radeonsi/llvm: Fix initialization of SIMachineFunctionInfo

SIMachineFunctionInfo needs to be initialized before any of the
AMDIL passes.
This commit is contained in:
Tom Stellard 2012-04-25 09:03:21 -04:00
parent 63da1aa5be
commit 76940ba852
1 changed files with 4 additions and 4 deletions

View File

@ -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));