[LLVMdev] Bug in LiveIntervals? Please Examine

Evan Cheng evan.cheng at apple.com
Fri Jul 17 12:00:47 PDT 2009


On Jul 17, 2009, at 7:57 AM, David Greene wrote:

> In LiveIntervals::processImplicitDefs() we have this:
>
>      for (MachineRegisterInfo::use_iterator UI = mri_->use_begin(Reg),
>             UE = mri_->use_end(); UI != UE; ) {
>        MachineOperand &RMO = UI.getOperand();
>        MachineInstr *RMI = &*UI;
>        ++UI;
>        MachineBasicBlock *RMBB = RMI->getParent();
>        if (RMBB == MBB)
>          continue;
>        const TargetRegisterClass* RC = mri_->getRegClass(Reg);
>        unsigned NewVReg = mri_->createVirtualRegister(RC);
>        MachineInstrBuilder MIB =
>          BuildMI(*RMBB, RMI, RMI->getDebugLoc(),
>                  tii_->get(TargetInstrInfo::IMPLICIT_DEF), NewVReg);
>        (*MIB).getOperand(0).setIsUndef();
>        RMO.setReg(NewVReg);
>        RMO.setIsUndef();
>        RMO.setIsKill();
>      }
>
> Souldn't there be a call to vrm.grow() after each call to
> mri->createVirtualRegister()?

No. This function is run during the analysis stage. vrm is actually  
owned by the register allocator which then passed it into  
liveintervals. Is there an actual problem that you run into?

Evan

>
>                            -Dave
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list