diff options
| author | Chris Lattner <clattner@google.com> | 2019-03-25 18:02:49 -0700 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 17:40:44 -0700 |
| commit | 46ade282c8d98558d0d1b8e79d2eee3ae00086f1 (patch) | |
| tree | 4ad14d05ba9f7458b815b790fef6e239ac82ddc1 /mlir/lib/Analysis/TestParallelismDetection.cpp | |
| parent | 5f3b914a6e26eb1ceefe6772579d110ac692e6b9 (diff) | |
| download | bcm5719-llvm-46ade282c8d98558d0d1b8e79d2eee3ae00086f1.tar.gz bcm5719-llvm-46ade282c8d98558d0d1b8e79d2eee3ae00086f1.zip | |
Make FunctionPass::getFunction() return a reference to the function, instead of
a pointer. This makes it consistent with all the other methods in
FunctionPass, as well as with ModulePass::getModule(). NFC.
PiperOrigin-RevId: 240257910
Diffstat (limited to 'mlir/lib/Analysis/TestParallelismDetection.cpp')
| -rw-r--r-- | mlir/lib/Analysis/TestParallelismDetection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Analysis/TestParallelismDetection.cpp b/mlir/lib/Analysis/TestParallelismDetection.cpp index af112e5b02c..701ef6ab348 100644 --- a/mlir/lib/Analysis/TestParallelismDetection.cpp +++ b/mlir/lib/Analysis/TestParallelismDetection.cpp @@ -43,9 +43,9 @@ FunctionPassBase *mlir::createParallelismDetectionTestPass() { // Walks the function and emits a note for all 'affine.for' ops detected as // parallel. void TestParallelismDetection::runOnFunction() { - Function *f = getFunction(); + Function &f = getFunction(); FuncBuilder b(f); - f->walk<AffineForOp>([&](AffineForOp forOp) { + f.walk<AffineForOp>([&](AffineForOp forOp) { if (isLoopParallel(forOp)) forOp.emitNote("parallel loop"); }); |

