[llvm] Introduce CounterExpressionBuilder::replace(C, Map) (PR #112698)
Jessica Paquette via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 18 00:39:55 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>;
----------------
ornata wrote:
why std::map instead of e.g. DenseMap?
> std::map is most useful when your keys or values are very large, if you need to iterate over the collection in sorted order, or if you need stable iterators into the map (i.e. they don’t get invalidated if an insertion or deletion of another element takes place).
https://github.com/llvm/llvm-project/pull/112698
More information about the llvm-commits
mailing list