[PATCH] D127531: [SLP]Improve analysis of same/alternate code ops and scheduling.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 15:24:11 PDT 2022


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1251
+                  getUnderlyingObject(LI2->getPointerOperand()))
+            return LookAheadHeuristics::ScoreAltOpcodes;
           return LookAheadHeuristics::ScoreFail;
----------------
vdmitrie wrote:
> I'm not sure I understand why this is scored as alternating opcodes.
> If underlying objects are same that probably means Dist variable must have a value and the value is 0.
> i.e. these loads are from same location. right?  It sounds like splat load. 
> Where alternating opcodes come from?
No. If you have Geps with non-const indices, the Dist might be None. But the loads still may be the source of masked gather.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7734
+    SmallVectorImpl<Value *> &Right, const TargetLibraryInfo &TLI,
+    const TargetTransformInfo &TTI, const DataLayout &DL, ScalarEvolution &SE,
+    const BoUpSLP &R) {
----------------
vdmitrie wrote:
> TTI argument is unused.
Will remove


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:12314
+static bool compareCmp(Value *V, Value *V2, TargetLibraryInfo &TLI,
+                       const TargetTransformInfo &TTI,
                        function_ref<bool(Instruction *)> IsDeleted) {
----------------
vdmitrie wrote:
> TTI argument is unused.
Will remove


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127531



More information about the llvm-commits mailing list