[PATCH] D70901: [Matrix] Update shape propagation to iterate until done.
Adam Nemet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 15:13:41 PST 2019
anemet accepted this revision.
anemet added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp:391
+ auto pushInstruction = [&WorkList](Value *V) {
+ Instruction *I = dyn_cast<Instruction>(V);
+ if (I)
----------------
I think that this should take the WorkList as a parameter so that it's clear it's not pushing to the NewWorkList
================
Comment at: llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp:404
+ size_t WSize = WorkList.size();
if (!isa<Instruction>(V))
continue;
----------------
WSize -> BeforeProcessingV or something like that
================
Comment at: llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp:447
+ // After we discovered new shape info for new instructions in the
+ // worklist, we use them as seeds for the next round of forward
+ // propagation.
----------------
... we use their users ...
================
Comment at: llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp:451
+ for (User *U : WorkList[I]->users())
+ if (isa<Instruction>(U))
+ NewWorkList.push_back(cast<Instruction>(U));
----------------
Should this exclude V?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70901/new/
https://reviews.llvm.org/D70901
More information about the llvm-commits
mailing list