Displaying 4 results from an estimated 4 matches for "isconstantphysreg".
2017 Jan 21
3
Spare Register at one Machine Instruction
I'm not sure exactly what you're after.
I was under the impression that you want to know which register is live at
a specific point (an instruction). If that's the case, how do one of the
two suggested solutions not suffice?
If a register is live-in to a block and not killed before your instruction
or it has a def and no kill within the block, it is live. Otherwise it is
dead and
2016 Nov 27
5
Extending Register Rematerialization
...t; << *DefMI);
for (unsigned i = 0, e = DefMI->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = DefMI->getOperand(i);
if (!MO.isReg() || !MO.getReg() || !MO.readsReg())
continue;
if (TargetRegisterInfo::isPhysicalRegister(MO.getReg())) {
if (MRI.isConstantPhysReg(MO.getReg(),
*DefMI->getParent()->getParent()))
continue;
//If not constant then check its def
if(depth > 6)
return false;
LiveInterval &li = LIS.getInterval(MO.getReg());
SlotIndex UseIdx = LIS.getInstructionIndex(*DefMI);
VNInfo *UseVNIn...
2016 Feb 26
0
Reserved/Unallocatable Registers
There is MachineRegisterInfo::isConstantPhysReg(), in the current implementation this just returns true if it cannot find any def operand for the register (or on of its aliases). I think we also write to zero registers at times and then this function would return false... For this to work reliably targets would need to provide the constant infor...
2016 Feb 26
2
Reserved/Unallocatable Registers
Hi Matthias,
Thanks for doing this. Each time we talk about it, it takes us 10 min to rebuild those rules form our recollection, so definitely useful to write them down.
I am in agreement with what you wrote down.
I just think we need additional rules for the constant registers like Jakob mentioned:
- Their value is constant (i.e., copy propagation is fine, unlike regular reserved registers).
-