[llvm-commits] [PATCH][Target/PTX] Public declaration of MCAsmStreamer class

Che-Liang Chiou clchiou at gmail.com
Fri Oct 15 00:48:40 PDT 2010


Hi Chris,

Thanks for the comments.  I thougt that a part of code might be shared
between MCAsmStreamer and PTX's AsmStreamer, but anyway I will write
one independently.

Regards,
Che-Liang

On Thu, Oct 14, 2010 at 6:21 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On Oct 12, 2010, at 8:35 PM, Che-Liang Chiou wrote:
>
>> Hi there,
>>
>> This patch makes the declaration of MCAsmStreamer class public.
>>
>> The purpose is for extending MCAsmStreamer and writing a customized
>> PTX assembly text output in subsequent patches.
>>
>> PTX imposes special syntax on function declaration, sections of
>> assembly text, and etc.  It would be very difficult if not impossible
>> to write a PTX-compliant assembly text generator if we may only extend
>> AsmPrinter class.
>
> Hi Che-Liang,
>
> The preferred way to do this is to use the MCStreamer:EmitRawText method.  This avoids having to add PTX specific stuff to the MCStreamer where it doesn't make sense, and gives you complete flexibility to emit whatever you want.  The only downside to this will come if you ever want to "emit a .o file directly".  Fortunately, I don't think that makes a lot of sense for PTX.
>
> -Chris




More information about the llvm-commits mailing list