[LLVMdev] Some questions about live intervals

Bill Wendling
Thu, 31 Jan 2008 19:11:36 -0000

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