Commit Graph

117917 Commits

Author SHA1 Message Date
Davide Italiano
41a6e6a698 [llvm-readobj/ELF] Teach how to decode DF_1_XXX flags
llvm-readobj -dynamic-table output.
Before:
0x000000006FFFFFFB unknown

After:
0x000000006FFFFFFB FLAGS_1 NOW ORIGIN

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238151 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 19:12:18 +00:00
Rafael Espindola
712c27f870 Move HasInstructions to MCSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238150 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 18:34:26 +00:00
Simon Pilgrim
4da23583b6 [X86][AVX2] Vectorized i16 shift operators
Part of D9474, this patch extends AVX2 v16i16 types to 2 x 8i32 vectors and uses i32 shift variable shifts before packing back to i16.

Adds AVX2 tests for v8i16 and v16i16 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238149 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 17:49:13 +00:00
Tom Stellard
e2b87dee1e R600/SI: Remove some unnecessary patterns from VINTRP multiclass
DisableEncoding and Constraints can be set using let statements around
the multiclass defs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238148 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 16:15:56 +00:00
Tom Stellard
38aad1c16a R600/SI: Fix bug with v_interp_p1_f32 instructions on 16 bank lds chips
The src and dst register cannot be the same on chips with 16 lds banks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238147 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 16:15:54 +00:00
Tom Stellard
cbb915183e R600/SI: Use NAME rather than opName as the key to the MCOpcode tables
This lets us drop a parameter the opName parameter to the VINTRP
multiclass and makes it possible to create multiple VINTRP defs
with the same asm mnemonic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238146 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 16:15:50 +00:00
Kit Barton
948ecae20e This patch adds support for the vector quadword add/sub instructions introduced
in POWER8:

vadduqm
vaddeuqm
vaddcuq
vaddecuq
vsubuqm
vsubeuqm
vsubcuq
vsubecuq
In addition to adding the instructions themselves, it also adds support for the
v1i128 type for intrinsics (Intrinsics.td, Function.cpp, and
IntrinsicEmitter.cpp).

http://reviews.llvm.org/D9081


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238144 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 15:49:26 +00:00
Rafael Espindola
68c5b83e12 Move bundle info from MCSectionData to MCSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238143 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 15:04:26 +00:00
Rafael Espindola
63b75630b4 Add a isBundleLocked helper to MCELFStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238142 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 14:57:35 +00:00
Rafael Espindola
b3eb86c875 Move LayoutOrder to MCSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238141 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 14:25:28 +00:00
Rafael Espindola
6cd7f1bca6 Use a simple initial value for the ordinal.
The odd value was only used by the ELF writer to check if the section was one
that it had created.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238140 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 14:18:24 +00:00
Rafael Espindola
8823110a85 Stop forwarding getOrdinal and setOrdinal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238139 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 14:12:48 +00:00
Rafael Espindola
98e5e8e3f6 Use default member initializes. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238138 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 14:04:31 +00:00
Rafael Espindola
84ff6c4ce7 Move Ordinal from MCSectionData to MCSection. NFC.
Part of the work to merge MCSectionData and MCSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238137 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 14:00:56 +00:00
Rafael Espindola
b9f5ce3a43 Simplify boolean conditional return statements.
Patch by Richard <legalize@xmission.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238134 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 13:50:21 +00:00
Benjamin Kramer
675da70da5 Refactor: Simplify boolean conditional return statements in llvm/lib/DebugInfo/DWARF
Use clang-tidy to simplify boolean conditional return statements. Patch by
Richard Thomson <legalize@xmission.com>!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238132 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 13:28:03 +00:00
Michael Kuperstein
8ffbb68a86 [X86] When pattern-matching scalar FMA3 intrinsics, don't re-arrange the first and second operands.
The semantics of the scalar FMA intrinsics are that the high vector elements are copied from the first source.
The existing pattern switches src1 and src2 around, to match the "213" order, which ends up tying the original src2 to the dest. Since the actual scalar fma3 instructions copy the high elements from the dest register, the wrong values are copied.

This modifies the pattern to leave src1 and src2 in their original order.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238131 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 12:35:25 +00:00
Elena Demikhovsky
17b7d6bf25 Added promotion to EXTRACT_SUBVECTOR operand.
I encountered with this case in one of KNL tests for i1 vectors.
v16i1 = EXTRACT_SUBVECTOR v32i1, x



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238130 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 11:33:13 +00:00
NAKAMURA Takumi
4d3b6d43cc Reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238126 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 01:43:34 +00:00
NAKAMURA Takumi
f61fb0c9a7 Prune CRLFs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238125 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 01:43:23 +00:00
Chandler Carruth
3dd00ff834 [Unroll] Switch from an eagerly populated SCEV cache to one that is
lazily built.

Also, make it a much more generic SCEV cache, which today exposes only
a reduced GEP model description but could be extended in the future to
do other profitable caching of SCEV information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238124 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 01:00:46 +00:00
Duncan P. N. Exon Smith
8ef4be78cd AsmPrinter: Make DIEValue::Ty private, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238123 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 17:03:15 +00:00
Duncan P. N. Exon Smith
518dcb905e AsmPrinter: Avoid creating symbols in DwarfStringPool
Stop creating symbols we don't need in `DwarfStringPool`.  The consumers
only call `DwarfStringPoolEntryRef::getSymbol()` when DWARF is
relocatable, so this just stops creating the unused symbols when it's
not.  This drops memory usage from 851 MB to 845 MB, around 0.7%.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238122 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:58:59 +00:00
Duncan P. N. Exon Smith
b976cabda3 AsmPrinter: Prune an include, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238121 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:54:59 +00:00
Duncan P. N. Exon Smith
6c44d1fc4e AsmPrinter: Remove dead code, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238120 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:51:29 +00:00
Duncan P. N. Exon Smith
9ec6380779 AsmPrinter: Avoid EmitLabelDifference() in DwarfAccelTable
Mint a new function, `AsmPrinter::emitDwarfStringOffset()`, which takes
a `DwarfStringPoolEntryRef`.  When DWARF is relocatable across sections,
this defers to `emitSectionOffset()` and emits the `MCSymbol`;
otherwise, just emit the offset directly, without using any intermediate
symbols.

`EmitLabelDifference()` is already optimized to emit absolute label
differences cheaply when possible, so there aren't any major memory
savings here (853 MB down to 851 MB, or 0.2%).  However, it prepares for
making the `MCSymbol`s in the `DwarfStringPool` optional.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238119 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:48:54 +00:00
Duncan P. N. Exon Smith
3755781deb AsmPrinter: Use DwarfStringPoolEntry in DwarfAccelTable, NFC
This is just an API change, but it prepares to stop using
`EmitLabelDifference()` when possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238118 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:44:32 +00:00
Duncan P. N. Exon Smith
24ad5c9e05 AsmPrinter: Make DIEString small
Expose the `DwarfStringPool` entry in a header, and store a pointer to
it directly in `DIEString`.  Instead of choosing at creation time how to
emit it, use the `dwarf::Form` to determine that at emission time.
Besides avoiding the other `DIEValue`, this shaves two pointers off of
`DIEString`; the data is now a single pointer.  This is a nice cleanup
on its own -- and drops memory usage from 861 MB down to 853 MB, around
0.9% -- but it's also preparation for passing `DIEValue`s by value.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238117 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:40:47 +00:00
Duncan P. N. Exon Smith
1717728066 AsmPrinter: Extract DwarfStringPoolEntry from DwarfStringPool, NFC
Extract out `DwarfStringPoolEntry` and `DwarfStringPoolRef` from
`DwarfStringPool` so that downstream users can start using
`DwarfStringPool::getEntry()` directly.  This will allow users to delay
the decision between emitting a symbol or an offset until later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238116 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:33:33 +00:00
Duncan P. N. Exon Smith
e3ae958f94 AsmPrinter: Emit the DwarfStringPool offset directly when possible
Change `DwarfStringPool` to calculate byte offsets on-the-fly, and
update `DwarfUnit::getLocalString()` to use a `DIEInteger` instead of a
`DIEDelta` when Dwarf doesn't use relocations (i.e., Mach-O).  This
eliminates another call to `EmitLabelDifference()`, and drops memory
usage from 865 MB down to 861 MB, around 0.5%.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238114 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:14:59 +00:00
Duncan P. N. Exon Smith
237137532a DebugInfo: Clarify test/DebugInfo/X86/stmt-list-multiple-compile-units.ll
This test was relying on the numbering of preceding .set directives, but
an upcoming commit is going to remove some of them.  Make the CHECKs
more nuanced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:10:35 +00:00
Duncan P. N. Exon Smith
8d2d4e2637 AsmPrinter: Refactor DwarfStringPool::getEntry(), NFC
Move `DwarfStringPool`'s `getEntry()` to the header (and make it a
member function) in preparation for calculating symbol offsets
on-the-fly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238112 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 16:06:08 +00:00
Vince Harron
556ca517ab Remove log2 dependency when building against Android API-9 SDK
Android's API-9 SDK is missing log2 builtins. A previous commit added
support for building against this API revision but this requires log2l
to be present.  (And it doesn't seem to be defined, despite being in
the headers.)

Author: pasaulais (Pierre-Andre Saulais)

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 13:24:31 +00:00
Renato Golin
4064cb4762 Move parseSubArch to ARMTargetParser. NFC
Using getCanonicalArchName() is the right way to parse ARM arch names.

Mapping ARMTargetParser IDs to Triple Arch IDs is temporary, until they
are merged into a TargetDescription class.

This was the last LLVM FIXME to move things to ARMTargetParser. Now on
to Clang and beyond.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238110 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 11:18:44 +00:00
Matt Arsenault
f44ed0919c Add target hook to allow merging stores of nonzero constants
On GPU targets, materializing constants is cheap and stores are
expensive, so only doing this for zero vectors was silly.

Most of the new testcases aren't optimally merged, and are for
later improvements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238108 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-24 00:51:27 +00:00
Davide Italiano
c009e842cb [Support/ELF] Add missing DF_1_XXX bits.
In preparation for adding support for decoding DF_FLAGS_1 to
llvm-readobj.

Differential Revision:	http://reviews.llvm.org/D9955
Reviewed by:	echristo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238107 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 23:08:28 +00:00
Benjamin Kramer
1de72bda4e Bump SmallString to the minimum required amount for raw_ostream to avoid allocation.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238104 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 17:20:53 +00:00
Benjamin Kramer
2b5e37952f [Mips] Prefer Twine::utohexstr over utohexstr, saves a string copy.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238103 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 16:53:07 +00:00
Benjamin Kramer
083d79a583 [AArch64] Clean up the ELF streamer a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238102 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 16:39:10 +00:00
Benjamin Kramer
24b6dadf2d [AArch64] Move AArch64TargetStreamer out of MCStreamer.h
It doesn't belong in the shared MC layer. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238101 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 16:15:10 +00:00
Aaron Ballman
a5d0a48209 Silencing a spurious -Wreturn-type warning; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238099 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 14:46:49 +00:00
Hal Finkel
43a5aa62d4 [PowerPC] Fix fast-isel when compare is split from branch
When the compare feeding a branch was in a different BB from the branch, we'd
try to "regenerate" the compare in the block with the branch, possibly trying
to make use of values not available there. Copy a page from AArch64's play book
here to fix the problem (at least in terms of correctness).

Fixes PR23640.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238097 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 12:18:10 +00:00
NAKAMURA Takumi
c1c3e6c7ec Update ExecutionEngine/LLVMBuild.txt, to add LLVMCodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238096 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 10:44:30 +00:00
Craig Topper
2077fc4acf Give more meaningful names than I and J to some for loop variables after converting to range-based loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238095 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 08:45:10 +00:00
Craig Topper
2b6e06c46a Fix an unused variable warning in release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238094 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 08:20:33 +00:00
Craig Topper
01fc7e7a0f Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238093 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 08:01:41 +00:00
Kostya Serebryany
762dbd0574 [lib/Fuzzer] doxygen-ify the comments for the user interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238086 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 02:12:05 +00:00
Duncan P. N. Exon Smith
b5f8c9b2ec AsmPrinter: Remove the vtable-entry from DIEValue
Remove all virtual functions from `DIEValue`, dropping the vtable
pointer from its layout.  Instead, create "impl" functions on the
subclasses, and use the `DIEValue::Type` to implement the dynamic
dispatch.

This is necessary -- obviously not sufficient -- for passing `DIEValue`s
around by value.  However, this change stands on its own: we make tons
of these.  I measured a drop in memory usage from 888 MB down to 860 MB,
or around 3.2%.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238084 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 01:45:07 +00:00
Duncan P. N. Exon Smith
804c199b75 CodeGen: Remove redundant DIETypeSignature::dump(), NFC
We already have this in `DIEValue`; no reason to shadow it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238082 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 01:26:26 +00:00
Kostya Serebryany
d434a0a1b2 [lib/Fuzzer] fully get rid of std::cerr in libFuzzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238081 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-23 01:22:35 +00:00