[llvm-commits] Patch to generalize .weak_definition directive in MCAsmStreamer

Dmitry N. Mikushin maemarcus at gmail.com
Thu Oct 18 17:19:38 PDT 2012


Hi Jim,

I was about to send another small patch containing necessary changes
on NVPTX side:

===
[NVPTX] Adding support for .weak directive (PTX ISA 3.1)

Dear all,

This patch aims to add basic support for .weak directive in NVPTX
backend. The PTX version string is changed from 3.0 to 3.1, .weak is
added to function header, and the default placement of weak directive
is commented out in the same way as it is already done for
.globl/.global.

Note this change also depends on the patch
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121015/153758.html

Please see the patch attached.

- D.
===

Should I combine these two patches into one, along with tests?

Thanks,
- D.

2012/10/19 Jim Grosbach <grosbach at apple.com>:
> Seems reasonable, but please make sure there's existing test cases for the default format (to make sure this doesn't regress those) and add a new test case for NVPTX to make sure we do it right for that (probably in test/CodeGen/NVPTX).
>
> -Jim
>
> On Oct 18, 2012, at 4:47 PM, "Dmitry N. Mikushin" <maemarcus at gmail.com> wrote:
>
>> Dear all,
>>
>> In NVPTX backend it is illegal to generate .weak_definition directive
>> in its default format. In order to let the target provide its own
>> implementation of this directive, MCAsmStreamer should emit
>> MAI.getWeakDefDirective() instead of hard-coded
>> "\t.weak_definition\t", in the same way as it is already done for
>> .globl/.global.
>>
>> Please see the attached patch.
>>
>> Thanks,
>> - D.
>> <weak_definition.patch>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nvptx.weak.patch
Type: application/octet-stream
Size: 1045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121019/fa775654/attachment.obj>


More information about the llvm-commits mailing list