[llvm-dev] Developing a pass for the backend

Pedro Lopes via llvm-dev llvm-dev at lists.llvm.org
Sun Feb 4 12:12:01 PST 2018


Hi,

Is there a way to map a MachineInstr to the respective LLVM IR using a
MachineFunctionPass (or something else) in my backend?

I need to read some metadata associated with LLVM IR instructions and
I was thinking of using some debug information (DebugLoc?) to do so.
However, By inspecting the LLVM source code I have not been able to
find any mapping between a MachineInstr and a LLVM IR Instruction.

Thanks,
Tiago


More information about the llvm-dev mailing list