Yes but I prefer the idiom of "increasing" the state of EverChanged as we process the function.<br><br>On Sunday, January 10, 2016, Roman Divacky <<a href="mailto:rdivacky@vlakno.cz">rdivacky@vlakno.cz</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=257279&r1=257278&r2=257279&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=257279&r1=257278&r2=257279&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)<br>
> +++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Sun Jan 10 01:13:04 2016<br>
> @@ -211,11 +211,12 @@ bool JumpThreading::runOnFunction(Functi<br>
>    // we will loop forever. We take care of this issue by not jump threading for<br>
>    // back edges. This works for normal cases but not for unreachable blocks as<br>
>    // they may have cycle with no back edge.<br>
> -  removeUnreachableBlocks(F);<br>
> +  bool EverChanged = false;<br>
> +  EverChanged |= removeUnreachableBlocks(F, LVI);<br>
<br>
This is<br>
<br>
bool EverChanged = removeUnreachableBlocks(F, LVI);<br>
<br>
right?<br>
<br>
Roman<br>
</blockquote>