[PATCH] D119013: [ArgPromotion][AMDGPU] New MSSA-based function argument promotion pass with input/output argument support

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 12:04:51 PST 2022


rampitec added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/MSSAArgPromotion.cpp:307
+      continue;
+    } else if (isa<ReturnInst>(BB->getTerminator())) {
+      HasLoadOnEveryPath = false;
----------------
else after continue is not needed.


================
Comment at: llvm/lib/Transforms/IPO/MSSAArgPromotion.cpp:779
+
+  auto getBBEntryValue = [&](BasicBlock *BB) -> Value * {
+    auto I = BBEntryValue.find(BB);
----------------
A single function and BBEntryValue/BBExitValue as an argument?


================
Comment at: llvm/lib/Transforms/IPO/MSSAArgPromotion.cpp:1344
+                      false)
+INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
+INITIALIZE_PASS_END(MSSAArgPromotion, "mssaargpromotion",
----------------
Don't you need to add at least MemorySSAWrapperPass and AAResultsWrapperPass?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119013



More information about the llvm-commits mailing list