diff options
author | Rahul Joshi <jurahul@google.com> | 2020-06-23 20:21:42 -0700 |
---|---|---|
committer | Rahul Joshi <jurahul@google.com> | 2020-06-23 20:21:42 -0700 |
commit | 60f914e5b191b1afcd9fb41fa8ede4b67d9735bb (patch) | |
tree | dd151a69747135b2e1925de2785b515ee379b368 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | |
parent | 8df3e1fd86fce6fd39954021bd7501842216dbe8 (diff) | |
download | llvm-60f914e5b191b1afcd9fb41fa8ede4b67d9735bb.zip llvm-60f914e5b191b1afcd9fb41fa8ede4b67d9735bb.tar.gz llvm-60f914e5b191b1afcd9fb41fa8ede4b67d9735bb.tar.bz2 |
[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)
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
-rw-r--r-- | mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp index 95cdb78..18c8257 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(); |