[PATCH] D154205: [MachineLICM] Handle subloops

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 09:01:44 PDT 2023


nikic added a comment.

That wasn't intended as an approval -- it's a phabricator quirk that if a revision is reopened it will show as accepted. One usually has to do "reopen" and then "request review", but it looks like only you can do the second part.



================
Comment at: llvm/lib/CodeGen/MachineLICM.cpp:786
+        MachineBasicBlock *InnerMostLoopPreheader =
+            InnerMostLoop->getLoopPreheader();
+        if (CurLoop != InnerMostLoop && InnerMostLoopPreheader) {
----------------
This is going to hoist to the inner-most preheader, but it may be that the instruction is invariant wrt a number of a loops (just not the outer-most one). Shouldn't we be going up the loop chain to find the highest invariant loop?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154205/new/

https://reviews.llvm.org/D154205



More information about the llvm-commits mailing list