[all-commits] [llvm/llvm-project] 901185: [X86][AMX] Try to hoist AMX shapes' def

Pengfei Wang via All-commits all-commits at lists.llvm.org
Thu Apr 22 21:17:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 90118563ad0f133c696e070ad72761fa0daa4517
      https://github.com/llvm/llvm-project/commit/90118563ad0f133c696e070ad72761fa0daa4517
  Author: Wang, Pengfei <pengfei.wang at intel.com>
  Date:   2021-04-23 (Fri, 23 Apr 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86PreTileConfig.cpp
    M llvm/test/CodeGen/X86/AMX/amx-sched.ll

  Log Message:
  -----------
  [X86][AMX] Try to hoist AMX shapes' def

We request no intersections between AMX instructions and their shapes'
def when we insert ldtilecfg. However, this is not always ture resulting
from not only users don't follow AMX API model, but also optimizations.

This patch adds a mechanism that tries to hoist AMX shapes' def as well.
It only hoists shapes inside a BB, we can improve it for cases across
BBs in future. Currently, it only hoists shapes of which all sources' def
above the first AMX instruction. We can improve for the case that only
source that moves an immediate value to a register below AMX instruction.

Differential Revision: https://reviews.llvm.org/D101067


  Commit: 53673fd1bf6f2dd94d8bb6ced49cc54ec5fc866b
      https://github.com/llvm/llvm-project/commit/53673fd1bf6f2dd94d8bb6ced49cc54ec5fc866b
  Author: Wang, Pengfei <pengfei.wang at intel.com>
  Date:   2021-04-23 (Fri, 23 Apr 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86TileConfig.cpp

  Log Message:
  -----------
  [X86][AMX][NFC] Avoid assert for the same immidiate value

The previous condition in the assert was over strict. We ought to allow
the same immidiate value being loaded more than once. The intention for
the assert is to check the same AMX register uses multiple different
immidiate shapes. So this fix supposes to be NFC.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D101124


Compare: https://github.com/llvm/llvm-project/compare/e8bce8399631...53673fd1bf6f


More information about the All-commits mailing list