Displaying 7 results from an estimated 7 matches for "getscevtype".
2007 Apr 20
3
[LLVMdev] SCEV ordering
The SCEV framework sorts operands of commutative SCEVs by their
getSCEVType() value, and then does an ad-hoc sort to group repeated
operands, but it does not do a full sort. In some test cases I'm
looking at right now, this causes it to miss opportunities to reuse
SCEV objects, as in cases like this:
( %i + %r54 + %r59)
( %r54 + %r59 + %i)
As a result, passes l...
2013 Jul 28
0
[LLVMdev] [Polly] Analysis of the expensive compile-time overhead of Polly Dependence pass
...alysis/ScopInfo.cpp
> +++ b/lib/Analysis/ScopInfo.cpp
> @@ -86,6 +86,14 @@ public:
> isl_aff *Affine =
> isl_aff_zero_on_domain(isl_local_space_from_space(Space));
> Affine = isl_aff_add_coefficient_si(Affine, isl_dim_param, 0, 1);
> + if (Scev->getSCEVType() == scAddRecExpr) {
> + const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(Scev);
The canonical pattern for this is:
if (SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Scev)) {
> + const SCEVConstant *c = cast<SCEVConstant>(AR->getOperand(0));
This is obvio...
2013 Jul 30
0
[LLVMdev] creating SCEV taking too long
...RNumOps)
return 1;
And the compile time is cut down from 45s to 1s.
This will give different sorting result than the original algorithm. However, it looks like that shouldn't be a problem according to this comment before the switch statement in compare();
// Aside from the getSCEVType() ordering, the particular ordering
// isn't very important except that it's beneficial to be consistent,
// so that (a + b) and (b + a) don't end up as different expressions.
Does this solution seem ok?
If the above solution seems ok, that solves the problem for cases whe...
2019 Mar 25
2
[IndVars] Rewriting exit value of SCEV add expressions
...%2 because phi node (%.lcssa) was not rewritten by indvars pass.
Simple fix would be just returning back original check for SCEVType in lib/Transforms/Scalar/IndVarSimplify.cpp:
- if (!isa<SCEVConstant>(ExitValue) && hasHardUserWithinLoop(L, Inst))
+ if ((ExitValue->getSCEVType() >= scMulExpr) && hasHardUserWithinLoop(L, Inst))
Note, there is another bug opened for the mentioned patch: https://bugs.llvm.org/show_bug.cgi?id=39673, but it only fixes the problem when the SCEV expression type is constant.
I'm not opening a new bug yet, but rather want to hear...
2007 Apr 20
0
[LLVMdev] SCEV ordering
On Fri, 20 Apr 2007, Dan Gohman wrote:
> The SCEV framework sorts operands of commutative SCEVs by their
> getSCEVType() value, and then does an ad-hoc sort to group repeated
> operands, but it does not do a full sort. In some test cases I'm
> looking at right now, this causes it to miss opportunities to reuse
> SCEV objects, as in cases like this:
>
> ( %i + %r54 + %r59)
> ( %r54 + %r59 +...
2013 Jul 30
4
[LLVMdev] creating SCEV taking too long
On Jul 29, 2013, at 4:08 PM, Guo, Xiaoyi <Xiaoyi.Guo at amd.com> wrote:
> Hi,
>
> We have a benchmark where there are 128 MAD computations in a loop. (See the attached IR.) Creating SCEVs for these expressions takes a long time, making the compile time too long. E.g., running opt with the “indvars” pass only takes 45 seconds.
>
> It seems that the majority of the time is
2013 Jul 26
6
[LLVMdev] [Polly] Analysis of the expensive compile-time overhead of Polly Dependence pass
Hi Sebastian,
Recently, I found the "Polly - Calculate dependences" pass would lead to significant compile-time overhead when compiling some loop-intensive source code. Tobias told me you found similar problem as follows:
http://llvm.org/bugs/show_bug.cgi?id=14240
My evaluation shows that "Polly - Calculate dependences" pass consumes 96.4% of total compile-time overhead