[llvm-dev] RFC: New function attribute HasInaccessibleState

Joseph Tremoulet via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 11 11:21:31 PST 2015


<<
Joseph Tremoulet via llvm-dev wrote:
> Sigh... let me try that last part again:
>
> Maybe GlobalsAA and/or a GlobalsAA-centric attribution pass could partition writes as:
>    1. Stores to local allocas
>    2. Stores through pointer parameters
>    3. Stores to globals defined in this compilation unit
>    4. Other
>
> Attributing functions with attributes:
>    readonly: only writes of type 1
>    argmemonly: only writes of type 1/2
>    almost-readonly: only writes of type 1/4
>    almost-argmemonly: only writes of type 1/2/4
>
> and when visiting a call instruction to determine what sort of writes it entails:
>    - calls to almost-readonly functions and almost-argmemonly 
> functions imply a write of type 4

Do you mean "readonly and almost-readonly"?
>>

No -- the thing that makes them "almost-" is that they can read and write state that is neither (1) local nor (3) one of the globals that GlobalsAA can precisely reason about nor (2) state that is an easily summarizable function of the parameters and which therefore allows reasoning at each callsite.


More information about the llvm-dev mailing list