Commit Graph

123156 Commits

Author SHA1 Message Date
Vasileios Kalintiris
9f2026ed3f [mips] Interrupt attribute support for mips32r2+.
Summary:
This patch adds support for using the "interrupt" attribute on Mips
for interrupt handling functions. At this time only mips32r2+ with the
o32 ABI with the static relocation model is supported. Unsupported
configurations will be rejected

Patch by Simon Dardis (+ clang-format & some trivial changes to follow the
LLVM coding standards by me).

Reviewers: mpf, dsanders

Subscribers: dsanders, vkalintiris, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251286 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 12:38:43 +00:00
Igor Breger
40b928c9fe AVX-512: Use correct extract vector length.
Bug https://llvm.org/bugs/show_bug.cgi?id=25318

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251285 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 12:26:34 +00:00
Silviu Baranga
e1ed72f459 [SCEV] Factor out common visiting patterns for SCEV rewriters. NFC.
Summary:
Add a SCEVRewriteVisitor class which contains the common
visiting patterns used when rewriting SCEVs.

SCEVParameterRewriter and SCEVApplyRewriter now inherit
from SCEVRewriteVisitor (and are therefore much simpler).

Reviewers: anemet, mzolotukhin, sanjoy

Subscribers: rengolin, llvm-commits, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251283 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 11:18:31 +00:00
Silviu Baranga
ebacf44320 [InstCombine] Teach instcombine not to create extra PHI nodes when folding GEPs
Summary:
InstCombine tries to transform GEP(PHI(GEP1, GEP2, ..)) into GEP(GEP(PHI(...))
when possible. However, this may leave the old PHI node around. Even if we
do end up folding the GEPs, having an extra PHI node might not be beneficial.

This change makes the transformation more conservative. We now only do this if
the PHI has only one use, and can therefore be removed after the transformation.

Reviewers: jmolloy, majnemer

Subscribers: mcrosier, mssimpso, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251281 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 10:25:05 +00:00
James Molloy
82ace96a30 [ARM] Handle the inline asm constraint type 'o'
This means "memory with offset" and requires very little plumbing to get working. This fixes PR25317.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251280 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 10:04:52 +00:00
Benjamin Kramer
6f975c928c Drop code after unreachable. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251278 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 09:55:45 +00:00
Igor Breger
31a3f5f4a1 AVX512: Add AVX-512 not materializable instructions.
Otherwise value can be reused , despite its value could be changed - produces incorrect assembler.

https://llvm.org/bugs/show_bug.cgi?id=25270

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251275 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 08:37:12 +00:00
Lang Hames
540bea1f52 [Orc] Add license header to OrcTargetSupport.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251274 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 06:40:28 +00:00
Lang Hames
88b1f94ab5 [Orc] In the CompileOnDemand layer, wrap module ownership in order to preserve
the module pointer type passed in by the user.

The previous ownership scheme, where the user pointer was always moved into a
std::shared_ptr, breaks if the user passes in a raw pointer.

Discovered while working on the Orc C API, which should be landing shortly.
I expect to include a test-case with that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251273 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 06:37:04 +00:00
David Majnemer
c08caf7413 Update test to take into account for r251271.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251272 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 03:34:29 +00:00
David Majnemer
434302d503 [MC] Add support for GNU as-compatible binary operator precedence
GNU as and Darwin give the various binary operators different
precedence.  LLVM's MC supported the Darwin semantics but not the GNU
semantics.

This fixes PR25311.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251271 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 03:15:34 +00:00
David Majnemer
7e2b51ddb0 [MC] Don't crash when .word is given bogus values
We didn't validate that the .word directive was given a sane value,
leading to crashes when we attempt to write out the object file.

Instead, perform some validation and issue a diagnostic pointing at the
start of the diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251270 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-26 02:45:50 +00:00
Tobias Grosser
aaf72bc7c6 RegionInfo: Correctly expand regions
Instead of playing around with dominance to verify if the possible expansion of
a scop region is indeed a single entry single exit region, we now distinguish
two cases. In case we only append a basic block, all edges entering this basic
block need to have come from within the region that is expanded. In case we join
two regions, the source basic blocks of the edges that end at the entry node of
the region that is appended most be part of either the original region or the
region that is appended.

This change will be tested through Polly.

This fixes llvm.org/PR25242

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251267 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 22:55:59 +00:00
Benjamin Kramer
165b4f4e46 Convert assert(false) into llvm_unreachable where it makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251266 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 22:28:27 +00:00
Simon Pilgrim
28c3d642ad [X86][AVX] Regenerate tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251263 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 21:47:09 +00:00
Saleem Abdulrasool
e368f9477a docs: document x mangling in LangRef
Windows has two different mangling specifiers.  `x` is used on x86 for the `_`
UserLabelPrefix.  Others use `w` for the no UserLabelPrefix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251260 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 20:39:35 +00:00
Davide Italiano
d4e4715f54 [ScalarEvolution] Throw away dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251256 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 20:00:49 +00:00
Davide Italiano
94c5c1d096 [ScalarEvolution] Get rid of NDEBUG in header (correctly this time).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251255 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:55:24 +00:00
Sanjoy Das
dd4f44833e [LCSSA] Unbreak build, don't reuse L; NFC
The build broke in r251248.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251251 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:27:17 +00:00
Davide Italiano
33624191af [ScalarEvolution] Get rid of NDEBUG in header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251249 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:13:36 +00:00
Sanjoy Das
f04aae61fa [LCSSA] Use range for loops; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251248 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 19:08:32 +00:00
Simon Pilgrim
49cf761925 [X86][SSE4A] Fix for EXTRQI shuffle lowering.
Incorrect range test - found during fuzz testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251245 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 17:40:54 +00:00
Simon Pilgrim
1415da8392 [X86][SSE] Refreshed tests (missing AVX512 patterns)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251238 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 15:39:22 +00:00
Elena Demikhovsky
16ed8780c7 Scalarizer for masked.gather and masked.scatter intrinsics.
When the target does not support these intrinsics they should be converted to a chain of scalar load or store operations.
If the mask is not constant, the scalarizer will build a chain of conditional basic blocks.
I added isLegalMaskedGather() isLegalMaskedScatter() APIs.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251237 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 15:37:55 +00:00
Simon Pilgrim
aa2b60f016 [X86][SSE] Added tests for shuffling through bitcasts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251236 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 15:32:04 +00:00
Simon Pilgrim
fc0eed896e [X86][SSE] vector sext/zext tests - remove unnecessary mcpu arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251233 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 12:15:00 +00:00
Simon Pilgrim
696e2f7d49 [X86][SSE] shift/rotate tests - remove unnecessary mcpu arguments and regenerate/cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251232 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 12:07:45 +00:00
Simon Pilgrim
6bd9ab9c64 [X86] PMOV*X* tests - remove unnecessary mcpu arguments and regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251230 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 11:55:10 +00:00
Simon Pilgrim
1487603333 [X86] Stack folding tests - just use mtriple - no need for mcpu in these tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251229 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 11:42:46 +00:00
Michael Kuperstein
8052f4541d [X86] Use correct calling convention for MCU psABI libcalls
When using the MCU psABI, compiler-generated library calls should pass
some parameters in-register. However, since inreg marking for x86 is currently
done by the front end, it will not be applied to backend-generated calls.

This is a workaround for PR3997, which describes a similar issue for -mregparm.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251223 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 08:14:05 +00:00
Michael Kuperstein
c50c6907aa [X86] Add support for elfiamcu triple
This adds support for the i?86-*-elfiamcu triple, which indicates the IAMCU psABI is used.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251222 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 08:07:37 +00:00
Craig Topper
30a1e5aa96 Remove two unnecessary conversions from MVT to EVT. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251219 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 03:15:29 +00:00
Craig Topper
e4745a7931 Use MVT::SimpleValueType instead of MVT in template parameter. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251217 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-25 00:27:14 +00:00
Rafael Espindola
ef85994685 Simplify boolean conditional return statements in tools/llvm-symbolizer.
Patch by Richard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251216 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 23:23:25 +00:00
Rafael Espindola
51c6afaf85 Simplify boolean expressions in tools/llvm-objdump.
Patch by Richard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251215 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 23:19:10 +00:00
Rafael Espindola
2fe94b6b08 Refactor: Simplify boolean conditional return statements in lib/CodeGen.
Patch by Richard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251213 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 23:11:13 +00:00
Simon Pilgrim
878eaf48c1 [X86][SSE] Use lowerVectorShuffleWithUNPCK instead of custom matches.
Most 128-bit and 256-bit shuffles were manually matching UNPCK patterns - use lowerVectorShuffleWithUNPCK to be more thorough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251211 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 22:45:04 +00:00
Davide Italiano
764129822f [Support] Add comment to explain why we can't drop NDEBUG.
Discussed with: Benjamin Kramer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251210 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 22:15:32 +00:00
Davide Italiano
548219a599 [CodeGen] Get rid of NDEBUG to ensure structure stability.
I think it's fine to keep this fields around in terms of overhead,
I wasn't able to measure any substantial regression while running the
test suite, but, in case this causes some regression I'm ready to revert
and work on an alternative solution.
This was tested building with clang/gcc both in Debug and Release mode
and passes the test-suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251209 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 22:09:54 +00:00
Simon Pilgrim
f811b16da3 [X86][SSE] lowerVectorShuffleWithUNPCK - use equivalent shuffle mask test.
Use isShuffleEquivalent to match UNPCK shuffles - better support for build vector inputs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251207 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 20:48:08 +00:00
Michael Zolotukhin
df43fcd565 Refactor: Simplify boolean conditional return statements in lib/Transforms/Vectorize (NFC).
Summary: Use clang-tidy to simplify boolean conditional return statements

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

Patch by Richard<legalize@xmission.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251206 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 20:16:42 +00:00
Simon Pilgrim
5dbc03472b Removed old FIXME - we do generate movddup for SSE3 and higher
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251205 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 20:15:43 +00:00
Simon Pilgrim
c0bfd317a3 [DAGCombiner] Tidy up ConstantFP commutation. NFCI
Move ConstantFP canonicalization of commutative instructions to start of 2-op node creation (matches integer) - simplifies constant folding code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 20:06:18 +00:00
Benjamin Kramer
ba3f3a65e6 Use all_of to simplify control flow. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251202 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 19:30:37 +00:00
Yaron Keren
bf4fbb2909 Add libuuid to required system libraries list for mingw.
This list is produced by llvm-config --system-libs to be used
by external programs using the llvm libraries, such as creduce.
In r250501 llvm/Support/Windows/Path.inc started to use the constant
FOLDERID_Profile from libuuid.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251201 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 19:27:28 +00:00
Benjamin Kramer
ff0edf02b3 Use find_if to simplify control flow. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251200 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 19:03:15 +00:00
Simon Pilgrim
2bc87a6f42 [DAGCombiner] Generalize masking of constant rotates.
We don't need a mask of a rotation result to be a constant splat - any constant scalar/vector can be usefully folded.

Followup to D13851.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251197 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 18:44:52 +00:00
Craig Topper
75af6938b2 Call the version of ConvertCostTableLookup that takes a statically sized array rather than pointer and size. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251196 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 18:40:22 +00:00
Hans Wennborg
76da85d572 X86ISelLowering: Support tail calls to/from callee pop functions
This enables tail calls with thiscall, stdcall, vectorcall and
fastcall functions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251190 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 16:47:10 +00:00
Simon Pilgrim
3f3f65ad5f Fix unused variable warning. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251189 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-24 13:41:45 +00:00