Displaying 20 results from an estimated 54 matches for "globalsaa".
2015 Dec 03
3
GlobalsAA from GVN
Hi James,
Thanks for the help. From the log, I could infer that SLP vectorizer is not
preserving alias analysis, preventing GVN from getting the info. Although
the first function to get compiled has GlobalsAA available during GVN, rest
of them do not as SLP vectorizer run on that function invalidates GlobalsAA
which is a module pass. Is there a way to force re-computation of a
particular analysis?
As a side note, I didn't have this problem on release_37.
Thanks a lot.
Regards,
- Vaivaswatha
O...
2015 Dec 04
2
GlobalsAA from GVN
>You could, in the LTO pipeline, reinsert GlobalsAA after the SLPVectorizer
(not saying you should).
I didn't realise that adding GlobalsAA* after* SLPVectorizer could help.
Thanks for this tip.
>There is something fishy. Do you have a test case that reproduce with
llvm-lto?
I'm currently looking at a proprietary benchmark. I'll try...
2015 Dec 03
2
GlobalsAA from GVN
Hi Mehdi,
Thank you for the response.
I'm actually on an LTO setup and was referring to
PassManagerBuilder::addLTOOptimizationPasses. Here, GlobalsAA is scheduled
to run well ahead of SLPVectorizer. However since GlobalsAA is a module
pass, it runs once and a bunch of passes, including SLPVectorizer is run
for each function. When one of them invalidates the analysis, rest of the
functions do not have it available. Both LICM and GVN face the same...
2015 Dec 03
2
GlobalsAA from GVN
...th for the inputs. I've created a patch for the same, please
review:
http://reviews.llvm.org/D15185
>You can specifically insert it into the pass pipeline, but in this case,
we should just fix SLP to preserve the analysis.
@Hal, I tried doing this but it didn't seem to work. I added the GlobalsAA
pass right before GVN but it didn't seem to help. In retrospect, looking at
the way pass manager works, it looks like it wasn't of much use. Since
GlobalsAA is a ModulePass, and FunctionPasses that are scheduled even later
are run first, those FunctionPasses that invalidate it do so for goo...
2015 Dec 02
2
GlobalsAA from GVN
Hi,
I've noticed that alias analysis queries arising from GVN do not use the
results from GlobalsAA.
The last call to AAResultsWrapperPass::runOnFunction() before GVN does not
add GlobalsAAWrapperPass due to unavailability. This leads to the alias
queries from GVN not having any globals mod-ref info.
Is this a known issue? and is there any way to have globals mod-ref info
available for GVN?
Tha...
2015 Dec 02
2
Function attributes for LibFunc and its impact on GlobalsAA
Hi,
GlobalsAA, during propagation of mod-ref behavior in the call graph, looks
at library functions (in GlobalsAAResult::AnalyzeCallGraph:
F->isDeclaration() check), for attributes, and if the function does not
have the onlyReadsMemory attribute set, forgets it.
I noticed that library functions such as mallo...
2015 Dec 03
2
Function attributes for LibFunc and its impact on GlobalsAA
...up malloc hooks (assuming
we're in a whole program compilation) and make assumptions (such as
onlyAccessesArgMem()) when the program hasn't setup malloc hooks? Using a
command line flag could be one option too.
I'm currently working on a program where having these attributes could help
GlobalsAA give significantly more precise results. Considering that this
info is propagated to the caller, its caller and so on, this may have a
wider impact than the program I'm currently looking at.
Thanks,
- Vaivaswatha
On Thu, Dec 3, 2015 at 2:57 PM, James Molloy <james at jamesmolloy.co.uk&g...
2015 Dec 11
2
RFC: New function attribute HasInaccessibleState
...act outside of LTO anyway.
>>>
I think you're understanding correctly, but I don't understand what you're saying will go badly with the malloc example. Quoting the start of the thread:
<<<
The intention behind introducing this attribute is to relax the conditions in GlobalsAA as below:
(this code is in GlobalsAAResult::AnalyzeCallGraph)
if (F->isDeclaration()) {
// Try to get mod/ref behaviour from function attributes.
- if (F->doesNotAccessMemory()) {
+ if (F->doesNotAccessMemory() || F->onlyAccessesArgMemory()) {
//...
2015 Dec 11
2
RFC: New function attribute HasInaccessibleState
...understanding correctly, but I don't understand what
> > you're saying will go badly with the malloc example. Quoting the
> > start of the thread:
> >
> > <<<
> > The intention behind introducing this attribute is to relax the
> > conditions in GlobalsAA as below:
> > (this code is in GlobalsAAResult::AnalyzeCallGraph)
> > if (F->isDeclaration()) {
> > // Try to get mod/ref behaviour from function attributes.
> > - if (F->doesNotAccessMemory()) {
> > + if (F->doesNotAccessMemory() |...
2015 Dec 11
3
RFC: New function attribute HasInaccessibleState
...rstand
> > > what
> > > you're saying will go badly with the malloc example. Quoting the
> > > start of the thread:
> > >
> > > <<<
> > > The intention behind introducing this attribute is to relax the
> > > conditions in GlobalsAA as below:
> > > (this code is in GlobalsAAResult::AnalyzeCallGraph)
> > > if (F->isDeclaration()) {
> > > // Try to get mod/ref behaviour from function attributes.
> > > - if (F->doesNotAccessMemory()) {
> > > + if (F-&g...
2015 Dec 14
3
RFC: New function attribute HasInaccessibleState
...in the call
> graph. (Do this in FunctionAttrs.cpp?).
> 5. Since ReadNone and ArgMemOnly has now been redfined, all
> optimizations that rely on these flags for safety now also need to
> check the new "HasInaccessibleState" flag and make sure it isn't
> present.
> 6. GlobalsAA will be modified according to the diff in the first mail
> in this email thread.
> The alternative approach that was discussed would involve the
> following changes:
> (Approach B)
> 1. Define new attributes AlmostReadNone and AlmostArgMemOnly, (with
> the "Almost" par...
2017 Jan 18
10
llvm is getting slower, January edition
...or sub, mul and shl. +2%
4. r246694: [RemoveDuplicatePHINodes] Start over after removing a PHI. -1%
5. r247269: [ADT] Rewrite the StringRef::find implementation to be simpler... +1%
r247240: [LPM] Use a map from analysis ID to immutable passes in the legacy pass manager... +3%
r247264: Enable GlobalsAA by default. +1%
6. r247674: [GlobalsAA] Disable globals-aa by default. -1%
7. r248638: [SCEV] Reapply 'Teach isLoopBackedgeGuardedByCond to exploit trip counts'. +2%
8. r249802: [SCEV] Call `StrengthenNoWrapFlags` after `GroupByComplexity`; NFCI. +4%
9. r250157: [GlobalsAA] Turn GlobalsAA o...
2015 Dec 14
2
RFC: New function attribute HasInaccessibleState
...ttrs.cpp?).
>> > 5. Since ReadNone and ArgMemOnly has now been redfined, all
>> > optimizations that rely on these flags for safety now also need to
>> > check the new "HasInaccessibleState" flag and make sure it isn't
>> > present.
>> > 6. GlobalsAA will be modified according to the diff in the first mail
>> > in this email thread.
>>
>> > The alternative approach that was discussed would involve the
>> > following changes:
>>
>> > (Approach B)
>> > 1. Define new attributes AlmostReadNon...
2015 Dec 14
2
RFC: New function attribute HasInaccessibleState
...ot; upwards in the call graph. (Do this in FunctionAttrs.cpp?).
> 5. Since ReadNone and ArgMemOnly has now been redfined, all optimizations that rely on these flags for safety now also
> need to check the new "HasInaccessibleState" flag and make sure it isn't present.
> 6. GlobalsAA will be modified according to the diff in the first mail in this email thread.
>
> The alternative approach that was discussed would involve the following changes:
> (Approach B)
> 1. Define new attributes AlmostReadNone and AlmostArgMemOnly, (with the "Almost" part denoti...
2017 Jan 18
2
llvm is getting slower, January edition
...r246694: [RemoveDuplicatePHINodes] Start over after removing a PHI. -1%
>> 5. r247269: [ADT] Rewrite the StringRef::find implementation to be simpler... +1%
>> r247240: [LPM] Use a map from analysis ID to immutable passes in the legacy pass manager... +3%
>> r247264: Enable GlobalsAA by default. +1%
>> 6. r247674: [GlobalsAA] Disable globals-aa by default. -1%
>> 7. r248638: [SCEV] Reapply 'Teach isLoopBackedgeGuardedByCond to exploit trip counts'. +2%
>> 8. r249802: [SCEV] Call `StrengthenNoWrapFlags` after `GroupByComplexity`; NFCI. +4%
>> 9. r...
2015 Dec 09
5
RFC: New function attribute HasInaccessibleState
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...
2017 Jan 20
2
llvm is getting slower, January edition
...eDuplicatePHINodes] Start over after removing a PHI.
> -1%
> > 5. r247269: [ADT] Rewrite the StringRef::find implementation to be
> simpler... +1%
> > r247240: [LPM] Use a map from analysis ID to immutable passes in the
> legacy pass manager... +3%
> > r247264: Enable GlobalsAA by default. +1%
> > 6. r247674: [GlobalsAA] Disable globals-aa by default. -1%
> > 7. r248638: [SCEV] Reapply 'Teach isLoopBackedgeGuardedByCond to exploit
> trip counts'. +2%
> > 8. r249802: [SCEV] Call `StrengthenNoWrapFlags` after
> `GroupByComplexity`; NFCI. +4%...
2015 Dec 08
3
RFC: New function attribute HasInaccessibleState
...e don't have a specific name for" and all the analyses report "may alias because neither touches anything I have a specific name for".
The other way would of course be to make one analysis powerful enough to catch the cases we're concerned with. Would it be workable to have GlobalsAA look through the stores (and other mutating operations) in a function to see if they're:
1. a store to a local alloca
2. a store to a global defined in this compilation unit
3. a store through a pointer parameter
4. a call to a function that it has inferred is "ReadOnly-like" (or...
2015 Dec 04
2
RFC: New function attribute HasInaccessibleState
...ariables such as errno).
Example attributes (in addition to what are already set):
malloc/free: HasInaccessibleState, ReadNone
printf: HasInaccessibleState, ArgMemOnly
realloc: HasInaccessibleState, ReadOnly (not sure).
The intention behind introducing this attribute is to relax the conditions
in GlobalsAA as below:
(this code is in GlobalsAAResult::AnalyzeCallGraph)
if (F->isDeclaration()) {
// Try to get mod/ref behaviour from function attributes.
- if (F->doesNotAccessMemory()) {
+ if (F->doesNotAccessMemory() || F->onlyAccessesArgMemory()) {
/...
2015 Dec 04
4
RFC: New function attribute HasInaccessibleState
...mple attributes (in addition to what are already set):
> malloc/free: HasInaccessibleState, ReadNone
> printf: HasInaccessibleState, ArgMemOnly
> realloc: HasInaccessibleState, ReadOnly (not sure).
>
> The intention behind introducing this attribute is to relax the conditions
> in GlobalsAA as below:
> (this code is in GlobalsAAResult::AnalyzeCallGraph)
>
> if (F->isDeclaration()) {
> // Try to get mod/ref behaviour from function attributes.
> - if (F->doesNotAccessMemory()) {
> + if (F->doesNotAccessMemory() || F->onlyAccess...