[PATCH] D98030: [IR] Add vscale_range IR function attribute

Sander de Smalen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 5 04:08:24 PST 2021


sdesmalen added a comment.

Thanks for this patch, it's great to have an IR attribute for this. The mechanics of this patch look mostly fine to me.
I added a few more subscribers to give this some wider visibility.



================
Comment at: llvm/docs/LangRef.rst:1998
+    function. A value of 0 means unbounded. If the optional max value is omitted
+    then max is set to the value of min.
 
----------------
Do you need to say anything about a default if the attribute is not set, e.g. if `vscale_range` is not set, no assumptions are made about the range of vscale and the compiler falls back on the architectural maximum (if available).


================
Comment at: llvm/lib/IR/Attributes.cpp:564-565
+  if (hasAttribute(Attribute::VScaleRange)) {
+    unsigned MinValue;
+    unsigned MaxValue;
+    std::tie(MinValue, MaxValue) = getVScaleRangeArgs();
----------------
nit: `unsigned MinValue, MaxValue;`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98030



More information about the cfe-commits mailing list