[LLVMdev] "Graphite" for llvm
jan_sjodin at yahoo.com
Mon Dec 28 11:15:53 PST 2009
> Jan, what's the plan to integrate PCP in GCC and/or LLVM?
Currently thre is no concrete plan, or at least nothing immediate.
I believe a modular approach to loop transformations is desirable.
The main purpose of PCP is to get a common interface between a lower level
IR like SSA and higher level optimizations done on structured code, but one
could also directly translate from a front-end to PCP. On the
analysis/transformation side there could be several implementations,
including the polyhedral model. What needs to be done is to clearly specify
how different information should be encoded. Debug info, costs for
heuristics etc. The second benefit of having PCP is to be able to read and
write code fragments to a file. LLVM has some of these features already,
but SSA is not the right level. Implementing views on top of SSA might be
possible, using program structure trees and a lot of bookkeeping, but that
will also reduce the modularity code.
Front End <- -> Polyhedral Model
==> PCP <==
/ ^ \
SSA <- | -> Classical Loop transforms
I believe it would not be too much work to LLVM-ify the current
implementation of PCP since it is all written in C++. Most of the work
would be to translate implementations of PCP data ADTs to use the LLVM ones.
There are however a few areas that need to be addressed:
1. Memory management.
2. Error handling.3. Improved type system, since we need to be able to reason better about
induction variables and size of data. Alignment may come in here as well.
4. Different properties must be encoded and some should perhaps put into
the PCP language itself e.g. reduction operations.
I can look into how the current code can be released, or contributed in order
for other people to work on it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev