132413 Commits

Author SHA1 Message Date
Simon Pilgrim
6c01836442 [X86][SSE] Added cvtdq2pd/cvtps2pd generic IR tests
Added D20528 implementations as well as existing x86 intrinsics versions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270494 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 21:45:02 +00:00
Justin Bogner
b10244d092 PrologEpilogInserter: Avoid an infinite loop when MinCSFrameIndex == 0
Before r269750 we did the comparisons in this loop in signed ints so
that it DTRT when MinCSFrameIndex was 0. This was changed because it's
now possible for MinCSFrameIndex to be UINT_MAX, but that introduced a
bug when we were comparing `>= 0` - this is tautological in unsigned.

Rework the comparisons here to avoid issues with unsigned wrapping.

No test. I couldn't find a way to get any of the StackGrowsUp in-tree
targets to reach the code that sets MinCSFrameIndex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270492 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 21:40:52 +00:00
Kevin Enderby
866cdd590d Add the printing the Mach-O (__LLVM,__bundle) xar archive file section "verbosely"
to llvm-objdump. This section is created with -fembed-bitcode option.

This requires the use of libxar and the Cmake and lit support were crafted by
Chris Bieneman!

rdar://26202242


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270491 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 21:34:12 +00:00
Simon Pilgrim
e3a492d0d0 [X86][SSE] Use shuffle/sext instead of deprecated (+ auto-upgraded) pmovsxwd intrinsic call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270489 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 21:21:38 +00:00
Lang Hames
5d82919adc [Kaleidoscope] Add an initial "Building an ORC JIT" tutorial chapter.
This is a work in progress - the chapter text is incomplete, though
the example code compiles and runs.

Feedback and patches are, as usual, most welcome.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270487 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 20:34:19 +00:00
James Y Knight
f891cd3982 [SPARC] Fix 8 and 16-bit atomic load and store.
They were accidentally using the 32-bit load/store instruction for
8/16-bit operations, due to incorrect patterns

(8/16-bit cmpxchg and atomicrmw will be fixed in subsequent changes)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 20:33:00 +00:00
Reid Kleckner
d9b93cd3fe Modify emitTypeInformation to use MemoryTypeTableBuilder, take 2
This effectively revers commit r270389 and re-lands r270106, but it's
almost a rewrite.

The behavior change in r270106 was that we could no longer assume that
each LF_FUNC_ID record got its own type index. This patch adds a map
from DINode* to TypeIndex, so we can stop making that assumption.

This change also emits padding bytes between type records similar to the
way MSVC does. The size of the type record includes the padding bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270485 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 20:23:46 +00:00
Wei Mi
14a29ca2bb InsertPointAnalysis: Move current live interval from being a class member
to query interfaces argument; NFC

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270481 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 19:39:19 +00:00
Xinliang David Li
0878fd7d6b tune lowering parameter for small apps (sjeng)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 19:29:26 +00:00
Gerolf Hoflehner
396a19fe67 [InstCombine] Fix assertion when bitcast is converted to gep
When an aggregate contains an opaque type its size cannot be
determined. This triggers an "Invalid GetElementPtrInst indices for type" assert
in function checkGEPType. The fix suppresses the conversion in this case.

http://reviews.llvm.org/D20319


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270479 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 19:23:17 +00:00
Michael Zolotukhin
4b3e216784 [LoopUnroll] Enable advanced unrolling analysis by default.
Summary:
This patch turns on LoopUnrollAnalyzer by default. To mitigate compile
time regressions, I chose very conservative thresholds for now. Later we
can make them more aggressive, but it might require being smarter in
which loops we're optimizing. E.g. currently the biggest issue is that
with more agressive thresholds we unroll many cold loops, which
increases compile time for no performance benefit (performance of those
loops is improved, but it doesn't matter since they are cold).

Test results for compile time(using 4 samples to reduce noise):
```
MultiSource/Benchmarks/VersaBench/ecbdes/ecbdes 5.19%
SingleSource/Benchmarks/Polybench/medley/reg_detect/reg_detect  4.19%
MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow  3.39%
MultiSource/Applications/JM/lencod/lencod 1.47%
MultiSource/Benchmarks/Fhourstones-3_1/fhourstones3_1 -6.06%
```

I didn't see any performance changes in the testsuite, but it improves
some internal tests.

Reviewers: hfinkel, chandlerc

Subscribers: llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270478 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 19:10:19 +00:00
Justin Lebar
961fcb527d Fix DEBUG logs in MachineLICM.
Summary:
MBBs don't necessarily have a name (in my experience, they almost never
do), in which case this logging is quite unhelpful.  The number seems to
work well.

Reviewers: iteratee

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270477 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 18:56:07 +00:00
Zachary Turner
dc38d33d03 [codeview] Refactor symbol records to use same pattern as types.
This will pave the way to introduce a full fledged symbol visitor
similar to how we have a type visitor, thus allowing the same
dumping code to be used in llvm-readobj and llvm-pdbdump.

Differential Revision: http://reviews.llvm.org/D20384
Reviewed By: rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270475 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 18:49:06 +00:00
Sanjay Patel
50c861b595 fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270469 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 18:01:20 +00:00
Sanjay Patel
68e7451924 use range-loop; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270467 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 18:00:50 +00:00
David Blaikie
27665308ff llvm-dwp: More error handling around invalid compressed sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 17:59:17 +00:00
Sanjay Patel
645115fadc fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270465 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 17:57:54 +00:00
Dan Gohman
7333a98310 [WebAssembly] Speed up LiveIntervals updating.
Use the more specific LiveInterval::removeSegment instead of
LiveInterval::shrinkToUses when we know the specific range that's
being removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270463 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 17:42:57 +00:00
David Blaikie
fb4915b806 llvm-dwp: Ensure compressed sections are preserved long enough for use in the string pool
Now that the string pool is referential rather than maintaining its own
copy of string data, compressed sections (well, technically only the
debug_str section*) need to be preserved for the lifetime of the pool to
match.

* I'm not currently optimizing for memory footprint with compressed
  input - the major memory limit I'm hitting is on dwp+dwp merge steps
  and we aren't currently compressing contents in dwp files, just in the
  .dwo inputs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270462 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 17:35:51 +00:00
Krzysztof Parzyszek
2123d3f905 [Hexagon] Move some debug-only variable declarations into DEBUG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 17:31:30 +00:00
Justin Bogner
30680ad2f1 SDAG: Remove the transitional default Select() implementation
In r268693, we started requiring that SelectionDAGISel::Select return
void, but provided a default implementation that did just that by
calling into the old interface. Now that all targets have been
updated, we'll just remove the default implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270454 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 16:52:53 +00:00
David Blaikie
5131c267e1 llvm-dwp: Fix the build by moving DWPStringPool into the llvm namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270453 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 16:45:00 +00:00
Amaury Sechet
000b227286 Extract renaming from D19181
Summary: This needs to get in before anything is released concerning attribute. If the old name gets in the wild, then we are stuck with it forever. Putting it in its own diff should getting that part at least in fast.

Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael, jyknight

Subscribers: llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 16:38:25 +00:00
Xinliang David Li
1386ead074 [profile] show more statistics
Add value profile statistics with the 'show' command.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270450 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 16:36:11 +00:00
David Blaikie
018cdc89a0 llvm-dwp: Add an abstraction for the DWP string pool
Also reference strings in the memory mapped file, reduces memory usage
on a large test case by 18.5%.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270449 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 16:32:11 +00:00
Aaron Ballman
e2dfcd9070 Removing a switch statement that contains only a default label; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270444 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 15:52:59 +00:00
Diana Picus
bbf43bf006 [BPF] Remove exit-on-error flag in test (PR27766)
The exit-on-error flag on the many_args1.ll test is needed to avoid an
unreachable in BPFTargetLowering::LowerCall. We can also avoid it by ignoring
any superfluous arguments to the call (i.e. any arguments after the first 5).

Fixes PR27766.

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

v2 of r270419

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 14:57:19 +00:00
Asaf Badouh
ab5f9266a7 [X86][RTM] _xabort() should not have "noreturn" attribute
Differential Revision: http://reviews.llvm.org/D20518

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270437 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 14:04:17 +00:00
Alexander Potapenko
1c9f2a9b43 [InlineAsm] Avoid creating extra string instances in ConstraintInfo::Parse()
Don't create unnecessary std::string objects when pushing back to |pCodes|.
NFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270436 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 13:58:04 +00:00
Simon Pilgrim
f6a6e81b7e [X86][AVX] Added tests that access ymm registers before and after explicit vzeroupper/vzeroall calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270434 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 13:03:45 +00:00
Renato Golin
4bd3c7629d Reverts "[BPF] Remove exit-on-error flag in test (PR27766)"
This patch reverts r270419 because it broke a lot of buildbots,
mostly Windows. We'd like help in investigating the issues, but
for now, it should stay out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270433 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 13:02:11 +00:00
Simon Pilgrim
21481f6c67 [X86][SSE] Regenerated scalar load folding tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270431 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 12:53:09 +00:00
Simon Pilgrim
481edf8ca6 [X86][SSE] Regenerated partial register update tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270430 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 12:49:37 +00:00
Simon Pilgrim
67270d4b29 [X86][SSE] Updated sse/avx cvtsi2sd tests to use non-constant value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270425 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 12:41:51 +00:00
Simon Pilgrim
a6265aaca2 [X86][SSE2] Regenerated sse2 upgraded intrinsics tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270423 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 12:40:11 +00:00
Simon Pilgrim
55494e1f78 [X86][AVX] Regenerated avx upgraded intrinsics tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270422 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 12:39:06 +00:00
Diana Picus
a466b7ce58 [BPF] Remove exit-on-error flag in test (PR27766)
The exit-on-error flag on the many_args1.ll test is needed to avoid an
unreachable in BPFTargetLowering::LowerCall. We can also avoid it by ignoring
any superfluous arguments to the call (i.e. any arguments after the first 5).

Fixes PR27766

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 12:33:34 +00:00
Chris Dewhurst
3c9099dfec [Sparc] LEON erratum fix - Delay Slot Filler modification.
This code should have been with the previous check-in (r270417) and prevents the DelaySlotFiller pass being utilized in functions where the erratum fix has been applied as this will break the run-time code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270418 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 11:52:28 +00:00
Chris Dewhurst
69e68a5966 [Sparc][LEON] LEON Erratum fix. Insert NOP after LD or LDF instruction.
Due to an erratum in some versions of LEON, we must insert a NOP after any LD or LDF instruction to ensure the processor has time to load the value correctly before using it. This pass will implement that erratum fix.

The code will have no effect for other Sparc, but non-LEON processors.

Differential Review: http://reviews.llvm.org/D20353

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 10:56:36 +00:00
Sam Kolton
f7363d583b [AMDGPU] Assembler: refactor parsing of modifiers and immediates. Allow modifiers for imms.
Reviewers: nhaustov, tstellarAMD

Subscribers: kzhuravl, arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270415 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 09:59:02 +00:00
Jacob Baungard Hansen
df232b13b3 Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270414 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 09:41:44 +00:00
Davide Italiano
fb56e1a36f [SCCP] Update comment to reflect reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270413 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 09:34:50 +00:00
Richard Smith
5d0c349a51 Enable use of sigaltstack for signal handlers when available. With this,
backtraces from the signal handler on stack overflow now work reliably (on my
system at least...).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 06:47:37 +00:00
Craig Topper
4de68f2b6c [X86] Use instruction aliases to replace custom asm parser code for optimizing moves to use 2 byte VEX prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 04:02:27 +00:00
David Majnemer
b06908a171 Revert "Modify emitTypeInformation to use MemoryTypeTableBuilder"
This reverts commit r270106.  It results in certain function types
omitted in the output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-23 01:37:45 +00:00
Craig Topper
23e51e1ea1 [AVX512] Add patterns to implement stores of extracts of least signficant subvectors using XMM or YMM stores instead of the vector extract instructions.
Similar is already done for AVX and we had lost it going to AVX512VL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-22 23:44:33 +00:00
Lang Hames
60e94e81eb [Kaleidoscope] Fix static global ordering to prevent crash on exit.
If TheModule is declared before LLVMContext then it will be destructed after it,
crashing when it tries to deregister itself from the destructed context.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-22 22:48:36 +00:00
Simon Pilgrim
9a4c9f3b35 [X86][SSE] Added extra i8 extract element test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270379 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-22 20:35:42 +00:00
Sanjay Patel
51a995642a [x86, AVX] don't add a vzeroupper if that's what the code is already doing (PR27823)
This isn't the complete fix, but it handles the trivial examples of duplicate vzero* ops in PR27823:
https://llvm.org/bugs/show_bug.cgi?id=27823
...and amusingly, the bogus cases already exist as regression tests, so let's take this baby step.

We'll need to do more in the general case where there's legitimate AVX usage in the function + there's
already a vzero in the code.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270378 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-22 20:22:47 +00:00
Sanjay Patel
86d4c5562d [x86, AVX] add test file to show vzeroupper pass excesses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270375 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-22 19:55:48 +00:00