- May 18, 2012
-
-
Eric Christopher authored
llvm-svn: 157060
-
Jakob Stoklund Olesen authored
It is no longer necessary to separate VirtCopies, PhysCopies, and ImpDefCopies. Implicitly defined copies are extremely rare after we added the ProcessImplicitDefs pass, and physical register copies are not joined any longer. llvm-svn: 157059
-
Jakob Stoklund Olesen authored
This has been disabled for a while, and it is not a feature we want to support. Copies between physical and virtual registers are eliminated by good hinting support in the register allocator. Joining virtual and physical registers is really a form of register allocation, and the coalescer is not properly equipped to do that. In particular, it cannot backtrack coalescing decisions, and sometimes that would cause it to create programs that were impossible to register allocate, by exhausting a small register class. It was also very difficult to keep track of the live ranges of aliasing registers when extending the live range of a physreg. By disabling physreg joining, we can let fixed physreg live ranges remain constant throughout the register allocator super-pass. One type of physreg joining remains: A virtual register that has a single value which is a copy of a reserved register can be merged into the reserved physreg. This always lowers register pressure, and since we don't compute live ranges for reserved registers, there are no problems with aliases. llvm-svn: 157055
-
Stepan Dyatkovskiy authored
SelectionDAGBuilder::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced. llvm-svn: 157046
-
Evan Cheng authored
non-profitable commute using outdated info. The test case would still fail because of poor pre-RA schedule. That will be fixed by MI scheduler. rdar://11472010 llvm-svn: 157038
-
Andrew Trick authored
llvm-svn: 157020
-
- May 17, 2012
-
-
Andrew Trick authored
llvm-svn: 157007
-
Andrew Trick authored
Introduce the basic strategy for register pressure scheduling. 1) Respect target limits at all times. 2) Indentify critical register classes (pressure sets). Track pressure within the scheduled region. Avoid increasing scheduled pressure for critical registers. 3) Avoid exceeding the max pressure of the region prior to scheduling. Added logic for picking between the top and bottom ready Q's based on regpressure heuristics. Status: functional but needs to be asjusted to achieve good results. llvm-svn: 157006
-
Andrew Trick authored
llvm-svn: 157005
-
Andrew Trick authored
llvm-svn: 157004
-
Andrew Trick authored
llvm-svn: 157003
-
Andrew Trick authored
llvm-svn: 157002
-
Jakob Stoklund Olesen authored
RegisterCoalescer set <undef> flags on all operands of copy instructions that are scheduled to be removed. This is so they won't affect shrinkToUses() by introducing false register reads. Make sure those <undef> flags are never cleared, or shrinkToUses() could cause live intervals to end at instructions about to be deleted. This would be a lot simpler if RegisterCoalescer could just erase joined copies immediately instead of keeping all the to-be-deleted instructions around. This fixes PR12862. Unfortunately, bugpoint can't create a sane test case for this. Like many other coalescer problems, this failure depends of a very fragile series of events. <rdar://problem/11474428> llvm-svn: 157001
-
Jakob Stoklund Olesen authored
Make sure useless (def-only) intervals also get verified. llvm-svn: 157000
-
Bill Wendling authored
bugpoint-ing, it may turn into something else. llvm-svn: 156998
-
Stepan Dyatkovskiy authored
SelectionDAGBuilder: CaseBlock, CaseRanges and CaseCmp changed representation of Low and High from signed to unsigned. Since unsigned ints usually simpler, faster and allows to reduce some extra signed bit checks needed before <,>,<=,>= comparisons. llvm-svn: 156985
-
- May 16, 2012
-
-
Jakob Stoklund Olesen authored
When widening an existing <def,reads-undef> operand to a super-register, it may be necessary to clear the <undef> flag because the wider register is now read-modify-write through the instruction. Conversely, it may be necessary to add an <undef> flag when the coalescer turns a full-register def into a sub-register def, but the larger register wasn't live before the instruction. This happens in test/CodeGen/ARM/coalesce-subregs.ll, but the test is too small for the <undef> flags to affect the generated code. llvm-svn: 156951
-
Duncan Sands authored
llvm-svn: 156909
-
Jakob Stoklund Olesen authored
It is now possible to coalesce weird skewed sub-register copies by picking a super-register class larger than both original registers. The included test case produces code like this: vld2.32 {d16, d17, d18, d19}, [r0]! vst2.32 {d18, d19, d20, d21}, [r0] We still perform interference checking as if it were a normal full copy join, so this is still quite conservative. In particular, the f1 and f2 functions in the included test case still have remaining copies because of false interference. llvm-svn: 156878
-
Jakob Stoklund Olesen authored
It is possible to coalesce two overlapping registers to a common super-register that it larger than both of the original registers. The important difference is that it may be necessary to rewrite DstReg operands as well as SrcReg operands because the sub-register index has changed. This behavior is still disabled by CoalescerPair. llvm-svn: 156869
-
Jakob Stoklund Olesen authored
This can happen when widening a virtual register to a super-register class. llvm-svn: 156867
-
Jakob Stoklund Olesen authored
There is no need to look at an always null SrcIdx. llvm-svn: 156866
-
- May 15, 2012
-
-
Jakob Stoklund Olesen authored
Now both SrcReg and DstReg can be sub-registers of the final coalesced register. CoalescerPair::setRegisters still rejects such copies because RegisterCoalescer doesn't yet handle them. llvm-svn: 156848
-
Andrew Trick authored
This feature avoids creating edges in the scheduler's dependence graph for non-aliasing memory operations according to whichever alias analysis is available. It has been fully tested in Hexagon. Before making this default, it needs to be extended to handle multiple MachineMemOperands, compile time needs more evaluation, and benchmarking on X86 and ARM is needed. Patch by Sergei Larin! llvm-svn: 156842
-
Jim Grosbach authored
Add the MCRegisterInfo to the factories and constructors. Patch by Tom Stellard <Tom.Stellard@amd.com>. llvm-svn: 156828
-
Stepan Dyatkovskiy authored
llvm-svn: 156808
-
Stepan Dyatkovskiy authored
SelectionDAGBuilder::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced. llvm-svn: 156804
-
- May 14, 2012
-
-
Jakob Stoklund Olesen authored
This should unbreak llvm-x86_64-linux. llvm-svn: 156778
-
Jakob Stoklund Olesen authored
RAFast must add an <imp-def> operand when it is rewriting a sub-register def that isn't a read-modify-write. llvm-svn: 156777
-
Dan Gohman authored
llvm-svn: 156774
-
- May 12, 2012
-
-
Jakob Stoklund Olesen authored
Empty live ranges represent undef and still get allocated, but they won't appear in LiveIntervalUnions. Patch by Patrik Hägglund! llvm-svn: 156685
-
Chad Rosier authored
llvm-svn: 156662
-
Chad Rosier authored
llvm-svn: 156658
-
- May 11, 2012
-
-
Manman Ren authored
This patch will optimize the following cases: sub r1, r3 | sub r1, imm cmp r3, r1 or cmp r1, r3 | cmp r1, imm bge L1 TO subs r1, r3 bge L1 or ble L1 If the branch instruction can use flag from "sub", then we can replace "sub" with "subs" and eliminate the "cmp" instruction. rdar: 10734411 llvm-svn: 156599
-
Dan Gohman authored
but it generates int3 on x86 instead of ud2. llvm-svn: 156593
-
- May 10, 2012
-
-
Andrew Trick authored
llvm-svn: 156576
-
Andrew Trick authored
llvm-svn: 156575
-
Andrew Trick authored
Prioritize the instruction that comes closest to keeping pressure under the target's limit. Then prioritize instructions that avoid increasing the max pressure in the scheduled region. The max pressure heuristic is a tad aggressive. Later I'll fix it to consider the unscheduled pressure as well. WIP: This is mostly functional but untested and not likely to do much good yet. llvm-svn: 156574
-
Andrew Trick authored
llvm-svn: 156573
-
Andrew Trick authored
llvm-svn: 156572
-