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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to