summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-08-17 19:42:11 +0000
committerTom Stellard <[email protected]>2012-08-23 15:00:48 +0000
commit235318a578b3d7772a60590c7e76791ed6d1a78e (patch)
tree91891bdde0a4a16ed4ce49d711c86ec6ffc04233 /src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp
parent2de24024c1ca5366e76f449b115392a97808ef2d (diff)
radeon/llvm: Use the MCCodeEmitter for SI
Diffstat (limited to 'src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp')
-rw-r--r--src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp b/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp
index 6f15430bd53..62c04d60b00 100644
--- a/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp
+++ b/src/gallium/drivers/radeon/AMDGPUTargetMachine.cpp
@@ -73,17 +73,18 @@ bool AMDGPUTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
formatted_raw_ostream &Out,
CodeGenFileType FileType,
bool DisableVerify) {
- // XXX: Hack here addPassesToEmitFile will fail, but this is Ok since we are
- // only using it to access addPassesToGenerateCode()
- bool fail = LLVMTargetMachine::addPassesToEmitFile(PM, Out, FileType,
- DisableVerify);
- assert(fail);
const AMDGPUSubtarget &STM = getSubtarget<AMDGPUSubtarget>();
std::string gpu = STM.getDeviceName();
if (gpu == "SI") {
- PM.add(createSICodeEmitterPass(Out));
+ return LLVMTargetMachine::addPassesToEmitFile(PM, Out, FileType,
+ DisableVerify);
} else if (Subtarget.device()->getGeneration() <= AMDGPUDeviceInfo::HD6XXX) {
+ // XXX: Hack here addPassesToEmitFile will fail, but this is Ok since we are
+ // only using it to access addPassesToGenerateCode()
+ bool fail = LLVMTargetMachine::addPassesToEmitFile(PM, Out, FileType,
+ DisableVerify);
+ assert(fail);
PM.add(createR600CodeEmitterPass(Out));
} else {
abort();