| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to speed up def_iterator by stopping at the first
use. This makes def_empty() and getUniqueVRegDef() much faster when
there are many uses.
In a +Asserts build, LiveVariables is 100x faster in one case because
getVRegDef() has an assertion that would scan to the end of a
def_iterator chain.
Spill weight calculation is significantly faster (300x in one case)
because isTriviallyReMaterializable() calls MRI->isConstantPhysReg(%RIP)
which calls def_empty(%RIP).
llvm-svn: 161634
|
|
|
|
|
|
|
|
|
|
|
| |
Use a more conventional doubly linked list where the Prev pointers form
a cycle. This means it is no longer necessary to adjust the Prev
pointers when reallocating the VRegInfo array.
The test changes are required because the register allocation hint is
using the use-list order to break ties.
llvm-svn: 161633
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Register MachineOperands are kept in linked lists accessible via MRI's
reg_iterator interfaces. The linked list management was handled partly
by MachineOperand methods, partly by MRI methods.
Move all of the list management into MRI, delete
MO::AddRegOperandToRegInfo() and MO::RemoveRegOperandFromRegInfo().
Be more explicit about handling the cases where an MRI pointer isn't
available.
llvm-svn: 161632
|
|
|
|
| |
llvm-svn: 161007
|
|
|
|
|
|
|
| |
register does not have multiple definitions. Modified TwoAddressInstructionPass
to use getUniqueVRegDef instead of getVRegDef.
llvm-svn: 159545
|
|
|
|
|
|
| |
This comes in handy during peephole optimization.
llvm-svn: 159453
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No functional change intended.
Sorry for the churn. The iterator classes are supposed to help avoid
giant commits like this one in the future. The TableGen-produced
register lists are getting quite large, and it may be necessary to
change the table representation.
This makes it possible to do so without changing all clients (again).
llvm-svn: 157854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Late optimization passes like branch folding and tail duplication can
transform the machine code in a way that makes it expensive to keep the
register liveness information up to date. There is a fuzzy line between
register allocation and late scheduling where the liveness information
degrades.
The MRI::tracksLiveness() flag makes the line clear: While true,
liveness information is accurate, and can be used for register
scavenging. Once the flag is false, liveness information is not
accurate, and can only be used as a hint.
Late passes generally don't need the liveness information, but they will
sometimes use the register scavenger to help update it. The scavenger
enforces strict correctness, and we have to spend a lot of code to
update register liveness that may never be used.
llvm-svn: 153511
|
|
|
|
| |
llvm-svn: 152492
|
|
|
|
| |
llvm-svn: 152001
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Passes after RegAlloc should be able to rely on MRI->getNumVirtRegs() == 0.
This makes sharing code for pre/postRA passes more robust.
Now, to check if a pass is running before the RA pipeline begins, use MRI->isSSA().
To check if a pass is running after the RA pipeline ends, use !MRI->getNumVirtRegs().
PEI resets virtual regs when it's done scavenging.
PTX will either have to provide its own PEI pass or assign physregs.
llvm-svn: 151032
|
|
|
|
|
|
|
|
|
| |
MRI keeps track of which physregs have been used. Make sure it gets
updated with all the regmask-clobbered registers.
Delete the closePhysRegsUsed() function which isn't necessary.
llvm-svn: 150830
|
|
|
|
|
|
| |
It is safe to move uses of such registers.
llvm-svn: 148259
|
|
|
|
|
|
|
|
|
|
|
| |
The register allocators don't currently support adding reserved
registers while they are running. Extend the MRI API to keep track of
the set of reserved registers when register allocation started.
Target hooks like hasFP() and needsStackRealignment() can look at this
set to avoid reserving more registers during register allocation.
llvm-svn: 147577
|
|
|
|
|
|
|
|
|
|
|
| |
Now that getMatchingSuperRegClass() returns accurate results, it can be
used to compute constraints imposed by instructions using a sub-register
of a virtual register.
This means we can recompute the register class of any virtual register
by combining the constraints from all its uses.
llvm-svn: 146874
|
|
|
|
|
|
|
|
|
|
| |
Now that MI->getRegClassConstraint() can also handle inline assembly,
don't bail when recomputing the register class of a virtual register
used by inline asm.
This fixes PR11078.
llvm-svn: 141836
|
|
|
|
|
|
| |
It will soon need the context.
llvm-svn: 140896
|
|
|
|
|
|
|
|
|
|
|
| |
The function will refuse to use a register class with fewer registers
than MinNumRegs. This can be used by clients to avoid accidentally
increase register pressure too much.
The default value of MinNumRegs=0 doesn't affect how constrainRegClass()
works.
llvm-svn: 140339
|
|
|
|
|
|
|
|
| |
This function doesn't have anything to do with spill weights, and MRI
already has functions for manipulating the register class of a virtual
register.
llvm-svn: 137123
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag is true from isel to register allocation when the machine
function is required to be in SSA form. The TwoAddressInstructionPass
and PHIElimination passes clear the flag.
The SSA flag wil be used by the machine code verifier to check for SSA
form, and eventually an assertion can enforce it in +Asserts builds.
This will catch the common target error of creating machine code with
multiple defs of a virtual register.
llvm-svn: 136532
|
|
|
|
| |
llvm-svn: 133967
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some register classes are only used for instruction operand constraints.
They should never be used for virtual registers. Previously, those
register classes were given an empty allocation order, but now you can
say 'let isAllocatable=0' in the register class definition.
TableGen calculates if a register is part of any allocatable register
class, and makes that information available in TargetRegisterDesc::inAllocatableClass.
The goal here is to eliminate use cases for overriding allocation_order_*
methods.
llvm-svn: 132508
|
|
|
|
|
|
|
|
|
|
|
| |
LiveIns."
In other words, do not keep track of argument's location. The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body.
This requires some coordination with debugger to get this working.
- The debugger needs to be aware of prolog_end attribute attached with line table entries.
- The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+)
llvm-svn: 126155
|
|
|
|
| |
llvm-svn: 124611
|
|
|
|
| |
llvm-svn: 123106
|
|
|
|
|
|
|
|
| |
This function is intended to be used when inserting a machine instruction that
trivially restricts the legal registers, like LEA requiring a GR32_NOSP
argument.
llvm-svn: 115875
|
|
|
|
| |
llvm-svn: 108062
|
|
|
|
|
|
| |
and to clean up unused incoming physregs from the live-in list.
llvm-svn: 106805
|
|
|
|
|
|
| |
std::vector.
llvm-svn: 106298
|
|
|
|
|
|
|
| |
MachineRegisterInfo doesn't have to confusingly allocate an extra
entry.
llvm-svn: 106296
|
|
|
|
| |
llvm-svn: 105100
|
|
|
|
| |
llvm-svn: 105095
|
|
|
|
| |
llvm-svn: 104560
|
|
|
|
|
|
| |
use of it in MachineCSE.
llvm-svn: 103726
|
|
|
|
| |
llvm-svn: 103508
|
|
|
|
|
|
|
|
| |
closure after allocating all blocks.
Add a few more test cases for -regalloc=fast.
llvm-svn: 103500
|
|
|
|
|
|
| |
doesn't have to guess.
llvm-svn: 103194
|
|
|
|
|
|
| |
instructions for function arguments early and insert them after instruction selection is done.
llvm-svn: 102554
|
|
|
|
|
|
| |
function arguments).
llvm-svn: 102368
|
|
|
|
|
|
| |
SelectionDAGISel.
llvm-svn: 101258
|
|
|
|
| |
llvm-svn: 101254
|
|
|
|
| |
llvm-svn: 101145
|
|
|
|
| |
llvm-svn: 97663
|
|
|
|
| |
llvm-svn: 82812
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Change register allocation hint to a pair of unsigned integers. The hint type is zero (which means prefer the register specified as second part of the pair) or entirely target dependent.
- Allow targets to specify alternative register allocation orders based on allocation hint.
Part 2.
- Use the register allocation hint system to implement more aggressive load / store multiple formation.
- Aggressively form LDRD / STRD. These are formed *before* register allocation. It has to be done this way to shorten live interval of base and offset registers. e.g.
v1025 = LDR v1024, 0
v1026 = LDR v1024, 0
=>
v1025,v1026 = LDRD v1024, 0
If this transformation isn't done before allocation, v1024 will overlap v1025 which means it more difficult to allocate a register pair.
- Even with the register allocation hint, it may not be possible to get the desired allocation. In that case, the post-allocation load / store multiple pass must fix the ldrd / strd instructions. They can either become ldm / stm instructions or back to a pair of ldr / str instructions.
This is work in progress, not yet enabled.
llvm-svn: 73381
|
|
|
|
|
|
| |
MachineRegisterInfo. This allows more passes to set them.
llvm-svn: 73346
|
|
|
|
| |
llvm-svn: 69126
|
|
|
|
| |
llvm-svn: 60684
|
|
|
|
| |
llvm-svn: 57844
|
|
|
|
|
|
| |
their cleanup code.
llvm-svn: 53194
|