[PATCH] D142647: [ConstraintElimination] Move Value2Index map to ConstraintSystem (NFC)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 14:12:37 PST 2023


fhahn added inline comments.


================
Comment at: llvm/include/llvm/Analysis/ConstraintSystem.h:16
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/IR/Value.h"
 
----------------
Not needed, you can instead forward declare `Value` as in `class Value;`


================
Comment at: llvm/include/llvm/Analysis/ConstraintSystem.h:27
   SmallVector<SmallVector<int64_t, 8>, 4> Constraints;
-
+  DenseMap<Value *, unsigned> Value2Index;
   /// Current greatest common divisor for all coefficients in the system.
----------------
This needs documenting. and newlines around.


================
Comment at: llvm/include/llvm/Analysis/ConstraintSystem.h:60
+    return Value2Index;
+  }
   bool addVariableRowFill(ArrayRef<int64_t> R) {
----------------
nit: newline.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142647



More information about the llvm-commits mailing list