[mlir] Toy tutorial: avoid erasing and then re-creating loop terminators
authorAlex Zinenko <zinenko@google.com>
Tue, 2 Jun 2020 10:49:45 +0000 (12:49 +0200)
committerAlex Zinenko <zinenko@google.com>
Tue, 2 Jun 2020 10:54:03 +0000 (12:54 +0200)
commitb596ecdd574e3ec717f71950370d2f58ae44296f
treea0ece5bbc12fa876374d1bd5d9bb0927d1b24633
parentc5b9fa1ccced3b4b20901f78c693a1a84aff372b
[mlir] Toy tutorial: avoid erasing and then re-creating loop terminators

The lower-to-affine-loops pass in chapters 5-7 of the Toy tutorial has
been creating affine loops, erasing their terminator and creating it
anew using a PatternRewriter instance to work around the fact that
implicit terminators were created without notifying the rewriter. Now
that has been fixed in 3ccf4a5bd109, remove the code erasing and
re-creating the terminators and rely on the default ones.
mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp