[PATCH] D113160: [stack-safety] Check SCEV constraints at memory instructions.
Kirill Stoimenov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 11 15:08:29 PST 2021
kstoimenov added inline comments.
================
Comment at: llvm/lib/Analysis/StackSafetyAnalysis.cpp:121
ConstantRange Range;
- std::map<const Instruction *, ConstantRange> Accesses;
+ std::map<const Instruction *, bool> AccessIsUnsafe;
----------------
Isn't that just a set?
================
Comment at: llvm/lib/Analysis/StackSafetyAnalysis.cpp:257
+ const SCEV *typeSizeToSCEV(TypeSize TS);
+ bool isSafeAccess(const Use &UI, AllocaInst *AI, const Instruction *I,
+ const SCEV *AccessSize);
----------------
If this is an output param, please consider moving it to the end of the argument list.
================
Comment at: llvm/lib/Analysis/StackSafetyAnalysis.cpp:398
if (AI && !SL.isAliveAfter(AI, I)) {
- US.addRange(I, UnknownRange);
+ US.addRange(I, UnknownRange, false);
break;
----------------
Add the var you are setting in comments like so: /*x=*/false to increase readability. Here and below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113160/new/
https://reviews.llvm.org/D113160
More information about the llvm-commits
mailing list