[PATCH] D20025: [PM] Make LowerAtomic a FunctionPass

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 19:42:48 PDT 2016


chandlerc accepted this revision.
chandlerc added a comment.

I'm fine with this, but I don't actually think you should really aggressively port basic block passes. I'm fine if it accomplishes something specifically, but in many cases I'd just leave the old basic block pass in place and add a clean function pass for the new pass manager having them both call out to a helper function.


================
Comment at: lib/Transforms/Scalar/LowerAtomic.cpp:124-126
@@ -121,2 +123,5 @@
       bool Changed = false;
-      for (BasicBlock::iterator DI = BB.begin(), DE = BB.end(); DI != DE; ) {
+      for (BasicBlock &BB: F) {
+        Changed |= runOnBasicBlock(BB);
+      }
+      return Changed;
----------------
Please use clang-format and skip the braces here.


http://reviews.llvm.org/D20025





More information about the llvm-commits mailing list