[PATCH] D144474: [LV][NFC] Use ElementCount for getMaxInterleaveFactor

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 05:22:28 PST 2023


fhahn added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:1099
   /// and the number of execution units in the CPU.
-  unsigned getMaxInterleaveFactor(unsigned VF) const;
+  unsigned getMaxInterleaveFactor(ElementCount VF) const;
 
----------------
luke wrote:
> Is there a policy on breaking API changes? If the old signature needs to be preserved we can overload as done in https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi/-/commit/8d36708507b3c378078b9fe364bc548354aaec86
We generally don't provide stability guarantees for the C++ API, so this should be fine.


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h:276
     // Let regular unroll to unroll the loop.
-    return VF == 1 ? 1 : ST->getMaxInterleaveFactor();
+    return VF.getKnownMinValue() == 1 ? 1 : ST->getMaxInterleaveFactor();
   }
----------------
Shouldn't that be `VF.isScalar()`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144474



More information about the llvm-commits mailing list