1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

11831 Commits

Author SHA1 Message Date
Devang Patel
e0b7ab9296 During branch folding avoid inserting redundant DBG_VALUE machine instructions.
llvm-svn: 132148
2011-05-26 21:47:59 +00:00
Charles Davis
4becdc727e Revert r132111. I built Release (without Asserts), so I didn't know about the
assert that prevented setting alignment on section creation.

llvm-svn: 132113
2011-05-26 05:35:55 +00:00
Charles Davis
44fb280873 Align Win64 EH Table sections to 4 bytes.
llvm-svn: 132111
2011-05-26 05:19:54 +00:00
Stuart Hastings
837a958ff6 Reverting 132105: it broke some LLVM-GCC DejaGNU tests.
llvm-svn: 132108
2011-05-26 04:09:49 +00:00
Stuart Hastings
e704bfb21e Correctly handle a one-word struct passed byval on x86_64.
rdar://problem/6920088

llvm-svn: 132105
2011-05-26 02:44:56 +00:00
Jakob Stoklund Olesen
6c654330dc Add a RAGreedy::canEvict function.
This doesn't change functionality (much), but it allows for a more fine-grained
eviction policy. The current policy only compares spill weights, and that is not
always the best thing to do.  Spill weights are designed to serve linear scan,
and they don't consider live range splitting.

Add a mechanism so canEvict() can request that a live range be evicted and
split/spilled. This is to avoid infinite eviction loops.

llvm-svn: 132101
2011-05-25 23:58:36 +00:00
Eli Friedman
93ffb875ad Rewrite fast-isel integer cast handling to handle more cases, and to be simpler and more consistent.
The practical effects here are that x86-64 fast-isel can now handle trunc from i8 to i1, and ARM fast-isel can handle many more constructs involving integers narrower than 32 bits (including loads, stores, and many integer casts).

rdar://9437928 .

llvm-svn: 132099
2011-05-25 23:49:02 +00:00
Devang Patel
7e814e1e36 Remove unused statistical counter.
llvm-svn: 132087
2011-05-25 21:55:40 +00:00
Rafael Espindola
70213c7c5f 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
0b44360610 Remove dead code.
llvm-svn: 131974
2011-05-24 18:27:52 +00:00
Rafael Espindola
8e44a53856 Explain FIXME.
llvm-svn: 131952
2011-05-24 03:10:31 +00:00
Rafael Espindola
176fe6a0e0 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
b5950697e8 - 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
5bce258c3d Fix debug info for blocks' variable.
llvm-svn: 131940
2011-05-24 00:22:25 +00:00
Devang Patel
8a90970a54 Remove unnecessary comment.
llvm-svn: 131936
2011-05-23 23:16:14 +00:00
Devang Patel
e829168e05 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
37ab34a49f 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
5920de5c8c 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
ca9723d80b 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
c383dd2c87 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
df3070e83d Implement mulo x, 2 -> addo x, x in DAGCombiner.
llvm-svn: 131800
2011-05-21 18:31:55 +00:00
Cameron Zwarich
00ec3d1f9f 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
445c467ced Fix typo. When will I learn?
llvm-svn: 131765
2011-05-20 22:23:34 +00:00
Charles Davis
989cc73ef3 Add .pdata and .xdata sections to the COFF TLOF implementation.
llvm-svn: 131763
2011-05-20 22:13:55 +00:00
Jim Grosbach
909aff492f 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
c4a65b2613 Fix typo.
llvm-svn: 131757
2011-05-20 21:35:39 +00:00
Jim Grosbach
b2b33616c0 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
a487989a73 Fix PR9960 by teaching SimpleRegisterCoalescing::AdjustCopiesBackFrom() to preserve
the phikill flag.

llvm-svn: 131717
2011-05-20 03:54:04 +00:00
Cameron Zwarich
4e8f708cbb 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
a68d5a99c0 Update some currently-disabled code, preparing for eventual use.
llvm-svn: 131663
2011-05-19 18:48:20 +00:00
Cameron Zwarich
6fbc514611 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
d3292b9f1e 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
b7d689c706 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
2310f43683 Eliminate dead dead code elimination code.
llvm-svn: 131524
2011-05-18 04:51:15 +00:00
Jakob Stoklund Olesen
cd6bbe0171 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
504b1bd8ab 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
ade6f78867 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
834a63625d Misc. code cleanups.
llvm-svn: 131497
2011-05-17 22:22:52 +00:00
Dan Gohman
5d23a937f7 Misc. code cleanups.
llvm-svn: 131495
2011-05-17 22:20:36 +00:00
Stuart Hastings
581113d8a0 Revert 131467 due to buildbot complaint.
llvm-svn: 131469
2011-05-17 16:59:46 +00:00
Stuart Hastings
a2509a7ec3 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
6645e60d56 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
16f11212fc 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
9a55240376 Delete unused variables.
llvm-svn: 131430
2011-05-16 22:19:54 +00:00
Dan Gohman
9ea3bcc685 Trim #includes.
llvm-svn: 131429
2011-05-16 22:14:50 +00:00
Dan Gohman
2d7dc7849f Fix whitespace and 80-column violations.
llvm-svn: 131428
2011-05-16 22:09:53 +00:00
Jim Grosbach
59a8c1aa5b 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
9f871794b6 Preserve debug info for unused zero extended boolean argument.
Radar 9422775.

llvm-svn: 131422
2011-05-16 21:24:05 +00:00
Eli Friedman
cb60e2293f Make fast-isel work correctly s/uadd.with.overflow intrinsics.
llvm-svn: 131420
2011-05-16 21:06:17 +00:00
Eli Friedman
bd237ec411 Fix silly typo.
llvm-svn: 131419
2011-05-16 20:34:53 +00:00