Sirish Pande [Fri, 13 Apr 2012 20:22:19 +0000 (20:22 +0000)]
Pass to replace tranfer/copy instructions into combine instruction where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154695
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 13 Apr 2012 20:06:17 +0000 (20:06 +0000)]
Reduce malloc traffic in DwarfAccelTable
- Don't copy offsets into HashData, the underlying vector won't change once the table is finalized.
- Allocate HashData and HashDataContents in a BumpPtrAllocator.
- Allocate string map entries in the same allocator.
- Random cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154694
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Linthicum [Fri, 13 Apr 2012 19:09:44 +0000 (19:09 +0000)]
Support for Hexagon backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154692
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Linthicum [Fri, 13 Apr 2012 19:09:18 +0000 (19:09 +0000)]
Support for Hexagon backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154691
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 13 Apr 2012 18:59:28 +0000 (18:59 +0000)]
On Darwin targets, only use vfma etc. if the source use fma() intrinsic explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154689
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 18:57:48 +0000 (18:57 +0000)]
Add some comments, and fix a few places that missed setting Changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154687
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 13 Apr 2012 18:46:37 +0000 (18:46 +0000)]
For ARM disassembly only print 32 unsigned bits for the address of branch
targets so if the branch target has the high bit set it does not get printed as:
beq 0xffffffff8008c404
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154685
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 18:28:58 +0000 (18:28 +0000)]
Consider ObjC runtime calls objc_storeWeak and others which make a copy of
their argument as "escape" points for objc_retainBlock optimization.
This fixes rdar://
11229925.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154682
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 13 Apr 2012 17:15:33 +0000 (17:15 +0000)]
By default, use Early-CSE instead of GVN for vectorization cleanup.
As has been suggested by Duncan and others, Early-CSE and GVN should
do similar redundancy elimination, but Early-CSE is much less expensive.
Most of my autovectorization benchmarks show a performance regresion, but
all of these are < 0.1%, and so I think that it is still worth using
the less expensive pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154673
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Fri, 13 Apr 2012 11:22:18 +0000 (11:22 +0000)]
Catch the Python exception when subprocess.Popen is failing.
For example, if llc cannot be found, the full python stacktrace is displayed
and no interesting information are provided.
+ fail the process when an exception occurs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154665
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 13 Apr 2012 08:09:12 +0000 (08:09 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154661
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Apr 2012 06:38:11 +0000 (06:38 +0000)]
Silence various build warnings from Hexagon backend that show up in release builds. Mostly converting 'assert(0)' to 'llvm_unreachable' to silence warnings about missing returns. Also fold some variable declarations into asserts to prevent the variables from being unused in release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154660
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Apr 2012 06:14:57 +0000 (06:14 +0000)]
Fix target specific intrinsic handling to adjust intrinsic number before doing attribute table lookup. Also fix attribute table lookup to handle 'invalid' intrinsic correctly. Fixes PR12542
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154658
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 13 Apr 2012 05:58:19 +0000 (05:58 +0000)]
Remove getElfArchType from ELF.h. It's only used in ELFObjectFile.cpp and there's already a copy there. ELF.h was hiding the one there and causing an unused function warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154657
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 01:08:28 +0000 (01:08 +0000)]
Use the new Use-aware dominates method to apply the objc runtime
library return value optimization for phi uses. Even when the
phi itself is not dominated, the specific use may be dominated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154647
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 13 Apr 2012 01:06:27 +0000 (01:06 +0000)]
Code-gen may inject code into the IR before it emits the ASM. The linker
obviously cannot know that this code is present, let alone used. So prevent the
internalize pass from internalizing those global values which code-gen may
insert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154645
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 00:59:57 +0000 (00:59 +0000)]
Don't move objc_autorelease calls past autorelease pool boundaries when
optimizing autorelease calls on phi nodes with null operands.
This fixes rdar://
11207070.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154642
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 13 Apr 2012 00:50:57 +0000 (00:50 +0000)]
Def here is an Instruction, so !isa<Instruction>(Def) is always false,
as Eli noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154641
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 12 Apr 2012 23:31:46 +0000 (23:31 +0000)]
Add forms of dominates and isReachableFromEntry that accept a Use
directly instead of a user Instruction. This allows them to test
whether a def dominates a particular operand if the user instruction
is a PHI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154631
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 12 Apr 2012 23:13:34 +0000 (23:13 +0000)]
Fix a few more places in the ARM disassembler so that branches get
symbolic operands added when using the C disassembler API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154628
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 12 Apr 2012 22:15:23 +0000 (22:15 +0000)]
Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154622
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Thu, 12 Apr 2012 21:44:58 +0000 (21:44 +0000)]
Hexagon: fix CMake error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154620
91177308-0d34-0410-b5e6-
96231b3b80d8
Sirish Pande [Thu, 12 Apr 2012 21:06:54 +0000 (21:06 +0000)]
Disable Hexagon test temporarily.
There is an assert at line 558 in ScheduleDAGInstrs::buildSchedGraph(AliasAnalysis *AA).
This assert needs to addressed for post RA scheduler. Until that assert is addressed,
any passes that uses post ra scheduler will fail. So, I am temporarily disabling the
hexagon tests until that fix is in.
The assert is as follows:
assert(!MI->isTerminator() && !MI->isLabel() &&
"Cannot schedule terminators or labels!");
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154617
91177308-0d34-0410-b5e6-
96231b3b80d8
Sirish Pande [Thu, 12 Apr 2012 21:06:38 +0000 (21:06 +0000)]
HexagonPacketizer patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154616
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Thu, 12 Apr 2012 20:13:57 +0000 (20:13 +0000)]
This patch improves the MCJIT runtime dynamic loader by adding new handling
of zero-initialized sections, virtual sections and common symbols
and preventing the loading of sections which are not required for
execution such as debug information.
Patch by Andy Kaylor!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154610
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 12 Apr 2012 19:14:21 +0000 (19:14 +0000)]
Generalize r153635 to deal with TokenFactor chains; also clean up the logic and fix the tests. rdar://
11069732, rdar://
11236106
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154604
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Thu, 12 Apr 2012 17:55:53 +0000 (17:55 +0000)]
Hexagon: enable assembler output through the MC layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154597
91177308-0d34-0410-b5e6-
96231b3b80d8
Anshuman Dasgupta [Thu, 12 Apr 2012 15:17:35 +0000 (15:17 +0000)]
Add DFA generator for VLIW targets to ReleaseNotes.html and CREDITS.TXT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154590
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 12 Apr 2012 12:47:29 +0000 (12:47 +0000)]
Remove README entry obsoleted by register masks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154588
91177308-0d34-0410-b5e6-
96231b3b80d8
Jean-Daniel Dupas [Thu, 12 Apr 2012 12:02:39 +0000 (12:02 +0000)]
Remove a remaining reference to the obsolete C backend in configure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154587
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 12 Apr 2012 07:23:00 +0000 (07:23 +0000)]
Fix 128-bit ptest intrinsics to take v2i64 instead of v4f32 since these are integer instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154580
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 12 Apr 2012 01:19:35 +0000 (01:19 +0000)]
ARM 'adr' fixups don't need the interworking addend tweaking.
They reference the PC directly, so things work properly that way.
rdar://
11231229
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154576
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 23:19:55 +0000 (23:19 +0000)]
Revert changes that were accidentally committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154563
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 23:11:33 +0000 (23:11 +0000)]
Fix string that is being checked.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154547
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 22:59:08 +0000 (22:59 +0000)]
Emit neg.s or neg.d only if -enable-no-nans-fp-math is supplied by user,
otherwise expand FNEG during legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154546
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 22:49:04 +0000 (22:49 +0000)]
Emit abs.s or abs.d only if -enable-no-nans-fp-math is supplied by user.
Invalid operation is signaled if the operand of these instructions is NaN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154545
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 11 Apr 2012 22:40:17 +0000 (22:40 +0000)]
Fixed a case of ARM disassembly getting an assert on a bad encoding
of a VST instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154544
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Apr 2012 22:13:04 +0000 (22:13 +0000)]
Fix bugs in lowering of FCOPYSIGN nodes.
- FCOPYSIGN nodes that have operands of different types were not handled.
- Different code was generated depending on the endianness of the target.
Additionally, code is added that emits INS and EXT instructions, if they are
supported by target (they are R2 instructions).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154540
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 21:09:54 +0000 (21:09 +0000)]
Remove incorrect comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154533
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 21:02:33 +0000 (21:02 +0000)]
Tidy up. Remove hard tab characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154532
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 21:02:30 +0000 (21:02 +0000)]
Tidy up. Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154531
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Apr 2012 20:20:37 +0000 (20:20 +0000)]
Fix pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154527
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 11 Apr 2012 19:21:58 +0000 (19:21 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154522
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 11 Apr 2012 18:16:28 +0000 (18:16 +0000)]
TableGen's regpressure: emit per-registerclass weight limits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154518
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 17:40:18 +0000 (17:40 +0000)]
ARM 'vuzp.32 Dd, Dm' is a pseudo-instruction.
While there is an encoding for it in VUZP, the result of that is undefined,
so we should avoid it. Define the instruction as a pseudo for VTRN.32
instead, as the ARM ARM indicates.
rdar://
11222366
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154511
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 11 Apr 2012 17:35:26 +0000 (17:35 +0000)]
TableGen'd regpressure: register unit set pruning.
The pruning is more complete if it is not done incrementally. The code
is also a tad less convluted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154510
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 16:53:25 +0000 (16:53 +0000)]
ARM 'vzip.32 Dd, Dm' is a pseudo-instruction.
While there is an encoding for it in VZIP, the result of that is undefined,
so we should avoid it. Define the instruction as a pseudo for VTRN.32
instead, as the ARM ARM indicates.
rdar://
11221911
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154505
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Wed, 11 Apr 2012 15:35:36 +0000 (15:35 +0000)]
Fix the build under Debian GNU/Hurd.
Thanks to Pino Toscano for the patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154500
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Apr 2012 14:06:54 +0000 (14:06 +0000)]
Cache the hash value of the operands in the MDNode.
FoldingSet is implemented as a chained hash table. When there is a hash
collision during insertion, which is common as we fill the table until a
load factor of 2.0 is hit, we walk the chained elements, comparing every
operand with the new element's operands. This can be very expensive if the
MDNode has many operands.
We sacrifice a word of space in MDNode to cache the full hash value, reducing
compares on collision to a minimum. MDNode grows from 28 to 32 bytes + operands
on x86. On x86_64 the new bits fit nicely into existing padding, not growing
the struct at all.
The actual speedup depends a lot on the test case and is typically between
1% and 2% for C++ code with clang -c -O0 -g.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154497
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Apr 2012 14:06:47 +0000 (14:06 +0000)]
FoldingSet: Push the hash through FoldingSetTraits::Equals, so clients can use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154496
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Apr 2012 14:06:39 +0000 (14:06 +0000)]
Compute hashes directly with hash_combine instead of taking a detour through FoldingSetNodeID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154495
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 11 Apr 2012 11:05:21 +0000 (11:05 +0000)]
remove unused argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154494
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 11 Apr 2012 10:25:24 +0000 (10:25 +0000)]
Add a C binding to the Target and TargetMachine classes to allow for emitting
binary and assembly. Patch by Carlo Kok. Emitting was inspired by but not based
on the D llvm bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154493
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 11 Apr 2012 10:15:10 +0000 (10:15 +0000)]
Add two statistics to help track how we are computing the inline cost.
Yea, 'NumCallerCallersAnalyzed' isn't a great name, suggestions welcome.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154492
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 11 Apr 2012 08:26:11 +0000 (08:26 +0000)]
Reapply 154397. Original message:
Fix a dagcombine optimization which assumes that the vsetcc result type is always
of the same size as the compared values. This is ture for SSE/AVX/NEON but not
for all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154490
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 11 Apr 2012 08:13:47 +0000 (08:13 +0000)]
Comment typo fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154488
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Apr 2012 06:59:47 +0000 (06:59 +0000)]
Add more fused mul+add/sub patterns. rdar://
10139676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154484
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 11 Apr 2012 06:40:27 +0000 (06:40 +0000)]
Reapply 154396 after fixing a test.
Original message:
Modify the code that lowers shuffles to blends from using blendvXX to vblendXX.
blendV uses a register for the selection while Vblend uses an immediate.
On sandybridge they still have the same latency and execute on the same execution ports.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154483
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Apr 2012 05:33:07 +0000 (05:33 +0000)]
Clean up ARM fused multiply + add/sub support some more: rename some isel
predicates.
Also remove NEON2 since it's not really useful and it is confusing. If
NEON + VFP4 implies NEON2 but NEON2 doesn't imply NEON + VFP4, what does it
really mean?
rdar://
10139676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154480
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 11 Apr 2012 04:55:51 +0000 (04:55 +0000)]
Fix an overly indented line. Remove an 'else' after an 'if' that returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154479
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 11 Apr 2012 04:34:11 +0000 (04:34 +0000)]
Inline implVisitAluOverflow by introducing a nested switch to convert the intrinsic to an nodetype.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154478
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 11 Apr 2012 04:31:33 +0000 (04:31 +0000)]
Tablegen'd regpressure: emit the weighted pressure limit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154477
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 11 Apr 2012 03:19:15 +0000 (03:19 +0000)]
Table-generated register pressure fixes.
Handle mixing allocatable and unallocatable register gracefully.
Simplify the pruning of register unit sets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154474
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 11 Apr 2012 03:06:35 +0000 (03:06 +0000)]
Optimize code a bit by calling push_back only once in some loops. Reduces compiled code size a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154473
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Apr 2012 01:21:25 +0000 (01:21 +0000)]
Match (fneg (fma) to vfnma. rdar://
10139676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154469
91177308-0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Wed, 11 Apr 2012 01:10:53 +0000 (01:10 +0000)]
Add retw and lretw instructions. Also, fix Intel syntax parsing for all
ret instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154468
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Apr 2012 01:03:11 +0000 (01:03 +0000)]
Merge fma.ll into fusedMAC.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154466
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 11 Apr 2012 00:25:40 +0000 (00:25 +0000)]
Fix ARM disassembly of VLD instructions with writebacks. And add test a case
for all opcodes handed by DecodeVLDInstruction() in ARMDisassembler.cpp .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154459
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 11 Apr 2012 00:15:16 +0000 (00:15 +0000)]
ARM add missing Thumb1 two-operand aliases for shift-by-immediate.
rdar://
11222742
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154457
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Apr 2012 00:13:00 +0000 (00:13 +0000)]
Fix a number of problems with ARM fused multiply add/subtract instructions.
1. The new instruction itinerary entries are not properly described.
2. The asm parser can't handle vfms and vfnms.
3. There were no assembler, disassembler test cases.
4. HasNEON2 has the wrong assembler predicate.
rdar://
10139676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154456
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 11 Apr 2012 00:00:28 +0000 (00:00 +0000)]
Tweak MachineLICM heuristics for cheap instructions.
Allow cheap instructions to be hoisted if they are register pressure
neutral or better. This happens if the instruction is the last loop use
of another virtual register.
Only expensive instructions are allowed to increase loop register
pressure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154455
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 11 Apr 2012 00:00:26 +0000 (00:00 +0000)]
Only check for PHI uses inside the current loop.
Hoisting a value that is used by a PHI in the loop will introduce a
copy because the live range is extended to cross the PHI.
The same applies to PHIs in exit blocks.
Also use this opportunity to make HasLoopPHIUse() non-recursive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154454
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 11 Apr 2012 00:00:24 +0000 (00:00 +0000)]
Fix test to be register assignment invariant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154453
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 10 Apr 2012 23:53:32 +0000 (23:53 +0000)]
TableGen/reginfo potential bug: typo from previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154452
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 10 Apr 2012 22:46:53 +0000 (22:46 +0000)]
Move the constant-folding support for FP_ROUND in SelectionDAG from the one-operand version of getNode() to the two-operand version, since it became a two-operand node at sound point.
Zap a testcase that this allows us to completely fold away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154447
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Tue, 10 Apr 2012 22:44:51 +0000 (22:44 +0000)]
llvm-stress: stop abusing ConstantFP::get()
ConstantFP::get(Type*, double) is unreliably host-specific:
it can't handle a type like PPC128 on an x86 host. It even
has a comment to that effect: "This should only be used for
simple constant values like 2.0/1.0 etc, that are
known-valid both as host double and as the target format."
Instead, use APFloat. While we're at it, randomize the floating
point value more thoroughly; it was previously limited
to the range 0 to 2**19 - 1.
PR12451.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154446
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan Noblesmith [Tue, 10 Apr 2012 22:44:49 +0000 (22:44 +0000)]
llvm-stress: don't make vectors of x86_mmx type
LangRef.html says:
"There are no arrays, vectors or constants of this type."
This was hitting assertions when passing the -generate-x86-mmx
option.
PR12452.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154445
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 10 Apr 2012 22:29:17 +0000 (22:29 +0000)]
[tsan] two more compile-time optimizations:
- don't isntrument reads from constant globals.
Saves ~1.5% of instrumented instructions on CPU2006
(counting static instructions, not their execution).
- don't insrument reads from vtable (which is a global constant too).
Saves ~5%.
I did not measure the run-time impact of this,
but it is certainly non-negative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154444
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Apr 2012 21:40:28 +0000 (21:40 +0000)]
Handle llvm.fma.* intrinsics. rdar://
10914096
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154439
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Apr 2012 20:35:27 +0000 (20:35 +0000)]
Add a comment noting that the fdiv -> fmul conversion won't generate
multiplication by a denormal, and some tests checking that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154431
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 10 Apr 2012 20:12:16 +0000 (20:12 +0000)]
The MDString class stored a StringRef to the string which was already in a
StringMap. This was redundant and unnecessarily bloated the MDString class.
Because the MDString class is a "Value" and will never have a "name", and
because the Name field in the Value class is a pointer to a StringMap entry, we
repurpose the Name field for an MDString. It stores the StringMap entry in the
Name field, and uses the normal methods to get the string (name) back.
PR12474
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154429
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Apr 2012 19:42:07 +0000 (19:42 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154427
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Apr 2012 19:39:18 +0000 (19:39 +0000)]
Revert r154396, which looks to be the real culprit behind the bot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154426
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 10 Apr 2012 19:33:16 +0000 (19:33 +0000)]
Temporarily revert this patch to see if it brings the buildbots back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154425
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 10 Apr 2012 18:18:56 +0000 (18:18 +0000)]
[tsan] compile-time instrumentation: do not instrument a read if
a write to the same temp follows in the same BB.
Also add stats printing.
On Spec CPU2006 this optimization saves roughly 4% of instrumented reads
(which is 3% of all instrumented accesses):
Writes : 161216
Reads : 446458
Reads-before-write: 18295
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154418
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 10 Apr 2012 18:18:10 +0000 (18:18 +0000)]
To ensure that we have more accurate line information for a block
don't elide the branch instruction if it's the only one in the block,
otherwise it's ok.
PR9796 and rdar://
11215207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154417
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 10 Apr 2012 18:02:12 +0000 (18:02 +0000)]
Revert r154397, which was causing make check failures on the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154414
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 10 Apr 2012 17:31:55 +0000 (17:31 +0000)]
ARM fix cc_out operand handling for t2SUBrr instructions.
We were incorrectly conflating some add variants which don't have a
cc_out operand with the mirroring sub encodings, which do. Part of the
awesome non-orthogonality legacy of thumb1. Similarly, handling of
add/sub of an immediate was sometimes incorrectly removing the cc_out
operand for add/sub register variants.
rdar://
11216577
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154411
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 10 Apr 2012 15:23:13 +0000 (15:23 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154398
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 10 Apr 2012 14:58:31 +0000 (14:58 +0000)]
Fix a dagcombine optimization which assumes that the vsetcc result type is always
of the same size as the compared values. This is ture for SSE/AVX/NEON but not
for all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154397
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 10 Apr 2012 14:33:13 +0000 (14:33 +0000)]
Modify the code that lowers shuffles to blends from using blendvXX to vblendXX.
blendv uses a register for the selection while vblend uses an immediate.
On sandybridge they still have the same latency and execute on the same execution ports.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154396
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Apr 2012 13:35:57 +0000 (13:35 +0000)]
Make a somewhat subtle change in the logic of block placement. Sometimes
the loop header has a non-loop predecessor which has been pre-fused into
its chain due to unanalyzable branches. In this case, rotating the
header into the body of the loop in order to place a loop exit at the
bottom of the loop is a Very Bad Idea as it makes the loop
non-contiguous.
I'm working on a good test case for this, but it's a bit annoynig to
craft. I should get one shortly, but I'm submitting this now so I can
begin the (lengthy) performance analysis process. An initial run of LNT
looks really, really good, but there is too much noise there for me to
trust it much.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154395
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 10 Apr 2012 13:22:49 +0000 (13:22 +0000)]
Transform div to mul with reciprocal only when fp imm is legal.
This fixes PR12516 and uncovers one weird problem in legalize (workarounded)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154394
91177308-0d34-0410-b5e6-
96231b3b80d8
David Chisnall [Tue, 10 Apr 2012 11:44:33 +0000 (11:44 +0000)]
Use the correct section types on Solaris for unwind data on both x86 and x86-64.
Patch by Dmitri Shubin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154391
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Apr 2012 08:22:43 +0000 (08:22 +0000)]
Express the number of ULPs in fpaccuracy metadata as a real rather than a
rational number, eg as 2.5 rather than 5, 2. OK'd by Peter Collingbourne.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154387
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 10 Apr 2012 05:14:42 +0000 (05:14 +0000)]
Fix 12513: Loop unrolling breaks with indirect branches.
Take this opportunity to generalize the indirectbr bailout logic for
loop transformations. CFG transformations will never get indirectbr
right, and there's no point trying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154386
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 10 Apr 2012 05:14:37 +0000 (05:14 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154385
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 10 Apr 2012 03:36:49 +0000 (03:36 +0000)]
Fix for register pressure tables.
Recent refactoring introduced a bug. Fix: added buildRegUnitSets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154382
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Apr 2012 03:15:42 +0000 (03:15 +0000)]
Add proper checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154379
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Apr 2012 03:15:18 +0000 (03:15 +0000)]
Make the code slightly more palatable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154378
91177308-0d34-0410-b5e6-
96231b3b80d8