[llvm] Introduce CounterExpressionBuilder::replace(C, Map) (PR #112698)

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 02:11:00 PDT 2024


================
@@ -213,6 +214,11 @@ class CounterExpressionBuilder {
   /// Return a counter that represents the expression that subtracts RHS from
   /// LHS.
   Counter subtract(Counter LHS, Counter RHS, bool Simplify = true);
+
+  using ReplaceMap = std::map<Counter, Counter>;
----------------
chapuni wrote:

I am so lazy to add hash helper into `llvm::Counter`. I have taken `std::map` since `Counter` has provided enough operators.

The map may grow up to hundreds of keys. Could we make `Counter` ready for hash maps?

https://github.com/llvm/llvm-project/pull/112698


More information about the llvm-commits mailing list