[PATCH] D34528: Define behavior of "stack-probe-size" attribute when inlining.

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 13:58:00 PDT 2017


majnemer added inline comments.


================
Comment at: docs/LangRef.rst:1515
+``"stack-probe-size"``
+    This attribute controls the behavior of the ``"probe-stack"`` attribute.
+    It defines the size of the guard region. It ensures that if the function
----------------
I believe it is also respected by stack probes which don't utilize the `probe-stack` attribute.


================
Comment at: lib/IR/Attributes.cpp:1649-1665
+  if (Callee.hasFnAttribute("stack-probe-size")) {
+    uint64_t CalleeStackProbeSize;
+    Callee.getFnAttribute("stack-probe-size")
+          .getValueAsString()
+          .getAsInteger(0, CalleeStackProbeSize);
+    if (Caller.hasFnAttribute("stack-probe-size")) {
+      uint64_t CallerStackProbeSize;
----------------
I think this should be in its own `adjustCallerStackProbeSize` (or something similar) merger.


Repository:
  rL LLVM

https://reviews.llvm.org/D34528





More information about the llvm-commits mailing list