[LLVMdev] Need guidance regarding MachineFunctionPass

Tim Northover t.p.northover at gmail.com
Thu Oct 2 18:16:44 PDT 2014


Hi Sachin,

>          int op = mi->getOpcode();

This is a target-specific opcode, and corresponds to one of the values
defined in (from a CMake build directory)
lib/Target/XYZ/XYZGenInstrInfo.inc.

The easiest way to find out which is actually to use
MachineInstr::dump (and/or "llc -debug" from the command-line to print
it out automatically); if it prints something like (to pick a
completely random example from AArch64):

 %X1<def> = LDRXui <fi#3>, 0; mem:LD8[%result] dbg:blockstret.c:20:

Then you'd want to compare "op" against "AArch64::LDRXui"

Cheers.

Tim.



More information about the llvm-dev mailing list