[llvm-commits] [llvm] r70820 - in /llvm/trunk: lib/Transforms/Scalar/JumpThreading.cpp test/Transforms/JumpThreading/no-irreducible-loops.ll

Nicolas Geoffray nicolas.geoffray at lip6.fr
Mon May 4 02:54:36 PDT 2009


Hi Chris,

Chris Lattner wrote:
> +#ifdef NDEBUG
> +    SmallPtrSet<BasicBlock*, 16> LoopHeaders;
> +#else
> +    SmallSet<AssertingVH<BasicBlock>, 16> LoopHeaders;
> +#endif
>
>   

> @@ -109,15 +121,42 @@
>          DOUT << "  JT: Deleting dead block '" << BB->getNameStart()
>               << "' with terminator: " << *BB->getTerminator();
>          DeleteDeadBlock(BB);
> +        LoopHeaders.erase(BB);
>   

SmallSet is an AssertingVH, so erasing the block in the LoopHeaders 
should come before deleting the block.

Nicolas



More information about the llvm-commits mailing list