Don't flush the raw_ostream between each MachineFunction. These flush

calls were originally put in place because errs() at one time was
not unbuffered, and these print routines are commonly used with errs()
for debugging. However, errs() is now properly unbuffered, so the
flush calls are no longer needed. This significantly reduces the
number of write(2) calls for regular asm printing when there are many
small functions.

llvm-svn: 78137
This commit is contained in:
Dan Gohman 2009-08-05 00:49:25 +00:00
parent 20f79e321e
commit c6b5e8a5c5
6 changed files with 0 additions and 12 deletions

View File

@ -330,8 +330,6 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Emit post-function debug information.
DW->EndFunction(&MF);
O.flush();
return false;
}

View File

@ -134,8 +134,6 @@ bool MSP430AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
if (TAI->hasDotTypeDotSizeDirective())
O << "\t.size\t" << CurrentFnName << ", .-" << CurrentFnName << '\n';
O.flush();
// We didn't modify anything
return false;
}

View File

@ -646,8 +646,6 @@ bool PPCLinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Emit post-function debug information.
DW->EndFunction(&MF);
O.flush();
// We didn't modify anything.
return false;
}

View File

@ -144,8 +144,6 @@ bool SystemZAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out jump tables referenced by the function.
EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
O.flush();
// We didn't modify anything
return false;
}

View File

@ -284,8 +284,6 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out jump tables referenced by the function.
EmitJumpTableInfo(MF.getJumpTableInfo(), MF);
O.flush();
// We didn't modify anything.
return false;
}

View File

@ -183,8 +183,6 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
O << CurrentFnName << "\tendp\n";
O.flush();
// We didn't modify anything.
return false;
}