Skip to content

Commit 9ab601f

Browse files
committed
Reland "[NFC][AMDGPU] Do not flush after printing every instruction (#95237)"
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.
1 parent fc19d62 commit 9ab601f

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ void AMDGPUInstPrinter::printRegName(raw_ostream &OS, MCRegister Reg) const {
4343
void AMDGPUInstPrinter::printInst(const MCInst *MI, uint64_t Address,
4444
StringRef Annot, const MCSubtargetInfo &STI,
4545
raw_ostream &OS) {
46-
OS.flush();
4746
printInstruction(MI, Address, STI, OS);
4847
printAnnotation(OS, Annot);
4948
}

llvm/lib/Target/AMDGPU/MCTargetDesc/R600InstPrinter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ using namespace llvm;
2121
void R600InstPrinter::printInst(const MCInst *MI, uint64_t Address,
2222
StringRef Annot, const MCSubtargetInfo &STI,
2323
raw_ostream &O) {
24-
O.flush();
2524
printInstruction(MI, Address, O);
2625
printAnnotation(O, Annot);
2726
}

0 commit comments

Comments
 (0)