[PATCH] D86844: [LoopDeletion] Allows deletion of possibly infinite side-effect free loops
Atmn Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 22 22:15:53 PST 2020
atmnpatel added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:621
}
}
----------------
nikic wrote:
> Unrelated, but why do these updates happen before the branch from preheader to exit is added in IR? Shouldn't it be the other way around according to the DTU contract?
Isn't that branch added on line 602? My understanding was the changes on line 640 onwards are for removing, not introducing a branch.
================
Comment at: llvm/test/Other/loop-deletion-printer.ll:17
-define void @deleteme() {
+define void @deleteme() willreturn {
entry:
----------------
fhahn wrote:
> Is this change related to the patch? Same for the other test changes that just add `willreturn`?
Yep, if these test functions aren't marked willreturn, we won't delete the loop because it could be a legal infinite loop from C/C++.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86844/new/
https://reviews.llvm.org/D86844
More information about the llvm-commits
mailing list