diff options
author | Tom Stellard <[email protected]> | 2012-05-02 11:53:13 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-05-02 11:53:13 -0400 |
commit | c8fb30abf1131072c855f2539db6455fac65dcb0 (patch) | |
tree | 6c48e8f19ee0d85404f31651a3e2b488c7062e2d /src/gallium/drivers | |
parent | 4731f1f52d4085f2ff35dcf58cb129f79d97a0b6 (diff) |
radeon/llvm: Fix MachineInstr dump
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeon/AMDILSubtarget.cpp | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/AMDILSubtarget.cpp b/src/gallium/drivers/radeon/AMDILSubtarget.cpp index 11b6bbe0c01..4fdbe755af6 100644 --- a/src/gallium/drivers/radeon/AMDILSubtarget.cpp +++ b/src/gallium/drivers/radeon/AMDILSubtarget.cpp @@ -27,7 +27,8 @@ using namespace llvm; #define GET_SUBTARGETINFO_TARGET_DESC #include "AMDILGenSubtargetInfo.inc" -AMDILSubtarget::AMDILSubtarget(llvm::StringRef TT, llvm::StringRef CPU, llvm::StringRef FS) : AMDILGenSubtargetInfo( TT, CPU, FS ) +AMDILSubtarget::AMDILSubtarget(llvm::StringRef TT, llvm::StringRef CPU, llvm::StringRef FS) : AMDILGenSubtargetInfo( TT, CPU, FS ), + mDumpCode(false) { memset(CapsOverride, 0, sizeof(*CapsOverride) * AMDILDeviceInfo::MaxNumberCapabilities); diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp index 3431316cd3c..ebc32106b52 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp @@ -93,20 +93,20 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes, AMDGPUTriple.setArch(Arch); Module * mod = unwrap(M); - std::string FS = gpu_family; + std::string FS; TargetOptions TO; + if (dump) { + mod->dump(); + FS += "+DumpCode"; + } + std::auto_ptr<TargetMachine> tm(AMDGPUTarget->createTargetMachine( - AMDGPUTriple.getTriple(), gpu_family, "" /* Features */, + AMDGPUTriple.getTriple(), gpu_family, FS, TO, Reloc::Default, CodeModel::Default, CodeGenOpt::Default )); TargetMachine &AMDGPUTargetMachine = *tm.get(); - /* XXX: Use TargetMachine.Options in 3.0 */ - if (dump) { - mod->dump(); - FS += ",DumpCode"; - } PassManager PM; PM.add(new TargetData(*AMDGPUTargetMachine.getTargetData())); PM.add(createPromoteMemoryToRegisterPass()); |