diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2019-04-17 16:31:52 +0000 |
---|---|---|
committer | Rhys Perry <pendingchaos02@gmail.com> | 2019-04-17 16:31:52 +0000 |
commit | c2814e12e7fd1d51caa3c14a7053dedadd99152c (patch) | |
tree | c86a0d3ef817a9392abab9b107c4b3cb2b774f4d /llvm/lib/Target/AMDGPU/SIInsertSkips.cpp | |
parent | 00f2ab1c2f014ffc790c59fc0e9fa1bc8647cba2 (diff) | |
download | bcm5719-llvm-c2814e12e7fd1d51caa3c14a7053dedadd99152c.tar.gz bcm5719-llvm-c2814e12e7fd1d51caa3c14a7053dedadd99152c.zip |
AMDGPU: Force skip over SMRD, VMEM and s_waitcnt instructions
Summary: This fixes a large Dawn of War 3 performance regression with RADV from Mesa 19.0 to master which was caused by creating less code in some branches.
Reviewers: arsen, nhaehnle
Reviewed By: nhaehnle
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60824
llvm-svn: 358592
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIInsertSkips.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIInsertSkips.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInsertSkips.cpp b/llvm/lib/Target/AMDGPU/SIInsertSkips.cpp index 9ea05d95680..f5f1f9934b7 100644 --- a/llvm/lib/Target/AMDGPU/SIInsertSkips.cpp +++ b/llvm/lib/Target/AMDGPU/SIInsertSkips.cpp @@ -137,6 +137,10 @@ bool SIInsertSkips::shouldSkip(const MachineBasicBlock &From, if (TII->hasUnwantedEffectsWhenEXECEmpty(*I)) return true; + // These instructions are potentially expensive even if EXEC = 0. + if (TII->isSMRD(*I) || TII->isVMEM(*I) || I->getOpcode() == AMDGPU::S_WAITCNT) + return true; + ++NumInstr; if (NumInstr >= SkipThreshold) return true; |