summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-07-06 23:51:56 +0000
committerEric Christopher <echristo@gmail.com>2015-07-06 23:51:56 +0000
commit93d6adfb46877b95d62b0e699a17fa70aeffa46d (patch)
tree024eb865588f3414a31ab55d46b7545adf8ca4a2
parent00409fbe19bd7c21a7643235222c8d2b1b11edc6 (diff)
downloadbcm5719-llvm-93d6adfb46877b95d62b0e699a17fa70aeffa46d.tar.gz
bcm5719-llvm-93d6adfb46877b95d62b0e699a17fa70aeffa46d.zip
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. llvm-svn: 241524
-rw-r--r--clang/include/clang/Basic/AttrDocs.td19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index 107458e4614..e4ca0cb4778 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -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 = [{
OpenPOWER on IntegriCloud