[LLVMdev] Some questions about live intervals

Bill Wendling isanbard at gmail.com
Thu Jan 31 11:11:36 PST 2008


Hi Roman,

> I already started work on the implementation of this algorithm and have
> a few hopefully rather simple questions:
>
> 1) What is the easiest way to understand which MBB a given instruction
> index belongs to? All the required information is available in the
> MBB2IdxMap of the LiveIntervalAnalysis class. Would it be useful to add
> a small function getMBBFromIndex() to this class?
>
The MachineInstr class has a pointer to its MachineBasicBlock (at
least in top-of-tree). Call "getParent()" on the MachineInstr.

-bw



More information about the llvm-dev mailing list