summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/CSE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Transforms/CSE.cpp')
-rw-r--r--mlir/lib/Transforms/CSE.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/mlir/lib/Transforms/CSE.cpp b/mlir/lib/Transforms/CSE.cpp
index a5b45ba4098..80e3dd955c3 100644
--- a/mlir/lib/Transforms/CSE.cpp
+++ b/mlir/lib/Transforms/CSE.cpp
@@ -24,7 +24,7 @@
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Function.h"
-#include "mlir/IR/StmtVisitor.h"
+#include "mlir/IR/InstVisitor.h"
#include "mlir/Pass.h"
#include "mlir/Support/Functional.h"
#include "mlir/Transforms/Passes.h"
@@ -207,24 +207,24 @@ struct CFGCSE : public CSEImpl {
};
/// Common sub-expression elimination for ML functions.
-struct MLCSE : public CSEImpl, StmtWalker<MLCSE> {
- using StmtWalker<MLCSE>::walk;
+struct MLCSE : public CSEImpl, InstWalker<MLCSE> {
+ using InstWalker<MLCSE>::walk;
void run(Function *f) {
- // Walk the function statements.
+ // Walk the function instructions.
walk(f);
// Finally, erase any redundant operations.
eraseDeadOperations();
}
- // Insert a scope for each statement range.
+ // Insert a scope for each instruction range.
template <class Iterator> void walk(Iterator Start, Iterator End) {
ScopedMapTy::ScopeTy scope(knownValues);
- StmtWalker<MLCSE>::walk(Start, End);
+ InstWalker<MLCSE>::walk(Start, End);
}
- void visitOperationInst(OperationInst *stmt) { simplifyOperation(stmt); }
+ void visitOperationInst(OperationInst *inst) { simplifyOperation(inst); }
};
} // end anonymous namespace
OpenPOWER on IntegriCloud