[llvm-dev] Howto properly discard parentless instructions (original) (raw)
Lorenz Braun via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 27 02:23:38 PDT 2017
- Previous message: [llvm-dev] Trap/BreakPoint Trap
- Next message: [llvm-dev] Howto properly discard parentless instructions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi there,
i am currently working on a transformation pass where i replace some function calls. I use replaceAllUsesWith() to replace them.
After that i want to clean up like this:
callInst->removeFromParent(); delete callInst;
If the instruction is not deleted an error occurs when running the pass (parentless instruction). So is it okay to do it this way or is there a better way to do it?
Regards
Lorenz
-- Lorenz Braun Research Associate Institute of Computer Engineering (ZITI) B6, 26, Building B, Office B2.20 68131 Mannheim
Phone: +49-621-181-2696 lorenz.braun at ziti.uni-heidelberg.de
- Previous message: [llvm-dev] Trap/BreakPoint Trap
- Next message: [llvm-dev] Howto properly discard parentless instructions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]