<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>> Jan, what's the plan to integrate PCP in GCC and/or LLVM?<BR><BR>Currently thre is no concrete plan, or at least nothing immediate. <BR>I believe a modular approach to loop transformations is desirable. <BR>The main purpose of PCP is to get a common interface between a lower level</DIV>
<DIV>IR like SSA and higher level optimizations done on structured code, but one </DIV>
<DIV>could also directly translate from a front-end to PCP. On the </DIV>
<DIV>analysis/transformation side there could be several implementations, </DIV>
<DIV>including the polyhedral model. What needs to be done is to clearly specify</DIV>
<DIV>how different information should be encoded. Debug info, costs for </DIV>
<DIV>heuristics etc. The second benefit of having PCP is to be able to read and </DIV>
<DIV>write code fragments to a file. LLVM has some of these features already, </DIV>
<DIV>but SSA is not the right level. Implementing views on top of SSA might be </DIV>
<DIV>possible, using program structure trees and a lot of bookkeeping, but that </DIV>
<DIV>will also reduce the modularity code. </DIV>
<DIV><BR>Front End <-             -> Polyhedral Model<BR>            \           /<BR>             ==> PCP <==<BR>            /     ^     \<BR>     SSA  <-      |      -> Classical Loop transforms</DIV>
<DIV>                  |</DIV>
<DIV>                  v</DIV>
<DIV>                Text</DIV>
<DIV><BR> </DIV>
<DIV>I believe it would not be too much work to LLVM-ify the current </DIV>
<DIV>implementation of PCP since it is all written in C++. Most of the work </DIV>
<DIV>would be to translate implementations of PCP data ADTs to use the LLVM ones. </DIV>
<DIV>There are however a few areas that need to be addressed:</DIV>
<DIV> </DIV>
<DIV>1. Memory management.</DIV>
<DIV>
<DIV>2. Error handling.</DIV>3. Improved type system, since we need to be able to reason better about </DIV>
<DIV>   induction variables and size of data. Alignment may come in here as well.  </DIV>
<DIV>4. Different properties must be encoded and some should perhaps put into </DIV>
<DIV>   the PCP language itself e.g. reduction operations. </DIV>
<DIV> </DIV>
<DIV>I can look into how the current code can be released, or contributed in order</DIV>
<DIV>for other people to work on it. </DIV>
<DIV> </DIV>
<DIV>- Jan</DIV>
<DIV> </DIV></div></body></html>