[PATCH] Add attributes for AMDGPU register limits.

Aaron Ballman aaron at aaronballman.com
Wed Dec 3 12:12:39 PST 2014


On Wed, Dec 3, 2014 at 3:03 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:
>
>> On Dec 3, 2014, at 2:55 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
>>
>> On Wed, Dec 3, 2014 at 2:48 PM, Matt Arsenault <arsenm2 at gmail.com> wrote:
>>>
>>> On Nov 17, 2014, at 1:32 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
>>>
>>>
>>>
>>> +  let Args = [UnsignedArgument<"NumVGPR">];
>>> +  let Documentation = [AMDGPURegisterDocs];
>>> +  let Subjects = SubjectList<[KernelFunction], ErrorDiag,
>>> +                             "ExpectedKernelFunction">;
>>> +}
>>> +
>>> +def AMDGPUNumSGPR : InheritableAttr, TargetSpecificAttr<TargetAMDGPU> {
>>> +  let Spellings = [GCC<"amdgpu_num_sgpr">];
>>>
>>>
>>> Same comment here as above.
>>>
>>> +  let Args = [UnsignedArgument<"NumSGPR">];
>>> +  let Documentation = [AMDGPURegisterDocs];
>>>
>>>
>>> This will render the same documentation a second time. The usual
>>> approach is to create a category in the docs, and then generate
>>> different docs in the same category. See the calling convention
>>> attributes as an example.
>>>
>>>
>>> It turns out they aren’t being rendered at all now. I’m not sure why, I
>>> don’t see what I’m doing differently from the interrupt attributes which I
>>> followed as an example. It seems many of the attributes documented here are
>>> not actually getting generated into the attribute documentation, such as
>>> align_value. This i when I attempt to generate the docs, the ones on the
>>> website seem to have them.
>>
>> How are you attempting to generate the docs? Are you running the
>> tablegen pass first, and then sphinx-build?
>>
>> ~Aaron
>
> I’m just running make and looking at the output in the build output doc directory

That's insufficient. You have to run clang's tablegen as well --
that's what generates the new RST file.

clang-tblgen -gen-attr-docs -I E:\llvm\llvm\tools\clang\include
E:\llvm\llvm\tools\clang\include\clang\Basic\Attr.td -o
E:\llvm\llvm\tools\clang\docs\AttributeReference.rst

Btw, please do not commit the resulting AttributeReference.rst; it's
generated server-side automatically on a daily basis.

~Aaron




More information about the cfe-commits mailing list