[PATCH] D23102: [ADCE] Refactoring for new functionality (NFC)

Nadav Rotem via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 10:10:29 PDT 2016


nadav added inline comments.

================
Comment at: lib/Transforms/Scalar/ADCE.cpp:51
@@ +50,3 @@
+  void initialize();
+  // True for operations which are always treated as live
+  bool isAlwaysLive(Instruction &);
----------------
Please use doxygen style comments (three slashes) and a period at the end of the sentence. Please do the same for the other comments above.  

Also, please name the parameter. If the name does not give a good indication of what the parameter is you can use '\p' to describe the parameter., 

================
Comment at: lib/Transforms/Scalar/ADCE.cpp:68
@@ +67,3 @@
+  // was removed
+  bool removeDeadInstructions();
+
----------------
Doxygen, period, just like above.  

================
Comment at: lib/Transforms/Scalar/ADCE.cpp:76
@@ -58,11 +75,3 @@
 
-void AgggressiveDeadCodeElimination::collectLiveScopes(
-    const DILocalScope &LS) {
-  if (!AliveScopes.insert(&LS).second)
-    return;
-
-  if (isa<DISubprogram>(LS))
-    return;
-
-  // Tail-recurse through the scope chain.
-  collectLiveScopes(cast<DILocalScope>(*LS.getScope()));
+bool AgggressiveDeadCodeElimination::performDeadCodeElimination() {
+  initialize();
----------------
Typo here. 'gig'


https://reviews.llvm.org/D23102





More information about the llvm-commits mailing list