[Mlir-commits] [mlir] 60f914e - [NFC][MLIR] Undo anonymous namespace change from https://reviews.llvm.org/D82417

Rahul Joshi llvmlistbot at llvm.org
Tue Jun 23 20:27:28 PDT 2020


Author: Rahul Joshi
Date: 2020-06-23T20:21:42-07:00
New Revision: 60f914e5b191b1afcd9fb41fa8ede4b67d9735bb

URL: https://github.com/llvm/llvm-project/commit/60f914e5b191b1afcd9fb41fa8ede4b67d9735bb
DIFF: https://github.com/llvm/llvm-project/commit/60f914e5b191b1afcd9fb41fa8ede4b67d9735bb.diff

LOG: [NFC][MLIR] Undo anonymous namespace change from https://reviews.llvm.org/D82417

Undo as it does not conform to LLVM coding style
(https://llvm.org/docs/CodingStandards.html#anonymous-namespaces)

Added: 
    

Modified: 
    mlir/lib/Transforms/LoopInvariantCodeMotion.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
index 95cdb78e05b6..18c82578acb1 100644
--- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
@@ -32,13 +32,15 @@ struct LoopInvariantCodeMotion
     : public LoopInvariantCodeMotionBase<LoopInvariantCodeMotion> {
   void runOnOperation() override;
 };
+} // end anonymous namespace
 
 // Checks whether the given op can be hoisted by checking that
 // - the op and any of its contained operations do not depend on SSA values
 //   defined inside of the loop (by means of calling definedOutside).
 // - the op has no side-effects. If sideEffecting is Never, sideeffects of this
 //   op and its nested ops are ignored.
-bool canBeHoisted(Operation *op, function_ref<bool(Value)> definedOutside) {
+static bool canBeHoisted(Operation *op,
+                         function_ref<bool(Value)> definedOutside) {
   // Check that dependencies are defined outside of loop.
   if (!llvm::all_of(op->getOperands(), definedOutside))
     return false;
@@ -72,7 +74,6 @@ bool canBeHoisted(Operation *op, function_ref<bool(Value)> definedOutside) {
   return true;
 }
 
-} // end anonymous namespace
 
 LogicalResult mlir::moveLoopInvariantCode(LoopLikeOpInterface looplike) {
   auto &loopBody = looplike.getLoopBody();


        


More information about the Mlir-commits mailing list