1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

10714 Commits

Author SHA1 Message Date
Gabor Greif
99c07b1d95 Move the search for the appropriate AND instruction
into OptimizeCompareInstr.
This necessitates the passing of CmpValue around,
so widen the virtual functions to accomodate.

No functionality changes.

llvm-svn: 114428
2010-09-21 12:01:15 +00:00
Chris Lattner
b68bd70665 a few more trivial updates. This fixes PerformInsertVectorEltInMemory to not
pass a completely incorrect SrcValue, which would result in a miscompile with
combiner-aa.

llvm-svn: 114411
2010-09-21 07:32:19 +00:00
Chris Lattner
1cad885bf7 add some accessors
llvm-svn: 114409
2010-09-21 06:43:24 +00:00
Chris Lattner
112cf9bc89 it's more elegant to put the "getConstantPool" and
"getFixedStack" on the MachinePointerInfo class.  While
this isn't the problem I'm setting out to solve, it is the
right way to eliminate PseudoSourceValue, so lets go with it.

llvm-svn: 114406
2010-09-21 06:22:23 +00:00
Chris Lattner
f94de5bf46 reimplement memcpy/memmove/memset lowering to use MachinePointerInfo
instead of srcvalue/offset pairs.  This corrects SV info for mem 
operations whose size is > 32-bits.

llvm-svn: 114401
2010-09-21 05:40:29 +00:00
Chris Lattner
b6d15db75c add some helpful accessors.
llvm-svn: 114400
2010-09-21 05:39:30 +00:00
Chris Lattner
dbe51ad1b8 add overloads for SelectionDAG::getLoad, getStore, getTruncStore that take a
MachinePointerInfo.  Among other virtues, this doesn't silently  truncate the
svoffset to 32-bits.

llvm-svn: 114399
2010-09-21 05:10:45 +00:00
Chris Lattner
e1fc671030 simplify interface to SelectionDAG::getMemIntrinsicNode, making it take a MachinePointerInfo
llvm-svn: 114397
2010-09-21 04:57:15 +00:00
Chris Lattner
e4db4cad3b chagne interface to SelectionDAG::getAtomic to take a MachinePointerInfo,
eliminating some weird "infer a frame address" logic which was dead.

llvm-svn: 114396
2010-09-21 04:53:42 +00:00
Chris Lattner
5de5fada20 don't implicitly drop the offset of a machinememoperand when legalizing atomics.
llvm-svn: 114395
2010-09-21 04:51:11 +00:00
Chris Lattner
af01f8d142 force clients of MachineFunction::getMachineMemOperand to provide a
MachinePointerInfo, propagating the type out a level of API.  Remove
the old MachineFunction::getMachineMemOperand impl.

llvm-svn: 114393
2010-09-21 04:46:39 +00:00
Chris Lattner
940c35a3c3 start pushing MachinePointerInfo out through the MachineMemOperand interface
to the MachineFunction construction methods.

llvm-svn: 114390
2010-09-21 04:32:08 +00:00
Chris Lattner
7fdf193383 refactor the Value*/offset pair from MachineMemOperand out to a new
MachinePointerInfo struct, no functionality change.

This also adds an assert to MachineMemOperand::MachineMemOperand
that verifies that the Value* is either null or is an IR pointer type.

llvm-svn: 114389
2010-09-21 04:23:39 +00:00
Evan Cheng
1ce02d180e Enable machine sinking critical edge splitting. e.g.
define double @foo(double %x, double %y, i1 %c) nounwind {
  %a = fdiv double %x, 3.2
  %z = select i1 %c, double %a, double %y
  ret double %z
}

Was:
_foo:
        divsd   LCPI0_0(%rip), %xmm0
        testb   $1, %dil
        jne     LBB0_2
        movaps  %xmm1, %xmm0
LBB0_2:
        ret

Now:
_foo:
        testb   $1, %dil
        je      LBB0_2
        divsd   LCPI0_0(%rip), %xmm0
        ret
LBB0_2:
        movaps  %xmm1, %xmm0
        ret

This avoids the divsd when early exit is taken.
rdar://8454886

llvm-svn: 114372
2010-09-20 22:52:00 +00:00
Owen Anderson
fc94b337eb When TCO is turned on, it is possible to end up with aliasing FrameIndex's. Therefore,
CombinerAA cannot assume that different FrameIndex's never alias, but can instead use
MachineFrameInfo to get the actual offsets of these slots and check for actual aliasing.

This fixes CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll and CodeGen/X86/tailcallstack64.ll
when CombinerAA is enabled, modulo a different register allocation sequence.

llvm-svn: 114348
2010-09-20 20:39:59 +00:00
Evan Cheng
1c7f72d0bc Avoid splitting critical edge twice for a set of PHI uses.
llvm-svn: 114338
2010-09-20 19:12:55 +00:00
Owen Anderson
9594834ec1 Revert r114312 while I sort out some issues.
llvm-svn: 114313
2010-09-19 21:01:26 +00:00
Owen Anderson
65f23dcf7e Tentatively enabled DAGCombiner Alias Analysis by default. As far as I know,
r114268 fixed the last of the blockers to enabling it.  I will be monitoring
for failures.

llvm-svn: 114312
2010-09-19 19:51:55 +00:00
Benjamin Kramer
89a330c4b9 Unbreak msvc build.
llvm-svn: 114284
2010-09-18 14:41:26 +00:00
Lang Hames
2d87a43549 Fixed non-const iterator error.
llvm-svn: 114273
2010-09-18 09:49:08 +00:00
Lang Hames
4a8c999803 Added a separate class (PBQPBuilder) for PBQP Problem construction. This class can be extended to support custom constraints.
For now the allocator still uses the old (internal) construction mechanism by default. This will be phased out soon assuming 
no issues with the builder system come up.

To invoke the new construction mechanism just pass '-regalloc=pbqp -pbqp-builder' to llc. To provide custom constraints a
Target just needs to extend PBQPBuilder and pass an instance of their derived builder to the RegAllocPBQP constructor.

llvm-svn: 114272
2010-09-18 09:07:10 +00:00
Evan Cheng
442cb9c620 Fix code that break critical edges for PHI uses. Watch out for multiple PHIs in different blocks.
llvm-svn: 114270
2010-09-18 06:42:17 +00:00
Owen Anderson
015641f659 Invert the logic of reachesChainWithoutSideEffects(). What we want to check is that there is
NO path to the destination containing side effects, not that SOME path contains no side effects.
In  practice, this only manifests with CombinerAA enabled, because otherwise the chain has little
to no branching, so "any" is effectively equivalent to "all".

llvm-svn: 114268
2010-09-18 04:45:14 +00:00
Evan Cheng
8c2bde65f0 Teach machine sink to
1) Do forward copy propagation. This makes it easier to estimate the cost of the
   instruction being sunk.
2) Break critical edges on demand, including cases where the value is used by
   PHI nodes.
Critical edge splitting is not yet enabled by default.

llvm-svn: 114227
2010-09-17 22:28:18 +00:00
Evan Cheng
042ab036a2 Machine CSE was forgetting to clear some data structures.
llvm-svn: 114222
2010-09-17 21:59:42 +00:00
Evan Cheng
5f2926d516 Fix a potential bug that can cause miscomparison with and without debug info.
llvm-svn: 114220
2010-09-17 21:56:26 +00:00
Devang Patel
99777d1d07 If FE forgot to provide a file name (usually it uses "stdin" as name in such situation) then make one up to ensure that debug info is not malformed.
llvm-svn: 114119
2010-09-16 20:57:49 +00:00
Jakob Stoklund Olesen
e37047a62f Use the value mapping provided by LiveIntervalMap. This simplifies the code a
great deal because we don't have to worry about maintaining SSA form.

Unconditionally copy back to dupli when the register is live out of the split
range, even if the live-out value was defined outside the range. Skipping the
back-copy only makes sense when the live range is going to spill outside the
split range, and we don't know that it will. Besides, this was a hack to avoid
SSA update issues.

Clear up some confusion about the end point of a half-open LiveRange. Methinks
LiveRanges need to be closed so both start and end are included in the range.
The low bits of a SlotIndex are symbolic, so a half-open range doesn't really
make sense. This would be a pervasive change, though.

llvm-svn: 114043
2010-09-16 00:01:36 +00:00
Devang Patel
e15f83013d Check bb to ensure that alloca is in separate basic block.
This fixes funcargs.exp regression reported by gdb testsuite.

llvm-svn: 113992
2010-09-15 18:13:55 +00:00
Devang Patel
fbc9fca6ac If dbg.declare from non-entry block is using alloca from entry block then use offset available in StaticAllocaMap to emit DBG_VALUE. Right now, this has no material impact because varible info also collected using offset table maintained in machine module info.
llvm-svn: 113967
2010-09-15 14:48:53 +00:00
Gabor Greif
bd0b1357e0 must not peephole away side effects
llvm-svn: 113848
2010-09-14 20:46:08 +00:00
Devang Patel
632686ac96 Use frame index, if available for byval argument while lowering dbg_declare. Otherwise let getRegForValue() find register for this argument.
llvm-svn: 113843
2010-09-14 20:29:31 +00:00
Michael J. Spencer
90f807fda5 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Jakob Stoklund Olesen
52d3045d23 Mechanically replace LiveInterval* with LiveIntervalMap for intervals being
edited without actually using LiveIntervalMap functionality.

llvm-svn: 113816
2010-09-13 23:29:11 +00:00
Jakob Stoklund Olesen
060ad376c4 Allow LiveIntervalMap to be reused by resetting the current live interval.
llvm-svn: 113815
2010-09-13 23:29:09 +00:00
Jakob Stoklund Olesen
0e83d54b2a Let's just declare that it is impossible to construct a std::pair from a null
pointer and work around that.

llvm-svn: 113788
2010-09-13 21:29:45 +00:00
Benjamin Kramer
9859d9eee4 Fix linux/msvc build, move include.
llvm-svn: 113776
2010-09-13 20:04:49 +00:00
Eric Christopher
02df36a2fb Silence more warnings. Two more unused variables.
llvm-svn: 113771
2010-09-13 18:30:57 +00:00
John Thompson
ae3a86d6de Added skeleton for inline asm multiple alternative constraint support.
llvm-svn: 113766
2010-09-13 18:15:37 +00:00
Bill Wendling
038bcd275f Rename ConvertToSetZeroFlag to something more general.
llvm-svn: 113670
2010-09-11 00:13:50 +00:00
Bill Wendling
f2b0c99610 No need to recompute the SrcReg and CmpValue.
llvm-svn: 113666
2010-09-10 23:46:12 +00:00
Bill Wendling
e54ebc2cbe Move some of the decision logic for converting an instruction into one that sets
the 'zero' bit down into the back-end. There are other cases where this logic
isn't sufficient, so they should be handled separately.

llvm-svn: 113665
2010-09-10 23:34:19 +00:00
Bob Wilson
cc4cd788ec Fix a comment typo.
llvm-svn: 113653
2010-09-10 22:42:21 +00:00
Bill Wendling
dc260a07f6 Modify the comparison optimizations in the peephole optimizer to update the
iterator when an optimization took place. This allows us to do more insane
things with the code than just remove an instruction or two.

llvm-svn: 113640
2010-09-10 21:55:43 +00:00
Michael J. Spencer
98ad3f2ea7 CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Devang Patel
346f59b31c Add DEBUG message.
llvm-svn: 113614
2010-09-10 20:32:09 +00:00
Evan Cheng
c9cb37516d Teach if-converter to be more careful with predicating instructions that would
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.

llvm-svn: 113570
2010-09-10 01:29:16 +00:00
Jakob Stoklund Olesen
db1636ff8c Remove dead code.
llvm-svn: 113386
2010-09-08 18:50:24 +00:00
Jakob Stoklund Olesen
bd8da2d3ee Don't add <imp-def> operands during register rewriting.
LiveIntervals already adds <imp-def> operands for super-registers when a subreg
def defines the whole register. Thus, it is not necessary to do it again when
rewriting.

In fact, the super-register imp-defs caused miscompilations because the late
scheduler couldn't see that the super-register was read.

We still add super-reg <imp-use,kill> operands when rewriting virtuals to
physicals.

llvm-svn: 113299
2010-09-07 22:38:45 +00:00
Chris Lattner
6c08c3b321 add a comment about where this should eventually move.
llvm-svn: 113117
2010-09-05 20:33:40 +00:00
Lang Hames
af037cded6 Added initialisers for reduction rule counters.
llvm-svn: 113108
2010-09-05 13:42:32 +00:00
Chris Lattner
684ae57b8e implement rdar://6653118 - fastisel should fold loads where possible.
Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
for example, before, this code:

int foo(int x, int y, int z) {
  return x+y+z;
}

used to compile into:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	movl	4(%rsp), %esi
	addl	%edx, %esi
	movl	(%rsp), %edx
	addl	%esi, %edx
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Now we produce:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	addl	4(%rsp), %edx    ## Folded load
	addl	(%rsp), %edx     ## Folded load
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Fewer instructions and less register use = faster compiles.

llvm-svn: 113102
2010-09-05 02:18:34 +00:00
Jakob Stoklund Olesen
14f6dc4465 Remove dead code.
Clobber ranges are no longer used when joining physical registers.
Instead, all aliases are checked for interference.

llvm-svn: 113084
2010-09-04 21:09:33 +00:00
Chris Lattner
8df3ffd7ac zap dead code.
llvm-svn: 113073
2010-09-04 18:12:00 +00:00
Jim Grosbach
f61aac8c15 previous patch was a little too tricky for its own good. Don't try to
overload UserInInstr. Explicitly check Allocatable. The early exit in the
condition will mean the performance impact of the extra test should be
minimal.

llvm-svn: 113016
2010-09-03 21:45:15 +00:00
Bob Wilson
5170a69b9f Add a missing check when legalizing a vector extending load. This doesn't
solve the root problem, but it corrects the bug in the code I added to
support legalizing in the case where the non-extended type is also legal.

llvm-svn: 112997
2010-09-03 19:20:37 +00:00
Jakob Stoklund Olesen
0806eee7ae VirtRegRewriter checks for early clobbers before it reuses an available stack
slot.

Teach it to also check for early clobbered aliases, and early clobber operands
following the current operand.

This fixes the miscompilation in PR8044 where EC registers eax and ecx were
being used for inputs.

llvm-svn: 112988
2010-09-03 18:36:56 +00:00
Duncan Sands
e5c010f505 Reapply commit 112702 which was speculatively reverted by echristo.
Original commit message:
Use the SSAUpdator to turn calls to eh.exception that are not in a
landing pad into uses of registers rather than loads from a stack
slot.  Doesn't touch the 'orrible hack code - Bill needs to persuade
me harder :)

llvm-svn: 112952
2010-09-03 08:31:48 +00:00
Devang Patel
e431686861 There is no need to use .set here.
Thanks Chris!

llvm-svn: 112900
2010-09-02 23:01:10 +00:00
Devang Patel
5d3e68d22b Detect undef value early and save unnecessary NodeMap query.
llvm-svn: 112864
2010-09-02 21:29:42 +00:00
Dan Gohman
6824bfc554 Don't narrow the load and store in a load+twiddle+store sequence unless
there are clearly no stores between the load and the store. This fixes
this miscompile reported as PR7833.

This breaks the test/CodeGen/X86/narrow_op-2.ll optimization, which is
safe, but awkward to prove safe. Move it to X86's README.txt.

llvm-svn: 112861
2010-09-02 21:18:42 +00:00
Devang Patel
3080c6e860 Tidy up.
llvm-svn: 112858
2010-09-02 21:02:27 +00:00
Jim Grosbach
b35c81846b The scavenger should just use getAllocatableSet() rather than reinventing it
locally.

llvm-svn: 112845
2010-09-02 18:29:04 +00:00
Jim Grosbach
8a3babf59a Anti-dependency breaking needs to be careful not to use reserved regs
llvm-svn: 112832
2010-09-02 17:12:55 +00:00
Devang Patel
bbbd35d042 Fix .debug_range for linux. Patch by Krister Wombell.
llvm-svn: 112830
2010-09-02 16:43:44 +00:00
Lang Hames
e80abebead Added support for register allocators to record which intervals are spill intervals, and where the uses and defs of the original intervals were in the original code.
Spill intervals can be hidden using the "-rmf-intervals=virt-nospills*" option.

llvm-svn: 112811
2010-09-02 08:27:00 +00:00
Chandler Carruth
71b26a9243 Silence an ambiguous else warning from GCC.
llvm-svn: 112809
2010-09-02 07:08:05 +00:00
Lang Hames
d19ac535ea Added counters for PBQP reduction rules.
llvm-svn: 112807
2010-09-02 05:37:52 +00:00
Jim Grosbach
82a4ac2c83 Add a bit of debug output for register scavenging
llvm-svn: 112787
2010-09-02 00:51:37 +00:00
Jim Grosbach
9df54659d3 Tweak to ignoring reserved regs. The allocator was occasionally still looking
at them since they'd end up in the register weights list. Tell it to stop
doing that.

llvm-svn: 112756
2010-09-01 22:48:34 +00:00
Jakob Stoklund Olesen
fe11c81560 Teach RemoveCopyByCommutingDef to check all aliases, not just subregisters.
This caused a miscompilation in WebKit where %RAX had conflicting defs when
RemoveCopyByCommutingDef was commuting a %EAX use.

llvm-svn: 112751
2010-09-01 22:15:35 +00:00
Jim Grosbach
69ffc23491 tidy up trailing whitespace and an 80 column violation.
llvm-svn: 112746
2010-09-01 21:48:06 +00:00
Jim Grosbach
250d5e6af4 cleanup per feedback. use a helper function for getting the first non-reserved
physical register in a register class. Make sure to assert if the register
class is empty.

llvm-svn: 112743
2010-09-01 21:34:41 +00:00
Jim Grosbach
6de7c3ef19 The register allocator shouldn't consider allocating reserved registers. PBQP version.
llvm-svn: 112742
2010-09-01 21:23:03 +00:00
Jim Grosbach
18fc90c535 The register allocator shouldn't consider allocating reserved registers.
r112728 did this for fast regalloc.

llvm-svn: 112741
2010-09-01 21:04:27 +00:00
Jim Grosbach
4672574f24 The register allocator shouldn't consider allocating reserved registers.
llvm-svn: 112728
2010-09-01 19:28:41 +00:00
Jim Grosbach
f727f525cd tidy up a few 80-column and trailing whitespace bits.
llvm-svn: 112726
2010-09-01 19:16:29 +00:00
Eric Christopher
f72b7040a2 Speculatively revert 112699 and 112702, they seem to be causing
self host errors on clang-x86-64.

llvm-svn: 112719
2010-09-01 17:29:10 +00:00
Duncan Sands
6aa2784156 Use the SSAUpdator to turn calls to eh.exception that are not in a
landing pad into uses of registers rather than loads from a stack
slot.  Doesn't touch the 'orrible hack code - Bill needs to persuade
me harder :)

llvm-svn: 112702
2010-09-01 14:07:47 +00:00
Devang Patel
9e8ee9242f Use absolute label for DW_AT_stmt_list if a target does not prefer offset here.
This patch was developed on top of original patch by Artur Pietrek.

llvm-svn: 112678
2010-08-31 23:50:19 +00:00
Devang Patel
46570e6783 Reapply r112623. Included additional check for unused byval argument.
llvm-svn: 112659
2010-08-31 22:22:42 +00:00
Jakob Stoklund Olesen
9fe6b84fb2 Track liveness of unallocatable, unreserved registers in machine DCE.
Reserved registers are unpredictable, and are treated as always live by machine
DCE.

Allocatable registers are never reserved, and can be used for virtual registers.

Unreserved, unallocatable registers can not be used for virtual registers, but
otherwise behave like a normal allocatable register. Most targets only have
the flag register in this set.

llvm-svn: 112649
2010-08-31 21:51:05 +00:00
Jakob Stoklund Olesen
d76e5132e7 Ignore unallocatable registers in RegAllocFast.
llvm-svn: 112632
2010-08-31 19:54:25 +00:00
Devang Patel
b94251aea0 Revert r112623. It is causing self host build failures.
llvm-svn: 112631
2010-08-31 19:41:03 +00:00
Devang Patel
414cbc940a Remember byval argument's frame index during argument lowering and use this info to emit debug info.
Fixes Radar 8367011.

llvm-svn: 112623
2010-08-31 18:50:09 +00:00
Jim Grosbach
ddc265a982 Improve virtual frame base register allocation heuristics.
1. Allocate them in the entry block of the function to enable function-wide
     re-use. The instructions to create them should be re-materializable, so
     there shouldn't be additional cost compared to creating them local
     to the basic blocks where they are used.
  2. Collect all of the frame index references for the function and sort them
     by the local offset referenced. Iterate over the sorted list to
     allocate the virtual base registers. This enables creation of base
     registers optimized for positive-offset access of frame references.
     (Note: This may be appropriate to later be a target hook to do the
     sorting in a target appropriate manner. For now it's done here for
     simplicity.)

llvm-svn: 112609
2010-08-31 17:58:19 +00:00
Duncan Sands
2a1c11e104 Stop using the dom frontier in DwarfEHPrepare by not promoting alloca's
any more.  I plan to reimplement alloca promotion using SSAUpdater later.
It looks like Bill's URoR logic really always needs domtree, so the pass
now always asks for domtree info.

llvm-svn: 112597
2010-08-31 09:05:06 +00:00
Devang Patel
a1ff33906b Offset is not always unsigned number.
llvm-svn: 112584
2010-08-31 06:12:08 +00:00
Devang Patel
2eeab37306 Simplify.
llvm-svn: 112583
2010-08-31 06:11:28 +00:00
Bruno Cardoso Lopes
ebe80d78ff zap unused method. x86 is the only user and already has a more powerfull version
llvm-svn: 112571
2010-08-31 02:36:20 +00:00
Jakob Stoklund Olesen
6fa8a6ac6b Add experimental -disable-physical-join command line option.
Eventually, we want to disable physreg coalescing completely, and let the
register allocator do its job using hints.

This option makes it possible to measure the impact of disabling physreg
coalescing.

llvm-svn: 112567
2010-08-31 01:27:49 +00:00
Chris Lattner
765e59210c two changes:
1) nuke ConstDataCoalSection, which is dead.
2) revise my previous patch for rdar://8018335,
  which was completely wrong.  Specifically, it doesn't 
  make sense to mark __TEXT,__const_coal as PURE_INSTRUCTIONS,
  because it is for readonly data.  templates (it turns out)
  go to const_coal_nt.  The real fix for rdar://8018335 was
  to give ConstTextCoalSection a section kind of ReadOnly 
  instead of Text.

llvm-svn: 112496
2010-08-30 18:12:35 +00:00
Bill Wendling
999c8b219d Revert r112461. It was failing on PPC...
llvm-svn: 112463
2010-08-30 04:36:50 +00:00
Bill Wendling
450e009b5e When adding a register, we should mark it as "def" if it can optionally define
said (physical) register.

llvm-svn: 112461
2010-08-30 01:36:05 +00:00
Chris Lattner
8331070df0 revert 112457, it looks like it broke selfhost.
llvm-svn: 112459
2010-08-29 22:28:18 +00:00
Chris Lattner
92879a5ba1 rewrite DwarfEHPrepare to use SSAUpdater to promote its allocas
instead of PromoteMemToReg.  This allows it to stop using DF and DT,
eliminating a computation of DT and DF from clang -O3.  Clang is now
down to 2 runs of DomFrontier.

llvm-svn: 112457
2010-08-29 19:54:28 +00:00
Chris Lattner
a38548a56d inline function into its only caller.
llvm-svn: 112455
2010-08-29 19:28:28 +00:00
Chris Lattner
ecf276b787 remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.

llvm-svn: 112356
2010-08-28 04:09:24 +00:00
Chris Lattner
e7afb6fbb0 remove dead proto
llvm-svn: 112354
2010-08-28 03:45:03 +00:00
Dan Gohman
507f5a8ae7 Completely disable tail calls when fast-isel is enabled, as fast-isel
doesn't currently support dealing with this.

llvm-svn: 112341
2010-08-28 00:51:03 +00:00
Dan Gohman
ffab4c6a7d Trim a #include.
llvm-svn: 112340
2010-08-28 00:49:13 +00:00
Devang Patel
eb68981283 Simplify.
llvm-svn: 112305
2010-08-27 22:25:51 +00:00
Bill Wendling
09a19ea0bf Remove now unneeded command line flag that enables 'optimize compares.'
llvm-svn: 112287
2010-08-27 20:39:09 +00:00
Devang Patel
24ad069401 Revert r112213. It is not needed.
llvm-svn: 112242
2010-08-26 23:35:15 +00:00
Jim Grosbach
2b81a07dc7 Simplify eliminateFrameIndex() interface back down now that PEI doesn't need
to try to re-use scavenged frame index reference registers. rdar://8277890

llvm-svn: 112241
2010-08-26 23:32:16 +00:00
Devang Patel
9d4933f6e0 If node is not available then use FuncInfo.ValueMap to emit debug info for byval parameter.
llvm-svn: 112238
2010-08-26 22:53:27 +00:00
Jim Grosbach
352d312320 Remove the now obsolete frame index virtual re-use algorithm from PEI. Pre-RA
virtual base registers handle this function, and more. A bit more cleanup
to do on the interface to eliminateFrameIndex() after this.

llvm-svn: 112237
2010-08-26 22:42:12 +00:00
Devang Patel
81e0e2622b Speculatively revert r112207.
llvm-svn: 112216
2010-08-26 20:33:42 +00:00
Devang Patel
4dd806f321 80 col.
llvm-svn: 112215
2010-08-26 20:32:32 +00:00
Devang Patel
d2b70bf32b Update DanglingDebugInfo so that it can be used to track llvm.dbg.declare also.
llvm-svn: 112213
2010-08-26 20:06:46 +00:00
Devang Patel
9565184a05 Donot forget to resolve dangling debug info in a case where virtual register, used for a value, is initialized after a dbg intrinsic is seen.
llvm-svn: 112207
2010-08-26 18:36:14 +00:00
Chris Lattner
bc2f7bb5f3 Add a hackaround for PR7993 which is causing failures on x86 builders that lack sse2.
llvm-svn: 112175
2010-08-26 06:57:07 +00:00
Chris Lattner
148485f707 implement SplitVecOp_CONCAT_VECTORS, fixing the included testcase with SSE1.
llvm-svn: 112171
2010-08-26 05:51:22 +00:00
Chris Lattner
2a233bf011 zap dead code.
llvm-svn: 112155
2010-08-26 02:57:35 +00:00
Chris Lattner
ef3055ca05 remove some llvmcontext arguments that are now dead post-refactoring.
llvm-svn: 112104
2010-08-25 23:00:45 +00:00
Chris Lattner
fe7c4ec039 Change handling of illegal vector types to widen when possible instead of
expanding: e.g. <2 x float> -> <4 x float> instead of -> 2 floats.  This
affects two places in the code: handling cross block values and handling
function return and arguments.  Since vectors are already widened by 
legalizetypes, this gives us much better code and unblocks x86-64 abi
and SPU abi work.

For example, this (which is a silly example of a cross-block value):
define <4 x float> @test2(<4 x float> %A) nounwind {
 %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
 %C = fadd <2 x float> %B, %B
  br label %BB
BB:
 %D = fadd <2 x float> %C, %C
 %E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
 ret <4 x float> %E
}

Now compiles into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 addps %xmm0, %xmm0
 ret

previously it compiled into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 pshufd $1, %xmm0, %xmm1
                                        ## kill: XMM0<def> XMM0<kill> XMM0<def>
 insertps $0, %xmm0, %xmm0
 insertps $16, %xmm1, %xmm0
 addps %xmm0, %xmm0
 ret

This implements rdar://8230384

llvm-svn: 112101
2010-08-25 22:49:25 +00:00
Devang Patel
3abb5dbc91 Fix comment.
llvm-svn: 112086
2010-08-25 20:41:24 +00:00
Devang Patel
25b17ca1c3 Remove dead argument.
llvm-svn: 112085
2010-08-25 20:39:26 +00:00
Jim Grosbach
eab4de864e Add some statistics for PEI register scavenging
llvm-svn: 112084
2010-08-25 20:34:28 +00:00
Chris Lattner
29cbd8d71c split the vector case of getCopyFromParts out to its own function,
no functionality change.

llvm-svn: 111994
2010-08-24 23:20:40 +00:00
Chris Lattner
ba2d0c8cca split the vector case out of getCopyToParts into its own function. No
functionality change.

llvm-svn: 111990
2010-08-24 23:10:06 +00:00
Chris Lattner
6246ba23da tidy up, reduce indentation
llvm-svn: 111982
2010-08-24 22:43:11 +00:00
Jim Grosbach
1b102f0b63 Add ARM heuristic for when to allocate a virtual base register for stack
access. rdar://8277890&7352504

llvm-svn: 111968
2010-08-24 21:19:33 +00:00
Jim Grosbach
0c3eb7ca50 Move enabling the local stack allocation pass into the target where it belongs.
For now it's still a command line option, but the interface to the generic
code doesn't need to know that.

llvm-svn: 111942
2010-08-24 19:05:43 +00:00
Devang Patel
9024c19242 Revert r107202. It is not adding any value.
llvm-svn: 111870
2010-08-24 00:06:12 +00:00
Jim Grosbach
33f85d977a Remove the MFI storage of the local allocation block size. It's not needed.
llvm-svn: 111847
2010-08-23 21:29:29 +00:00
Jim Grosbach
2bce13a3a4 Better handling of local offsets for downwards growing stacks. This corrects
relative offsets when there are offsets encoded in the instructions and
simplifies final allocation in PEI. rdar://8277890

llvm-svn: 111836
2010-08-23 20:40:38 +00:00
Devang Patel
cf6c6b4038 Handle qualified constants that are directly folded by FE.
PR 7920.

llvm-svn: 111820
2010-08-23 18:25:56 +00:00
Owen Anderson
fe3d206e65 Now that PassInfo and Pass::ID have been separated, move the rest of the passes over to the new registration API.
llvm-svn: 111815
2010-08-23 17:52:01 +00:00
Chandler Carruth
e0ed6ee921 Fix some GCC warnings by providing a virtual destructor in the base of a class
hierarchy with virtual methods and using llvm_unreachable to properly indicate
unreachable states which would otherwise leave variables uninitialized.

llvm-svn: 111803
2010-08-23 08:25:07 +00:00
Eli Friedman
64c0b96dd3 Delete dead comment.
llvm-svn: 111744
2010-08-21 20:19:51 +00:00
Bill Wendling
163660135e Create the new linker type "linker_private_weak_def_auto".
It's similar to "linker_private_weak", but it's known that the address of the
object is not taken. For instance, functions that had an inline definition, but
the compiler decided not to inline it. Note, unlike linker_private and
linker_private_weak, linker_private_weak_def_auto may have only default
visibility.  The symbols are removed by the linker from the final linked image
(executable or dynamic library).

llvm-svn: 111684
2010-08-20 22:05:50 +00:00
Jim Grosbach
2a9a42fbb1 Downwards growing stack allocation order reverses relative offsets
llvm-svn: 111673
2010-08-20 20:25:31 +00:00
Jim Grosbach
b96a34d6c7 Add more dbg output
llvm-svn: 111670
2010-08-20 19:04:43 +00:00
Jim Grosbach
2ed1a1d58e properly check for whether base regs were inserted
llvm-svn: 111646
2010-08-20 16:48:30 +00:00
Bob Wilson
3821009139 If the target says that an extending load is not legal, regardless of whether
it involves specific floating-point types, legalize should expand an
extending load to a non-extending load followed by a separate extend operation.
For example, we currently expand SEXTLOAD to EXTLOAD+SIGN_EXTEND_INREG (and
assert that EXTLOAD should always be supported).  Now we can expand that to
LOAD+SIGN_EXTEND.  This is needed to allow vector SIGN_EXTEND and ZERO_EXTEND
to be used for NEON.

llvm-svn: 111586
2010-08-19 23:52:39 +00:00
Jim Grosbach
4e6f40561f Better handling of offsets on frame index references. rdar://8277890
llvm-svn: 111585
2010-08-19 23:52:25 +00:00
Evan Cheng
0710eb55f1 Update debug logs.
llvm-svn: 111575
2010-08-19 23:33:02 +00:00
Evan Cheng
e558c5048c Properly update MachineDominators when splitting critical edge.
llvm-svn: 111574
2010-08-19 23:32:47 +00:00
Bill Wendling
33a73c2744 Correct header.
llvm-svn: 111540
2010-08-19 18:52:17 +00:00
Evan Cheng
44e9a498ac It's possible to sink a def if its local uses are PHI's.
llvm-svn: 111537
2010-08-19 18:33:29 +00:00
Michael J. Spencer
c17025abdc Fix the msvc 2010 build.
The Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01
implements parts of C++0x based on the draft standard. An old version of
the draft had a bug that makes std::pair<T1*, T2*>(something, 0) fail to
compile. This is because the template<class U, class V> pair(U&& x, V&& y)
constructor is selected, even though it later fails to implicitly convert
U and V to frist_type and second_type.

This has been fixed in n3090, but it seems that Microsoft is not going to
update msvc.

llvm-svn: 111535
2010-08-19 18:16:39 +00:00
Evan Cheng
f34da99d49 Remove disabled assertion.
llvm-svn: 111531
2010-08-19 17:33:48 +00:00
Evan Cheng
2edab9ddea Teach machine-sink to break critical edges when appropriate. Work in progress.
llvm-svn: 111530
2010-08-19 17:33:11 +00:00
Jim Grosbach
d6e0ffd95b Update local stack block allocation to let PEI do the allocs if no additional
base registers were required. This will allow for slightly better packing
of the locals when alignment padding is necessary after callee saved registers.

llvm-svn: 111508
2010-08-19 02:47:08 +00:00
Jim Grosbach
5d8da556ff Add a newline to debug output
llvm-svn: 111453
2010-08-18 23:14:02 +00:00
Evan Cheng
4690ffd18a If any def of a machine-sink candidate has local uses, it's obviously not safe to sink it to a successor block. This bug has been hidden because a later check for critical-edge disable these illegal optimizations. This patch should significantly reduce the amount of time spent on checking dominator information for obviously unsafe sinking.
llvm-svn: 111450
2010-08-18 23:09:25 +00:00
Jim Grosbach
6f036da8dc Enable ARM base register reuse to local stack slot allocation. Whenever a new
frame index reference to an object in the local block is seen, check if
it's near enough to any previously allocaated base register to re-use.

rdar://8277890

llvm-svn: 111443
2010-08-18 22:44:49 +00:00
Jakob Stoklund Olesen
ef87fb790b Thinking about it, we don't need MachineDominatorTree after all. The DomValue
map discovers the iterated dominance frontier for free.

llvm-svn: 111400
2010-08-18 20:29:53 +00:00
Jakob Stoklund Olesen
a94deec1c0 Revert r111394. It was too aggressive.
We must complete the DFS, otherwise we might miss needed phi-defs, and
prematurely color live ranges with a non-dominating value.

This is not a big deal since we get to color more of the CFG and the next
mapValue call will be faster.

llvm-svn: 111397
2010-08-18 20:06:05 +00:00
Jakob Stoklund Olesen
221c0b3c75 Aggressively prune the DFS when inserting phi-defs.
llvm-svn: 111394
2010-08-18 19:00:11 +00:00
Jakob Stoklund Olesen
b6491ab1f6 Add the LiveIntervalMap class. Don't hook it up yet.
LiveIntervalMap maps values from a parent LiveInterval to a child interval that
is a strict subset. It will create phi-def values as needed to preserve the
VNInfo SSA form in the child interval.

This leads to an algorithm very similar to the one in SSAUpdaterImpl.h, but with
enough differences that the code can't be reused:

- We don't need to manipulate PHI instructions.
- LiveIntervals have kills.
- We have MachineDominatorTree.
- We can use df_iterator.

llvm-svn: 111393
2010-08-18 19:00:08 +00:00
Bill Wendling
a055bae65f Improve whitespace.
llvm-svn: 111384
2010-08-18 18:41:13 +00:00
Jim Grosbach
b517fe948f Add hook for re-using virtual base registers for local stack slot access.
Nothing fancy, just ask the target if any currently available base reg
is in range for the instruction under consideration and use the first one
that is. Placeholder ARM implementation simply returns false for now.

ongoing saga of rdar://8277890

llvm-svn: 111374
2010-08-18 17:57:37 +00:00
Jakob Stoklund Olesen
32dcf0e7a9 Preserve subregs on PHI source operands. Patch by Krister Wombell!
llvm-svn: 111366
2010-08-18 16:09:47 +00:00
Jim Grosbach
ff8f931bbf Add materialization of virtual base registers for frame indices allocated into
the local block. Resolve references to those indices to a new base register.
For simplification and testing purposes, a new virtual base register is
allocated for each frame index being resolved. The result is truly horrible,
but correct, code that's good for exercising the new code paths.

Next up is adding thumb1 support, which should be very simple. Following that
will be adding base register re-use and implementing a reasonable ARM
heuristic for when a virtual base register should be generated at all.

llvm-svn: 111315
2010-08-17 22:41:55 +00:00
Dale Johannesen
535ca58e85 Make fast scheduler handle asm clobbers correctly.
PR 7882.  Follows suggestion by Amaury Pouly, thanks.

llvm-svn: 111306
2010-08-17 22:17:24 +00:00
Evan Cheng
aea9870136 PHI elimination shouldn't require machineloopinfo since it's used at -O0. Move the requirement to LiveIntervalAnalysis instead. Note this does not change the number of times machineloopinfo is computed.
llvm-svn: 111285
2010-08-17 21:00:37 +00:00
Evan Cheng
4cbb884ce2 Machine CSE preserves CFG. Pass manager was freeing machineloopinfo after machine cse before.
llvm-svn: 111281
2010-08-17 20:57:42 +00:00
Jim Grosbach
23003dc92f silence warning
llvm-svn: 111274
2010-08-17 20:21:30 +00:00
Jim Grosbach
4597437c58 Add hook to examine an instruction referencing a frame index to determine
whether to allocate a virtual frame base register to resolve the frame
index reference in it. Implement a simple version for ARM to aid debugging.

In LocalStackSlotAllocation, scan the function for frame index references
to local frame indices and ask the target whether to allocate virtual
frame base registers for any it encounters. Purely infrastructural for
debug output. Next step is to actually allocate base registers, then add
intelligent re-use of them.

rdar://8277890

llvm-svn: 111262
2010-08-17 18:13:53 +00:00
Evan Cheng
4223d274ca Move the decision logic whether it's a good idea to split a critical edge to clients. Also fixed an erroneous check. An edge is only a back edge when the from and to blocks are in the same loop.
llvm-svn: 111256
2010-08-17 17:43:50 +00:00
Evan Cheng
677a57e76a Fix debug message.
llvm-svn: 111250
2010-08-17 17:15:14 +00:00
Eric Christopher
2bf87a1c77 Fix typo.
llvm-svn: 111223
2010-08-17 01:30:33 +00:00
Evan Cheng
0163d059e4 PHI elimination should not break back edge. It can cause some significant code placement issues. rdar://8263994
good:
LBB0_2:
  mov     r2, r0
  . . .
  mov     r1, r2
  bne     LBB0_2

bad:
LBB0_2:
  mov     r2, r0
  . . .
@ BB#3:
  mov     r1, r2
  b       LBB0_2

llvm-svn: 111221
2010-08-17 01:20:36 +00:00
Jim Grosbach
9e252e854d tidy up. remove unused local.
llvm-svn: 111206
2010-08-16 23:26:09 +00:00
Jim Grosbach
ea414d3999 Better handle alignment requirements for local objects in pre-regalloc frame
mapping. Have the local block track its alignment requirement, and then
apply that when the block itself is allocated. Previously, offsets could
get adjusted in PEI to be different, relative to one another, than the
block allocation thought they would be, which defeats the point of doing
the allocation this way. Continuing rdar://8277890

llvm-svn: 111197
2010-08-16 22:30:41 +00:00
Eli Friedman
fb8b05726f Until uleb/sleb are MC-ized, add a hack to make them work with ELF object
emission.

llvm-svn: 111177
2010-08-16 20:08:40 +00:00
Jim Grosbach
33f86ffe9f track local frame size in MFI, not local to the pass, since PEI needs it.
llvm-svn: 111164
2010-08-16 18:06:15 +00:00
Jakob Stoklund Olesen
c3183a6ad4 Remove unused functions.
llvm-svn: 111156
2010-08-16 17:18:20 +00:00
Ted Kremenek
8091488511 Update CMake build.
llvm-svn: 111063
2010-08-14 01:55:09 +00:00
Jim Grosbach
a4d3174cba Add a local stack object block allocation pass. This is still an
experimental pass that allocates locals relative to one another before
register allocation and then assigns them to actual stack slots as a block
later in PEI. This will eventually allow targets with limited index offset
range to allocate additional base registers (not just FP and SP) to
more efficiently reference locals, as well as handle situations where
locals cannot be referenced via SP or FP at all (dynamic stack realignment
together with variable sized objects, for example). It's currently
incomplete and almost certainly buggy. Work in progress.

Disabled by default and gated via the -enable-local-stack-alloc command
line option.

rdar://8277890

llvm-svn: 111059
2010-08-14 00:15:52 +00:00
Jakob Stoklund Olesen
44b77ea344 Clean up the Spiller.h interface.
The earliestStart argument is entirely specific to linear scan allocation, and
can be easily calculated by RegAllocLinearScan.

Replace std::vector with SmallVector.

llvm-svn: 111055
2010-08-13 22:56:53 +00:00
Jakob Stoklund Olesen
70604cb116 Implement splitting inside a single block.
When a live range is contained a single block, we can split it around
instruction clusters. The current approach is very primitive, splitting before
and after the largest gap between uses.

llvm-svn: 111043
2010-08-13 21:18:48 +00:00
Jim Grosbach
4f58c74300 tidy up whitespace a bit
llvm-svn: 111019
2010-08-13 16:55:08 +00:00
Jakob Stoklund Olesen
d802c303fd Let LiveInterval::addRange extend existing ranges, it will verify that value
numbers match. The old check could accidentally leave holes in openli.

Also let useIntv add all ranges for the phi-def value inserted by
enterIntvAtEnd. This works as long at the value mapping is established in
enterIntvAtEnd.

llvm-svn: 110995
2010-08-13 01:05:26 +00:00
Jakob Stoklund Olesen
7bac4bf66d Remember to actually update SplitAnalysis statistics now that we have a fancy
function to do it.

llvm-svn: 110994
2010-08-13 01:05:23 +00:00
Jakob Stoklund Olesen
2dc2440b42 Handle an empty dupli.
This can happen if the original interval has been broken into two disconnected
parts. Ideally, we should be able to detect when the graph is disconnected and
create separate intervals, but that code is not implemented yet.

Example:

Two basic blocks are both branching to a loop header. Our interval is defined in
both basic blocks, and live into the loop along both edges.

We decide to split the interval around the loop. The interval is split into an
inside part and an outside part. The outside part now has two disconnected
segments, one in each basic block.

If we later decide to split the outside interval into single blocks, we get one
interval per basic block and an empty dupli for the remainder.

llvm-svn: 110976
2010-08-12 23:02:57 +00:00
Jakob Stoklund Olesen
f8957964f7 Update the SplitAnalysis statistics as uses are moved from curli to the new
split intervals. THis means the analysis can be used for multiple splits as long
as curli doesn't shrink.

llvm-svn: 110975
2010-08-12 23:02:55 +00:00
Jakob Stoklund Olesen
1337aa8e38 Also recompute HasPHIKill flags in LiveInterval::RenumberValues.
If a phi-def value were removed from the interval, the phi-kill flags are no
longer valid.

llvm-svn: 110949
2010-08-12 20:38:03 +00:00
Jakob Stoklund Olesen
cbb21e8c0e Remove trailing whitespace.
llvm-svn: 110944
2010-08-12 20:01:23 +00:00
Jakob Stoklund Olesen
d3e41f910a Clean up debug output.
llvm-svn: 110940
2010-08-12 18:50:55 +00:00
Jakob Stoklund Olesen
886eebfa6f Implement single block splitting.
Before spilling a live range, we split it into a separate range for each basic
block where it is used. That way we only get one reload per basic block if the
new smaller ranges can allocate to a register.

This type of splitting is already present in the standard spiller.

llvm-svn: 110934
2010-08-12 17:07:14 +00:00
Jakob Stoklund Olesen
ccf528b792 Fix a FIXME. The SlotIndex::Slot enum should be private.
llvm-svn: 110826
2010-08-11 16:50:17 +00:00
Bill Wendling
c8117e507d Turn optimize compares back on with fix. We needed to test that a machine op was
a register before checking if it was defined.

llvm-svn: 110733
2010-08-10 21:38:11 +00:00
Jakob Stoklund Olesen
e0262a6e24 Give up on register class recalculation when the register is used with subreg
operands. We don't currently have a hook to provide "the largest super class of
A where all registers' getSubReg(subidx) is valid and in B".

llvm-svn: 110730
2010-08-10 21:16:16 +00:00
Dan Gohman
9abea56ce4 Revert r110718; it broke clang-i386-darwin9.
llvm-svn: 110726
2010-08-10 20:49:33 +00:00
Jakob Stoklund Olesen
6036d58c40 Avoid editing the current live interval during remat.
The live interval may be used for a spill slot as well, and that spill slot
could be shared by split registers. We cannot shrink it, even if we know the
current register won't need the spill slot in that range.

llvm-svn: 110721
2010-08-10 20:45:07 +00:00
Jakob Stoklund Olesen
d3f939d7a2 More debug spew
llvm-svn: 110720
2010-08-10 20:45:01 +00:00
Bill Wendling
0acc8f8a02 Turn optimize cmps on by default so that we can get some testing by the nightly
ARM testers.

llvm-svn: 110718
2010-08-10 20:23:02 +00:00
Devang Patel
9b12559c4f Do not forget debug info for enums. Use named mdnode to keep track of these types.
llvm-svn: 110712
2010-08-10 20:01:20 +00:00
Jakob Stoklund Olesen
245a1faf76 Implement register class inflation.
When splitting a live range, the new registers have fewer uses and the
permissible register class may be less constrained. Recompute the register class
constraint from the uses of new registers created for a split. This may let them
be allocated from a larger set, possibly avoiding a spill.

llvm-svn: 110703
2010-08-10 18:37:40 +00:00
Jakob Stoklund Olesen
e51a747336 Recalculate the spill weight and allocation hint for virtual registers created
during live range splitting.

llvm-svn: 110686
2010-08-10 17:07:22 +00:00
Devang Patel
84f48b5483 Handle TAG_constant for integers.
llvm-svn: 110656
2010-08-10 07:11:13 +00:00
Bill Wendling
eb1b0564a7 Update CMake...sorry for the breakage.
llvm-svn: 110654
2010-08-10 05:16:06 +00:00
Devang Patel
8edc7575a4 Simplify.
llvm-svn: 110653
2010-08-10 04:12:17 +00:00
Devang Patel
191ed4c41d Drop "const". It does not add value here.
llvm-svn: 110652
2010-08-10 04:09:06 +00:00
Evan Cheng
7aaf83ba17 Add missing null check reported by Amaury Pouly.
llvm-svn: 110649
2010-08-10 02:39:45 +00:00
Devang Patel
ef61383343 Do not include file static variable in pubnames list.
Refactor and simplify code to avoid redundant checks.

llvm-svn: 110642
2010-08-10 01:37:23 +00:00
Jakob Stoklund Olesen
1ab2fab3af Transpose the calculation of spill weights such that we are calculating one
register at a time. This turns out to be slightly faster than iterating over
instructions, but more importantly, it allows us to compute spill weights for
new registers created after the spill weight pass has run.

Also compute the allocation hint at the same time as the spill weight. This
allows us to use the spill weight as a cost metric for copies, and choose the
most profitable hint if there is more than one possibility.

The new hints provide a very small (< 0.1%) but universal code size improvement.

llvm-svn: 110631
2010-08-10 00:02:26 +00:00