[mlir] Change the internal representation of FrozenRewritePatternList to use shared_ptr
authorRiver Riddle <riddleriver@gmail.com>
Mon, 14 Dec 2020 20:32:21 +0000 (12:32 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Mon, 14 Dec 2020 20:32:44 +0000 (12:32 -0800)
commit6af2c4ca9bdb37e56cfda8dae4f6c3c6ca21b8d7
treee158bfe16fccc880afe0fbb5f4e291821b733315
parent6f271e921ba48f4c4fa54bbd2c7a4c548ca5e59e
[mlir] Change the internal representation of FrozenRewritePatternList to use shared_ptr

This will allow for caching pattern lists across multiple pass instances, such as when multithreading. This is an extremely important invariant for PDL patterns, which are compiled at runtime when the FrozenRewritePatternList is built.

Differential Revision: https://reviews.llvm.org/D93146
mlir/include/mlir/Rewrite/FrozenRewritePatternList.h
mlir/lib/Rewrite/FrozenRewritePatternList.cpp