[autovect] [patch] Implement call-site versioning
Victor Kaplansky
VICTORK@il.ibm.com
Sun May 7 09:05:00 GMT 2006
Initial implementation of call-site versioning.
switch (x) {
case 1:
a = 5;
break;
case 2:
a = 10;
break;
case 3:
a = 100;
break;
}
foo (a);
will ve converted to
switch (x) {
case 1:
foo (5);
break;
case 2:
foo (10);
break;
case 3:
foo (100);
break;
}
New pass runs before inlining.
Bootstrapped and tested on powerpc-linux.
Committed to autovect-branch.
2006-05-07 Mircea Namolaru <namolaru@il.ibm.com>
Vladimir Yanovsky <yanov@il.ibm.com>
Victor Kaplansky <victork@il.ibm.com>
* gcc/tree-pass.h: Define two new passes pass_tree_loop0 and
pass_cv.
* gcc/timevar.def: Define new timevar.
* gcc/tree-ssa-loop.c: (gate_loop0) New.
(pass_tree_loop0): New pass.
* gcc/ipa-prop.h: (cv_driver): New.
* gcc/tree-ssa-forwprop.c
(tree_ssa_forward_propagate_single_use_va):
Add transformation to array access.
* gcc/common.opt (ftree-early-loop): New option.
(fcv): New option.
* gcc/tree-inline.c: Add include of tree-inline-aux.h.
(copy_body_r): Change condition for tree_inlining.
(copy_bb): Change to non-static, add call to cgraph_clone_edge.
(copy_edges_for_bb): Change to non-static.
* gcc/Makefile.in: Add rules for cv.o
* gcc/passes.c (pass_cv): Add new pass pass_cv.
(pass_tree_loop0): New pass.
(init_optimization_passes): Add call to various existing pass to
make
scalar expansion happen.
* gcc/config/rs6000/rs6000.c: Add include of cfgloop.h
* tree-inline-aux.h: New.
* cv.c: New.
(See attached file: autovect.cv.patch.txt)
(See attached file: autovect.cv.patch.txt)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: autovect.cv.patch.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060507/cfe34915/attachment.txt>
More information about the Gcc-patches
mailing list