[llvm-commits] patch: flush raw_ostream after AsmPrinting function

Dan Gohman gohman at apple.com
Fri Nov 7 12:30:54 PST 2008


I've applied your patch for now. Hopefully soon we'll replace
it with the one true way :-).

Dan

On Nov 5, 2008, at 10:59 AM, Preston Gurd wrote:

> While you are all considering the one true way to handle this issue
> (which would be above my patch-grade, I think), might you consider
> applying the (attached) patch for the time being?
>
> When printing the generated assembly code for a function to a
> raw_ostream using the -print-emitted-asm option, flush the raw_ostream
> output to avoid the possibility of having the last partial buffer be
> separated from the rest of the generated code output by other output  
> to
> the same device, but using a different output stream.
>
>
> On Sun, 2008-02-11 at 03:07 -0500, Daniel Dunbar wrote:
>> I agree with Dan, this is unfortunate.
>>
>> Is an extra branch in the write routine really a performance issue
>> here?
>>
>> - Daniel
>>
>> On Fri, Oct 31, 2008 at 4:33 PM, Chris Lattner <clattner at apple.com>
>> wrote:
>>
>>        On Oct 31, 2008, at 1:52 PM, Dan Gohman wrote:
>>
>>> The real bug here, in my opinion, is that the new
>>        raw_ostream
>>> version of stderr is buffered.
>>
>>
>>        Patches, as they say, are welcome :).  If you can figure out a
>>        way to
>>        not affect the perf of the buffered case, I would really
>>        really like
>>        this.
>>
>>        -Chris
>>
>>        _______________________________________________
>>        llvm-commits mailing list
>>        llvm-commits at cs.uiuc.edu
>>        http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
> <flush.diff>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list