OSDN Git Service

android-x86/external-llvm.git
8 years agoHandle offsets larger than 32 bits.
Rafael Espindola [Thu, 14 Jan 2016 21:03:06 +0000 (21:03 +0000)]
Handle offsets larger than 32 bits.

David Majnemer noticed that it was not obvious what the behavior would
be if B.Offset - A.Offset could not fit in an int.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257803 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SLP] Vectorize the index computations of getelementptr instructions.
Matthew Simpson [Thu, 14 Jan 2016 20:46:27 +0000 (20:46 +0000)]
[SLP] Vectorize the index computations of getelementptr instructions.

This patch seeds the SLP vectorizer with getelementptr indices. The primary
motivation in doing so is to vectorize gather-like idioms beginning with
consecutive loads (e.g., g[a[0] - b[0]] + g[a[1] - b[1]] + ...). While these
cases could be vectorized with a top-down phase, seeding the existing bottom-up
phase with the index computations avoids the complexity, compile-time, and
phase ordering issues associated with a full top-down pass. Only bundles of
single-index getelementptrs with non-constant differences are considered for
vectorization.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257800 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Rename RoundUpToAlignment -> alignTo.
Rui Ueyama [Thu, 14 Jan 2016 20:43:11 +0000 (20:43 +0000)]
[Support] Rename RoundUpToAlignment -> alignTo.

Rounding up an integer m to a nearest multiple of n where n is a power
of 2 is used very often if you are writing code to emit binary files.
RoundUpToAlignment is a small function to do that. But we found that the
function has a small but annoying issue; the name is a bit too long.
Because it is used quite often, that hurts readability.

This patch is to rename the function. The original name is kept as a
forwarder, so that submitting this patch won't immediately break Clang
and other LLVM projects. Once I update all occurrences of RoundUpToAlignment,
I'll remove the old name entirely.

http://reviews.llvm.org/D16162

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257799 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAssert that a cmp function defines a total order.
Rafael Espindola [Thu, 14 Jan 2016 20:28:25 +0000 (20:28 +0000)]
Assert that a cmp function defines a total order.

Thanks to David Blaikie for noticing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257796 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SROA] Also insert a bit piece expression if only one piece is needed
Keno Fischer [Thu, 14 Jan 2016 20:06:34 +0000 (20:06 +0000)]
[SROA] Also insert a bit piece expression if only one piece is needed

Summary: If SROA creates only one piece (e.g. because the other is not needed),
it still needs to create a bit_piece expression if that bit piece is smaller
than the original size of the alloca.

Reviewers: aprantl

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257795 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeGen] Don't assume fp_to_fp16 produces i16 when legalizing it.
Ahmed Bougacha [Thu, 14 Jan 2016 19:45:36 +0000 (19:45 +0000)]
[CodeGen] Don't assume fp_to_fp16 produces i16 when legalizing it.

Since r230276, we support an improved legalization for f64->f16,
which goes through a temporary f32, improving codegen when
f32->f16 is legal but not f64->f16. This requires unsafe-fp-math.

However, that legalization assumed that the second step, producing
a pseudo-softened f16, had type i16. That's not true on targets
with illegal i16, such as ARM.

Use the initial f64->f16 result type instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257794 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoInclude TypeIndex. Again, the "check" target is not enough to catch this currently
Reid Kleckner [Thu, 14 Jan 2016 19:40:27 +0000 (19:40 +0000)]
Include TypeIndex. Again, the "check" target is not enough to catch this currently

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257793 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRename WinCodeViewLineTables to CodeViewDebug, similar to DwarfDebug
Reid Kleckner [Thu, 14 Jan 2016 19:25:04 +0000 (19:25 +0000)]
Rename WinCodeViewLineTables to CodeViewDebug, similar to DwarfDebug

Soon it will be responsible for more than line tables.

Reviewers: majnemer

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257792 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoExclude test-suite from CMake builds in test-release.sh
Hans Wennborg [Thu, 14 Jan 2016 19:21:14 +0000 (19:21 +0000)]
Exclude test-suite from CMake builds in test-release.sh

It's broken. In 3.7 there wasn't a CMake build for test-suite at all,
so we're not losing something we had before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257791 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[codeview] Dump CodeView inlinee lines subsection
Reid Kleckner [Thu, 14 Jan 2016 19:20:17 +0000 (19:20 +0000)]
[codeview] Dump CodeView inlinee lines subsection

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257790 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Utils] Fix incorrect dbg.declare store conversion
Keno Fischer [Thu, 14 Jan 2016 19:12:27 +0000 (19:12 +0000)]
[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

8 years agodsymutil: Provide better warnings when clang modules cannot be found.
Adrian Prantl [Thu, 14 Jan 2016 18:31:07 +0000 (18:31 +0000)]
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

8 years ago[PGO] [Coverage] put covmap into note section with no 'alloc flag' (Linux)
Xinliang David Li [Thu, 14 Jan 2016 18:09:45 +0000 (18:09 +0000)]
[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

8 years agoUse std::map::insert instead of emplace for libstdc++ 4.7
Reid Kleckner [Thu, 14 Jan 2016 18:03:29 +0000 (18:03 +0000)]
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

8 years agoPrint function names when they are referenced via TypeIndex
Reid Kleckner [Thu, 14 Jan 2016 17:52:01 +0000 (17:52 +0000)]
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

8 years ago[readobj] Add functionality to dump relocations inside of binary blobs
Reid Kleckner [Thu, 14 Jan 2016 17:51:57 +0000 (17:51 +0000)]
[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

8 years ago[codeview] Print relocations against code and data offset fields
Reid Kleckner [Thu, 14 Jan 2016 17:51:54 +0000 (17:51 +0000)]
[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

8 years agoRevert "Stop increasing alignment of externally-visible globals on ELF platforms."
James Y Knight [Thu, 14 Jan 2016 16:33:21 +0000 (16:33 +0000)]
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

8 years agoRevert "[ValueTracking] Understand more select patterns in ComputeKnownBits"
James Molloy [Thu, 14 Jan 2016 15:49:32 +0000 (15:49 +0000)]
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

8 years ago[Hexagon] Expand pseudo instruction Insert4
Krzysztof Parzyszek [Thu, 14 Jan 2016 15:37:16 +0000 (15:37 +0000)]
[Hexagon] Expand pseudo instruction Insert4

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257771 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUnxfail passing testcase on Hexagon
Krzysztof Parzyszek [Thu, 14 Jan 2016 15:24:15 +0000 (15:24 +0000)]
Unxfail passing testcase on Hexagon

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257770 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ValueTracking] Understand more select patterns in ComputeKnownBits
James Molloy [Thu, 14 Jan 2016 15:23:19 +0000 (15:23 +0000)]
[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

8 years ago[Hexagon] Handle branches with non-mbb operands
Krzysztof Parzyszek [Thu, 14 Jan 2016 15:05:27 +0000 (15:05 +0000)]
[Hexagon] Handle branches with non-mbb operands

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257768 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LTO] Add a run of LoopUnroll
James Molloy [Thu, 14 Jan 2016 15:00:09 +0000 (15:00 +0000)]
[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

8 years ago[ARM] Use the efficient version of BitVector::set and a static_assert.
Benjamin Kramer [Thu, 14 Jan 2016 14:33:04 +0000 (14:33 +0000)]
[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

8 years ago[docs] Improve the documentation on committing code reviewed on
Dan Liew [Thu, 14 Jan 2016 13:39:29 +0000 (13:39 +0000)]
[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

8 years agoInstructionsTest.cpp: Fix a warning. [-Wsign-compare]
NAKAMURA Takumi [Thu, 14 Jan 2016 09:21:49 +0000 (09:21 +0000)]
InstructionsTest.cpp: Fix a warning. [-Wsign-compare]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257752 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Assert that we have all use/users in the getters."
Michael Zolotukhin [Thu, 14 Jan 2016 09:02:45 +0000 (09:02 +0000)]
Revert "Assert that we have all use/users in the getters."

This reverts commit fdb838f3f8a8b6896bbbd5285555874eb3b748eb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257751 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GlobalsAA] Relax condition in checking globals as args to functions
Vaivaswatha Nagaraj [Thu, 14 Jan 2016 08:46:45 +0000 (08:46 +0000)]
[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

8 years agoAVX512: VMOVDQA32/64 (load) intrinsic implementation.
Igor Breger [Thu, 14 Jan 2016 07:56:04 +0000 (07:56 +0000)]
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

8 years agoRename local variable to avoid conflict
Xinliang David Li [Thu, 14 Jan 2016 06:38:52 +0000 (06:38 +0000)]
Rename local variable to avoid conflict

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257748 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[UnitTest] Fix warning, NFC.
Joseph Tremoulet [Thu, 14 Jan 2016 06:30:19 +0000 (06:30 +0000)]
[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

8 years ago[OperandBundles] Copy DebugLoc with calls/invokes
Joseph Tremoulet [Thu, 14 Jan 2016 06:21:42 +0000 (06:21 +0000)]
[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

8 years agoCleanup: shorten prefix to consistent with other decls /NFC
Xinliang David Li [Thu, 14 Jan 2016 06:21:25 +0000 (06:21 +0000)]
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

8 years ago[TableGen] Pass PassSubtarget flag into getCode instead of storing a copy of the...
Craig Topper [Thu, 14 Jan 2016 06:15:07 +0000 (06:15 +0000)]
[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

8 years ago[CodeView] Add support for dumping binary annotations
David Majnemer [Thu, 14 Jan 2016 06:12:30 +0000 (06:12 +0000)]
[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

8 years agoFix comments /NFC
Xinliang David Li [Thu, 14 Jan 2016 04:22:45 +0000 (04:22 +0000)]
Fix comments /NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257740 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PGO] clean up and documentation
Xinliang David Li [Thu, 14 Jan 2016 02:47:01 +0000 (02:47 +0000)]
[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

8 years ago[libFuzzer] suggest a dictionary to the user of some of the trace-based dictionary...
Kostya Serebryany [Thu, 14 Jan 2016 02:36:44 +0000 (02:36 +0000)]
[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

8 years ago[AArch64] Don't assume extractelt constant index when matching shuffle.
Ahmed Bougacha [Thu, 14 Jan 2016 02:12:30 +0000 (02:12 +0000)]
[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

8 years agoAdd virtual dtor
Xinliang David Li [Thu, 14 Jan 2016 02:10:49 +0000 (02:10 +0000)]
Add virtual dtor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257734 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWebAssembly: mark a few new failures
JF Bastien [Thu, 14 Jan 2016 01:49:22 +0000 (01:49 +0000)]
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

8 years agoMark remote-JIT tests as XFAIL, as well as win32, for targeting mingw32.
NAKAMURA Takumi [Thu, 14 Jan 2016 01:33:00 +0000 (01:33 +0000)]
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

8 years ago[X86] Don't alter HasOpaqueSPAdjustment after we've relied on it
David Majnemer [Thu, 14 Jan 2016 01:20:03 +0000 (01:20 +0000)]
[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

8 years ago[GC] Remove more dead code from Registry [NFCI]
Philip Reames [Thu, 14 Jan 2016 01:06:05 +0000 (01:06 +0000)]
[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

8 years agoFix Release build warning.
Philip Reames [Thu, 14 Jan 2016 00:55:51 +0000 (00:55 +0000)]
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

8 years ago[GC] Remove a bunch of unused complexity from Registry and RegistryParser [NFCI]
Philip Reames [Thu, 14 Jan 2016 00:45:15 +0000 (00:45 +0000)]
[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

8 years agollvm-profdata.cpp: Fix comment lines. [-Wdocumentation]
NAKAMURA Takumi [Thu, 14 Jan 2016 00:36:59 +0000 (00:36 +0000)]
llvm-profdata.cpp: Fix comment lines. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257726 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GCRoot] Assert preconditions to clarify behavior
Philip Reames [Thu, 14 Jan 2016 00:21:56 +0000 (00:21 +0000)]
[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

8 years ago[codeview] Regenerate C++ display name test case and update comments
Reid Kleckner [Thu, 14 Jan 2016 00:12:54 +0000 (00:12 +0000)]
[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

8 years agoStop increasing alignment of externally-visible globals on ELF
James Y Knight [Wed, 13 Jan 2016 23:59:19 +0000 (23:59 +0000)]
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

8 years ago[TLS] New lower emutls pass, fix linkage bugs.
Chih-Hung Hsieh [Wed, 13 Jan 2016 23:56:37 +0000 (23:56 +0000)]
[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

8 years agoAdd file missing from r257712
Reid Kleckner [Wed, 13 Jan 2016 23:48:32 +0000 (23:48 +0000)]
Add file missing from r257712

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257715 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] make CurrentUnit a POD object instead of vector to avoid extra allocations
Kostya Serebryany [Wed, 13 Jan 2016 23:46:01 +0000 (23:46 +0000)]
[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

8 years ago[codeview] Share more enums across the writer and the dumper
Reid Kleckner [Wed, 13 Jan 2016 23:44:57 +0000 (23:44 +0000)]
[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

8 years agoWebAssembly: fix build break introduced by ELFObjectWriter churn
JF Bastien [Wed, 13 Jan 2016 23:36:00 +0000 (23:36 +0000)]
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

8 years ago[Coverage] introduce class hierarchy (funcRecordReader) to support multiple versions...
Xinliang David Li [Wed, 13 Jan 2016 23:29:33 +0000 (23:29 +0000)]
[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

8 years agoAdd a triple to the test.
Rafael Espindola [Wed, 13 Jan 2016 23:13:38 +0000 (23:13 +0000)]
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

8 years agoRevert r257699 -- windows buildbot failure TBI
Xinliang David Li [Wed, 13 Jan 2016 23:12:53 +0000 (23:12 +0000)]
Revert r257699 -- windows buildbot failure TBI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257703 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] make sure we find buffer overflow in the input buffer. Previously, re...
Kostya Serebryany [Wed, 13 Jan 2016 23:02:30 +0000 (23:02 +0000)]
[libFuzzer] make sure we find buffer overflow in the input buffer. Previously, re-using the same vector object was hiding buffer overflows (unless we used annotated vector)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257701 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agomove return variable declarations down to where they are actually used; NFCI
Sanjay Patel [Wed, 13 Jan 2016 23:01:57 +0000 (23:01 +0000)]
move return variable declarations down to where they are actually used; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257700 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Coverage] introduce class hierarchy (funcRecordReader) to support multiple versions...
Xinliang David Li [Wed, 13 Jan 2016 22:58:42 +0000 (22:58 +0000)]
[Coverage] introduce class hierarchy (funcRecordReader) to support multiple versions of coverage data

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@257699 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoConvert a few assert failures into proper errors.
Rafael Espindola [Wed, 13 Jan 2016 22:56:57 +0000 (22:56 +0000)]
Convert a few assert failures into proper errors.

Fixes PR25944.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257697 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSimplify. NFC.
Rafael Espindola [Wed, 13 Jan 2016 22:23:36 +0000 (22:23 +0000)]
Simplify. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257689 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix formatting; NFC
Sanjay Patel [Wed, 13 Jan 2016 22:17:13 +0000 (22:17 +0000)]
fix formatting; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257688 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agohasNUses(0) == use_empty() ; NFCI
Sanjay Patel [Wed, 13 Jan 2016 22:16:48 +0000 (22:16 +0000)]
hasNUses(0) == use_empty() ; NFCI

Also, improve variable name and remove unnecessary braces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257687 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDisplay detailed profile summary in llvm-profdata tool.
Easwaran Raman [Wed, 13 Jan 2016 21:44:36 +0000 (21:44 +0000)]
Display detailed profile summary in llvm-profdata tool.

This adds a detailed profile summary in llvm-profdata. The summary is in the
form of one or more triples of the form (P, N, M) which is interpreted as if
we look at the Top-N counts in the profile, their sum accounts for P percentage
of the sum of all counts in the program and the minimum count in the Top-N is M.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257680 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Fix the options controlling jump table generation
Krzysztof Parzyszek [Wed, 13 Jan 2016 21:43:13 +0000 (21:43 +0000)]
[Hexagon] Fix the options controlling jump table generation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257679 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agorangify; NFCI
Sanjay Patel [Wed, 13 Jan 2016 21:39:26 +0000 (21:39 +0000)]
rangify; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257677 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodon't duplicate comments that are in the header file; NFC
Sanjay Patel [Wed, 13 Jan 2016 21:38:23 +0000 (21:38 +0000)]
don't duplicate comments that are in the header file; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257676 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodon't repeat function names in comments; NFC
Sanjay Patel [Wed, 13 Jan 2016 21:36:50 +0000 (21:36 +0000)]
don't repeat function names in comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257675 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRelax testcase so it works on Windows.
Adrian Prantl [Wed, 13 Jan 2016 21:09:48 +0000 (21:09 +0000)]
Relax testcase so it works on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257667 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Update ISA version for FIJI
Changpeng Fang [Wed, 13 Jan 2016 20:39:25 +0000 (20:39 +0000)]
AMDGPU/SI: Update ISA version for FIJI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257666 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix instance of -Wcovered-switch-default
Reid Kleckner [Wed, 13 Jan 2016 20:39:22 +0000 (20:39 +0000)]
Fix instance of -Wcovered-switch-default

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257665 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodsymutil: Only warn about missing clang modules once.
Adrian Prantl [Wed, 13 Jan 2016 20:26:00 +0000 (20:26 +0000)]
dsymutil: Only warn about missing clang modules once.

rdar://problem/22269336

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257664 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove bashism from merge.sh: POSIX sh does not have the `function`
Dimitry Andric [Wed, 13 Jan 2016 19:48:50 +0000 (19:48 +0000)]
Remove bashism from merge.sh: POSIX sh does not have the `function`
reserved word, and it is even superfluous in bash, for this particular
instance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257663 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix build of CodeView library
Reid Kleckner [Wed, 13 Jan 2016 19:45:06 +0000 (19:45 +0000)]
Fix build of CodeView library

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257662 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUnbreak the sphinx build
Hans Wennborg [Wed, 13 Jan 2016 19:33:49 +0000 (19:33 +0000)]
Unbreak the sphinx build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257659 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[readobj] Expand CodeView dumping functionality
Reid Kleckner [Wed, 13 Jan 2016 19:32:35 +0000 (19:32 +0000)]
[readobj] Expand CodeView dumping functionality

This rewrites and expands the existing codeview dumping functionality in
llvm-readobj using techniques similar to those in lib/Object. This defines a
number of new records and enums useful for reading memory mapped codeview
sections in COFF objects.

The dumper is intended as a testing tool for LLVM as it grows more codeview
output capabilities.

Reviewers: majnemer

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257658 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Add an assertion to catch unexpected MCFixupKindInfo flags.
Dan Gohman [Wed, 13 Jan 2016 19:31:57 +0000 (19:31 +0000)]
[WebAssembly] Add an assertion to catch unexpected MCFixupKindInfo flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257657 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] MCFixupKindInfo's TargetSize is in bits rather than bytes.
Dan Gohman [Wed, 13 Jan 2016 19:29:37 +0000 (19:29 +0000)]
[WebAssembly] MCFixupKindInfo's TargetSize is in bits rather than bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257655 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodon't repeat function names in comments; NFC
Sanjay Patel [Wed, 13 Jan 2016 19:01:43 +0000 (19:01 +0000)]
don't repeat function names in comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257649 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix struct/class mismatch for MachineSchedContext
Hans Wennborg [Wed, 13 Jan 2016 18:59:45 +0000 (18:59 +0000)]
Fix struct/class mismatch for MachineSchedContext

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257648 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agorangify; NFCI
Sanjay Patel [Wed, 13 Jan 2016 18:37:28 +0000 (18:37 +0000)]
rangify; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257646 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid undefined behavior in LinkAllPasses.h
Dimitry Andric [Wed, 13 Jan 2016 18:29:46 +0000 (18:29 +0000)]
Avoid undefined behavior in LinkAllPasses.h

The LinkAllPasses.h file is included in several main programs, to force
a large number of passes to be linked in.  However, the ForcePassLinking
constructor uses undefined behavior, since it calls member functions on
`nullptr`, e.g.:

      ((llvm::Function*)nullptr)->viewCFGOnly();
      llvm::RGPassManager RGM;
      ((llvm::RegionPass*)nullptr)->runOnRegion((llvm::Region*)nullptr, RGM);

When the optimization level is -O2 or higher, the code below the first
nullptr dereference is optimized away, and replaced by `ud2` (on x86).

Therefore, the calls after that first dereference are never emitted.  In
my case, I noticed there was no call to `llvm::sys::RunningOnValgrind()`!

Replace instances of dereferencing `nullptr` with either objects on the
stack, or regular function calls.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257645 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodon't repeat names in comments ; NFC
Sanjay Patel [Wed, 13 Jan 2016 17:43:35 +0000 (17:43 +0000)]
don't repeat names in comments ; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257643 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate version to 3.9.
Hans Wennborg [Wed, 13 Jan 2016 17:32:32 +0000 (17:32 +0000)]
Update version to 3.9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257627 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 17:23:52 +0000 (17:23 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257626 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Fix a GPU hang with POS_W_FLOAT enabled
Marek Olsak [Wed, 13 Jan 2016 17:23:20 +0000 (17:23 +0000)]
AMDGPU/SI: Fix a GPU hang with POS_W_FLOAT enabled

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257625 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Add tests for non-void functions and InitialPSInputAddr
Marek Olsak [Wed, 13 Jan 2016 17:23:15 +0000 (17:23 +0000)]
AMDGPU/SI: Add tests for non-void functions and InitialPSInputAddr

Reviewers: tstellarAMD, arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257624 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Remove ending s_endpgm from non-void functions
Marek Olsak [Wed, 13 Jan 2016 17:23:12 +0000 (17:23 +0000)]
AMDGPU/SI: Remove ending s_endpgm from non-void functions

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257623 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Add s_waitcnt at the end of non-void functions
Marek Olsak [Wed, 13 Jan 2016 17:23:09 +0000 (17:23 +0000)]
AMDGPU/SI: Add s_waitcnt at the end of non-void functions

Summary:
v2: Make ReturnsVoid private, so that I can another 8 lines of code and
    look more productive.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257622 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Add support for non-void functions
Marek Olsak [Wed, 13 Jan 2016 17:23:04 +0000 (17:23 +0000)]
AMDGPU/SI: Add support for non-void functions

Summary:
Return values can be stored in SGPRs (i32) and VGPRs (f32).

This will be used by functions which expect some bytecode or other binary to
be appended at the end. It allows defining in which registers the return
values will be stored.

v2: don't do this for compute shaders

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257621 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssemly] Invalidate liveness in CFG stackifier
Derek Schuff [Wed, 13 Jan 2016 17:10:28 +0000 (17:10 +0000)]
[WebAssemly] Invalidate liveness in CFG stackifier

WebAssemblyCFGStackify does not track liveness for EXPR_STACK, causing
verifier failure if liveness has not already been invalidated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257620 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 16:46:41 +0000 (16:46 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257617 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lit] Fix handling of per test timeout when the installed psutil version
Dan Liew [Wed, 13 Jan 2016 16:43:49 +0000 (16:43 +0000)]
[lit] Fix handling of per test timeout when the installed psutil version
is < ``2.0``.

Older versions of psutil (e.g. ``1.2.1`` which is the version shipped with
Ubuntu 14.04) use a different API for retrieving the child processes.
To handle this try the new API first and if that fails try the old API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257616 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 16:34:10 +0000 (16:34 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257613 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo
Sanjay Patel [Wed, 13 Jan 2016 16:30:44 +0000 (16:30 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257611 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Add SI Machine Scheduler
Nicolai Haehnle [Wed, 13 Jan 2016 16:10:10 +0000 (16:10 +0000)]
AMDGPU/SI: Add SI Machine Scheduler

Summary:
It is off by default, but can be used
with --misched=si

Patch by: Axel Davy

Reviewers: arsenm, tstellarAMD, nhaehnle

Subscribers: nhaehnle, solenskiner, arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257609 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFixing warning by adding the X86ISD::VROTRI case.
Michael Zuckerman [Wed, 13 Jan 2016 15:48:42 +0000 (15:48 +0000)]
Fixing warning by adding the X86ISD::VROTRI case.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257607 91177308-0d34-0410-b5e6-96231b3b80d8