summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
diff options
context:
space:
mode:
authorSam Kolton <Sam.Kolton@amd.com>2017-04-07 10:53:12 +0000
committerSam Kolton <Sam.Kolton@amd.com>2017-04-07 10:53:12 +0000
commit6e79529db4e81cc99ec28359b6a32a9c3fece184 (patch)
treed9cf5d457741b62ae806fb8f58e4d799f483bb2d /llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
parent3c608448e1a5c162697e2478a264b4596f9cf2ad (diff)
downloadbcm5719-llvm-6e79529db4e81cc99ec28359b6a32a9c3fece184.tar.gz
bcm5719-llvm-6e79529db4e81cc99ec28359b6a32a9c3fece184.zip
[AMDGPU] Move SiShrinkInstruction and SDWAPeephole to SSAOptimization passes
Summary: Difference beetween PreRegAlloc() and MachineSSAOptimization() are that the former is run despite of -O0 optimization level. In my undestanding SiShrinkInstructions and SDWAPeephole shouldn't run when optimizations are disabled. With this change order of passes will not change. Reviewers: arsenm, vpykhtin, rampitec Subscribers: qcolombet, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye Differential Revision: https://reviews.llvm.org/D31705 llvm-svn: 299757
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 80feef384be..9cd8c2876c9 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -716,6 +716,11 @@ void GCNPassConfig::addMachineSSAOptimization() {
addPass(&SIFoldOperandsID);
addPass(&DeadMachineInstructionElimID);
addPass(&SILoadStoreOptimizerID);
+ addPass(createSIShrinkInstructionsPass());
+ if (EnableSDWAPeephole) {
+ addPass(&SIPeepholeSDWAID);
+ addPass(&DeadMachineInstructionElimID);
+ }
}
bool GCNPassConfig::addILPOpts() {
@@ -757,11 +762,6 @@ bool GCNPassConfig::addGlobalInstructionSelect() {
#endif
void GCNPassConfig::addPreRegAlloc() {
- addPass(createSIShrinkInstructionsPass());
- if (EnableSDWAPeephole) {
- addPass(&SIPeepholeSDWAID);
- addPass(&DeadMachineInstructionElimID);
- }
addPass(createSIWholeQuadModePass());
}
OpenPOWER on IntegriCloud