[LLVMdev] moving from llvm 2.6 -> 2.7

Duncan Sands baldrick at free.fr
Thu Sep 16 00:57:41 PDT 2010


Hi Aparna,

> We have this piece of code in our system , where we are iteratively remove
> functions that were unreachable in the cfg.
>
> In llvm-2.6 func->eraseFromParent() worked but now we want to move to llvm-2.7
> we get a the following assert.
>
> An asserting value handle still pointed to this value!
> UNREACHABLE executed at llvm-2.7/lib/VMCore/Value.cpp:
> 522!

perhaps you need to update the callgraph?  Historically, all kinds of passes
(such as the inliner) were using the callgraph but not updating it properly
when removing calls, leading to subtle miscompilations.  Because of this the
callgraph was changed to complain loudly when such mistakes are made - IIRC,
the symptoms are similar to what you describe.

If this is not the reason, I suggest you try to find out which asserting
value handle is floating around and who created it - that should give you a
clue.

Ciao,

Duncan.



More information about the llvm-dev mailing list