[llvm] [LV][NFC] Factor out MinBWs of values from the cost model (PR #194492)

Hassnaa Hamdi via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 05:16:29 PDT 2026


================
@@ -563,6 +563,15 @@ bool VFSelectionContext::runtimeChecksRequired() {
   return false;
 }
 
+const MapVector<Instruction *, uint64_t> &
+VFSelectionContext::getMinimalBitwidths() {
+  if (!MinBWsComputed) {
+    MinBWs = computeMinimumValueSizes(TheLoop->getBlocks(), *DB, &TTI);
----------------
hassnaaHamdi wrote:

I initially though about doing that, but after looking at the implementation of `computeMinimumValueSizes` which has many loops/nested loops, I preferred not to add it to the constructor to keep it doing simple stuff.
What do you think ?

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


More information about the llvm-commits mailing list