[PATCH] D38349: [Polly] Add dumpPw() and dumpExpanded() functions. NFC.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 02:49:09 PDT 2017


Meinersbur created this revision.
Herald added a subscriber: mehdi_amini.
Herald added a reviewer: bollu.

These functions print a multi-line and sorted representation of unions of polyhedra. Each polyhedron has its own line.

Example output:
[p_0, p_1, p_2] -> {

  Stmt0[0] -> [0, 0];
  Stmt0[i0] -> [i0, 0] : 0 < i0 <= 5 - p_2;
  Stmt1[0] -> [0, 2] : p_1 = 1 and p_0 = -1;
  Stmt2[0] -> [0, 1] : p_1 >= 3 + p_0;
  Stmt3[0] -> [0, 3];

}

dumpExpanded() prints each point in the sets, except if the dimension is unbounded.

Example output of { [MemRef_A[i0] -> [i1]] : (exists (e0 = floor((1 + i1)/3): i0 = 1 and 3e0 <= i1 and 3e0 >= -1 + i1 and i1 >= 15 and i1 <= 25)) or (exists (e0 = floor((i1)/3): i0 = 0 and 3e0 < i1 and 3e0 >= -2 + i1 and i1 > 0 and i1 <= 11)) }:

{

  [MemRef_A[0] ->[1]];
  [MemRef_A[0] ->[2]];
  [MemRef_A[0] ->[4]];
  [MemRef_A[0] ->[5]];
  [MemRef_A[0] ->[7]];
  [MemRef_A[0] ->[8]];
  [MemRef_A[0] ->[10]];
  [MemRef_A[0] ->[11]];
  [MemRef_A[1] ->[15]];
  [MemRef_A[1] ->[16]];
  [MemRef_A[1] ->[18]];
  [MemRef_A[1] ->[19]];
  [MemRef_A[1] ->[21]];
  [MemRef_A[1] ->[22]];
  [MemRef_A[1] ->[24]];
  [MemRef_A[1] ->[25]]

}

These functions help to understand the isl's sets while debugging Polly.


https://reviews.llvm.org/D38349

Files:
  include/polly/Support/ISLTools.h
  lib/Support/ISLTools.cpp
  lib/Transform/FlattenAlgo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38349.116950.patch
Type: text/x-patch
Size: 18686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170928/44c90930/attachment.bin>


More information about the llvm-commits mailing list