[PATCH] D83283: [Attributor] AAPotentialValues Interface

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 02:26:36 PDT 2020


fhahn added inline comments.


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:3455
+  static bool classof(const AbstractAttribute *AA) {
+    return (AA->getIdAddr() == &ID);
+  }
----------------
nit: unnecessary ()


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:53
+template <>
+unsigned llvm::PotentialConstantIntValuesState::MaxPotentialValues = 0;
+
----------------
Why not just use `MaxPotentialValues` directly and keep it as a global? There might be a reason for doing so that I am missing, but it seems like similar options (e.g. `MaxHeapToStackSize`) are also just using the global directly.


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

https://reviews.llvm.org/D83283



More information about the llvm-commits mailing list