formatted_raw_ostream &Out,
CodeGenFileType FileType,
bool DisableVerify);
-public:
- void dumpCode() { mDump = true; }
- bool shouldDumpCode() const { return mDump; }
};
} /* End namespace llvm */
"CapsOverride[AMDILDeviceInfo::Debug]",
"true",
"Debug mode is enabled, so disable hardware accelerated address spaces.">;
+def FeatureDumpCode : SubtargetFeature <"DumpCode",
+ "mDumpCode",
+ "true",
+ "Dump MachineInstrs in the CodeEmitter">;
+
//===----------------------------------------------------------------------===//
// Register File, Calling Conv, Instruction Descriptions
uint32_t mVersion;
bool mIs64bit;
bool mIs32on64bit;
+ bool mDumpCode;
public:
AMDILSubtarget(llvm::StringRef TT, llvm::StringRef CPU, llvm::StringRef FS);
virtual ~AMDILSubtarget();
ParseSubtargetFeatures(
llvm::StringRef CPU,
llvm::StringRef FS);
+ bool dumpCode() const { return mDumpCode; }
};
} else {
evergreenEncoding = true;
}
- const AMDGPUTargetMachine *amdtm =
- static_cast<const AMDGPUTargetMachine *>(&MF.getTarget());
- if (amdtm->shouldDumpCode()) {
+ if (STM.dumpCode()) {
MF.dump();
}
/* XXX: Use TargetMachine.Options in 3.0 */
if (dump) {
mod->dump();
+ FS += ",DumpCode";
}
PassManager PM;
PM.add(new TargetData(*AMDGPUTargetMachine.getTargetData()));