[all-commits] [llvm/llvm-project] a3b52a: [X86][AMX] Refactor for PostRA ldtilecfg pass.

Pengfei Wang via All-commits all-commits at lists.llvm.org
Tue Apr 13 19:08:42 PDT 2021


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

  Changed paths:
    M llvm/lib/Target/X86/X86PreTileConfig.cpp
    M llvm/lib/Target/X86/X86TileConfig.cpp
    M llvm/test/CodeGen/X86/AMX/amx-across-func.ll
    M llvm/test/CodeGen/X86/AMX/amx-config.ll
    M llvm/test/CodeGen/X86/AMX/amx-ldtilecfg-insert.ll
    M llvm/test/CodeGen/X86/AMX/amx-spill-merge.ll
    M llvm/test/CodeGen/X86/AMX/amx-spill.ll

  Log Message:
  -----------
  [X86][AMX] Refactor for PostRA ldtilecfg pass.

This is a follow up of D99010. We didn't consider the live range of shape registers when hoist ldtilecfg. There maybe risks, e.g. we happen to insert it to an invalid range of some registers and get unexpected error.

This patch fixes this problem by storing the value to corresponding stack place of ldtilecfg after all its definition immediately.

This patch also fix a problem in previous code: If we don't have a ldtilecfg which dominates all AMX instructions, we cannot initialize shapes for other ldtilecfg.

There're still some optimization points left. E.g. eliminate unused mov instructions, break the def-use dependency before RA etc.

Reviewed By: LuoYuanke, xiangzhangllvm

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




More information about the All-commits mailing list