mirror of
https://github.com/intel/llvm.git
synced 2026-02-06 06:31:50 +08:00
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
This commit is contained in:
committed by
A. Unique TensorFlower
parent
a085700311
commit
4bfae66d70
@@ -226,8 +226,7 @@ void MemRefDataFlowOpt::runOnFunction() {
|
||||
memrefsToErase.clear();
|
||||
|
||||
// Walk all load's and perform load/store forwarding.
|
||||
f.walk<AffineLoadOp>(
|
||||
[&](AffineLoadOp loadOp) { forwardStoreToLoad(loadOp); });
|
||||
f.walk([&](AffineLoadOp loadOp) { forwardStoreToLoad(loadOp); });
|
||||
|
||||
// Erase all load op's whose results were replaced with store fwd'ed ones.
|
||||
for (auto *loadOp : loadOpsToErase) {
|
||||
|
||||
Reference in New Issue
Block a user