[PATCH] D95508: [X86] Fix tile config register spill issue for AMX
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 00:24:36 PST 2021
xiangzhangllvm added inline comments.
================
Comment at: llvm/lib/Target/X86/X86PreTileConfig.cpp:242
+ MachineBasicBlock::iterator MII = MI ? MI->getIterator() : MBB->begin();
+ for (auto E = MBB->end(); MII != E; ++MII) {
+ if (isAMXInstruction(MII)) {
----------------
pengfei wrote:
> Since you iterate all MI twice, the total complex is 2 * N(BB) * M(MI), which is worse than D56136 (N * M + N).
we see O(N) == O(2N) in program.
================
Comment at: llvm/lib/Target/X86/X86PreTileConfig.cpp:260
}
+ AMXBBVisited[MBB] = ReachAMX;
+ return ReachAMX;
----------------
pengfei wrote:
> If it is also succsor of itself, it will drop into infinite loop.
good catch! it should move ahead.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95508/new/
https://reviews.llvm.org/D95508
More information about the llvm-commits
mailing list