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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78137 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2009-08-05 00:49:25 +00:00
parent 4a3d35abef
commit 1c55fab534
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;
}