[LLVMdev] how to delete an invalidated call graph
gordon.haak at googlemail.com
Mon Nov 8 01:02:16 CST 2010
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?
More information about the LLVMdev