OSDN Git Service

2005-01-30 Daniel Berlin <dberlin@dberlin.org>
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Jan 2005 19:08:37 +0000 (19:08 +0000)
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Jan 2005 19:08:37 +0000 (19:08 +0000)
commitac2f03246138f00ef09c7e14a0514bea5279e444
tree0a91c97f68df2f3505e7df5458a6291a47382478
parent40441bdec9cadc755fa80cbf7361f8e24f0b78f9
2005-01-30  Daniel Berlin  <dberlin@dberlin.org>

Fix PR tree-optimization/19624

* Makefile.in (tree-ssa-pre.o): Add CFGLOOP_H.
* tree-ssa-pre.c: Add cfgloop.h.
Update comment.
(pre_stats): New member, constified.
(inserted_exprs): New static variable.
(NECESSARY): New macro.
(create_expression_by_pieces): Fold the expression, and
mark it as defaulting to not necessary. Also put in
inserted_exprs.
(fully_constant_expression): New function.
(insert_into_preds_of_block): Modify to not insert phis when we
are playing with induction variables.
Push phis onto the inserted_exprs vector, and mark them as not
necessary by default.
(insert_aux): Call fully_constant_expression on eprime.
If all edges produce the same value, mark it constant.
(mark_operand_necessary): New function.
(remove_dead_inserted_code): New function.
(init_pre): Init loop optimizer to get loop info.
(fini_pre): Free loop_optimizer, and inserted_exprs vec.
(execute_pre): Commit edge inserts, then remove dead code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94448 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/Makefile.in
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-6.c [new file with mode: 0644]
gcc/tree-ssa-pre.c