This allows users to provide custom Iterator templates. A new iterator will be added in a subsequent change.
Also rename makeRange to makeIterable and add a test case for the reverse iterator.
Paths
| Differential D144887
[mlir][IR][NFC] Move `walk` definitions to header file ClosedPublic Authored by springerm on Feb 27 2023, 8:49 AM.
Details Summary This allows users to provide custom Iterator templates. A new iterator will be added in a subsequent change. Also rename makeRange to makeIterable and add a test case for the reverse iterator.
Diff Detail
Event Timelinespringerm added a child revision: D144888: [mlir][IR] Add ForwardDominanceIterator for IR walkers.Feb 27 2023, 8:50 AM
Comment Actions Any idea of how this will affect build times? This code is now going to get instantiated a lot. Comment Actions
It does not affect compile time on my machine. It's a pretty fast machine though (AMD Ryzen Threadripper PRO 3995WX 64-Cores). BEFORE ➜ llvm-project git:(3f9b0446f9a7) time cmake --build build --target mlir-opt [3109/3109] Linking CXX executable bin/mlir-opt cmake --build build --target mlir-opt 13980.53s user 550.07s system 7589% cpu 3:11.46 total ➜ llvm-project git:(3f9b0446f9a7) time cmake --build build --target mlir-opt [3109/3109] Linking CXX executable bin/mlir-opt cmake --build build --target mlir-opt 13951.46s user 552.38s system 7599% cpu 3:10.85 total AFTER ➜ llvm-project git:(269d19604f36) time cmake --build build --target mlir-opt [3109/3109] Linking CXX executable bin/mlir-opt cmake --build build --target mlir-opt 13983.18s user 554.72s system 7620% cpu 3:10.78 total ➜ llvm-project git:(269d19604f36) time cmake --build build --target mlir-opt [3109/3109] Linking CXX executable bin/mlir-opt cmake --build build --target mlir-opt 13982.50s user 552.88s system 7614% cpu 3:10.90 total
This revision is now accepted and ready to land.Mar 3 2023, 9:53 AM This revision was landed with ongoing or failed builds.Mar 6 2023, 12:21 AM Closed by commit rGdf067f13de56: [mlir][IR][NFC] Move `walk` definitions to header file (authored by springerm). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 502539 mlir/include/mlir/IR/Visitors.h
mlir/lib/IR/Visitors.cpp
mlir/test/IR/visitors.mlir
mlir/test/lib/IR/TestVisitors.cpp
|
This makes me think that our walk implementation is recursive right? Seems like a ticking bomb in the compiler :(
How hard will it be to remove the recursion?