从LLVM IR中删除指令时的StackDump

时间:2012-01-28 04:17:23

标签: llvm

任何人都可以告诉我如何永久删除IR的指令。当我尝试使用以下代码删除mul指令时,我得到一个StackDump:

Instruction *mul = BinaryOperator::CreateMul(op1,op1,"mul",tmp); //Creating new mul instruction
I2 = cast<Instruction>(i); //i is an Instruction iterator.
I2->replaceAllUsesWith(mul);
I2->eraseFromParent(); //Getting StackDump for this instruction

0 个答案:

没有答案