pengfei updated this revision to Diff 484805.
pengfei added a comment.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Move doc to comments.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139784/new/

https://reviews.llvm.org/D139784

Files:
  clang/lib/CodeGen/CodeGenFunction.cpp


Index: clang/lib/CodeGen/CodeGenFunction.cpp
===================================================================
--- clang/lib/CodeGen/CodeGenFunction.cpp
+++ clang/lib/CodeGen/CodeGenFunction.cpp
@@ -492,13 +492,19 @@
   if (CurFnInfo->getMaxVectorWidth() > LargestVectorWidth)
     LargestVectorWidth = CurFnInfo->getMaxVectorWidth();
 
-  // Add the required-vector-width attribute. This contains the max width from:
-  // 1. min-vector-width attribute used in the source program.
+  // Add the min-legal-vector-width attribute. This contains the max width 
from:
+  // 1. min-legal-vector-width attribute used in the source program.
   // 2. Any builtins used that have a vector width specified.
   // 3. Values passed in and out of inline assembly.
   // 4. Width of vector arguments and return types for this function.
-  // 5. Width of vector aguments and return types for functions called by this
+  // 5. Width of vector arguments and return types for functions called by this
   //    function.
+  // This attribute is intended for X86 backend use only. The "min legal" in 
the
+  // name means the minimum width in bits that vector types have must be 
treated
+  // as legal types by code generator.
+  // Note: The attribute doesn't guarantee arbitrary vector width specified 
will
+  // be treated as legal type in code generator. Users are not encouraged to
+  // directly pass or return vector types out of the capacity of their targets.
   if (getContext().getTargetInfo().getTriple().isX86())
     CurFn->addFnAttr("min-legal-vector-width",
                      llvm::utostr(LargestVectorWidth));


Index: clang/lib/CodeGen/CodeGenFunction.cpp
===================================================================
--- clang/lib/CodeGen/CodeGenFunction.cpp
+++ clang/lib/CodeGen/CodeGenFunction.cpp
@@ -492,13 +492,19 @@
   if (CurFnInfo->getMaxVectorWidth() > LargestVectorWidth)
     LargestVectorWidth = CurFnInfo->getMaxVectorWidth();
 
-  // Add the required-vector-width attribute. This contains the max width from:
-  // 1. min-vector-width attribute used in the source program.
+  // Add the min-legal-vector-width attribute. This contains the max width from:
+  // 1. min-legal-vector-width attribute used in the source program.
   // 2. Any builtins used that have a vector width specified.
   // 3. Values passed in and out of inline assembly.
   // 4. Width of vector arguments and return types for this function.
-  // 5. Width of vector aguments and return types for functions called by this
+  // 5. Width of vector arguments and return types for functions called by this
   //    function.
+  // This attribute is intended for X86 backend use only. The "min legal" in the
+  // name means the minimum width in bits that vector types have must be treated
+  // as legal types by code generator.
+  // Note: The attribute doesn't guarantee arbitrary vector width specified will
+  // be treated as legal type in code generator. Users are not encouraged to
+  // directly pass or return vector types out of the capacity of their targets.
   if (getContext().getTargetInfo().getTriple().isX86())
     CurFn->addFnAttr("min-legal-vector-width",
                      llvm::utostr(LargestVectorWidth));
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D139784: [Doc] Refacto... Phoebe Wang via Phabricator via cfe-commits

Reply via email to