[PATCH] D100026: [X86] Support AMX fast register allocation

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 19 21:04:17 PDT 2021


pengfei added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/CodeGenPassBuilder.h:1042
   addRegAllocPass(addPass, false);
+  addPostFastRegAllocRewrite(addPass);
   return Error::success();
----------------
Is this function actually used?


================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:68
+// as a new Row for other new created AMX intrinsics.
+static std::map<Value *, Value *> Col2Row;
+
----------------
Better move it to class `X86LowerAMXType`


================
Comment at: llvm/lib/Target/X86/X86LowerAMXType.cpp:370-372
+static Value *getAllocaPos(BasicBlock *BB) {
+  Module *M = BB->getModule();
+  Function *F = BB->getParent();
----------------
You can make it be member of X86VolatileTileData. Then you don't need to calculate `F` here.


================
Comment at: llvm/lib/Target/X86/X86PreAMXConfig.cpp:205-207
+  preWriteTileCfg(I8Ptr, Cfg, Shapes);
+
+  return Cfg;
----------------
`return preWriteTileCfg(I8Ptr, Cfg, Shapes);` ?


================
Comment at: llvm/lib/Target/X86/X86PreAMXConfig.cpp:324
+        continue;
+      assert(onlyTileDef(II) && "Not volatile model for AMX at O0!");
+
----------------
Does it cause warning in release build?


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

https://reviews.llvm.org/D100026



More information about the llvm-commits mailing list