[PATCH] D142803: [LogicCombine 1/?] Implement a general way to simplify logical operations.

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 17:09:28 PST 2023


bcl5980 added inline comments.


================
Comment at: llvm/include/llvm/Analysis/LogicCombine.h:53-54
+  SmallDenseMap<Value *, LogicalOpNode *, 16> LogicalOpNodes;
+  SmallPtrSet<Value *, 8> LeafSet;
+  SmallVector<Value *, 8> LeafValues;
+
----------------
spatel wrote:
> I don't think we need "LeafSet". If you make "LeafValues" a `SmallSetVector`, we won't insert duplicate values into the vector. Is that the only job of the LeafSet?
I need LeafValues to access value by index. It looks `SmallSetVector` can't do that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142803/new/

https://reviews.llvm.org/D142803



More information about the llvm-commits mailing list