[llvm] [NFC][AMDGPU] Do not flush after printing every instruction (PR #95237)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 05:39:55 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Pierre van Houtryve (Pierre-vh)
<details>
<summary>Changes</summary>
It's very expensive and doesn't achieve anything.
I one test I did, it saves almost 10s on a 2m23s build, bringing it down to 2m15s using a downstream branch.
---
Full diff: https://github.com/llvm/llvm-project/pull/95237.diff
1 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp (-1)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
index 883b6c4407fe5..227b7383e16d5 100644
--- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
+++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
@@ -43,7 +43,6 @@ void AMDGPUInstPrinter::printRegName(raw_ostream &OS, MCRegister Reg) const {
void AMDGPUInstPrinter::printInst(const MCInst *MI, uint64_t Address,
StringRef Annot, const MCSubtargetInfo &STI,
raw_ostream &OS) {
- OS.flush();
printInstruction(MI, Address, STI, OS);
printAnnotation(OS, Annot);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/95237
More information about the llvm-commits
mailing list