This is an archive of the discontinued LLVM Phabricator instance.

Stack Safety Analysis documentation
ClosedPublic

Authored by vitalybuka on Oct 16 2018, 12:10 PM.

Details

Summary

Basic documentation of the Stack Safety Analysis.
It will be improved during review and upstream of an implementation.

Diff Detail

Repository
rL LLVM

Event Timeline

vitalybuka created this revision.Oct 16 2018, 12:10 PM

I sent you my StackSafetyAnalysis.rst edits over e-mail because the s/// format got tricky.

llvm/docs/Passes.rst
365 ↗(On Diff #169877)

s/analysis/analysis'/
s/it/is to/

llvm/docs/index.rst
439 ↗(On Diff #169877)

s/design/the design/
s/stack/the stack/

vitalybuka marked 2 inline comments as done.Oct 16 2018, 2:54 PM

I sent you my StackSafetyAnalysis.rst edits over e-mail because the s/// format got tricky.

Thank you. Done.

vlad.tsyrklevich accepted this revision.Oct 16 2018, 3:03 PM
vlad.tsyrklevich added inline comments.
llvm/docs/StackSafetyAnalysis.rst
12 ↗(On Diff #169898)

Oops: s/ofscope/of-scope/

This revision is now accepted and ready to land.Oct 16 2018, 3:03 PM
kcc added inline comments.Oct 19 2018, 9:21 AM
llvm/docs/StackSafetyAnalysis.rst
13 ↗(On Diff #169898)

I'd like to see the use-of-uninitialized-memory mentioned here explicitly as well, and treated as one of the primary design goals.

eugenis added inline comments.Oct 19 2018, 10:03 AM
llvm/docs/Passes.rst
363 ↗(On Diff #169898)

I think we should distinguish the analysis itself which simply lets you query safety of variables, and the wrapper pass that sets the metadata. The primary usage mode of this thing should be by query, not by metadata IMHO.

llvm/docs/Passes.rst
363 ↗(On Diff #169898)

I just wanted to chime in and say that in the ThinLTO case I think we have to annotate allocas with metadata since the global analysis has to run before any transformations occur. That said, the interface can be as you said where we just hide the logic to check metadata or otherwise run the analysis.

kcc added a reviewer: glider.Oct 22 2018, 9:30 AM

+use-of-uninitialized-memory

Removed reference to !stack-safety

This revision was automatically updated to reflect the committed changes.