[PATCH] D23824: [ADCE] Add handling of PHI nodes when removing control flow

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 20:48:47 PDT 2016


mehdi_amini added inline comments.

================
Comment at: lib/Transforms/Scalar/ADCE.cpp:116
@@ +115,3 @@
+  /// Verify that a live phi node that has inputs in blocks with
+  /// dead terminators has a unique reaching definition from all such blocks.
+  void markLivePhiNodeInputs();
----------------
Can you revisit the comment? I find it hard to figure what you want to do here.

Also, as a side note, "verify" makes me think of a "check", which does not go well with the name of the method prefixed with "mark".

================
Comment at: lib/Transforms/Scalar/ADCE.cpp:448
@@ +447,3 @@
+    // Verify a common reaching definition from predecessors with
+    // dead terminators, marking some live to enforce this.
+    Value *CommonReachngDefintion = nullptr;
----------------
This is not clear to me, I have no idea what is going on in this code? 
I mean I can follow what your doing, but I don't know why.


https://reviews.llvm.org/D23824





More information about the llvm-commits mailing list