IPA is implemented as module pass which produce map from Function or Alias to
StackSafetyInfo for a single function.
From prototype by Evgenii Stepanov and Vlad Tsyrklevich.
Paths
| Differential D54543
[stack-safety] Inter-Procedural Analysis implementation ClosedPublic Authored by vitalybuka on Nov 14 2018, 1:53 PM.
Details Summary IPA is implemented as module pass which produce map from Function or Alias to From prototype by Evgenii Stepanov and Vlad Tsyrklevich.
Diff Detail
Event TimelineHerald added subscribers: llvm-commits, mgrang, hiraditya. · View Herald TranscriptNov 14 2018, 1:53 PM vitalybuka added a parent revision: D54541: [stack-safety] Empty local passes for Stack Safety Global Analysis.
Comment Actions The local tests that check for use 'empty-set, $CALL_INFO' for the local and 'full-set, $CALL_INFO' for the global analysis is sort of confusing. It seems like the use is safe in local analysis (empty-set means no uses!) but unsafe in the global, when really the situation is actually local analysis has 'no local uses but used in function calls' and the global analysis is just 'it's safe/unsafe (function call info is integrated into the previous distintion)'. Maybe we should clear all of the UseInfo::Calls fields at the end of StackSafetyDataFlowAnalysis?
Comment Actions
That's unfortunate, as now we can keep checks for local and global passes mostly the same and highlight the difference with branched LOCAL-NEXT/GLOBAL-NEXT Comment Actions
That's a good point, I didn't consider that it would break that pattern. Though looking at the tests now it seems that the current tests don't have cases where this would happen? Presumably most tests where an alloca has a use in a function call it would result in a local/global difference due to the IPA being able to refine the use range. Comment Actions
Can we reconsider this later. I've added TODO. Probably these are implementation details which are unneeded. Comment Actions
I'm OK coming back to it after the bulk of the changes have landed.
Comment Actions LGTM with nit
This revision is now accepted and ready to land.Nov 21 2018, 3:38 PM vlad.tsyrklevich added inline comments.
Closed by commit rL347611: [stack-safety] Inter-Procedural Analysis implementation (authored by vitalybuka). · Explain WhyNov 26 2018, 3:08 PM This revision was automatically updated to reflect the committed changes. Comment Actions Please fix the build break introduced.
This revision is now accepted and ready to land.Nov 26 2018, 3:51 PM
Revision Contents
Diff 175349 llvm/trunk/lib/Analysis/StackSafetyAnalysis.cpp
llvm/trunk/test/Analysis/StackSafetyAnalysis/Inputs/ipa-alias.ll
llvm/trunk/test/Analysis/StackSafetyAnalysis/Inputs/ipa.ll
llvm/trunk/test/Analysis/StackSafetyAnalysis/ipa-alias.ll
llvm/trunk/test/Analysis/StackSafetyAnalysis/ipa.ll
llvm/trunk/test/Analysis/StackSafetyAnalysis/local.ll
llvm/trunk/test/Analysis/StackSafetyAnalysis/memintrin.ll
llvm/trunk/test/Analysis/StackSafetyAnalysis/scev-udiv.ll
|
This doesn't build:
I commented it out in r347616. Please fix.