Charles Davis
8d9c99042f
Implement the Win64 EH directive methods for the assembly language streamer.
...
GAS has no such directives (not even mingw-w64 GAS has them), so I took
creative license with their names in assembly. I prefixed them all with
"w64_" to avoid namespace collisions, for example. If I discover that GAS
has taken a different approach, I'll change ours to match.
llvm-svn: 131525
2011-05-18 04:58:05 +00:00
Jakob Stoklund Olesen
07b5c276f4
Eliminate dead dead code elimination code.
...
llvm-svn: 131524
2011-05-18 04:51:15 +00:00
Jakob Stoklund Olesen
f3dc225972
Also use shrinkToUses after AdjustCopiesBackFrom().
...
The 'last use' may not be in the same basic block, and we still want a correct
live range.
llvm-svn: 131523
2011-05-18 04:51:12 +00:00
Charles Davis
384041d0dc
While thinking about how to know where the functions' boundaries are for
...
the purposes of the Win64 EH tables, I realized we had no way to tell where
the function ends. (MASM bounds functions with PROC and ENDP keywords.)
Add a directive to delimit the end of the function, and rename the 'frame'
directive to more accurately reflect its duality with the new directive.
llvm-svn: 131522
2011-05-18 04:47:22 +00:00
Jakob Stoklund Olesen
595a47d462
Properly shrink live ranges after deleting dead copies. Clean up after all joined copies.
...
LiveInterval::shrinkToUses recomputes the live range from scratch instead of
removing snippets. This should avoid the problem with dangling live ranges.
Leave physreg identity copies alone. They can be created when joining a virtreg
with a physreg. They don't affect register allocation, and they will be removed
by the rewriter.
llvm-svn: 131521
2011-05-18 04:18:19 +00:00
Cameron Zwarich
f9839e4257
Fix typo.
...
llvm-svn: 131519
2011-05-18 02:29:50 +00:00
Cameron Zwarich
d7c55fe2ef
Fix more of PR8825 by correctly using rGPR registers when lowering atomic
...
compare-and-swap intrinsics.
llvm-svn: 131518
2011-05-18 02:20:07 +00:00
Eli Friedman
96254a0d53
Start trying to make InstCombine preserve more debug info. The idea here is to set the debug location on the IRBuilder, which will be then right location in most cases. This should magically give many transformations debug locations, and fixing places which are missing a debug location will usually just means changing the code creating it to use the IRBuilder.
...
As an example, the change to InstCombineCalls catches a common case where a call to a bitcast of a function is rewritten.
Chris, does this approach look reasonable?
llvm-svn: 131516
2011-05-18 01:28:27 +00:00
Eli Friedman
b9ed18f2cb
Use ReplaceInstUsesWith instead of replaceAllUsesWith where appropriate in instcombine.
...
llvm-svn: 131512
2011-05-18 00:32:01 +00:00
Eli Friedman
7d7ad8374f
Make some of the fast-isel tests actually test fast-isel (and fix test failures).
...
llvm-svn: 131510
2011-05-18 00:00:10 +00:00
Devang Patel
b849cd511b
Preseve line numbers while simplifying CFG.
...
llvm-svn: 131508
2011-05-17 23:29:05 +00:00
Cameron Zwarich
33a67ddbd2
Actually, the address operand of the Thumb2 LDREX / STREX instructions *can*
...
take r13, so we can just make it a GPR. This fixes PR8825.
llvm-svn: 131507
2011-05-17 23:26:20 +00:00
Cameron Zwarich
c5d272766f
Correct a minor problem with the Thumb2 LDREX and STREX instruction encodings. They
...
were marked as taking a tGPR when in reality they take an rGPR.
llvm-svn: 131506
2011-05-17 23:11:12 +00:00
Bill Wendling
0671ba8448
Conditionalize the format of the GCOV files by target type. Darwin uses the 4.2
...
format.
llvm-svn: 131503
2011-05-17 23:05:13 +00:00
Eli Friedman
e9692808b7
Make fast-isel miss counting in -stats and -fast-isel-verbose take terminators into account; since there are many fewer isel misses with recent changes, misses caused by terminators are more significant.
...
llvm-svn: 131502
2011-05-17 23:02:10 +00:00
Dan Gohman
abffc991dc
Misc. code cleanups.
...
llvm-svn: 131497
2011-05-17 22:22:52 +00:00
Dan Gohman
4298df6d86
Misc. code cleanups.
...
llvm-svn: 131495
2011-05-17 22:20:36 +00:00
Stuart Hastings
5bd18b6638
X86 pmovsx/pmovzx ignore the upper half of their inputs.
...
rdar://problem/6945110
llvm-svn: 131493
2011-05-17 22:13:31 +00:00
Tanya Lattner
c7e291b354
vrev is incorrectly defined in the perfect shuffle table. The ordering is backwards (should be 0x3210 versus 0x1032) which exposed a bug when doing a shuffle on a 4xi16. I've attached a test case.
...
llvm-svn: 131488
2011-05-17 20:48:40 +00:00
Devang Patel
341b38c22a
Preserve line number information.
...
llvm-svn: 131482
2011-05-17 20:00:02 +00:00
Devang Patel
c5933f2418
Set debug loc for new load instruction.
...
llvm-svn: 131481
2011-05-17 19:43:38 +00:00
Devang Patel
c23bcbc498
Preserve line number information.
...
llvm-svn: 131480
2011-05-17 19:43:06 +00:00
Galina Kistanova
dd45646a47
Move test for appropriate directory.
...
llvm-svn: 131477
2011-05-17 19:06:43 +00:00
Mon P Wang
6f6b44d19d
Enable autodetect of popcnt
...
llvm-svn: 131476
2011-05-17 18:33:37 +00:00
Jim Grosbach
4f51873f22
Frame indices are signed. Update MachineOperand methods accordingly.
...
llvm-svn: 131475
2011-05-17 18:29:21 +00:00
Eli Friedman
7b27942fe7
Add x86 fast-isel for calls returning first-class aggregates. rdar://9435872.
...
This is r131438 with a couple small fixes.
llvm-svn: 131474
2011-05-17 18:29:03 +00:00
Eli Friedman
d000a2c26e
Clean up the mess created by r131467+r131469.
...
llvm-svn: 131471
2011-05-17 18:02:22 +00:00
Stuart Hastings
c65d8eda7b
Revert 131467 due to buildbot complaint.
...
llvm-svn: 131469
2011-05-17 16:59:46 +00:00
Stuart Hastings
3cf5308890
Fix an obscure issue in X86_64 parameter passing: if a tiny byval is
...
passed as the fifth parameter, insure it's passed correctly (in R9).
rdar://problem/6920088
llvm-svn: 131467
2011-05-17 16:45:55 +00:00
Jakob Stoklund Olesen
52375e6a01
Tweak cross-class coalescing to be more aggressive when the target class is small.
...
The greedy register allocator has live range splitting and register class
inflation, so it can actually fully undo this join, including restoring the
original register classes.
We still don't want to do this for long live ranges, mostly because of the high
register pressure of there are many constrained live ranges overlapping.
llvm-svn: 131466
2011-05-17 16:38:37 +00:00
Rafael Espindola
0693182265
Don't include information about the build into the information returned by
...
getHostTriple. This fixes a 32 bit clang running on a 64 bit ubuntu.
llvm-svn: 131463
2011-05-17 15:26:34 +00:00
Nadav Rotem
d8edb1d5cc
Fix a bug in PerformEXTRACT_VECTOR_ELTCombine. The code created an ADD SDNode
...
with two different types, in cases where the index and the ptr had different
types.
llvm-svn: 131461
2011-05-17 08:31:57 +00:00
Eric Christopher
56a42ebf15
Update comment.
...
llvm-svn: 131459
2011-05-17 08:16:14 +00:00
Eric Christopher
a1d9e29552
Support XOR and AND optimization with no return value.
...
Finishes off rdar://8470697
llvm-svn: 131458
2011-05-17 08:10:18 +00:00
Eric Christopher
abfe3131e3
Couple less magic numbers.
...
llvm-svn: 131457
2011-05-17 07:50:41 +00:00
Eric Christopher
eb47a2a1e5
Make this code a little less magic number laden.
...
llvm-svn: 131456
2011-05-17 07:47:55 +00:00
Chris Lattner
1e81f57bf0
add a note
...
llvm-svn: 131455
2011-05-17 07:22:33 +00:00
Stuart Hastings
a7ae4552af
Drop lli, revise test.
...
llvm-svn: 131452
2011-05-17 02:38:59 +00:00
Eli Friedman
7335e8a720
Back out r131444 and r131438; they're breaking nightly tests. I'll look into
...
it more tomorrow.
llvm-svn: 131451
2011-05-17 02:36:59 +00:00
Eli Friedman
e5f7f26df0
Fix test.
...
llvm-svn: 131444
2011-05-17 00:39:14 +00:00
Evan Cheng
54459240e3
Add target triple so test doesn't fail on Windows machines.
...
llvm-svn: 131439
2011-05-17 00:15:58 +00:00
Eli Friedman
83ba150f3a
Add x86 fast-isel for calls returning first-class aggregates. rdar://9435872.
...
llvm-svn: 131438
2011-05-17 00:13:47 +00:00
Owen Anderson
97f0cf32ea
@llvm.lifetime.begin acts as a load, not @llvm.lifetime.end.
...
llvm-svn: 131437
2011-05-17 00:05:49 +00:00
Jakob Stoklund Olesen
4edf17d91f
Teach LiveInterval::isZeroLength about null SlotIndexes.
...
When instructions are deleted, they leave tombstone SlotIndex entries.
The isZeroLength method should ignore these null indexes.
This causes RABasic to sometimes spill a callee-saved register in the
abi-isel.ll test, so don't run that test with -regalloc=basic. Prioritizing
register allocation according to spill weight can cause more registers to be
used.
llvm-svn: 131436
2011-05-16 23:50:05 +00:00
Jim Grosbach
4e983166bc
Kill some dead code.
...
llvm-svn: 131431
2011-05-16 22:24:07 +00:00
Dan Gohman
d282f46c6b
Delete unused variables.
...
llvm-svn: 131430
2011-05-16 22:19:54 +00:00
Dan Gohman
d4d12d14b5
Trim #includes.
...
llvm-svn: 131429
2011-05-16 22:14:50 +00:00
Dan Gohman
ae9b1685a8
Fix whitespace and 80-column violations.
...
llvm-svn: 131428
2011-05-16 22:09:53 +00:00
Devang Patel
a0b682db62
There is no need to force DebugLoc on a PHI at this point.
...
llvm-svn: 131427
2011-05-16 22:05:03 +00:00
Jim Grosbach
e85c0dde7a
Track how many insns fast-isel successfully selects as well as how many it
...
misses.
llvm-svn: 131426
2011-05-16 21:51:07 +00:00