Checking affines for instructions

12 views
Skip to first unread message

harish c

unread,
May 12, 2021, 2:30:56 AM5/12/21
to Polly Development

Hello All,


I find trouble understanding the below scalar expressions. Can someone help me understand why the below expressions are not affine.

Expr: {{((8 * %8) + (-1 * %2) + %13),+,1}<%pregion_for_entry.entry.i>,+,(1 + (-1 * %2)),+,1}<%while.body.i>
Region: pregion_for_entry.entry.i => transpose_ceWork.exit
 -> INVALID: AddRec is not affine
Non affine loop bound '***COULDNOTCOMPUTE***' in loop: while.body.i

Expr: %18
Region: while.end.i => if.end.r_exit.i
 ->   %18 = phi i32 [ %add1.i.i, %pregion_for_entry.entry.i ], [ %sub.i.lcssa, %while.end.i.loopexit ] ; instructoin in IR
INVALID: UnknownExpr references an instruction within the region



Thanks in advance.

Regards,
Harish C

Harish

unread,
May 12, 2021, 11:54:58 PM5/12/21
to re...@meinersbur.de, Polly Development
Thank you for the clarification. 

On Thu, 13 May, 2021, 8:24 am Michael Kruse, <Michae...@meinersbur.de> wrote:
This is from the -debug-only=polly-scev-validator output which is only
really useful when debugging. It tries to diagnose why an expression
is not affine.

In the first case the expression is not an affine recurrence equation,
but a quadratic one. (reduced: {X,+,Y,+,1}<%while.body.i>)

In the second case an instruction cannot be resolved by
ScalarEvolution, but is also not loop-invariant.

Michael
> --
> You received this message because you are subscribed to the Google Groups "Polly Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to polly-dev+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/polly-dev/b1e0c1f2-37db-4c88-8a62-4c0716964740n%40googlegroups.com.



--
Tardyzentrismus verboten!
Reply all
Reply to author
Forward
0 new messages