This is an archive of the discontinued LLVM Phabricator instance.

[MTE] Convert StackSafety into analysis
ClosedPublic

Authored by vitalybuka on May 28 2020, 5:36 PM.

Details

Summary

This lets us to remove !stack-safe metadata and
better controll when to perform StackSafety
analysis.

Diff Detail

Event Timeline

vitalybuka created this revision.May 28 2020, 5:36 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 28 2020, 5:36 PM
eugenis added inline comments.May 29 2020, 1:27 PM
clang/test/Driver/memtag_lto.c
126

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.

llvm/lib/Analysis/StackSafetyAnalysis.cpp
711

either match or find, not both :)

716

we could cache the results in a hashmap

vitalybuka marked 3 inline comments as done.
vitalybuka retitled this revision from [MTE] Convert StackSafety into analysis This lets us to remove !stack-safe metadata and better controll when to perform StackSafety analysis. to [MTE] Convert StackSafety into analysis.
vitalybuka edited the summary of this revision. (Show Details)

address comments

vitalybuka marked an inline comment as done.May 29 2020, 3:18 PM
vitalybuka added inline comments.
clang/test/Driver/memtag_lto.c
126

-DAG?

llvm/lib/Analysis/StackSafetyAnalysis.cpp
716
eugenis added inline comments.Jun 1 2020, 12:00 PM
clang/test/Driver/memtag_lto.c
126

Well, that, but also the actual numbers "[1]" and "[4]". Where are "2" and "3", and how likely is 4 to turn into 5 in the future?

llvm/lib/Analysis/StackSafetyAnalysis.cpp
193

SmallPtrSet?

vitalybuka updated this revision to Diff 267710.Jun 1 2020, 1:15 PM
vitalybuka marked an inline comment as done.

SmallPtrSet

vitalybuka marked 2 inline comments as done.Jun 1 2020, 1:16 PM
vitalybuka added inline comments.
clang/test/Driver/memtag_lto.c
126

[4] is not value number, but alloca size

vitalybuka updated this revision to Diff 267731.Jun 1 2020, 2:20 PM
vitalybuka marked an inline comment as done.

rebase

eugenis accepted this revision.Jun 1 2020, 10:07 PM

LGTM

This revision is now accepted and ready to land.Jun 1 2020, 10:07 PM

remove unneeded pass

This revision was automatically updated to reflect the committed changes.
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp