Displaying 7 results from an estimated 7 matches for "v_reg".
Did you mean:
s_reg
2006 Aug 14
2
[LLVMdev] Folding instructions
...t happen. But
I realized something important: I am not mapping virtuals to physicals
strait on VirtRegMap during the scan. I use my own data structures to
record the register assignment, and write on VirtRegMap after I am done,
on a single step. When I remove the command this->vrm->virtFolded(v_reg,
mi, u, fmi) from my code, the error does not happen. So, I think I am not
using VirtRegMap properly. It seems to me that I don't have to call this
method during the scan, because instruction operands still contain
virtuals, not physical registers, as it would be expected. Is this right?
If som...
2006 Aug 21
0
[LLVMdev] Recalculating live intervals
...tes a class
of
// registers. The spilling algorithm must evict a register from the same
class
// as the parameter. I am using the VirtRegMap class to place loads and
stores.
//===--------------------------------------------------------------------------
void RegAllocChordal_Fer::spill(
unsigned v_reg,
KillingSites_Fer & ks,
const MachineBasicBlock & mbb
) {
// First, find a place to store this register. Of course, this will be
done
// by the implementation of vrm. We just have to ask it.
int slot = vrm->assignVirt2StackSlot(v_reg);
unsigned p_reg = this->re...
2006 Aug 21
2
[LLVMdev] Recalculating live intervals
So what addIntervalsToSpills returns are new intervals to allocate with
infinite weights, right?
And I need not to allocate the old interval. Should hasStackSlot return true
on its register then?
On 8/21/06, Fernando Magno Quintao Pereira <fernando at cs.ucla.edu> wrote:
>
>
> Well, someone correct me if am wrong, but, you still have to allocate
> physical registers to them,
2006 Aug 14
0
[LLVMdev] Folding instructions
...egs;
> for(unsigned u = 0; u < mi->getNumOperands(); u++) {
> const MachineOperand & mo = mi->getOperand(u);
> if(mo.isUse() && mo.isRegister() && mo.getReg()) {
> if(MRegisterInfo::isVirtualRegister(mo.getReg())) {
> unsigned v_reg = mo.getReg();
> if(this->vrm->hasStackSlot(v_reg)) {
> int slot = this->vrm->getStackSlot(v_reg);
> // First, try to fold the memory reference into the
> // instruction. If we can do this, we don't need to
> // ins...
2006 Aug 14
0
[LLVMdev] Folding instructions
...this->machine_function->getTarget();
> const MRegisterInfo *ri = target_machine.getRegisterInfo();
> MachineInstr * fmi = ri->foldMemoryOperand(mi, u, slot);
> if(fmi) {
> numFolded++;
> MachineBasicBlock * mbb = mi->getParent();
> this->vrm->virtFolded(v_reg, mi, u, fmi);
> //std::cerr << "Folding " << NeatPrint::mi2string(*mi,
> *this->machine_function) << "\n";
> // TODO: see if it is not necessary to iterate
> // again on the instruction.
> return mbb->insert(mbb->erase(mi), f...
2006 Aug 14
2
[LLVMdev] Folding instructions
...Machine & target_machine =
this->machine_function->getTarget();
const MRegisterInfo *ri = target_machine.getRegisterInfo();
MachineInstr * fmi = ri->foldMemoryOperand(mi, u, slot);
if(fmi) {
numFolded++;
MachineBasicBlock * mbb = mi->getParent();
this->vrm->virtFolded(v_reg, mi, u, fmi);
//std::cerr << "Folding " << NeatPrint::mi2string(*mi,
*this->machine_function) << "\n";
// TODO: see if it is not necessary to iterate
// again on the instruction.
return mbb->insert(mbb->erase(mi), fmi);
}
With this code, m...
2006 Aug 21
3
[LLVMdev] Recalculating live intervals
...pilling algorithm must evict a register from the same
> class
> // as the parameter. I am using the VirtRegMap class to place loads and
> stores.
>
> //===--------------------------------------------------------------------------
> void RegAllocChordal_Fer::spill(
> unsigned v_reg,
> KillingSites_Fer & ks,
> const MachineBasicBlock & mbb
> ) {
> // First, find a place to store this register. Of course, this will be
> done
> // by the implementation of vrm. We just have to ask it.
> int slot = vrm->assignVirt2StackSlot(v_reg);
&g...