[LLVMdev] Possible SelectionDAG Bug

David Greene dag at cray.com
Tue Mar 2 08:57:02 PST 2010


On Monday 01 March 2010 20:32:07 Dan Gohman wrote:

> > No, what I mean is the thing under UI at the point of call to
> > AddModifiedNodeToCSEMaps gets deleted.  So UI is invalid and when
> > we loop back around and check it against UE we blow up with a
> > singular iterator error.
>
> UI is incremented before AddModifiedNodeToCSEMaps is called, so
> I'm still not seeing what you're describing here.

It's not the increment that trips, it's the loop top compare to UE.  It 
doesn't matter where UI points at the call to AddModifiedNodeToCSEMaps.
The fact that AddModifiedNodeToCSEMaps can recursively call 
ReplaceAllUsesOf means that we can potentially delete the node
out from under UI.

                                           -Dave




More information about the llvm-dev mailing list