Hi,
I am parsing through each instruction and for each value in the instruction, I want the instruction that is defining/allocating the value being used here (the dominator instruction). Is there a method to do that?
Hi,
I am parsing through each instruction and for each value in the instruction, I want the instruction that is defining/allocating the value being used here (the dominator instruction). Is there a method to do that?
Hi Adarsh,
I am parsing through each instruction and for each value in the
instruction, I want the instruction that is defining/allocating the
value being used here (the dominator instruction). Is there a method to
do that?
I'm not sure what you mean by "each value in the instruction". Operands
perhaps? Operands can be instructions or constants (or metadata in some
cases). You can check whether operand Op is an instruction by doing:
isa<Instruction>(Op). If so, you can cast it to an instruction using:
cast<Instruction>(Op).
Ciao,
Duncan.