construct pet_scop from intermediate pet_tree data structure
In particular, break up the extraction of a pet_scop into two phases,
a first phase that detects the part of the clang AST that can be
converted to a polyhedral model and a second phase that performs
the actual construction of the pet_scop.
The first phase constructs a pet_tree from the bottom up,
collecting all the information extracted during this first phase.
An alternative would have been to recompute this information
in the second phase, but this would have required further
refactorings to make the extraction of this information
callable from different contexts.
An additional advantage of the separate data structure is
that it makes the second phase largely independent of the
clang AST.
The second phase currently also works bottom-up, but one of
the main motivations of breaking up the extraction into two phases
is that we can later transform the second phase into a top-down process.
This will then allow us to exploit context information during
the construction of the pet_scop.
We try to stay as close as possible to the original implementation
in this commit. However, the sequence number in the statement level
dimensions of the schedule is no longer derived from the sequence number
in the StmtRange, but from the sequence number
in the actually extracted statements. This only has an effect
when autodetection is turned on since we may then choose
to only extract part of a range of statements.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
16 files changed: