[PATCH] D95508: [X86] Fix tile config register spill issue for AMX

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 00:17:11 PST 2021


pengfei 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)) {
----------------
Since you iterate all MI twice, the total complex is 2 * N(BB) * M(MI), which is worse than D56136 (N * M + N).


================
Comment at: llvm/lib/Target/X86/X86PreTileConfig.cpp:260
     }
+    AMXBBVisited[MBB] = ReachAMX;
+    return ReachAMX;
----------------
If it is also succsor of itself, it will drop into infinite loop.


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

https://reviews.llvm.org/D95508



More information about the llvm-commits mailing list