Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks Mahesh!! Looks good, just had some comments on the encoding.
mlir/lib/Transforms/DialectConversion.cpp | ||
---|---|---|
627 | Assuming all of the other operations are tracked properly, all you really need to do a merge is:
When reverting all you would need to do is splice back (origEnd++, curEnd) to the source block. | |
644 | Please avoid any use of std::distance or random access on these containers, they are intrusive linked lists. These computations all run O(N). I just noticed that getErase is doing the same thing, it shouldn't. | |
mlir/test/lib/Dialect/Test/TestPatterns.cpp | ||
559 | Can you add a new driver instead? This one is overly bloated at this point. |
mlir/lib/Transforms/DialectConversion.cpp | ||
---|---|---|
644 | Removed the std::distance from here. Re: use of std::distance in getErased, does that mean I change BlockPosition to be {Region *, Block*} where the block * is the block erased (it is actually same as sourceBlock, so we only need the Region* then? |
mlir/lib/Transforms/DialectConversion.cpp | ||
---|---|---|
623 | Do you actually need this if you are relying on the erase action to do the backtracking? | |
644 | Yeah I would change BlockPosition to use a similar scheme, i.e. keep a pointer to the previous block(or null if the region only has a single block). | |
1005 | destBlockLastInst can be null here. | |
1337 | typo: ezpected | |
mlir/test/lib/Dialect/Test/TestOps.td | ||
1167 | Move the brace to the previous line. | |
mlir/test/lib/Dialect/Test/TestPatterns.cpp | ||
849 | You can initialize the SmallVector with the range directly, no need to use begin/end. | |
871 | Same here. |
Do you actually need this if you are relying on the erase action to do the backtracking?