diff options
| author | Chris Lattner <clattner@google.com> | 2018-10-25 16:58:08 -0700 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 13:40:05 -0700 |
| commit | adbba70d8215007e2519fce8933f7259e64b991d (patch) | |
| tree | 7218b65debde9d275f0e99a62583261a05ac386c /mlir/lib/Transforms/CFGFunctionViewGraph.cpp | |
| parent | 7de0da9594e5411aa555ee1a09e6c7f7bace0012 (diff) | |
| download | bcm5719-llvm-adbba70d8215007e2519fce8933f7259e64b991d.tar.gz bcm5719-llvm-adbba70d8215007e2519fce8933f7259e64b991d.zip | |
Simplify FunctionPass to eliminate the CFGFunctionPass/MLFunctionPass
distinction. FunctionPasses can now choose to get called on all functions, or
have the driver split CFG/ML Functions up for them. NFC.
PiperOrigin-RevId: 218775885
Diffstat (limited to 'mlir/lib/Transforms/CFGFunctionViewGraph.cpp')
| -rw-r--r-- | mlir/lib/Transforms/CFGFunctionViewGraph.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mlir/lib/Transforms/CFGFunctionViewGraph.cpp b/mlir/lib/Transforms/CFGFunctionViewGraph.cpp index dea1fc90af2..a75d26c1fbc 100644 --- a/mlir/lib/Transforms/CFGFunctionViewGraph.cpp +++ b/mlir/lib/Transforms/CFGFunctionViewGraph.cpp @@ -73,7 +73,7 @@ void mlir::CFGFunction::viewGraph() const { } namespace { -struct PrintCFGPass : public CFGFunctionPass { +struct PrintCFGPass : public FunctionPass { PrintCFGPass(llvm::raw_ostream &os, bool shortNames, const llvm::Twine &title) : os(os), shortNames(shortNames), title(title) {} PassResult runOnCFGFunction(CFGFunction *function) override { @@ -88,8 +88,8 @@ private: }; } // namespace -CFGFunctionPass *mlir::createPrintCFGGraphPass(llvm::raw_ostream &os, - bool shortNames, - const llvm::Twine &title) { +FunctionPass *mlir::createPrintCFGGraphPass(llvm::raw_ostream &os, + bool shortNames, + const llvm::Twine &title) { return new PrintCFGPass(os, shortNames, title); } |

