Commit Graph

126291 Commits

Author SHA1 Message Date
Reid Kleckner
c2046c01da [codeview] Dump CodeView inlinee lines subsection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257790 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 19:20:17 +00:00
Keno Fischer
4d6ccf4c99 [Utils] Fix incorrect dbg.declare store conversion
Summary: The dbg.declare -> dbg.value conversion did not check which operand of
the store instruction the alloca was passed to. As a result code that stored the
address of an alloca, rather than storing to the alloca, would still trigger
the conversion routine, leading to the insertion of an incorrect dbg.value
intrinsic.

Reviewers: aprantl

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16169

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257787 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 19:12:27 +00:00
Adrian Prantl
b363d33293 dsymutil: Provide better warnings when clang modules cannot be found.
rdar://problem/22823264

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 18:31:07 +00:00
Xinliang David Li
c4dee26e9f [PGO] [Coverage] put covmap into note section with no 'alloc flag' (Linux)
Coverage mapping data is not referenced by runtime, and they won't be dumped
into profile data. There is no need to allocate memory for covmap sections.
A good side effect of this change is that the coverage map data won't be mistakenly
 garbage collected by the linker (for Gold linker only, BFD linker has an issue where the a bug is filed).
Tested with clang build with instrumentation and -fcoverage-mapping and linker GC. The size of
 covmap section is ~17.6M so the text segment size will be reduced by this amount with this change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257781 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 18:09:45 +00:00
Reid Kleckner
cffba721f4 Use std::map::insert instead of emplace for libstdc++ 4.7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257780 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 18:03:29 +00:00
Reid Kleckner
f0480876f0 Print function names when they are referenced via TypeIndex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257778 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 17:52:01 +00:00
Reid Kleckner
a9d04d084c [readobj] Add functionality to dump relocations inside of binary blobs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257777 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 17:51:57 +00:00
Reid Kleckner
51bb529b5b [codeview] Print relocations against code and data offset fields
These fields are almost always zero. However, there are relocations
against them, and we should print the relocation symbol with it as
SYM+0xNN.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257776 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 17:51:54 +00:00
James Y Knight
ee7d060ab8 Revert "Stop increasing alignment of externally-visible globals on ELF platforms."
This reverts commit r257719, due to PR26144.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257775 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 16:33:21 +00:00
James Molloy
def08208bf Revert "[ValueTracking] Understand more select patterns in ComputeKnownBits"
This reverts commit r257769. Backing this out because of stage2 failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257773 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:49:32 +00:00
Krzysztof Parzyszek
edec0136f0 [Hexagon] Expand pseudo instruction Insert4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257771 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:37:16 +00:00
Krzysztof Parzyszek
cc26b12e85 Unxfail passing testcase on Hexagon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257770 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:24:15 +00:00
James Molloy
f59da46fd7 [ValueTracking] Understand more select patterns in ComputeKnownBits
Some patterns of select+compare allow us to know exactly the value of the uppermost bits in the select result. For example:

  %b = icmp ugt i32 %a, 5
  %c = select i1 %b, i32 2, i32 %a

Here we know that %c is bounded by 5, and therefore KnownZero = ~APInt(5).getActiveBits() = ~7.

There are several such patterns, and this patch attempts to understand a reasonable subset of them - namely when the base values are the same (as above), and when they are related by a simple (add nsw), for example (add nsw %a, 4) and %a.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257769 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:23:19 +00:00
Krzysztof Parzyszek
ba4dbafbf9 [Hexagon] Handle branches with non-mbb operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257768 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:05:27 +00:00
James Molloy
994f24a703 [LTO] Add a run of LoopUnroll
Loop trip counts can often be resolved during LTO. We should obviously be unrolling small loops once those trip counts have been resolved, but we weren't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257767 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 15:00:09 +00:00
Benjamin Kramer
5f2bc6c766 [ARM] Use the efficient version of BitVector::set and a static_assert.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 14:33:04 +00:00
Dan Liew
10387d22ff [docs] Improve the documentation on committing code reviewed on
Phabricator to trunk.

The previous documentation had a few issues:

* It did not make it explicit that code could be
committed without using the Arcanist tool and how this should be done.

* There was also an implicit assumption on using Subversion
rather than git-svn in the example using Arcanist. The documentation now
explicitly mentions both cases and details how to commit to trunk in
each case.

Reviewers: klimek, probinson

Subscribers: probinson, nwilson, reames, llvm-commits

Differential Revision: http://reviews.llvm.org/D15801

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257764 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 13:39:29 +00:00
NAKAMURA Takumi
92d091bf6f InstructionsTest.cpp: Fix a warning. [-Wsign-compare]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257752 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 09:21:49 +00:00
Michael Zolotukhin
af6e8973aa Revert "Assert that we have all use/users in the getters."
This reverts commit fdb838f3f8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257751 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 09:02:45 +00:00
Vaivaswatha Nagaraj
741199b113 [GlobalsAA] Relax condition in checking globals as args to functions
Summary:
Since globals may escape as function arguments (even when they have been 
found to be non-escaping, because of optimizations such as memcpyoptimizer
that replaces stores with memcpy), all arguments to a function are checked
during query to make sure they are identifiable. At that time, also ensure
we return a conservative result only if the arguments don't alias to our global.

Reviewers: hfinkel, jmolloy

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16140

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257750 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 08:46:45 +00:00
Igor Breger
f8ccddcb89 AVX512: VMOVDQA32/64 (load) intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16142

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257749 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 07:56:04 +00:00
Xinliang David Li
183e87ecde Rename local variable to avoid conflict
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257748 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:38:52 +00:00
Joseph Tremoulet
6f91687d11 [UnitTest] Fix warning, NFC.
Use an unsigned literal to avoid signedness mismatch in the compare.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257747 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:30:19 +00:00
Joseph Tremoulet
0d05e6c90c [OperandBundles] Copy DebugLoc with calls/invokes
Summary:
The overloads of CallInst::Create and InvokeInst::Create that are used to
adjust operand bundles purport to create a new instruction "identical in
every way except [for] the operand bundles", so copy the DebugLoc along
with everything else.


Reviewers: sanjoy, majnemer

Subscribers: majnemer, dblaikie, llvm-commits

Differential Revision: http://reviews.llvm.org/D16157

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257745 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:21:42 +00:00
Xinliang David Li
94d8cb3cbf Cleanup: shorten prefix to consistent with other decls /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257744 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:21:25 +00:00
Craig Topper
efefcdd53d [TableGen] Pass PassSubtarget flag into getCode instead of storing a copy of the flag in every AsmWriterOperand. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257743 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:15:07 +00:00
David Majnemer
294255bbe4 [CodeView] Add support for dumping binary annotations
Binary annotations are encoded along the lines of UTF-8 and ECI but with
a few minor differences.

The algorithm specified in "ECMA-335 CLI Section II.3.2 - Blobs and
Signatures" is used to compress binary annotations.  Signed binary
annotations are encoded like unsigned annotations except the sign bit is
rotated left to reduce the number of bits needed to be encoded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257742 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:12:30 +00:00
Xinliang David Li
e6075bdf86 Fix comments /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 04:22:45 +00:00
Xinliang David Li
5fd06e2add [PGO] clean up and documentation
Introduce enum for indexed format versions and 
document indexed format change history.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 02:47:01 +00:00
Kostya Serebryany
a416b73b12 [libFuzzer] suggest a dictionary to the user of some of the trace-based dictionary entries were successful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257736 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 02:36:44 +00:00
Ahmed Bougacha
7b82860fa4 [AArch64] Don't assume extractelt constant index when matching shuffle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257735 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 02:12:30 +00:00
Xinliang David Li
a4ccbcef22 Add virtual dtor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257734 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 02:10:49 +00:00
JF Bastien
d9de69f705 WebAssembly: mark a few new failures
A recent change introduced this assertion failure in some corner cases.

Repro:
mkdir /s/wasm/torture-out ; time /s/wasm/waterfall/src/compile_torture_tests.py --c /s/llvm/out/bin/clang --cxx /s/llvm/out/bin/clang++ --testsuite /s/gcc/gcc/testsuite --fails /s/llvm/llvm/lib/Target/WebAssembly/known_gcc_test_failures.txt --out /s/wasm/torture-out

Or look on the wasm integration bot:
https://build.chromium.org/p/client.wasm.llvm/console

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257733 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 01:49:22 +00:00
NAKAMURA Takumi
e9382fe577 Mark remote-JIT tests as XFAIL, as well as win32, for targeting mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 01:33:00 +00:00
David Majnemer
f7cfdf8b26 [X86] Don't alter HasOpaqueSPAdjustment after we've relied on it
We rely on HasOpaqueSPAdjustment not changing after we've calculated
things based on it.  Things like whether or not we can use 'rep;movs' to
copy bytes around, that sort of thing.  If it changes, invariants in the
backend will quietly break.  This situation arose when we had a call to
memcpy *and* a COPY of the FLAGS register where we would attempt to
reference local variables using %esi, a register that was clobbered by
the 'rep;movs'.

This fixes PR26124.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 01:20:03 +00:00
Philip Reames
103a36146c [GC] Remove more dead code from Registry [NFCI]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257729 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 01:06:05 +00:00
Philip Reames
7a335f89b7 Fix Release build warning.
A value used only in an assert.  Again.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257728 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:55:51 +00:00
Philip Reames
3a4727c413 [GC] Remove a bunch of unused complexity from Registry and RegistryParser [NFCI]
The only two Registries we have in the system are the GCStrategy and GCMetadataPrinter ones.  Registry has a bunch of problems - for instance, order of initialization is undefined - and the code was overly general for what was actually used.  I hope to completely kill Registry in the near future, but for now, just delete all the unused listener and parsing support.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:45:15 +00:00
NAKAMURA Takumi
dda3410d81 llvm-profdata.cpp: Fix comment lines. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:36:59 +00:00
Philip Reames
f7c44aa964 [GCRoot] Assert preconditions to clarify behavior
This code isn't reachable if the GFI (GCFunctionInfo*) is null.  Clarify this by adding an assert and removing an always taken if.  



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257724 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:21:56 +00:00
Reid Kleckner
5353c0fbdd [codeview] Regenerate C++ display name test case and update comments
Clang generates good display names for codeview since r255744, and the
change to make LLVM use them was accidentally included in r257658.

This change just updates the comments and test case to reflect reality
better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257723 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 00:12:54 +00:00
James Y Knight
326b7ceee0 Stop increasing alignment of externally-visible globals on ELF
platforms.

With ELF, the alignment of a global variable in a shared library will
get copied into an executables linked against it, if the executable even
accesss the variable. So, it's not possible to implicitly increase
alignment based on access patterns, or you'll break existing binaries.

This happened to affect libc++'s std::cout symbol, for example. See
thread: http://thread.gmane.org/gmane.comp.compilers.clang.devel/45311

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257719 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:59:19 +00:00
Chih-Hung Hsieh
08ba2ca688 [TLS] New lower emutls pass, fix linkage bugs.
Previous implementation in http://reviews.llvm.org/D10522
created external references to __emutls_v.* variables.
Such references are inaccurate and cannot be handled by
all linkers, e.g. Android dynamic and gold linkers for aarch64.

Now a new LowerEmuTLS pass to go through all global variables,
and add emutls_v.* and emutls_t.* variables.
These __emutls* variables have the same linkage and
visibility as the associated user defined TLS variable.

Also removed old code that dump __emutls* variables in AsmPrinter.cpp,
and updated TLS unit tests.

Differential Revision: http://reviews.llvm.org/D15300



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257718 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:56:37 +00:00
Reid Kleckner
c40a833c41 Add file missing from r257712
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257715 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:48:32 +00:00
Kostya Serebryany
92e8dcd607 [libFuzzer] make CurrentUnit a POD object instead of vector to avoid extra allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257713 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:46:01 +00:00
Reid Kleckner
13d3e2ec58 [codeview] Share more enums across the writer and the dumper
Moves some .def files into include/DebugInfo/CodeView.

Aslo remove a 'using namespace' directive from a header in readobj and
update the uses of the endian helper types to compensate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257712 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:44:57 +00:00
JF Bastien
ad2da49a99 WebAssembly: fix build break introduced by ELFObjectWriter churn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257709 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:36:00 +00:00
Xinliang David Li
8a0c782515 [Coverage] introduce class hierarchy (funcRecordReader) to support multiple versions of coverage data
[resubmit after fixing build bot failures: qualify make_unique and eliminate -Wcovered-switch-default warning.
With the planned size reduction change, the coverage format version is expected to be bumped up. This patch adds necessary support such that backward compatibility can be kept with maximal code sharing. Reading different versions of coverage data just requires instantiating the reader according to the version.

No functional change is intended.

Differiential Revision: http://reviews.llvm.org/D16133


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257708 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:29:33 +00:00
Rafael Espindola
b09c6d4e92 Add a triple to the test.
Sorry for forgetting it the first time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:13:38 +00:00
Xinliang David Li
0d31a22edd Revert r257699 -- windows buildbot failure TBI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 23:12:53 +00:00