search for: aliasphi

Displaying 15 results from an estimated 15 matches for "aliasphi".

2015 Jun 02
3
[LLVMdev] BasicAA unable to analyze recursive PHI nodes
Hi all, I came across the following limitation in our BasicAliasAnalysis. This happens with the following IR pattern: %x = phi [ %incptr, ... ] [ %var, ... ] %incptr = getelementptr %x, 1 We will basically always return MayAlias for %x and any other value because aliasPHI recurses on the first value and gives up. There are, however, many cases where this is too conservative. Take the following example: typedef struct { unsigned num_words; unsigned word_ofs; const unsigned *data; } section_t; void test(section_t* restrict section, unsigned* restrict dst) {...
2020 Mar 18
2
valid BasicAA behavior?
...How do you guys feel about setting the initial cached result as MayAlias instead of NoAlias if the query is performed for UnknownSize? > > If during alias query recursion we hit the same phi query again, we will return a conservative ‘MayAlias’ knowing that we have hit a cycle (loop). Since aliasPHI looks for any incoming value contradicting the NoAlias assumption, it would be equivalant to always return MayAlias. Michael
2015 Jun 10
2
[LLVMdev] BasicAA unable to analyze recursive PHI nodes
...wing limitation in our BasicAliasAnalysis. This >> happens with the following IR pattern: >> >> %x = phi [ %incptr, ... ] [ %var, ... ] >> %incptr = getelementptr %x, 1 >> >> We will basically always return MayAlias for %x and any other value >> because aliasPHI recurses on the first value and gives up. > > Patch now posted as http://reviews.llvm.org/D10368 > > Tobias > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a > Linux Foundation Collaborative Project. > __________________________________________...
2020 Mar 17
2
valid BasicAA behavior?
...rstanding is that alias analysis returns results in the function scope, not in loop scope. Since both the phis access both global arrays, that should results in BasicAA conservatively returning MayAlias. I debugged this a little bit and narrowed it down to the section of the code in BasicAAResult::aliasPHI() which has this comment- // Analyse the PHIs' inputs under the assumption that the PHIs are // NoAlias. // If the PHIs are May/MustAlias there must be (recursively) an input // operand from outside the PHIs' cycle that is MayAlias/MustAlias or // there must be...
2020 Mar 18
2
valid BasicAA behavior?
...to be no resolution to the problem. How can DA fix this without help from alias analysis? DependenceInfo is not using the AA interface correctly. Either DI has to be fixed, or another method added to AA that gives additional guarantees. Please see the bug report for details. > >> Since aliasPHI looks for any incoming value contradicting the NoAlias assumption, it would be equivalant to always return MayAlias. > I pasted the code snippet below with some extra comments. As far as the AA interface specification is concerned, the NoAlias result is correct. Such a patch would be a pessimiz...
2019 Jun 03
2
Question about a AA result and its use in Dependence Analysis
...res about the precise point in the program; the answer applies to any point in the program dominated by the definitions of both values. This produces useful results because LLVM uses SSA form. Working from that definition, it's easy to see that the logic used in aliasSelect is valid, and that aliasPHI is returning the correct result for the given example. Maybe it's worth calling this out in the alias analysis documentation. For information across loop iterations, the appropriate analysis is probably LoopAccessAnalysis. -Eli > -----Original Message----- > From: llvm-dev <llvm-de...
2015 Jun 11
2
[LLVMdev] BasicAA unable to analyze recursive PHI nodes
----- Original Message ----- > From: "Tobias Edler von Koch" <tobias at codeaurora.org> > To: "Daniel Berlin" <dberlin at dberlin.org> > Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Thursday, June 11, 2015 10:02:37 AM > Subject: Re: [LLVMdev] BasicAA unable to analyze recursive PHI nodes > > Hi Daniel,
2019 Jun 03
2
Question about a AA result and its use in Dependence Analysis
...De Azevedo Piovezan, Felipe <felipe.de.azevedo.piovezan at intel.com> Cc: llvm-dev at lists.llvm.org; Finkel, Hal J. <hfinkel at anl.gov> Subject: Re: [llvm-dev] Question about a AA result and its use in Dependence Analysis Hi Felipe, (+ Hal) I think the reasoning in `BasicAAResult::aliasPHI(...)` is flawed but I want someone else to take a look as well. As far as I can tell, the reasoning there is as follows: - Two phi nodes in the same block do not alias by default. - They do alias if the pair of inputs from the same predecessor alias. - If all inputs are pair-wise alias free,...
2020 Mar 17
3
valid BasicAA behavior?
...anding is that alias analysis returns results in the function scope, not in loop scope. Since both the phis access both global arrays, that should results in BasicAA conservatively returning MayAlias. I debugged this a little bit and narrowed it down to the section of the code in BasicAAResult::aliasPHI() which has this comment- // Analyse the PHIs' inputs under the assumption that the PHIs are // NoAlias. // If the PHIs are May/MustAlias there must be (recursively) an input // operand from outside the PHIs' cycle that is MayAlias/MustAlias or // there mu...
2019 Jun 05
2
Question about a AA result and its use in Dependence Analysis
...res about the precise point in the program; the answer applies to any point in the program dominated by the definitions of both values. This produces useful results because LLVM uses SSA form. Working from that definition, it's easy to see that the logic used in aliasSelect is valid, and that aliasPHI is returning the correct result for the given example. Maybe it's worth calling this out in the alias analysis documentation. +1 The flaw here seems to be in the way that DA is using AA. DependenceAnalysis's underlyingObjectsAlias is doing this:   // Check the original locations (min...
2020 Mar 17
1
valid BasicAA behavior?
...anding is that alias analysis returns results in the function scope, not in loop scope. Since both the phis access both global arrays, that should results in BasicAA conservatively returning MayAlias. I debugged this a little bit and narrowed it down to the section of the code in BasicAAResult::aliasPHI() which has this comment- // Analyse the PHIs' inputs under the assumption that the PHIs are // NoAlias. // If the PHIs are May/MustAlias there must be (recursively) an input // operand from outside the PHIs' cycle that is MayAlias/MustAlias or // there mu...
2019 Jun 01
2
Question about a AA result and its use in Dependence Analysis
Hi Johannes, I followed your advice and got the same result: NoAlias and No dependence. Would you say AA is faulty for saying NoAlias or DA is faulty for saying no dependence? Or both? (revised example below) Thanks! define float @f() { entry: %g = alloca float, align 4 %h = alloca float, align 4 br label %for.body for.cond.cleanup: ; preds = %for.body
2020 Mar 19
2
valid BasicAA behavior?
Am Mi., 18. März 2020 um 18:15 Uhr schrieb Chawla, Pankaj <pankaj.chawla at intel.com>: > > >> DependenceInfo is not using the AA interface correctly. Either DI has to be fixed, or another method added to AA that gives additional guarantees. Please see the bug report for details. > > Thanks for updating the bug report but GetUnderlyingObject() doesn't help in this case.
2015 Jun 11
2
[LLVMdev] BasicAA unable to analyze recursive PHI nodes
...t; happens with the following IR pattern: >> >> >> >> %x = phi [ %incptr, ... ] [ %var, ... ] >> >> %incptr = getelementptr %x, 1 >> >> >> >> We will basically always return MayAlias for %x and any other value >> >> because aliasPHI recurses on the first value and gives up. >> > >> > Patch now posted as http://reviews.llvm.org/D10368 >> > >> > Tobias >> > >> > -- >> > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a >> > Linux Foundatio...
2020 Mar 17
2
valid BasicAA behavior?
Hi all, I have this test case- #define N 1000 extern double Ag[N]; extern double Bg[N]; void consume(double *A, double *B); void swap_deps() { double *A = Ag; double *B = Bg; for (int i = 0; i < 97; ++i) { for (int j = 0; j < N; ++j) { B[j] = A[j] + 1; } double *tmp = A; A = B; B = tmp; } consume(A, B); } BasicAA is returning 'NoAlias' when