Refactor the 'walk' methods for operations.
authorRiver Riddle <riverriddle@google.com>
Thu, 29 Aug 2019 20:04:22 +0000 (13:04 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 29 Aug 2019 20:04:50 +0000 (13:04 -0700)
commit4bfae66d70aea0df4bf9948e51f4bfa8895a4f4e
tree36d7709307e4319b8fe5fccb104ac7a9e6880603
parenta085700311cec4644381d71c6afeee021a7e8e25
Refactor the 'walk' methods for operations.

This change refactors and cleans up the implementation of the operation walk methods. After this refactoring is that the explicit template parameter for the operation type is no longer needed for the explicit op walks. For example:

    op->walk<AffineForOp>([](AffineForOp op) { ... });

is now accomplished via:

    op->walk([](AffineForOp op) { ... });

PiperOrigin-RevId: 266209552
28 files changed:
mlir/examples/Linalg/Linalg2/Example.cpp
mlir/examples/Linalg/Linalg3/lib/Transforms.cpp
mlir/include/mlir/IR/Block.h
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/Operation.h
mlir/include/mlir/IR/Region.h
mlir/include/mlir/IR/Visitors.h [new file with mode: 0644]
mlir/include/mlir/Support/LLVM.h
mlir/lib/Analysis/TestParallelismDetection.cpp
mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
mlir/lib/IR/Block.cpp
mlir/lib/IR/Operation.cpp
mlir/lib/IR/Region.cpp
mlir/lib/IR/Visitors.cpp [new file with mode: 0644]
mlir/lib/Transforms/LoopCoalescing.cpp
mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
mlir/lib/Transforms/LoopUnroll.cpp
mlir/lib/Transforms/MemRefDataFlowOpt.cpp
mlir/lib/Transforms/PipelineDataTransfer.cpp
mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
mlir/lib/Transforms/Utils/LoopUtils.cpp
mlir/lib/Transforms/Vectorize.cpp
mlir/test/lib/Transforms/TestLoopMapping.cpp
mlir/test/lib/Transforms/TestLoopParametricTiling.cpp