[llvm-commits] [llvm] r86603 - /llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp

Duncan Sands baldrick at free.fr
Mon Nov 9 18:49:07 PST 2009


Hi Chris,

> +  // This only adjusts blocks with PHI nodes.
> +  if (!isa<PHINode>(BB->begin()))
> +    return;

don't you still want to do BB->removePredecessor in this case?
Anyway, if the BB doesn't start with a phi, the following code does essentially
nothing anyway, so the test doesn't buy you much.

> +  //BB->removePredecessor(Pred, true);
> +  BB->removePredecessor(Pred, true);

One of these shouldn't be there :)

Also, this seems like a generally useful transform - does it really belong
in JumpThreading?

Ciao,

Duncan.



More information about the llvm-commits mailing list