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
Andrew Trick [Tue, 10 Apr 2012 03:12:29 +0000 (03:12 +0000)]
Use std::includes instead of my own implementation.
Jakob's review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154377
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 10 Apr 2012 02:25:26 +0000 (02:25 +0000)]
Added a TargetRegisterInfo interface for accessing register pressure sets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154375
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 10 Apr 2012 02:25:24 +0000 (02:25 +0000)]
Added register unit sets to the target description.
This is a new algorithm that finds sets of register units that can be
used to model registers pressure. This handles arbitrary, overlapping
register classes. Each register class is associated with a (small)
list of pressure sets. These are the dimensions of pressure affected
by the register class's liveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154374
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 10 Apr 2012 02:25:21 +0000 (02:25 +0000)]
Added register unit weights to the target description.
This is a new algorithm that associates registers with weighted
register units to accuretely model their effect on register
pressure. This handles registers with multiple overlapping
subregisters. It is possible, but almost inconceivable that the
algorithm fails to find an exact solution for a target description. If
an exact solution cannot be found, an inexact, but reasonable solution
will be chosen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154373
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 10 Apr 2012 02:25:18 +0000 (02:25 +0000)]
Fix header comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154372
91177308-0d34-0410-b5e6-
96231b3b80d8
Danil Malyshev [Tue, 10 Apr 2012 01:54:44 +0000 (01:54 +0000)]
Add a constructor for DataRefImpl and remove excess initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154371
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Apr 2012 01:51:00 +0000 (01:51 +0000)]
Fix a long standing tail call optimization bug. When a libcall is emitted
legalizer always use the DAG entry node. This is wrong when the libcall is
emitted as a tail call since it effectively folds the return node. If
the return node's input chain is not the entry (i.e. call, load, or store)
use that as the tail call input chain.
PR12419
rdar://
9770785
rdar://
11195178
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154370
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 10 Apr 2012 00:16:22 +0000 (00:16 +0000)]
Don't try to zExt just to check if an integer constant is zero, it might
not fit in a i64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154364
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 10 Apr 2012 00:13:07 +0000 (00:13 +0000)]
ARM LDR/LDRT has the same encoding collision as STR/STRT.
Generalized logic of r154141.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154362
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Apr 2012 23:58:59 +0000 (23:58 +0000)]
Test case for PR12495.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154359
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 9 Apr 2012 23:16:51 +0000 (23:16 +0000)]
Revert the 'EnableInitializing' flag. There is debate on whether we should run that pass by default in LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154356
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 9 Apr 2012 22:18:01 +0000 (22:18 +0000)]
Apply the scope restrictions after parsing the command line options. There may be some which are used in that function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154348
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 9 Apr 2012 20:32:12 +0000 (20:32 +0000)]
Have TargetLowering::getPICJumpTableRelocBase return a node that points to the
GOT if jump table uses 64-bit gp-relative relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154341
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 9 Apr 2012 20:32:02 +0000 (20:32 +0000)]
When performing a truncating store, it's possible to rearrange the data
in-register, such that we can use a single vector store rather then a
series of scalar stores.
For func_4_8 the generated code
vldr d16, LCPI0_0
vmov d17, r0, r1
vadd.i16 d16, d17, d16
vmov.u16 r0, d16[3]
strb r0, [r2, #3]
vmov.u16 r0, d16[2]
strb r0, [r2, #2]
vmov.u16 r0, d16[1]
strb r0, [r2, #1]
vmov.u16 r0, d16[0]
strb r0, [r2]
bx lr
becomes
vldr d16, LCPI0_0
vmov d17, r0, r1
vadd.i16 d16, d17, d16
vuzp.8 d16, d17
vst1.32 {d16[0]}, [r2, :32]
bx lr
I'm not fond of how this combine pessimizes 2012-03-13-DAGCombineBug.ll,
but I couldn't think of a way to judiciously apply this combine.
This
ldrh r0, [r0, #4]
strh r0, [r1]
becomes
vldr d16, [r0]
vmov.u16 r0, d16[2]
vmov.32 d16[0], r0
vuzp.16 d16, d17
vst1.32 {d16[0]}, [r1, :32]
PR11158
rdar://
10703339
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154340
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 9 Apr 2012 20:17:30 +0000 (20:17 +0000)]
Patch r153892 for PR11861 apparently broke an external project (see PR12493).
This patch restores TwoAddressInstructionPass's pre-r153892 behaviour when
rescheduling instructions in TryInstructionTransform. Hopefully this will fix
PR12493. To refix PR11861, lowering of INSERT_SUBREGS is deferred until after
the copy that unties the operands is emitted (this seems to be a more
appropriate fix for that issue anyway).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154338
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 9 Apr 2012 19:38:15 +0000 (19:38 +0000)]
Update comments and remove unnecessary isVolatile() check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154336
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 9 Apr 2012 17:54:34 +0000 (17:54 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154329
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 9 Apr 2012 16:29:35 +0000 (16:29 +0000)]
Fix accidentally constant conditions found by uncommitted improvements to -Wconstant-conversion.
A couple of cases where we were accidentally creating constant conditions by
something like "x == a || b" instead of "x == a || x == b". In one case a
conditional & then unreachable was used - I transformed this into a direct
assert instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154324
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 9 Apr 2012 16:06:03 +0000 (16:06 +0000)]
Pattern match a setcc of boolean value with 0 as a truncate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154322
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Mon, 9 Apr 2012 15:32:22 +0000 (15:32 +0000)]
This patch adds X86 instruction itineraries, which were missed by the
original patch to add itineraries, to X86InstrArithmetc.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154320
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 9 Apr 2012 14:08:00 +0000 (14:08 +0000)]
Clarify that fpaccuracy metadata is giving the compiler permission to use a
less accurate method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154319
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 9 Apr 2012 08:33:21 +0000 (08:33 +0000)]
Lower some x86 shuffle sequences to the vblend family of instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154313
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 9 Apr 2012 08:32:21 +0000 (08:32 +0000)]
s/lto_codegen_whole_program_optimization/lto_codegen_set_whole_program_optimization/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154312
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 9 Apr 2012 07:45:58 +0000 (07:45 +0000)]
Fix a bug in the lowering of broadcasts: ConstantPools need to use the target pointer type.
Move NormalizeVectorShuffle and LowerVectorBroadcast into X86TargetLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154310
91177308-0d34-0410-b5e6-
96231b3b80d8