question about PRE

Hi, I am Jill, I'm new here and new with llvm. I find that its old
PRE.cpp has been removed from llvm-1.9 and the project homepage says
that a GVN-PRE pass is being implemented.
Since many PRE algorithms have been suggested, and I think PRE further
differs according to the specific defination of equivalence, whether
it is an "optimal" algorithm and optimal at what metric, etc, can I
ask what differences you're going to make between this one and the old
pass, and based on which algorithm you are going to develop?


The old PRE never really worked properly, or at least was never really finished. We're planning to implement GVN-PRE ( as it is a more powerful algorithm. You are right, of course, that the ability of the PRE to determine the equivalence of two expression. This is an area that can always be improved, and it's mostly an issue of if it's worth the amount of work required to prove a given equivalence. This is something that'll probably have to be determined empirically.

Hope this help,