[PATCH] D50323: [GVNHoist] Prune out useless CHI insertions

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 13:31:50 PDT 2018


efriedma added a comment.

Seems fine to me.



================
Comment at: lib/Transforms/Scalar/GVNHoist.cpp:158
 using CHIArgs = iterator_range<CHIIt>;
+using CHICache = DenseMap<BasicBlock *, SmallPtrSet<Instruction *, 2>>;
 using OutValuesType = DenseMap<BasicBlock *, SmallVector<CHIArg, 2>>;
----------------
efriedma wrote:
> `DenseSet<std::pair<BasicBlock*, Instruction*>>` is probably more efficient if you expect a small number of instructions per BB.
You didn't reply to this comment?


https://reviews.llvm.org/D50323





More information about the llvm-commits mailing list