Understanding unbounded optimums

12 views
Skip to first unread message

Harish

unread,
Jan 5, 2022, 1:25:10 AM1/5/22
to Polly Development
Hi All,

I have a function with two pointer arguments, as shown in LLVM IR. When running a custom pass, I am getting an unbounded optimum error.
I want to understand why am I getting bounds for MemRef9 but not MemRef8? Please let me know if you need additional details.

LLVM IR:
declare void @test(<4 x float>* nocapture %0, <4 x float>* nocapture %1)

Custom Pass:

scop.Arrays()
<4 x float> MemRef8[*]; // Element size 16
<4 x float> MemRef9[*]; // Element size 16 

Code:
for (const ScopStmt &Stmt : scop) { isl::set domain = Stmt.getDomain(); for (MemoryAccess *MA : Stmt) { if (!MA->isScalarKind()) { isl::set accessed; accessed = MA->getAccessRelation().intersect_domain(domain).range(); accessed.dump()
accessed.lexmin_pw_multi_aff().dump() } } }

Dump:
[p_0, p_1] -> { MemRef9[i0] : i0 <= 7 + 8p_0 + 8p_1 and i0 >= 8p_0 + 8p_1 }
[p_0, p_1] -> { MemRef9[(8p_0 + 8p_1)] } [p_0, p_1] -> { MemRef8[i0] } /llvm-project/polly/lib/External/isl/isl_tab_pip.c:703: unbounded optimum

Thanks,
Harish C


Michael Kruse

unread,
Jan 5, 2022, 5:18:59 AM1/5/22
to Harish, Polly Development
The set { [p_0, p_1] -> { MemRef8[i0] } has no (lexical) minimum: i0 can be chosen arbitrarily small. If anything, it would approach negative infinity.

In contrast to that, in MemRef9[i0], has a lower bound `i0 >= 8p_0 + 8p_1`, hence that value is the minimum value of i0.

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/CA%2BBROwCYRnNCUonHt5YdgxP-P2k2aGiMy-SuxJ5o7D7ZEUA8nw%40mail.gmail.com.


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