On Mon, Jul 6, 2015 at 7:51 PM, Eric Christopher <[email protected]> wrote: > Author: echristo > Date: Mon Jul 6 18:51:56 2015 > New Revision: 241524 > > URL: http://llvm.org/viewvc/llvm-project?rev=241524&view=rev > Log: > Add some basic documentation for the __attribute__((target(""))) support. > > Describes the general syntax of how it's used with the unfortunate > usage of "subtarget features" and some examples from the x86 port > to help users. > > Modified: > cfe/trunk/include/clang/Basic/AttrDocs.td
Did you forget to change the Undocument in Attr.td for the TargetAttr object? ~Aaron > > Modified: cfe/trunk/include/clang/Basic/AttrDocs.td > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttrDocs.td?rev=241524&r1=241523&r2=241524&view=diff > ============================================================================== > --- cfe/trunk/include/clang/Basic/AttrDocs.td (original) > +++ cfe/trunk/include/clang/Basic/AttrDocs.td Mon Jul 6 18:51:56 2015 > @@ -678,6 +678,25 @@ The semantics are as follows: > }]; > } > > +def TargetDocs : Documentation { > + let Category = DocCatFunction; > + let Content = [{ > +Clang supports the GNU style ``__attribute__((target("OPTIONS")))`` > attribute. > +This attribute may be attached to a function definition and instructs > +the backend to use different code generation options than were passed on the > +command line. > + > +The current set of options correspond to the existing "subtarget features" > for > +the target with or without a "-mno-" in front corresponding to the absence > +of the feature, as well as ``arch="CPU"`` which will change the default "CPU" > +for the function. > + > +Example "subtarget features" from the x86 backend include: "mmx", "sse", > "sse4.2", > +"avx", "xop" and largely correspond to the machine specific options handled > by > +the front end. > +}]; > +} > + > def DocCatAMDGPURegisterAttributes : > DocumentationCategory<"AMD GPU Register Attributes"> { > let Content = [{ > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
