Gordon Haak wrote:> 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"?
Instead of destroying the entire CallGraph, why not just inform it of
the change using CG->removeFunctionFromModule(F) ?
Nick
Do I have to do this> explicitly? What is the right place for this?
>
> Kind regards,
> Gordon
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>