[llvm] r257279 - [JumpThreading] Don't forget to report that the IR changed

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 10 21:44:07 PST 2016


Yes but I prefer the idiom of "increasing" the state of EverChanged as we
process the function.

On Sunday, January 10, 2016, Roman Divacky <rdivacky at vlakno.cz> wrote:

> > Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=257279&r1=257278&r2=257279&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
> > +++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Sun Jan 10
> 01:13:04 2016
> > @@ -211,11 +211,12 @@ bool JumpThreading::runOnFunction(Functi
> >    // we will loop forever. We take care of this issue by not jump
> threading for
> >    // back edges. This works for normal cases but not for unreachable
> blocks as
> >    // they may have cycle with no back edge.
> > -  removeUnreachableBlocks(F);
> > +  bool EverChanged = false;
> > +  EverChanged |= removeUnreachableBlocks(F, LVI);
>
> This is
>
> bool EverChanged = removeUnreachableBlocks(F, LVI);
>
> right?
>
> Roman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160110/af28fa3f/attachment.html>


More information about the llvm-commits mailing list