[X86][AMX] Hoist ldtilecfg
authorWang, Pengfei <pengfei.wang@intel.com>
Mon, 12 Apr 2021 14:08:27 +0000 (22:08 +0800)
committerWang, Pengfei <pengfei.wang@intel.com>
Mon, 12 Apr 2021 14:36:41 +0000 (22:36 +0800)
commit4cbaaf4a24376fe24656fc1fac846fd82de5158f
tree375295f4c92bdad4e838eddd70fa1daba533a0dd
parent6c0a1ed3a94ff34e6d9500cdfd04858b1a6f72aa
[X86][AMX] Hoist ldtilecfg

The previous code calculated the first ldtilecfg by dominating all AMX registers' def. This may result in the ldtilecfg being inserted into a loop.

This patch try to calculate the nearest point where all shapes of AMX registers are reachable.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D99010
llvm/lib/Target/X86/X86PreTileConfig.cpp
llvm/test/CodeGen/X86/AMX/amx-across-func.ll
llvm/test/CodeGen/X86/AMX/amx-config.ll
llvm/test/CodeGen/X86/AMX/amx-ldtilecfg-insert.ll
llvm/test/CodeGen/X86/opt-pipeline.ll