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
Evan Cheng
8a88026ae3
Update comment.
...
llvm-svn: 131258
2011-05-12 22:35:48 +00:00
Devang Patel
12419aee7a
Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
...
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g
llvm-svn: 131244
2011-05-12 21:29:42 +00:00
Evan Cheng
43054e6159
Re-enable branchfolding common code hoisting optimization. Fixed a liveness test bug and also taught it to update liveins.
...
llvm-svn: 131241
2011-05-12 20:30:01 +00:00
Devang Patel
2409e7843b
Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
...
llvm-svn: 131238
2011-05-12 19:06:16 +00:00
Evan Cheng
33469b2cae
Temporarily disable the transformation. It's breaking 186.crafty in some configuration.
...
llvm-svn: 131235
2011-05-12 18:44:58 +00:00
Evan Cheng
cfdf33904b
Re-commit 131172 with fix. MachineInstr identity checks should check dead
...
markers. In some cases a register def is dead on one path, but not on
another.
This is passing Clang self-hosting.
llvm-svn: 131214
2011-05-12 00:56:58 +00:00
Devang Patel
34a6620748
Identify end of prologue (and beginning of function body) using DW_LNS_set_prologue_end line table opcode.
...
llvm-svn: 131194
2011-05-11 19:22:19 +00:00
Jakob Stoklund Olesen
31a0b5e2f0
Avoid hoisting spills when looking at a copy from another register that is also
...
about to be spilled.
This can only happen when two extra snippet registers are included in the spill,
and there is a copy between them. Hoisting the spill creates problems because
the hoist will mark the copy for later dead code elimination, and spilling the
second register will turn the copy into a spill.
<rdar://problem/9420853>
llvm-svn: 131192
2011-05-11 18:25:10 +00:00