[llvm] 3b1de7a - [X86][AMX] Reduce the compiling time for non-amx code.
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 03:11:11 PDT 2022
Author: Luo, Yuanke
Date: 2022-05-24T18:02:51+08:00
New Revision: 3b1de7ab6097adc92d5057bc9172c48806704e8c
URL: https://github.com/llvm/llvm-project/commit/3b1de7ab6097adc92d5057bc9172c48806704e8c
DIFF: https://github.com/llvm/llvm-project/commit/3b1de7ab6097adc92d5057bc9172c48806704e8c.diff
LOG: [X86][AMX] Reduce the compiling time for non-amx code.
Differential Revision: https://reviews.llvm.org/D126280
Added:
Modified:
llvm/lib/Target/X86/X86FastPreTileConfig.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86FastPreTileConfig.cpp b/llvm/lib/Target/X86/X86FastPreTileConfig.cpp
index 08ccfeda5a4ab..da10964d51ecb 100644
--- a/llvm/lib/Target/X86/X86FastPreTileConfig.cpp
+++ b/llvm/lib/Target/X86/X86FastPreTileConfig.cpp
@@ -663,6 +663,18 @@ bool X86FastPreTileConfig::runOnMachineFunction(MachineFunction &MFunc) {
CfgSS = -1;
unsigned NumVirtRegs = MRI->getNumVirtRegs();
+ // Abandon early if there is no tile register to config.
+ bool HasVirtTileReg = false;
+ for (unsigned I = 0, E = NumVirtRegs; I != E; ++I) {
+ Register VirtReg = Register::index2VirtReg(I);
+ if (MRI->getRegClass(VirtReg)->getID() == X86::TILERegClassID) {
+ HasVirtTileReg = true;
+ break;
+ }
+ }
+ if (!HasVirtTileReg)
+ return false;
+
StackSlotForVirtReg.resize(NumVirtRegs);
MayLiveAcrossBlocks.clear();
// We will create register during config. *3 is to make sure
More information about the llvm-commits
mailing list