[PATCH] D117951: [SLP] Optimize reschedule of previously scheduled bundle member [NFC]
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 24 12:18:00 PST 2022
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2596-2597
+ // Walk up the def chain unscheduling all nodes encountered
+ // until a frontier of unscheduled nodes is found.
+ void unschedule(ScheduleData *SD) {
----------------
Use `///` style of comments here
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2599
+ void unschedule(ScheduleData *SD) {
+ assert(SD && SD->isSchedulingEntity() && SD->IsScheduled);
+ LLVM_DEBUG(dbgs() << "SLP: unschedule " << *SD << "\n");
----------------
Asserting message?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2602-2603
+
+ SmallVector<ScheduleData*> Worklist;
+ Worklist.push_back(SD);
+
----------------
`SmallVector<ScheduleData *> Worklist(1, SD);`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2613
+ // If BundleMember is a vector bundle, its operands may have been
+ // reordered duiring buildTree(). We therefore need to get its operands
+ // through the TreeEntry.
----------------
`during`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2627
+ assert(In &&
+ (isa<ExtractValueInst>(In) || isa<ExtractElementInst>(In) ||
+ In->getNumOperands() == TE->getNumOperands()) &&
----------------
Can we get PHINode here? Plus, extracts and PHIs are completely excluded from scheduling, I assume you can skip such instructions. Same about insertelements
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2644
+ // is formed.
+ assert(!SD->NextInBundle);
+
----------------
Asserting message.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2657
+ for (ScheduleData *MemoryDepSD : SD->MemoryDependencies) {
+ assert(isInSchedulingRegion(MemoryDepSD));
+ Worklist.push_back(MemoryDepSD);
----------------
Asserting message.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:2662-2663
+ }
+
+
void doForAllOpcodes(Value *V,
----------------
Extra breaks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117951/new/
https://reviews.llvm.org/D117951
More information about the llvm-commits
mailing list