[PATCH] D94155: [X86] Fix tile config register spill issue.

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 22:55:42 PST 2021


LuoYuanke created this revision.
Herald added subscribers: pengfei, hiraditya, qcolombet, MatzeB.
LuoYuanke requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Previous code build the model that tile config register is the user of
each AMX instruction. There is a problem for the tile config register
spill. When across function, the ldtilecfg instruction may be inserted
on each AMX instruction which use tile config register. This cause all
tile data register clobber.
To fix this issue, we remove the model of tile config register. We
analyze the regmask of call instruction and insert ldtilecfg if there is
any tile data register live across the call. Inserting the sttilecfg
before the call is unneccessary, because the tile config doesn't change
and we can just reload the config.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94155

Files:
  llvm/include/llvm/CodeGen/LiveIntervals.h
  llvm/lib/CodeGen/LiveIntervals.cpp
  llvm/lib/Target/X86/X86ExpandPseudo.cpp
  llvm/lib/Target/X86/X86FrameLowering.cpp
  llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
  llvm/lib/Target/X86/X86InstrAMX.td
  llvm/lib/Target/X86/X86InstrInfo.cpp
  llvm/lib/Target/X86/X86PreTileConfig.cpp
  llvm/lib/Target/X86/X86RegisterInfo.td
  llvm/lib/Target/X86/X86TileConfig.cpp
  llvm/test/CodeGen/X86/AMX/amx-across-func.ll
  llvm/test/CodeGen/X86/AMX/amx-bf16-intrinsics.ll
  llvm/test/CodeGen/X86/AMX/amx-spill-merge.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94155.314803.patch
Type: text/x-patch
Size: 21343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210106/72c91cb5/attachment.bin>


More information about the llvm-commits mailing list