[PATCH] D138641: [reg2mem] Add special handling to CatchSwitchInst

Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 00:59:37 PST 2022


Naville added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:158
+    // We need a separate load before each actual use of the PHI
+    SmallVector<Instruction *, 4> users;
+    for (User *U : P->users()) {
----------------
nikic wrote:
> Why does this insert a load before uses, rather than doing the same as in the previous function (insert load in each successor)?
Because otherwise we need another Map to record successor and the loadinst in it?


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

https://reviews.llvm.org/D138641



More information about the llvm-commits mailing list