R600/SI: Move SIInsertWaits into AMDGPUPassConfig::addPreSched2()

This pass needs to be run after PrologEpilogInserter, because
that pass may inserter spill code which reads or writes memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223253 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tom Stellard 2014-12-03 18:27:08 +00:00
parent 8a8dc6a29d
commit f41e1d1a45

View File

@ -190,7 +190,6 @@ bool AMDGPUPassConfig::addPostRegAlloc() {
if (ST.getGeneration() > AMDGPUSubtarget::NORTHERN_ISLANDS) {
addPass(createSIShrinkInstructionsPass());
addPass(createSIInsertWaits(*TM));
}
return false;
}
@ -204,6 +203,9 @@ bool AMDGPUPassConfig::addPreSched2() {
addPass(&IfConverterID);
if (ST.getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS)
addPass(createR600ClauseMergePass(*TM));
if (ST.getGeneration() >= AMDGPUSubtarget::SOUTHERN_ISLANDS) {
addPass(createSIInsertWaits(*TM));
}
return false;
}