Skip to content

Commit

Permalink
[NFC][AMDGPU] Do not flush after printing every instruction (#95237)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Pierre-vh authored Jun 12, 2024
1 parent 74f200b commit ad9fe3b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Target/AMDGPU/MCTargetDesc/R600InstPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ using namespace llvm;
void R600InstPrinter::printInst(const MCInst *MI, uint64_t Address,
StringRef Annot, const MCSubtargetInfo &STI,
raw_ostream &O) {
O.flush();
printInstruction(MI, Address, O);
printAnnotation(O, Annot);
}
Expand Down

0 comments on commit ad9fe3b

Please sign in to comment.