[LLVMdev] how to delete an invalidated call graph

Gordon Haak gordon.haak at googlemail.com
Sun Nov 7 23:02:16 PST 2010


Hello,

I am working on the the "Global Variable Optimizer" pass. I'd like to
modify this pass to be more  aggressive. Therefore I need the call
graph. The call graph contains AssertVHs of all functions. If the
"Global Variable Optimizer" pass identifies a function to be delete
able it will be deleted immediately by this pass. The call graph is
not destroyed before. That's why deleting a function leads to an
assert in Value.cpp: "While deleting: i32 (...)* %assert. An asserting
value handle still pointed to this value! ...".
How can I ensure that the call graph is destroyed before a functions
is deleted by the "Global Variable Optimizer"? Do I have to do this
explicitly? What is the right place for this?

Kind regards,
Gordon



More information about the llvm-dev mailing list