Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Naryreassociate vs reassociate"
2015 May 05
1
[LLVMdev] Naryreassociate vs reassociate
Hi Daniel,
I presume you mean, instead of assigning function arguments distinct ranks (
http://llvm.org/docs/doxygen/html/Reassociate_8cpp_source.html#l00282), we
should group function arguments in favor of existing pairings. You are not
suggesting discarding the entire ranking system, right?
I'll look into how that works on my benchmarks. AFAIK, we encountered some
cases that seem beyond
2015 May 05
1
[LLVMdev] Naryreassociate vs reassociate
On Tue, May 5, 2015 at 10:20 AM, Jingyue Wu <jingyue at google.com> wrote:
> Hi Daniel,
>
> I presume you mean, instead of assigning function arguments distinct ranks
> (http://llvm.org/docs/doxygen/html/Reassociate_8cpp_source.html#l00282), we
> should group function arguments in favor of existing pairings.
Existing = pairings reassociate already chose before
*not*
existing
2015 May 05
1
[LLVMdev] Naryreassociate vs reassociate
On Tue, May 5, 2015 at 10:31 AM, Daniel Berlin <dberlin at dberlin.org> wrote:
> On Tue, May 5, 2015 at 10:20 AM, Jingyue Wu <jingyue at google.com> wrote:
> > Hi Daniel,
> >
> > I presume you mean, instead of assigning function arguments distinct
> ranks
> > (http://llvm.org/docs/doxygen/html/Reassociate_8cpp_source.html#l00282),
> we
> > should
2013 Apr 26
0
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
Hi Andrew, Shuxin,
Thanks for the explanation about 'Reassociate'.
The problem is indeed that one of the variables, becomes loop invariant after
some of the loop transformations.
> -----Original Message-----
> From: Andrew Trick [mailto:atrick at apple.com]
[...]
> Right. Reassociate ranks expressions by their order in the IR, so shouldn't
> make matters worse, but it
2013 Apr 25
3
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
On Apr 23, 2013, at 10:37 AM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
> As far as I can understand of the code, the Reassociate tries to achieve this result by its "ranking" mechanism.
>
> If it dose not, it is not hard to achieve this result, just restructure the expression in a way such that
> the earlier definition of the sub-expression is permute earlier in
2015 Feb 02
2
[LLVMdev] Reassociate and Canonicalization of Expressions
Hi,
I encountered some bugs in Reassociate [1] where we are hitting some assertions:
assert(!Duplicates.count(Factor) &&
"Shouldn't have two constant factors, missed a canonicalize");
assert(NumAddedValues > 1 && "Each occurrence should contribute a value”);
My understanding is that these assertions enforce that when processing an
2013 Apr 25
2
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
It's an interesting problem.
The best stuff I've seen published is by Cooper, Eckhart, & Kennedy, in
PACT '08.
Cooper gives a nice intro in one of his lectures:
http://www.cs.rice.edu/~keith/512/2012/Lectures/26ReassocII-1up.pdf
I can't tell, quickly, what's going on in Reassociate;
as usual, the documentation resolutely avoids giving any credit for the
ideas.
Why is that?
2013 Apr 25
0
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
On Apr 25, 2013, at 10:51 AM, Preston Briggs <preston.briggs at gmail.com> wrote:
> It's an interesting problem.
> The best stuff I've seen published is by Cooper, Eckhart, & Kennedy, in PACT '08.
> Cooper gives a nice intro in one of his lectures: http://www.cs.rice.edu/~keith/512/2012/Lectures/26ReassocII-1up.pdf
> I can't tell, quickly, what's going on
2013 Apr 23
0
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
As far as I can understand of the code, the Reassociate tries to achieve
this result by its "ranking" mechanism.
If it dose not, it is not hard to achieve this result, just restructure
the expression in a way such that
the earlier definition of the sub-expression is permute earlier in the
resulting expr.
e.g.
outer-loop1
x=
outer-loop2
y =
2015 Feb 04
3
[LLVMdev] Reassociate and Canonicalization of Expressions
>> On Feb 2, 2015, at 11:12 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>>
>> Hi,
>>
>> I encountered some bugs in Reassociate [1] where we are hitting some
>> assertions:
>>
>> assert(!Duplicates.count(Factor) &&
>> "Shouldn't have two constant factors, missed a
>> canonicalize");
2015 Feb 04
2
[LLVMdev] Reassociate and Canonicalization of Expressions
> Hi Chad,
>
> Thanks for you answer.
>
>> On Feb 4, 2015, at 11:22 AM, Chad Rosier <mcrosier at codeaurora.org>
>> wrote:
>>
>>>> On Feb 2, 2015, at 11:12 AM, Mehdi Amini <mehdi.amini at apple.com>
>>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I encountered some bugs in Reassociate [1] where we
2013 Apr 23
2
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
Hi,
I am investigating a performance degradation between llvm-3.1 and llvm-3.2
(Note: current top-of-tree shows a similar degradation)
One issue I see is the following:
- 'loop invariant code motion' seems to be depending on the result of the 'reassociate expression' pass:
In the samples below I observer the following behavior:
Both start with the same expression:
%add = add
2017 Oct 25
2
[PATCH/RFC] Modifying reassociate for improved CSE: fairly large perf gains
When playing around with reassociate I noticed a seemingly obvious optimization that was not getting done anywhere in llvm… nor in gcc or ICC.
Consider the following trivial function:
void foo(int a, int b, int c, int d, int e, int *res) {
res[0] = (e * a) * d;
res[1] = (e * b) * d;
res[2] = (e * c) * d;
}
This function can be optimized down to 4 multiplies instead of 6 by reassociating
2014 Jun 30
2
[LLVMdev] r156323 - Reassociate FP operands.
Owen/All,
I've been working on adding support for reassociation with unsafe math
(see: http://reviews.llvm.org/D4129).
Do you know if this change, r156323, is still necessary? Specifically, do
we need the reassociation pass to canonicalize FP operands for CSE to work
effectively? This kinda scares me if it does! :(
Side note:
Without this canonicalization, I did see a 3% regression in Mesa
2015 Mar 13
3
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
On Fri, Mar 13, 2015 at 10:16 AM Mark Heffernan <meheff at google.com> wrote:
> On Thu, Mar 12, 2015 at 2:34 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>
>> It is not clear to me at all that preventing the merging is the right
>> solution. There are a large number of analysis, including alias analysis,
>> and optimizations that use GetUnderlyingObject, and
2009 Jan 30
2
[LLVMdev] Reassociating expressions involving GEPs
Hello,
We've run across the following missed optimization: in the attached
loop (addind.c/addind-opt.ll) there's a lookup into an array (V) using
an indirect index (coming from another array, WI[k]) offset by a loop-
invariant base (l). The full addressing expression can be reassociated
so that we add the offset l to V's base first, and then add the
indirect part. This makes
2009 Jan 30
0
[LLVMdev] Reassociating expressions involving GEPs
On Fri, Jan 30, 2009 at 3:03 PM, Stefanus Du Toit
<stefanus.dutoit at rapidmind.com> wrote:
> The computation of %base then becomes loop-invariant and can be lifted out.
>
> What's the best way to add this optimization to LLVM?
Probably the best place is LICM itself... only loop transformations
are aware whether something is loop-invariant.
Although, I'm not completely
2015 Mar 16
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
----- Original Message -----
> From: "Jingyue Wu" <jingyue at google.com>
> To: "Daniel Berlin" <dberlin at dberlin.org>, "Mark Heffernan" <meheff at google.com>, "Hal Finkel" <hfinkel at anl.gov>
> Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Sent: Friday, March 13, 2015 1:31:59 PM
>
2013 Apr 25
1
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
On Thu, Apr 25, 2013 at 9:18 AM, Arnold Schwaighofer <
aschwaighofer at apple.com> wrote:
>
> On Apr 25, 2013, at 10:51 AM, Preston Briggs <preston.briggs at gmail.com>
wrote:
>
> > It's an interesting problem.
> > The best stuff I've seen published is by Cooper, Eckhart, & Kennedy, in
PACT '08.
> > Cooper gives a nice intro in one of his
2018 May 08
4
more reassociation in IR
There are at least 3 active proposals to add reassociative optimizations in
IR:
[1] D41574 <https://reviews.llvm.org/D41574>- a new pass for
reassociation/factoring
[2] D46336 <https://reviews.llvm.org/D46336> - enhance -instcombine to do
more reassociation/factoring
[3] D45842 <https://reviews.llvm.org/D45842> - add to the existing
-reassociate pass to enable factoring