[PATCH] D84630: [StackSafety] Skip ambiguous lifetime analysis
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 30 13:30:58 PDT 2020
eugenis added inline comments.
================
Comment at: llvm/lib/Analysis/StackLifetime.cpp:301
+ case LivenessType::Must:
+ LiveRanges.resize(NumAllocas, LiveRange(Instructions.size()));
+ break;
----------------
vitalybuka wrote:
> t.p.northover wrote:
> > Doesn't this case need the loop below? It looks like it's undoing all the extra default initialization caused by the resize.
> >
> > Actually, I'd be inclined to reword the whole thing in terms of resizing with the default and separately setting `NumAllocas - 1` if that is the correct reading.
> Loop below sets Full range for uninteresting allocas, however with HasUnknowLifetimeStartOrEnd we can't be sure which are uninteresting,
> Other than that I am not sure what are you asking.
I think Vitaly's right, if we see a lifetime that can't be traced back to an alloca, we have no way of knowing which allocas are "not interesting" and must handle all of them conservatively.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84630/new/
https://reviews.llvm.org/D84630
More information about the llvm-commits
mailing list