[PATCH] D99010: [X86][AMX] Hoist ldtilecfg
Pengfei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 12 06:20:49 PDT 2021
pengfei added inline comments.
================
Comment at: llvm/lib/Target/X86/X86PreTileConfig.cpp:109
+ bool isAMXInstruction(MachineInstr &MI) {
+ if (MI.isPseudo() || MI.getNumOperands() < 3)
+ return false;
----------------
LuoYuanke wrote:
> !MI.isPseudo()?
Yeah, I meant to. Surprisingly, we didn't set this flag when we define `PseudoI`. So the tests happened to pass. :)
================
Comment at: llvm/lib/Target/X86/X86PreTileConfig.cpp:184
+ MachineBasicBlock *DefMBB = DefMI->getParent();
+ if (!DefMI || DefMI->isMoveImmediate() || !DefVisited.insert(DefMI).second)
+ continue;
----------------
xiangzhangllvm wrote:
> This should be calculated in ShapeNum, for AMX always use reg as its shape after PHI.
The immediate value is specially handled in PostRA pass. Since the immediate value is always defined adjoining its use, we cannot calculate it as shape def. Otherwise, they will intersect with other AMX instructions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99010/new/
https://reviews.llvm.org/D99010
More information about the llvm-commits
mailing list