[PATCH] D80771: [MTE] Convert StackSafety into analysis

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 29 15:20:24 PDT 2020


vitalybuka marked an inline comment as done.
vitalybuka added inline comments.


================
Comment at: clang/test/Driver/memtag_lto.c:126
+  // XUNSAFE: [4]: full-set
+  // XSAFE: [4]: [0,4)
   int x;
----------------
eugenis wrote:
> Alloca order can easily change in the future. Not sure how to make this better. Perhaps simply remove the numbers and test that the function has one alloca with [0, 4) and one with [0, 1)? This looks specific enough.
-DAG?


================
Comment at: llvm/lib/Analysis/StackSafetyAnalysis.cpp:697
+        const FunctionInfo &FI = Iter->second;
+        return getStaticAllocaSizeRange(AI).contains(FI.Allocas[Pos].Range);
+      }
----------------
eugenis wrote:
> we could cache the results in a hashmap 
and https://reviews.llvm.org/D80847


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80771





More information about the cfe-commits mailing list