[LLVMdev] LLVM Instr from MachineInstr
Jim Grosbach
grosbach at apple.com
Fri Jul 1 08:53:59 PDT 2011
Hi Ankur,
For a MachineBasicBlock you can call getBasicBlock() to find the IR level BasicBlock from which it was generated (if there isn't a one, it will return NULL). I don't know of a way to get a finer granularity than that, though.
-Jim
On Jul 1, 2011, at 1:06 AM, ankur deshwal wrote:
> Hi,
>
> Is there any way to get a pointer to the LLVM Instr from which a
> particular MachineInstr is generated ?
>
> Although I understand it goes through many optimization after a LLVM
> instruction is converted to SDAG node, so maintaining such a mapping
> will be hard. Still is the mapping stored some where which can give
> some sane results at least in case of -O0?
>
> Thanks and regards,
> Ankur
> _______________________________________________
> 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