summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-04-25 09:03:21 -0400
committerTom Stellard <[email protected]>2012-04-25 09:02:16 -0400
commit76940ba852a9b9a34a36afc4b1709d548e036f2a (patch)
treee1ce74e072384e7ef8c6abdfd27d3e03184b3097 /src/gallium
parent63da1aa5be4aa3e14a0456daf863c1bf10de619f (diff)
radeonsi/llvm: Fix initialization of SIMachineFunctionInfo
SIMachineFunctionInfo needs to be initialized before any of the AMDIL passes.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp b/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp
index 328589cc143..b37c6edea15 100644
--- a/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp
+++ b/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp
@@ -130,6 +130,10 @@ AMDGPUPassConfig::addPreISel()
}
bool AMDGPUPassConfig::addInstSelector() {
+ const AMDILSubtarget &ST = TM->getSubtarget<AMDILSubtarget>();
+ if (ST.device()->getGeneration() == AMDILDeviceInfo::HD7XXX) {
+ PM.add(createSIInitMachineFunctionInfoPass(*TM));
+ }
PM.add(createAMDILBarrierDetect(*TM));
PM.add(createAMDILPrintfConvert(*TM));
PM.add(createAMDILInlinePass(*TM));
@@ -141,10 +145,6 @@ bool AMDGPUPassConfig::addInstSelector() {
bool AMDGPUPassConfig::addPreRegAlloc() {
const AMDILSubtarget &ST = TM->getSubtarget<AMDILSubtarget>();
- if (ST.device()->getGeneration() == AMDILDeviceInfo::HD7XXX) {
- PM.add(createSIInitMachineFunctionInfoPass(*TM));
- }
-
PM.add(createAMDGPUReorderPreloadInstructionsPass(*TM));
if (ST.device()->getGeneration() <= AMDILDeviceInfo::HD6XXX) {
PM.add(createR600LowerShaderInstructionsPass(*TM));