summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Analysis/OpStats.cpp
diff options
context:
space:
mode:
authorChris Lattner <clattner@google.com>2018-12-28 16:05:35 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 14:44:30 -0700
commit456ad6a8e0ca78ce6277da897a0b820533387d84 (patch)
treed9fbb26651eed51b02281be03c9bbc66522cbacf /mlir/lib/Analysis/OpStats.cpp
parentb1d9cc4d1ef5a1f81ca566fc06960df2bf31ddfe (diff)
downloadbcm5719-llvm-456ad6a8e0ca78ce6277da897a0b820533387d84.tar.gz
bcm5719-llvm-456ad6a8e0ca78ce6277da897a0b820533387d84.zip
Standardize naming of statements -> instructions, revisting the code base to be
consistent and moving the using declarations over. Hopefully this is the last truly massive patch in this refactoring. This is step 21/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227178245
Diffstat (limited to 'mlir/lib/Analysis/OpStats.cpp')
-rw-r--r--mlir/lib/Analysis/OpStats.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/mlir/lib/Analysis/OpStats.cpp b/mlir/lib/Analysis/OpStats.cpp
index f4c509a5132..07edb13d1a3 100644
--- a/mlir/lib/Analysis/OpStats.cpp
+++ b/mlir/lib/Analysis/OpStats.cpp
@@ -16,9 +16,9 @@
// =============================================================================
#include "mlir/IR/Function.h"
+#include "mlir/IR/InstVisitor.h"
+#include "mlir/IR/Instructions.h"
#include "mlir/IR/OperationSupport.h"
-#include "mlir/IR/Statements.h"
-#include "mlir/IR/StmtVisitor.h"
#include "mlir/Pass.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/raw_ostream.h"
@@ -26,7 +26,7 @@
using namespace mlir;
namespace {
-struct PrintOpStatsPass : public FunctionPass, StmtWalker<PrintOpStatsPass> {
+struct PrintOpStatsPass : public FunctionPass, InstWalker<PrintOpStatsPass> {
explicit PrintOpStatsPass(llvm::raw_ostream &os = llvm::errs())
: FunctionPass(&PrintOpStatsPass::passID), os(os) {}
@@ -38,7 +38,7 @@ struct PrintOpStatsPass : public FunctionPass, StmtWalker<PrintOpStatsPass> {
// Process ML functions and operation statments in ML functions.
PassResult runOnMLFunction(Function *function) override;
- void visitOperationInst(OperationInst *stmt);
+ void visitOperationInst(OperationInst *inst);
// Print summary of op stats.
void printSummary();
@@ -69,8 +69,8 @@ PassResult PrintOpStatsPass::runOnCFGFunction(Function *function) {
return success();
}
-void PrintOpStatsPass::visitOperationInst(OperationInst *stmt) {
- ++opCount[stmt->getName().getStringRef()];
+void PrintOpStatsPass::visitOperationInst(OperationInst *inst) {
+ ++opCount[inst->getName().getStringRef()];
}
PassResult PrintOpStatsPass::runOnMLFunction(Function *function) {
OpenPOWER on IntegriCloud