[PATCH] D109503: [stack-safety] Allow to determine safe accesses.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 9 13:06:45 PDT 2021


eugenis added a comment.

LGTM with Vitaly's comment about test coverage



================
Comment at: llvm/include/llvm/Analysis/StackSafetyAnalysis.h:79
   bool isSafe(const AllocaInst &AI) const;
+  bool accessIsSafe(const Instruction &I) const;
   void print(raw_ostream &O) const;
----------------
I realized that this header does not define what "safe" means anywhere. Especially important for this method. Could you clarify that this means the access is proven to be inbounds of a live alloca?


================
Comment at: llvm/lib/Analysis/StackSafetyAnalysis.cpp:820
+
+    std::map<const Instruction *, bool> Accesses;
     for (auto &FnKV : Info->Info) {
----------------
"UnsafeAccesses" ?
"AccessIsUnsafe"?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109503



More information about the llvm-commits mailing list