[StackSafety] Check variable lifetime
authorVitaly Buka <vitalybuka@google.com>
Mon, 22 Jun 2020 08:28:25 +0000 (01:28 -0700)
committerVitaly Buka <vitalybuka@google.com>
Mon, 22 Jun 2020 10:45:29 +0000 (03:45 -0700)
commit5d964e262f0c446dd1e25179d342a953a3611d76
tree226fe9874cb5c373f90ca3b2af0de61461b19150
parent8f592ed33360516e9531fc12424ad050d17195b4
[StackSafety] Check variable lifetime

We can't consider variable safe if out-of-lifetime access is possible.
So if StackLifetime can't prove that the instruction always uses
the variable when it's still alive, we consider it unsafe.
llvm/lib/Analysis/StackSafetyAnalysis.cpp
llvm/test/Analysis/StackSafetyAnalysis/local.ll