[PATCH] D69605: [Attributor] Make liveness "edge-based"

Stefan Stipanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 07:47:14 PDT 2019


sstefan1 accepted this revision.
sstefan1 added a comment.
This revision is now accepted and ready to land.

LGTM with minor comments.



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2314
 
-    for (const Instruction *NRC : NoReturnCalls) {
+    for (const Instruction *NRC : ToBeExploredFrom) {
+      auto *CB = dyn_cast<CallBase>(NRC);
----------------
Maybe change `NRC` as well. It doesn't have real meaning after this rewrite.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2481
   /// Collection of calls with noreturn attribute, assumed or knwon.
   SmallSetVector<const Instruction *, 4> NoReturnCalls;
 };
----------------
This doesn't seem to be used anymore.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2494
+  if (CB.isTerminator())
+    AliveSuccessors.push_back(&CB.getSuccessor(0)->front());
+  else
----------------
Just to make sure I understand this correctly. This is looking at `callbr` instruction and only looking at normal label? Shouldn't it look at other labels as well?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69605





More information about the llvm-commits mailing list