diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2015-01-06 17:59:56 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2015-01-06 17:59:56 +0000 |
commit | 4bc014f0a727df13c8ab39f7fc748a942564b988 (patch) | |
tree | 6c43da2a6fe64743953a05d79e2e222169744284 | |
parent | f807a6f2970398b85ccd2a3ba6d8959426a9872f (diff) | |
download | bcm5719-llvm-4bc014f0a727df13c8ab39f7fc748a942564b988.tar.gz bcm5719-llvm-4bc014f0a727df13c8ab39f7fc748a942564b988.zip |
R600/SI: Remove MachineFunction dump from AsmPrinter
The dump was dependent on a feature string, which meant that it couldn't
be disabled or enable on a per compile basis.
llvm-svn: 225275
-rw-r--r-- | llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp index 36d4509358b..038bdc6f628 100644 --- a/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp +++ b/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp @@ -161,23 +161,18 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) { } } - if (STM.dumpCode()) { -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - MF.dump(); -#endif - - if (DisasmEnabled) { - OutStreamer.SwitchSection(Context.getELFSection(".AMDGPU.disasm", - ELF::SHT_NOTE, 0, - SectionKind::getReadOnly())); - - for (size_t i = 0; i < DisasmLines.size(); ++i) { - std::string Comment(DisasmLineMaxLen - DisasmLines[i].size(), ' '); - Comment += " ; " + HexLines[i] + "\n"; - - OutStreamer.EmitBytes(StringRef(DisasmLines[i])); - OutStreamer.EmitBytes(StringRef(Comment)); - } + if (STM.dumpCode() && DisasmEnabled) { + + OutStreamer.SwitchSection(Context.getELFSection(".AMDGPU.disasm", + ELF::SHT_NOTE, 0, + SectionKind::getReadOnly())); + + for (size_t i = 0; i < DisasmLines.size(); ++i) { + std::string Comment(DisasmLineMaxLen - DisasmLines[i].size(), ' '); + Comment += " ; " + HexLines[i] + "\n"; + + OutStreamer.EmitBytes(StringRef(DisasmLines[i])); + OutStreamer.EmitBytes(StringRef(Comment)); } } |