Commit Graph

117746 Commits

Author SHA1 Message Date
Elena Demikhovsky
55fd78065f AVX-512: fixed a bug in lowering VSELECT for 512-bit vector
https://llvm.org/bugs/show_bug.cgi?id=23634



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238195 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 11:32:39 +00:00
Michael Kuperstein
d714fcf5c8 Use std::bitset for SubtargetFeatures.
Previously, subtarget features were a bitfield with the underlying type being uint64_t. 
Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset.
No functional change.

The first several times this was committed (e.g. r229831, r233055), it caused several buildbot failures.
Apparently the reason for most failures was both clang and gcc's inability to deal with large numbers (> 10K) of bitset constructor calls in tablegen-generated initializers of instruction info tables. 
This should now be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238192 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 10:47:10 +00:00
Daniel Sanders
bda72d8098 [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.
Summary:
Following on from r209907 which made personality encodings indirect, do the
same for TType encodings. This fixes the case where a try/catch block needs
to generate references to, for example, std::exception in the
.gcc_except_table.

This commit uses DW_EH_PE_sdata8 for N64 as far as is possible at the moment.
However, it is possible to end up with DW_EH_PE_sdata4 when a TargetMachine is
not available. There's no risk of issues with inconsistency here since the
tables are self describing but it does mean there is a small chance of the
PC-relative offset being out of range for particularly large programs.

Reviewers: petarj

Reviewed By: petarj

Subscribers: srhines, joerg, tberghammer, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238190 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 10:19:18 +00:00
Simon Atanasyan
eda9f8aa74 [mips] Move some structures represent MIPS specific ELF sections from LLD to LLVM
That allows to reuse the code in other tools like llvm-readobj etc.

No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238188 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 08:48:14 +00:00
Craig Topper
7b0f8fc600 [TableGen] Fix line wrapping logic for the autogenerated header to use math that makes more sense (at least to me).
The old code had a bug if the description was between 75 and 85 characters or so as it substracted PSLen from Desc.size() instead of MAX_LINE_LEN in the compare. It also calculated odd values for PosE on the last split and just let StringRef::slice take care of it being larger than the description string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238187 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 08:07:56 +00:00
Craig Topper
c9739ec212 [TableGen] Rewrite an assert to not do a bunch unsigned math and then try to ensure the result is a positive number.
I think the fact that it was explicitly excluding 0 kept this from being a tautology. The exclusion of 0 for the old math was also a bug that's easily hit if the description gets split into multiple lines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238186 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 08:07:49 +00:00
Craig Topper
88008cb710 [TableGen] Put a space between '*' and description in the autogenerated tablegen header. Minor cleanup in surrounding code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238185 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 08:07:45 +00:00
Craig Topper
d0185f83c6 [TableGen] Fix indentation. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238181 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 06:48:47 +00:00
Craig Topper
cfacb30e5d [TableGen] Include header for each cpp file first. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238180 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 06:48:46 +00:00
Craig Topper
d60caada8b [TableGen] Remove unnecessary include and just forward declare. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238179 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 06:48:43 +00:00
Craig Topper
a274efbc67 [TableGen] Remove unneeded namespace around a function. Just put llvm:: on the definition since it's already declared in a header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238178 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 06:48:41 +00:00
Craig Topper
ef92f29b75 [TableGen] Use 'static' instead of an anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238177 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 06:48:38 +00:00
Rafael Espindola
2224f64c6d Remove most uses of MCSectionData from MCAssembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238172 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 02:17:21 +00:00
Rafael Espindola
ea3533b4c6 Stop using MCSectionData in MCAsmLayout.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238170 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 02:00:36 +00:00
Rafael Espindola
369611994b Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238168 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 01:56:56 +00:00
Rafael Espindola
eac71e23fd Move MCSection destruction to MCContext::reset.
Fixes the leaks when running llc.

Also found by an asan bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238167 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 01:52:19 +00:00
Rafael Espindola
1826cd69f3 Stop using MCSectionData in MCMachObjectWriter.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238165 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 01:15:30 +00:00
Rafael Espindola
5c84463094 Remove dead forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238164 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 00:55:28 +00:00
Rafael Espindola
504473e6ae Stop using MCSectionData in MCExpr.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238163 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 00:52:18 +00:00
Rafael Espindola
f363960679 Return a MCSection from MCFragment::getParent().
Another step in merging MCSectionData and MCSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238162 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 00:36:57 +00:00
Rafael Espindola
be38d7cb8c Call the destructors of the MCSections.
They now contain the fragments. If we don't call the destructors the
fragments leak.

Found by an asan bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238161 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 00:32:28 +00:00
Rafael Espindola
68e7d22de4 Store a MCSection in MCFragment.
Part of the work to merge MCSectionData into MCSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238160 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 23:48:22 +00:00
Rafael Espindola
e86bc46939 Turn MCSectionData into a field of MCSection.
This also changes MCAssembler to store a vector of MCSections instead of an
iplist of MCSectionData.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238159 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 23:14:17 +00:00
Rafael Espindola
5e435847b0 Move MCSectionData to MCSection.h.
Another step in merging MCSectionData and MCSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238158 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 22:57:48 +00:00
Rafael Espindola
50c2fe1d5c Remove dead code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238157 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 22:07:33 +00:00
Rafael Espindola
ab78d67435 Make a few MCSectionELF& variables const. NFC.
This just reduces the noise from another patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238156 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 21:56:55 +00:00
Rafael Espindola
0d46e8a420 Insert MCSectionData into the section list directly in getOrCreateSectionData.
Removing the logic from the constructor will make it easier to merge
MCSectionData and MCSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238155 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 20:39:23 +00:00
Craig Topper
002c5281ef Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238154 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 20:01:18 +00:00
Bjorn Steinbrink
0cb6d37dea Remove conflicting attributes before adding deduced readonly/readnone
Summary:
In case of functions that have a pointer argument and only pass it to
each other, the function attributes pass deduces that the pointer should
get the readnone attribute, but fails to remove a readonly attribute
that may already have been present.

Reviewers: nlewycky

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238152 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-25 19:46:38 +00:00
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