summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-04-30 00:23:06 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-04-30 00:23:06 +0000
commitcb6ba62d6fce87cc28a5076ccebe05b740d2340d (patch)
treea090c0340339618f28dbb530f14c77b5c572588d /llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
parent52c68bb0f57fd53e4bd3f721e5fd4ca19544551f (diff)
downloadbcm5719-llvm-cb6ba62d6fce87cc28a5076ccebe05b740d2340d.tar.gz
bcm5719-llvm-cb6ba62d6fce87cc28a5076ccebe05b740d2340d.zip
AMDGPU/SI: Enable the post-ra scheduler
Summary: This includes a hazard recognizer implementation to replace some of the hazard handling we had during frame index elimination. Reviewers: arsenm Subscribers: qcolombet, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D18602 llvm-svn: 268143
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 13abe7f1343..342afffea6d 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -384,6 +384,17 @@ void GCNPassConfig::addPreSched2() {
}
void GCNPassConfig::addPreEmitPass() {
+
+ // The hazard recognizer that runs as part of the post-ra scheduler does not
+ // gaurantee to be able handle all hazards correctly. This is because
+ // if there are multiple scheduling regions in a basic block, the regions
+ // are scheduled bottom up, so when we begin to schedule a region we don't
+ // know what instructions were emitted directly before it.
+ //
+ // Here we add a stand-alone hazard recognizer pass which can handle all cases.
+ // hazard recognizer pass.
+ addPass(&PostRAHazardRecognizerID);
+
addPass(createSIInsertWaitsPass(), false);
addPass(createSIShrinkInstructionsPass());
addPass(createSILowerControlFlowPass(), false);
OpenPOWER on IntegriCloud