radeon/llvm: Fix MachineInstr dump
This commit is contained in:
parent
4731f1f52d
commit
c8fb30abf1
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue