- Jan 22, 2010
-
-
Dale Johannesen authored
this makes the code work transparently the same whether they're there or not. llvm-svn: 94240
-
- Jan 04, 2010
-
-
David Greene authored
Change errs() to dbgs(). llvm-svn: 92529
-
- Dec 22, 2009
-
-
Lang Hames authored
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals. llvm-svn: 91859
-
- Dec 16, 2009
-
-
Jakob Stoklund Olesen authored
Tail duplication produces lots of identical phi nodes in different basic blocks. Teach PHIElimination to reuse the join registers when lowering a phi node that is identical to an already lowered node. This saves virtual registers, and more importantly it avoids creating copies the the coalescer doesn't know how to eliminate. Teach LiveIntervalAnalysis about the phi joins with multiple uses. This patch significantly reduces code size produced by -pre-regalloc-taildup. llvm-svn: 91549
-
- Dec 11, 2009
-
-
Evan Cheng authored
llvm-svn: 91103
-
- Dec 10, 2009
-
-
Jakob Stoklund Olesen authored
The coalescer is supposed to clean these up, but when setting up parameters for a function call, there may be copies to physregs. If the defining instruction has been LICM'ed far away, the coalescer won't touch it. The register allocation hint does not always work - when the register allocator is backtracking, it clears the hints. This patch is more conservative than r90502, and does not break 483.xalancbmk/i686. It still breaks the PowerPC bootstrap, so it is disabled by default, and can be enabled with the -trivial-coalesce-ends option. llvm-svn: 91049
-
- Dec 09, 2009
-
-
Lang Hames authored
When a call is placed to spill an interval this spiller will first try to break the interval up into its component values. Single value intervals and intervals which have already been split (or are the result of previous splits) are spilled by the default spiller. Splitting intervals as described above may improve the performance of generated code in some circumstances. This work is experimental however, and it still miscompiles many benchmarks. It's not recommended for general use yet. llvm-svn: 90951
-
- Dec 05, 2009
-
-
Bill Wendling authored
llvm-svn: 90653
-
- Dec 04, 2009
-
-
Jakob Stoklund Olesen authored
The coalescer is supposed to clean these up, but when setting up parameters for a function call, there may be copies to physregs. If the defining instruction has been LICM'ed far away, the coalescer won't touch it. The register allocation hint does not always work - when the register allocator is backtracking, it clears the hints. This patch takes care of a few more cases that r90163 missed. llvm-svn: 90502
-
- Dec 03, 2009
-
-
Jakob Stoklund Olesen authored
llvm-svn: 90481
-
- Dec 01, 2009
-
-
Evan Cheng authored
- A valno should be set HasRedefByEC if there is an early clobber def in the middle of its live ranges. It should not be set if the def of the valno is defined by an early clobber. - If a physical register def is tied to an use and it's an early clobber, it just means the HasRedefByEC is set since it's still one continuous live range. - Add a couple of missing checks for HasRedefByEC in the coalescer. In general, it should not coalesce a vr with a physical register if the physical register has a early clobber def somewhere. This is overly conservative but that's the price for using such a nasty inline asm "feature". llvm-svn: 90269
-
- Nov 30, 2009
-
-
Jakob Stoklund Olesen authored
New virtual registers created for spill intervals should inherit allocation hints from the original register. This helps us avoid silly copies when rematting values that are copied to a physical register: leaq _.str44(%rip), %rcx movq %rcx, %rsi call _strcmp becomes: leaq _.str44(%rip), %rsi call _strcmp The coalescer will not touch the movq because that would tie down the physical register. llvm-svn: 90163
-
- Nov 20, 2009
-
-
Jakob Stoklund Olesen authored
llvm-svn: 89470
-
Jakob Stoklund Olesen authored
Fix debug code that assumes getBasicBlock never returns NULL. llvm-svn: 89428
-
- Nov 18, 2009
-
-
Jakob Stoklund Olesen authored
llvm-svn: 89240
-
- Nov 09, 2009
-
-
Evan Cheng authored
llvm-svn: 86522
-
- Nov 07, 2009
-
-
Jakob Stoklund Olesen authored
A non-identity copy cannot be coalesced when the phi join destination register is live at the copy site. Also verify the condition that the PHI join source register is only used in the PHI join. Otherwise the coalescing is invalid. llvm-svn: 86322
-
- Nov 04, 2009
-
-
Lang Hames authored
This introduces a new pass, SlotIndexes, which is responsible for numbering instructions for register allocation (and other clients). SlotIndexes numbering is designed to match the existing scheme, so this patch should not cause any changes in the generated code. For consistency, and to avoid naming confusion, LiveIndex has been renamed SlotIndex. The processImplicitDefs method of the LiveIntervals analysis has been moved into its own pass so that it can be run prior to SlotIndexes. This was necessary to match the existing numbering scheme. llvm-svn: 85979
-
- Oct 20, 2009
-
-
Evan Cheng authored
llvm-svn: 84597
-
Evan Cheng authored
llvm-svn: 84586
-
- Oct 10, 2009
-
-
Dan Gohman authored
is trivially rematerializable and integrate it into TargetInstrInfo::isTriviallyReMaterializable. This way, all places that need to know whether an instruction is rematerializable will get the same answer. This enables the useful parts of the aggressive-remat option by default -- using AliasAnalysis to determine whether a memory location is invariant, and removes the questionable parts -- rematting operations with virtual register inputs that may not be live everywhere. llvm-svn: 83687
-
- Oct 09, 2009
-
-
Dan Gohman authored
TargetInstrDesc::isRematerializable flag, so it isn't necessary to do this check in its callers. llvm-svn: 83671
-
- Oct 07, 2009
-
-
Dan Gohman authored
teach it how to recognize invariant physical registers. llvm-svn: 83476
-
- Oct 03, 2009
-
-
Lang Hames authored
llvm-svn: 83255
-
Lang Hames authored
llvm-svn: 83254
-
- Sep 26, 2009
-
-
Daniel Dunbar authored
llvm-svn: 82821
-
Dan Gohman authored
llvm-svn: 82812
-
- Sep 25, 2009
-
-
Dan Gohman authored
- Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions. This eliminates MachineInstr's std::list member and allows the data to be created by isel and live for the remainder of codegen, avoiding a lot of copying and unnecessary translation. This also shrinks MemSDNode. - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated fields for MachineMemOperands. - Change MemSDNode to have a MachineMemOperand member instead of its own fields with the same information. This introduces some redundancy, but it's more consistent with what MachineInstr will eventually want. - Ignore alignment when searching for redundant loads for CSE, but remember the greatest alignment. Target-specific code which previously used MemOperandSDNodes with generic SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range so that the SelectionDAG framework knows that MachineMemOperand information is available. llvm-svn: 82794
-
- Sep 23, 2009
-
-
Evan Cheng authored
of the defs are processed. Also fix a implicit_def propagation bug: a implicit_def of a physical register should be applied to uses of the sub-registers. llvm-svn: 82616
-
- Sep 21, 2009
-
-
Evan Cheng authored
Fix PR4986. "r1024 = insert_subreg r1024, undef, 2" cannot be turned in an implicit_def. Instead, it's an identity copy so it should be eliminated. Also make sure to update livevariable kill information. llvm-svn: 82436
-
- Sep 20, 2009
-
-
Dale Johannesen authored
we pushed the beginning of the interval back 1, so the interval would overlap with inputs that die. We were also pushing the end of the interval back 1, though, which means the earlyclobber didn't overlap with other output operands. Don't do this. PR 4964. llvm-svn: 82342
-
- Sep 15, 2009
-
-
Daniel Dunbar authored
llvm-svn: 81909
-
Evan Cheng authored
Another try at early partial coalescing. Identity phi source copies (their sources are defined by phi join def) are coalesced. And the phi join copy is backward copy propagated into the other copies. Still miscompiling some tests. :-( llvm-svn: 81849
-
- Sep 14, 2009
-
-
Evan Cheng authored
Add early coalescing to liveintervals. This is work in progress and is known to miscompute some tests. Read it at your own rish, I have aged 10 year while writing this. The gist of this is if source of some of the copies that feed into a phi join is defined by the phi join, we'd like to eliminate them. However, if any of the non-identity source overlaps the live interval of the phi join then the coalescer won't be able to coalesce them. The early coalescer's job is to eliminate the identity copies by partially-coalescing the two live intervals. llvm-svn: 81796
-
- Sep 12, 2009
-
-
Lang Hames authored
llvm-svn: 81605
-
Evan Cheng authored
llvm-svn: 81598
-
- Sep 04, 2009
-
-
Lang Hames authored
a new class, MachineInstrIndex, which hides arithmetic details from most clients. This is a step towards allowing the register allocator to update/insert code during allocation. llvm-svn: 81040
-
- Aug 23, 2009
-
-
Chris Lattner authored
update all code that this affects. llvm-svn: 79830
-
Chris Lattner authored
MachineInstr and MachineOperand. This required eliminating a bunch of stuff that was using DOUT, I hope that bill doesn't mind me stealing his fun. ;-) llvm-svn: 79813
-
Chris Lattner authored
llvm-svn: 79795
-