Devang Patel
84b64a3e92
Remove unused statistical counter.
...
llvm-svn: 132087
2011-05-25 21:55:40 +00:00
Rafael Espindola
fc9bae6f8b
Replace the -unwind-tables option with a per function flag. This is more
...
LTO friendly as we can now correctly merge files compiled with or without
-fasynchronous-unwind-tables.
llvm-svn: 132033
2011-05-25 03:44:17 +00:00
Devang Patel
5de2375db8
Remove dead code.
...
llvm-svn: 131974
2011-05-24 18:27:52 +00:00
Rafael Espindola
0d018b1155
Explain FIXME.
...
llvm-svn: 131952
2011-05-24 03:10:31 +00:00
Rafael Espindola
0f33be1b87
Fix the defaults for .eh_frame. We were marking it as writable.
...
llvm-svn: 131951
2011-05-24 02:50:20 +00:00
Evan Cheng
88f9137fd7
- Teach SelectionDAG::isKnownNeverZero to return true (op x, c) when c is
...
non-zero.
- Teach X86 cmov optimization to eliminate the cmov from ctlz, cttz extension
when the source of X86ISD::BSR / X86ISD::BSF is proven to be non-zero.
rdar://9490949
llvm-svn: 131948
2011-05-24 01:48:22 +00:00
Devang Patel
354fa0798f
Fix debug info for blocks' variable.
...
llvm-svn: 131940
2011-05-24 00:22:25 +00:00
Devang Patel
faaa16ea2c
Remove unnecessary comment.
...
llvm-svn: 131936
2011-05-23 23:16:14 +00:00
Devang Patel
efec7715ec
Revert 121907 (it causes llc crash) and apply original patch from PR9817.
...
llvm-svn: 131926
2011-05-23 22:04:42 +00:00
Devang Patel
7992883811
Preserve debug info during iSel by keeping DanglingDebugInfoMap live until end of function.
...
Patch by Micah Villmow
llvm-svn: 131908
2011-05-23 17:44:13 +00:00
Devang Patel
c4d9a84159
While replacing all uses of a SDValue with another value, do not forget to transfer SDDbgValue.
...
llvm-svn: 131907
2011-05-23 17:35:08 +00:00
Chris Lattner
68254fcbca
Eliminate some temporary variables, and don't call getByValTypeAlignment
...
when we're just going to throw the result away. No functionality change.
llvm-svn: 131880
2011-05-22 23:23:02 +00:00
Chris Lattner
04120e9567
eliminate dependence on StandardPasses.h. The code generator's pass pipeline
...
should eventually convert to PMBuilder, but I don't plan to do this.
llvm-svn: 131819
2011-05-22 00:13:44 +00:00
Benjamin Kramer
2fd48f2730
Implement mulo x, 2 -> addo x, x in DAGCombiner.
...
llvm-svn: 131800
2011-05-21 18:31:55 +00:00
Cameron Zwarich
d7ee0fcac9
Fix PR9962 by properly constraining register classes in RemoveCopyByCommutingDef(). This
...
actually fixes most of the VerifyCoalescing failures in test-suite.
llvm-svn: 131768
2011-05-20 23:25:36 +00:00
Charles Davis
1a1d4777b9
Fix typo. When will I learn?
...
llvm-svn: 131765
2011-05-20 22:23:34 +00:00
Charles Davis
bc1feb1f25
Add .pdata and .xdata sections to the COFF TLOF implementation.
...
llvm-svn: 131763
2011-05-20 22:13:55 +00:00
Jim Grosbach
8aded86edb
No reason not to allow defining the CFA as a reg w/ offset zero.
...
llvm-svn: 131760
2011-05-20 21:50:09 +00:00
Jim Grosbach
17c1d13ee4
Fix typo.
...
llvm-svn: 131757
2011-05-20 21:35:39 +00:00
Jim Grosbach
83c4bb157a
Add support for frame info use of the .cfi_def_cfa directive.
...
llvm-svn: 131756
2011-05-20 21:23:17 +00:00
Cameron Zwarich
e0a52df6e5
Fix PR9960 by teaching SimpleRegisterCoalescing::AdjustCopiesBackFrom() to preserve
...
the phikill flag.
llvm-svn: 131717
2011-05-20 03:54:04 +00:00
Cameron Zwarich
2af60abad8
Fix PR9955 by only attaching load memory operands to load instructions and
...
similarly for stores. Now "make check" passes with the MachineVerifier forced
on with the VerifyCoalescing option!
llvm-svn: 131705
2011-05-19 23:44:34 +00:00
Stuart Hastings
4a4e5a2b55
Update some currently-disabled code, preparing for eventual use.
...
llvm-svn: 131663
2011-05-19 18:48:20 +00:00
Cameron Zwarich
fe5795a1f6
Revert r128961 because it didn't include a test and causes the verifier to fail
...
on CodeGen/X86/2007-05-07-InvokeSRet.ll. There is probably a bug here that was
fixed by r128961, but since there is no test or reference to a source file I have
to revert it.
llvm-svn: 131618
2011-05-19 01:56:19 +00:00
Duncan Sands
3d9407f4eb
Revert commit 131534 since it seems to have broken several buildbots.
...
Original log entry:
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place.
llvm-svn: 131536
2011-05-18 14:57:56 +00:00
Nadav Rotem
c5c27ede55
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
...
code in one place.
llvm-svn: 131534
2011-05-18 12:26:38 +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
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
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
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
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
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
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
Devang Patel
8e60ff11db
Preserve debug info for unused zero extended boolean argument.
...
Radar 9422775.
llvm-svn: 131422
2011-05-16 21:24:05 +00:00
Eli Friedman
a4d4a0162d
Make fast-isel work correctly s/uadd.with.overflow intrinsics.
...
llvm-svn: 131420
2011-05-16 21:06:17 +00:00
Eli Friedman
4c08bb450a
Fix silly typo.
...
llvm-svn: 131419
2011-05-16 20:34:53 +00:00
Eli Friedman
9ac944774f
Basic fast-isel of extractvalue. Not too helpful on its own, given the IR clang generates for cases like this, but it should become more useful soon.
...
llvm-svn: 131417
2011-05-16 20:27:46 +00:00
Rafael Espindola
2050af838d
Don't do tail calls in a function that call setjmp. The stack might be
...
corrupted when setjmp returns again.
llvm-svn: 131399
2011-05-16 03:05:33 +00:00
Eli Friedman
8f1e11cde9
Fix a FIXME by moving the fast-isel implementation of the objectsize intrinsic from the x86 code to the generic code.
...
llvm-svn: 131332
2011-05-14 00:47:51 +00:00
Rafael Espindola
e53b7d1a11
Make codegen able to handle values of empty types. This is one way
...
to fix PR9900. I will keep it open until sable is able to comment on it.
llvm-svn: 131294
2011-05-13 15:18:06 +00:00
Stuart Hastings
aa02c0847d
Since I can't reproduce the failures from 131261, re-trying with a
...
simplified version. <rdar://problem/9298790>
llvm-svn: 131274
2011-05-13 00:51:54 +00:00
Stuart Hastings
8d57d8ea64
Revert 131266 and 131261 due to buildbot complaints.
...
rdar://problem/9298790
llvm-svn: 131269
2011-05-13 00:15:17 +00:00
Stuart Hastings
89f1b47e3a
Non-fast-isel followup to 129634; correctly handle branches controlled
...
by non-CMP expressions. The executable test case (129821) would test
this as well, if we had an "-O0 -disable-arm-fast-isel" LLVM-GCC
tester. Alas, the ARM assembly would be very difficult to check with
FileCheck.
The thumb2-cbnz.ll test is affected; it generates larger code (tst.w
vs. cmp #0 ), but I believe the new version is correct.
rdar://problem/9298790
llvm-svn: 131261
2011-05-12 23:36:41 +00:00