[PATCH] D144838: [SCCP] Correct the made changes behavior
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 03:04:54 PST 2023
bcl5980 added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/SCCP.cpp:215
- MadeChanges = true;
-
- if (&BB != &F.front())
+ if (&BB != &F.front()) {
+ MadeChanges = true;
----------------
nikic wrote:
> Even in this case we're going to do a changeToUnreachable() below, so it's still changed?
Oh thanks for the mention. You are right, generally it will change first non-phi instruction to unreachable.
How about if the entry block is already unreachable? It will replace unreachable to unreachable again. It looks this case we needn't set MadeChanges to true.
I have some local code to run ipsccp until no changed and dead loop happen here. This is the motivation of the patch. And I think I need to find some other way to workaround it maybe.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144838/new/
https://reviews.llvm.org/D144838
More information about the llvm-commits
mailing list