llvm-project/polly/lib/Support
Michael Kruse ed787e7540 [Polly] Add dumpPw() and dumpExpanded() functions. NFC.
These functions print a multi-line and sorted representation of unions
of polyhedra. Each polyhedron (basic_{ast/map}) has its own line.
First sort key is the polyhedron's hierachical space structure.
Secondary sort key is the lower bound of the polyhedron, which should
ensure that the polyhedral are printed in approximately ascending order.

Example output of dumpPw():
[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];
}

In contrast dumpExpanded() prints each point in the sets, unless there
is an unbounded dimension that cannot be expandend.
This is useful for reduced test cases where the loop counts are set to
some constant to understand a bug.

Example output of dumpExpanded(
{ [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]]
}

Differential Revision: https://reviews.llvm.org/D38349

llvm-svn: 314525
2017-09-29 15:45:40 +00:00
..
DumpModulePass.cpp [Support] Rename tool_output_file to ToolOutputFile, NFC 2017-09-23 01:03:17 +00:00
GICHelper.cpp [Support] Force instantiation of isl dump() methods. NFC. 2017-09-28 09:51:04 +00:00
ISLTools.cpp [Polly] Add dumpPw() and dumpExpanded() functions. NFC. 2017-09-29 15:45:40 +00:00
Mainpage.h docs: Add doxygen mainpage 2016-03-07 21:17:48 +00:00
PollyPasses.def [JSON][PM] Port json import/export over to new pm 2017-08-10 14:45:09 +00:00
RegisterPasses.cpp Add more statistics. 2017-08-23 13:50:30 +00:00
SCEVAffinator.cpp [ScopInfo] Move Scop::getPwAffOnly to isl++ [NFC] 2017-08-06 21:42:38 +00:00
SCEVValidator.cpp [ScopInfo] Allow uniform branch conditions 2017-09-25 16:37:15 +00:00
ScopHelper.cpp [ScopHelper] Do not crash on unreachable blocks 2017-09-03 18:01:22 +00:00
ScopLocation.cpp clang-tidy: Add llvm namespace comments 2016-06-23 22:17:27 +00:00
VirtualInstruction.cpp Fix Memory Access of failing tests. 2017-09-01 11:36:52 +00:00