1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

11296 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
9f7beb42a8 Assert on bad jump tables.
llvm-svn: 125225
2011-02-09 21:52:06 +00:00
Jakob Stoklund Olesen
16c11feb5a Add tags to live interval unions to avoid using stale queries.
The tag is updated whenever the live interval union is changed, and it is tested
before using cached information.

llvm-svn: 125224
2011-02-09 21:52:03 +00:00
Jakob Stoklund Olesen
d324b906a8 Evict a lighter single interference before attempting to split a live range.
Registers are not allocated strictly in spill weight order when live range
splitting and spilling has created new shorter intervals with higher spill
weights.

When one of the new heavy intervals conflicts with a single lighter interval,
simply evict the old interval instead of trying to split the heavy one.

The lighter interval is a better candidate for splitting, it has a smaller use
density.

llvm-svn: 125151
2011-02-09 01:14:03 +00:00
Jakob Stoklund Olesen
5d66cf0c01 Set an allocation hint when rematting before a COPY.
This almost guarantees that the COPY will be coalesced.

llvm-svn: 125140
2011-02-09 00:25:36 +00:00
Jakob Stoklund Olesen
3433de2114 Fix one more case of splitting after the last split point.
llvm-svn: 125137
2011-02-08 23:26:48 +00:00
Jakob Stoklund Olesen
3da2844610 Reorganize interference code to check LastSplitPoint first.
The last split point can be anywhere in the block, so it interferes with the
strictly monotonic requirements of advanceTo().

llvm-svn: 125132
2011-02-08 23:02:58 +00:00
Jakob Stoklund Olesen
e0a74b3dcf Also handle the situation where an indirect branch is the first (and last)
instruction in a basic block.

llvm-svn: 125116
2011-02-08 21:46:11 +00:00
Jakob Stoklund Olesen
fe0a7ea3aa Add LiveIntervals::addKillFlags() to recompute kill flags after register allocation.
This is a lot easier than trying to get kill flags right during live range
splitting and rematerialization.

llvm-svn: 125113
2011-02-08 21:13:03 +00:00
Jakob Stoklund Olesen
5574089a0b Trim debug spew
llvm-svn: 125109
2011-02-08 19:33:58 +00:00
Jakob Stoklund Olesen
acdd9ab5ff Avoid folding a load instruction into an instruction that redefines the register.
The target hook doesn't know how to do that. (Neither do I).

llvm-svn: 125108
2011-02-08 19:33:55 +00:00
Jakob Stoklund Olesen
d5ad17c42b Add SplitEditor::overlapIntv() to create small ranges where both registers are live.
If a live range is used by a terminator instruction, and that live range needs
to leave the block on the stack or in a different register, it can be necessary
to have both sides of the split live at the terminator instruction.

Example:

  %vreg2 = COPY %vreg1
  JMP %vreg1

Becomes after spilling %vreg2:

  SPILL %vreg1
  JMP %vreg1

The spill doesn't kill the register as is normally the case.

llvm-svn: 125102
2011-02-08 18:50:21 +00:00
Jakob Stoklund Olesen
5a0048302f Add assertion.
llvm-svn: 125101
2011-02-08 18:50:18 +00:00
Andrew Trick
3286438277 Fix PostRA antidependence breaker.
Avoid using the same register for two def operands or and earlyclobber
def and use operand. This fixes PR8986 and improves on the prior fix
for rdar://problem/8959122.

llvm-svn: 125089
2011-02-08 17:39:46 +00:00
Jakob Stoklund Olesen
a5e0ea6e4e Add LiveIntervals::shrinkToUses().
After uses of a live range are removed, recompute the live range to only cover
the remaining uses. This is necessary after rematerializing the value before
some (but not all) uses.

llvm-svn: 125058
2011-02-08 00:03:05 +00:00
Devang Patel
2c62329722 Remove comment about an argument that was removed couple of years ago.
llvm-svn: 125054
2011-02-07 21:58:52 +00:00
Andrew Trick
2cdb14d30b Fix an anti-dep breaker corner case.
<rdar://problem/8959122> illegal register operands for UMULL instruction in cfrac nightly test
I'm stil working on a unit test, but the case is:
rx = movcc rx, r3
r2 = ldr
r2, r3 = umull r2, r2

The anti-dep breaker should not convert this into an illegal instruction:
r2, r2 = umull

llvm-svn: 124932
2011-02-05 02:58:46 +00:00
Jakob Stoklund Olesen
2a26f7f183 Be more strict about the first/last interference-free use.
If the interference overlaps the instruction, we cannot separate it.

llvm-svn: 124918
2011-02-05 01:06:39 +00:00
Jakob Stoklund Olesen
99be342f10 Add assertions to verify that the new interval is clear of the interference.
If these inequalities don't hold, we are creating a live range split that won't
allocate.

llvm-svn: 124917
2011-02-05 01:06:36 +00:00
Jakob Stoklund Olesen
b416dbf12e Apparently, it is possible for a block with a landing pad successor to have no calls.
In that case we simply ignore the landing pad and split live ranges before the
first terminator.

llvm-svn: 124907
2011-02-04 23:11:13 +00:00
Devang Patel
930b4b16a1 Merge .debug_loc entries whenever possible to reduce debug_loc size.
llvm-svn: 124904
2011-02-04 22:57:18 +00:00
Nick Lewycky
a4f2b5a934 Mark that the return is using EAX so that we don't use it for some other
purpose. Fixes PR9080!

llvm-svn: 124903
2011-02-04 22:44:08 +00:00
Jakob Stoklund Olesen
8de536be92 Be more accurate about live range splitting at the end of blocks.
If interference reaches the last split point, it is effectively live out and
should be marked as 'MustSpill'.

This can make a difference when the terminator uses a register. There is no way
that register can be reused in the outgoing CFG bundle, even if it isn't live
out.

llvm-svn: 124900
2011-02-04 21:42:06 +00:00
Jakob Stoklund Olesen
bf833680ec Add LiveIntervals::getLastSplitPoint().
A live range cannot be split everywhere in a basic block. A split must go before
the first terminator, and if the variable is live into a landing pad, the split
must happen before the call that can throw.

llvm-svn: 124894
2011-02-04 19:33:11 +00:00
Jakob Stoklund Olesen
0ceb8d032a Verify that one of the ranges produced by region splitting is allocatable.
We should not be attempting a region split if it won't lead to at least one
directly allocatable interval. That could cause infinite splitting loops.

llvm-svn: 124893
2011-02-04 19:33:07 +00:00
Andrew Trick
09aa9fe96b Introducing a new method of tracking register pressure. We can't
precisely track pressure on a selection DAG, but we can at least keep
it balanced. This design accounts for various interesting aspects of
selection DAGS: register and subregister copies, glued nodes, dead
nodes, unused registers, etc.

Added SUnit::NumRegDefsLeft and ScheduleDAGSDNodes::RegDefIter.

Note: I disabled PrescheduleNodesWithMultipleUses when register
pressure is enabled, based on no evidence other than I don't think it
makes sense to have both enabled.

llvm-svn: 124853
2011-02-04 03:18:17 +00:00
Devang Patel
a586bb8ecd DebugLoc associated with a machine instruction is used to emit location entries. DebugLoc associated with a DBG_VALUE is used to identify lexical scope of the variable. After register allocation, while inserting DBG_VALUE remember original debug location for the first instruction and reuse it, otherwise dwarf writer may be mislead in identifying the variable's scope.
llvm-svn: 124845
2011-02-04 01:43:25 +00:00
Evan Cheng
dda52de359 Update comments.
llvm-svn: 124843
2011-02-04 01:10:12 +00:00
Jakob Stoklund Olesen
097e61e40f Skip unused values.
llvm-svn: 124842
2011-02-04 00:59:23 +00:00
Jakob Stoklund Olesen
89c57d3a69 Also compute interference intervals for blocks with no uses.
When the live range is live through a block that doesn't use the register, but
that has interference, region splitting wants to split at the top and bottom of
the basic block.

llvm-svn: 124839
2011-02-04 00:39:20 +00:00
Jakob Stoklund Olesen
f61ad513fc Verify kill flags conservatively.
Allow a live range to end with a kill flag, but don't allow a kill flag that
doesn't end the live range.

This makes the machine code verifier more useful during register allocation when
kill flag computation is deferred.

llvm-svn: 124838
2011-02-04 00:39:18 +00:00
Andrew Trick
8f8918816d whitespace
llvm-svn: 124827
2011-02-03 23:00:17 +00:00
Jakob Stoklund Olesen
d59988aebb Ensure that the computed interference intervals actually overlap their basic blocks.
llvm-svn: 124815
2011-02-03 20:29:43 +00:00
Jakob Stoklund Olesen
bb8328dcda Tweak debug output from SlotIndexes.
llvm-svn: 124814
2011-02-03 20:29:41 +00:00
Jakob Stoklund Olesen
1451898887 Add debug output and asserts to the phi-connecting code.
llvm-svn: 124813
2011-02-03 20:29:39 +00:00
Jakob Stoklund Olesen
eb29913703 Fix coloring bug when mapping values in the middle of a live-through block.
If the found value is not live-through the block, we should only add liveness up
to the requested slot index. When the value is live-through, the whole block
should be colored.

Bug found by SSA verification in the machine code verifier.

llvm-svn: 124812
2011-02-03 20:29:36 +00:00
Jakob Stoklund Olesen
319f2bbf2b Return live range end points from SplitEditor::enter*/leave*.
These end points come from the inserted copies, and can be passed directly to
useIntv. This simplifies the coloring code.

llvm-svn: 124799
2011-02-03 17:04:16 +00:00
Jakob Stoklund Olesen
e3aabdc892 Silence an MSVC warning
llvm-svn: 124798
2011-02-03 17:04:12 +00:00
Eric Christopher
57e4dada99 Reapply this.
llvm-svn: 124779
2011-02-03 06:18:29 +00:00
Eric Christopher
8082811b65 Temporarily revert 124765 in an attempt to find the cycle breaking bootstrap.
llvm-svn: 124778
2011-02-03 05:40:54 +00:00
Jakob Stoklund Olesen
880fa5b5dc Defer SplitKit value mapping until all defs are available.
The greedy register allocator revealed some problems with the value mapping in
SplitKit. We would sometimes start mapping values before all defs were known,
and that could change a value from a simple 1-1 mapping to a multi-def mapping
that requires ssa update.

The new approach collects all defs and register assignments first without
filling in any live intervals. Only when finish() is called, do we compute
liveness and mapped values. At this time we know with certainty which values map
to multiple values in a split range.

This also has the advantage that we can compute live ranges based on the
remaining uses after rematerializing at split points.

The current implementation has many opportunities for compile time optimization.

llvm-svn: 124765
2011-02-03 00:54:23 +00:00
Devang Patel
71b1fadf20 Add support to describe template value parameter in debug info.
llvm-svn: 124755
2011-02-02 22:35:53 +00:00
Devang Patel
89455dc7cd Add support to describe template parameter type in debug info.
llvm-svn: 124752
2011-02-02 21:38:25 +00:00
Evan Cheng
c7ce7e2ac3 Given a pair of floating point load and store, if there are no other uses of
the load, then it may be legal to transform the load and store to integer
load and store of the same width.

This is done if the target specified the transformation as profitable. e.g.
On arm, this can transform:
vldr.32 s0, []
vstr.32 s0, []

to

ldr r12, []
str r12, []

rdar://8944252

llvm-svn: 124708
2011-02-02 01:06:55 +00:00
Matt Beaumont-Gay
de874158f4 Take Bill Wendling's suggestion for structuring a couple of asserts.
llvm-svn: 124688
2011-02-01 22:12:50 +00:00
Devang Patel
97c467ee47 Keep track of incoming argument's location while emitting LiveIns.
llvm-svn: 124611
2011-01-31 21:38:14 +00:00
Richard Osborne
11cdda2346 Fix bug where ReduceLoadWidth was creating illegal ZEXTLOAD instructions.
llvm-svn: 124587
2011-01-31 17:41:44 +00:00
Anton Korobeynikov
c608d67509 Clarify the LSDASection NULL check
llvm-svn: 124569
2011-01-30 22:07:31 +00:00
Jakob Stoklund Olesen
430d0693dc Respect the -tail-dup-size command line option even when optimizing for size.
This is similar to the -unroll-threshold option. There should be no change in
behavior when -tail-dup-size is not explicit on the llc command line.

llvm-svn: 124564
2011-01-30 20:38:12 +00:00
Benjamin Kramer
6b3c3de09a Teach DAGCombine to fold fold (sra (trunc (sr x, c1)), c2) -> (trunc (sra x, c1+c2) when c1 equals the amount of bits that are truncated off.
This happens all the time when a smul is promoted to a larger type.

On x86-64 we now compile "int test(int x) { return x/10; }" into
  movslq  %edi, %rax
  imulq $1717986919, %rax, %rax
  movq  %rax, %rcx
  shrq  $63, %rcx
  sarq  $34, %rax <- used to be "shrq $32, %rax; sarl $2, %eax"
  addl  %ecx, %eax

This fires 96 times in gcc.c on x86-64.

llvm-svn: 124559
2011-01-30 16:38:43 +00:00
Benjamin Kramer
4a40190f76 Add the missing sub identity "A-(A-B) -> B" to DAGCombine.
This happens e.g. for code like "X - X%10" where we lower the modulo operation
to a series of multiplies and shifts that are then subtracted from X, leading to
this missed optimization.

llvm-svn: 124532
2011-01-29 12:34:05 +00:00
Evan Cheng
4af5487b74 Re-apply r124518 with fix. Watch out for invalidated iterator.
llvm-svn: 124526
2011-01-29 04:46:23 +00:00
Evan Cheng
1f943b9b13 Revert r124518. It broke Linux self-host.
llvm-svn: 124522
2011-01-29 02:43:04 +00:00
Evan Cheng
a1e4cb5f09 Re-commit r124462 with fixes. Tail recursion elim will now dup ret into unconditional predecessor to enable TCE on demand.
llvm-svn: 124518
2011-01-29 01:29:26 +00:00
Evan Cheng
5b6c72e549 Revert r124462. There are a few big regressions that I need to fix first.
llvm-svn: 124478
2011-01-28 07:12:38 +00:00
Nick Lewycky
fdee464a16 Fix build with stdcxx by using llvm::next. Patch by Joerg Sonnenberger!
llvm-svn: 124472
2011-01-28 04:00:15 +00:00
Rafael Espindola
9bc19ee478 Print the visibility of declarations.
llvm-svn: 124468
2011-01-28 03:20:10 +00:00
Evan Cheng
7031f450b3 - Stop simplifycfg from duplicating "ret" instructions into unconditional
branches. PR8575, rdar://5134905, rdar://8911460.
- Allow codegen tail duplication to dup small return blocks after register
  allocation is done.

llvm-svn: 124462
2011-01-28 02:19:21 +00:00
Andrew Trick
3f570c28b7 Remove a temporary workaround for a lencod miscompile. Depends on the fix in r124442.
llvm-svn: 124443
2011-01-27 21:28:51 +00:00
Andrew Trick
6a24682579 VirtRegRewriter fix: update kill flags, which are used by the scavenger.
rdar://problem/8893967: JM/lencod miscompile at -arch armv7 -mthumb -O3

Added ResurrectKill to remove kill flags after we decide to reused a
physical register. And (hopefully) ensure that we call it in all the
right places.

Sorry, I'm not checking in a unit test given that it's a miscompile I
can't reproduce easily with a toy example. Failures in the rewriter
depend on a series of heuristic decisions maked during one of the many
upstream phases in codegen. This case would require coercing regalloc
to generate a couple of rematerialzations in a way that causes the
scavenger to reuse the same register at just the wrong point.

The general way to test this is to implement kill flags
verification. Then we could have a simple, robust compile-only unit
test. That would be worth doing if the whole pass was not about to
disappear. At this point we focus verification work on the next
generation of regalloc.

llvm-svn: 124442
2011-01-27 21:26:43 +00:00
Devang Patel
14eb3db47f Speculatively revert r124380.
llvm-svn: 124397
2011-01-27 19:15:01 +00:00
Devang Patel
6c3de04fdd While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.
Take 2. This includes fix for dragonegg crash.

llvm-svn: 124380
2011-01-27 17:43:53 +00:00
Bob Wilson
08e0cec53e Avoid modifying the OneClassForEachPhysReg map while iterating over it.
Linear scan regalloc is currently assuming that any register aliased with
a member of a regclass must also be in at least one regclass.  That is not
always true.  For example, for X86, RIP is in a regclass but IP is not.
If you're unlucky, this can cause a crash by invalidating the iterator.

llvm-svn: 124365
2011-01-27 07:26:15 +00:00
Matt Beaumont-Gay
7001cac6c5 Try harder to not have unused variables.
llvm-svn: 124350
2011-01-27 02:39:27 +00:00
Matt Beaumont-Gay
d984615f35 Opt-mode -Wunused-variable cleanup
llvm-svn: 124346
2011-01-27 01:47:50 +00:00
Devang Patel
b81f6dbc21 Reapply 124301
llvm-svn: 124339
2011-01-27 00:13:27 +00:00
Bill Wendling
51d9acc25b Initialize variable to get rid of clang warning.
llvm-svn: 124331
2011-01-26 22:21:35 +00:00
Devang Patel
bd203876fa Revert 124301.
llvm-svn: 124327
2011-01-26 21:41:22 +00:00
Devang Patel
ac5d878d16 Revert r124302
llvm-svn: 124320
2011-01-26 21:12:32 +00:00
David Greene
5c173a307b [AVX] Add INSERT_SUBVECTOR and support it on x86. This provides a
default implementation for x86, going through the stack in a similr
fashion to how the codegen implements BUILD_VECTOR.  Eventually this
will get matched to VINSERTF128 if AVX is available.

llvm-svn: 124307
2011-01-26 19:13:22 +00:00
Devang Patel
3f443cbd7b While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.
llvm-svn: 124302
2011-01-26 18:55:05 +00:00
Devang Patel
b7f86b1453 Process valid SDDbgValues even if the node does not have any order assigned.
llvm-svn: 124301
2011-01-26 18:42:32 +00:00
Devang Patel
c74abe4ded Refactor.
llvm-svn: 124300
2011-01-26 18:20:04 +00:00
David Greene
93b74739e7 [AVX] Support EXTRACT_SUBVECTOR on x86. This provides a default
implementation of EXTRACT_SUBVECTOR for x86, going through the stack
in a similr fashion to how the codegen implements BUILD_VECTOR.
Eventually this will get matched to VEXTRACTF128 if AVX is available.

llvm-svn: 124292
2011-01-26 15:38:49 +00:00
Jakob Stoklund Olesen
5c0fcc03af Rename member variables to follow the rest of LLVM.
No functional change.

llvm-svn: 124257
2011-01-26 00:50:53 +00:00
Devang Patel
134e5b7679 Provide an interface to transfer SDDbgValue from one SDNode to another.
llvm-svn: 124245
2011-01-25 23:27:42 +00:00
Devang Patel
fce915414e Resolve DanglingDbgValue of PHI nodes where the use follows dbg.value intrinisic.
llvm-svn: 124203
2011-01-25 18:09:58 +00:00
Devang Patel
e1d739cd64 This assertion is too restrictive, it does not apply for dangling dbg value nodes (nodes where dbg.value intrinsic preceds use of the value).
llvm-svn: 124202
2011-01-25 18:09:33 +00:00
Anton Korobeynikov
febd3ec17f Support printing exception section into the current one. This is the case when LSDASection is blank
llvm-svn: 124150
2011-01-24 22:38:40 +00:00
Devang Patel
431a9b9c2f Speculatively revert r124138.
llvm-svn: 124142
2011-01-24 20:04:37 +00:00
Devang Patel
5ccc4e884c Resolve DanglingDbgValue of PHI nodes where the use follows dbg.value intrinisic.
llvm-svn: 124138
2011-01-24 19:24:37 +00:00
Andrew Trick
977497dbf1 Temporarily workaround JM/lencod miscompile (SIGSEGV).
rdar://problem/8893967

llvm-svn: 124137
2011-01-24 19:08:15 +00:00
Rafael Espindola
547873da60 Add support for the --noexecstack option.
llvm-svn: 124077
2011-01-23 17:55:27 +00:00
Ted Kremenek
880c19c032 Null initialize a few variables flagged by
clang's -Wuninitialized-experimental warning.
While these don't look like real bugs, clang's
-Wuninitialized-experimental analysis is stricter
than GCC's, and these fixes have the benefit
of being general nice cleanups.

llvm-svn: 124073
2011-01-23 17:05:06 +00:00
Rafael Espindola
aefd549139 Delay the creation of eh_frame so that the user can change the defaults.
Add support for SHT_X86_64_UNWIND.

llvm-svn: 124059
2011-01-23 05:43:40 +00:00
Rafael Espindola
492ad6ca06 Remove more duplicated code.
llvm-svn: 124056
2011-01-23 04:43:11 +00:00
Rafael Espindola
59c1246cee Remove duplicated code.
llvm-svn: 124054
2011-01-23 04:28:49 +00:00
Andrew Trick
e0bccb5f87 Enable support for precise scheduling of the instruction selection
DAG. Disable using "-disable-sched-cycles".

For ARM, this enables a framework for modeling the cpu pipeline and
counting stalls. It also activates several heuristics to drive
scheduling based on the model. Scheduling is inherently imprecise at
this stage, and until spilling is improved it may defeat attempts to
schedule. However, this framework provides greater control over
tuning codegen.

Although the flag is not target-specific, it should have very little
affect on the default scheduler used by x86. The only two changes that
affect x86 are:
- scheduling a high-latency operation bumps the current cycle so independent
  operations can have their latency covered. i.e. two independent 4
  cycle operations can produce results in 4 cycles, not 8 cycles.
- Two operations with equal register pressure impact and no
  latency-based stalls on their uses will be prioritized by depth before height
  (height is irrelevant if no stalls occur in the schedule below this point).

llvm-svn: 123971
2011-01-21 06:19:05 +00:00
Andrew Trick
7155e98904 Convert -enable-sched-cycles and -enable-sched-hazard to -disable
flags. They are still not enable in this revision.

Added TargetInstrInfo::isZeroCost() to fix a fundamental problem with
the scheduler's model of operand latency in the selection DAG.

Generalized unit tests to work with sched-cycles.

llvm-svn: 123969
2011-01-21 05:51:33 +00:00
Jakob Stoklund Olesen
60743dd45f SplitKit requires that all defs are in place before calling useIntv().
The value mapping gets confused about which original values have multiple new
definitions so they may need phi insertions.

This could probably be simplified by letting enterIntvBefore() take a live range
to be added following the instruction. As long as the range stays inside the
same basic block, value mapping shouldn't be a problem.

llvm-svn: 123926
2011-01-20 17:45:23 +00:00
Jakob Stoklund Olesen
360b0921ac Add LiveIntervalMap::dumpCache() to print out the cache used by the ssa update algorithm.
llvm-svn: 123925
2011-01-20 17:45:20 +00:00
Eric Christopher
d17b5b7988 My editor's indent went crazy. Fix.
llvm-svn: 123909
2011-01-20 08:56:34 +00:00
Eric Christopher
f7579ff174 Expand invalid return values for umulo and smulo. Handle these similarly
to add/sub by doing the normal operation and then checking for overflow
afterwards. This generally relies on the DAG handling the later invalid
operations as well.

Fixes the 64-bit part of rdar://8622122 and rdar://8774702.

llvm-svn: 123908
2011-01-20 08:54:28 +00:00
Evan Cheng
6dc21c7358 Sorry, several patches in one.
TargetInstrInfo:
Change produceSameValue() to take MachineRegisterInfo as an optional argument.
When in SSA form, targets can use it to make more aggressive equality analysis.

Machine LICM:
1. Eliminate isLoadFromConstantMemory, use MI.isInvariantLoad instead.
2. Fix a bug which prevent CSE of instructions which are not re-materializable.
3. Use improved form of produceSameValue.

ARM:
1. Teach ARM produceSameValue to look pass some PIC labels.
2. Look for operands from different loads of different constant pool entries
   which have same values.
3. Re-implement PIC GA materialization using movw + movt. Combine the pair with
   a "add pc" or "ldr [pc]" to form pseudo instructions. This makes it possible
   to re-materialize the instruction, allow machine LICM to hoist the set of
   instructions out of the loop and make it possible to CSE them. It's a bit
   hacky, but it significantly improve code quality.
4. Some minor bug fixes as well.

With the fixes, using movw + movt to materialize GAs significantly outperform the
load from constantpool method. 186.crafty and 255.vortex improved > 20%, 254.gap
and 176.gcc ~10%.

llvm-svn: 123905
2011-01-20 08:34:58 +00:00
Andrew Trick
bf079d8831 Selection DAG scheduler register pressure heuristic fixes.
Added a check for already live regs before claiming HighRegPressure.
Fixed a few cases of checking the wrong number of successors.
Added some tracing until these heuristics are better understood.

llvm-svn: 123892
2011-01-20 06:21:59 +00:00
Jakob Stoklund Olesen
ea33059ff5 Check that a live range exists before shortening it. This fixes PR8989.
The live range may have been deleted earlier because of rematerialization.

llvm-svn: 123891
2011-01-20 06:20:02 +00:00
Jakob Stoklund Olesen
bb94da29b2 Add hidden -verify-coalescing to run the machine code verifier before and after
register coalescing.

llvm-svn: 123890
2011-01-20 06:20:00 +00:00
Jakob Stoklund Olesen
c387993232 Fix bug found by new clang warning.
llvm-svn: 123872
2011-01-20 02:43:19 +00:00
Eric Christopher
58f8058502 Use only one API at a time.
llvm-svn: 123866
2011-01-20 01:29:23 +00:00
Eric Christopher
1b0e5debb4 If we can, lower the multiply part of a umulo/smulo call to a libcall
with an invalid type then split the result and perform the overflow check
normally.

Fixes the 32-bit parts of rdar://8622122 and rdar://8774702.

llvm-svn: 123864
2011-01-20 00:29:24 +00:00
Devang Patel
729c5e59af Fix debug info for merged global.
llvm-svn: 123862
2011-01-20 00:02:16 +00:00