[PATCH] D82941: [StackSafety,NFC] Update documentation

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 09:10:33 PDT 2020


tejohnson added a comment.

Thanks, a few follow on questions and nits below.



================
Comment at: llvm/docs/LangRef.rst:6857
+parameter. ``calls`` is empty, so the parameter is either not used for function
+calls or ``offset`` already covers all accesses from nested function calls. Then
+function itself can access just a single byte of the parameter #3. Additional
----------------
nit: s/Then/The/

I assume if it is passed directly to another call and we don't know the accesses within that callee (this is the per-module summary) that it would have a calls entry with offset [0,0]? 


================
Comment at: llvm/docs/LangRef.rst:6860
+access is possible when the function calls ``^3``. The function increment or
+decrement parameter pointer and pass it as the argument #5 into ``^3``. This
+record itself does not tell us how ``^3`` will access the parameter.
----------------
nit: "increments or decrements the parameter pointer and passes it.."


================
Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:557
+  /// Describes the uses of a parameter by the range of byte offsets of direct
+  /// access in in the function and by all of the call targets it is passed to.
   struct ParamAccess {
----------------
nit: s/in in/in/

The "by all of the call targets it is passed to" sounds ambiguous to me, as if we already have knowledge of how it is accessed within those callees. I guess this is the situation after the thin link, but not initially.

Probably best to be more explicit. I.e., from my understanding reading your LangRef writeup:
- In the per-module summary, the Calls vector summarize the byte offset applied to each pointer parameter before passing to each corresponding callee. I.e. this structure describes offsets computed from the pointer parameter within the function only
- In the combined summary, the offsets may include the offsets within each called function consuming this pointer parameter. Two questions: I assume that happens after some kind of inter-procedural propagation across the combined summary? After that propagation, is the Calls list empty?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82941





More information about the llvm-commits mailing list