[PATCHES][TUPLES] Fix tree-profiling
Doug Kwan (關振德)
dougkwan@google.com
Thu May 1 23:23:00 GMT 2008
Hi Diego,
This patch fixes 45 C failures and 22 C++ failures. I tested and
bootstrapped it on i686-unknown-linux-gnu. I removed an assertion in
gimple_set_bb which checks that a label is not in a bb. I don't think
a assertion is a good check anyway. To not trigger the assertion, one
must do something like
gimple_set_bb (label, NULL);
gimple_set_bb (label, new_bb);
when moving a label from bb to new_bb, and I think it is quite
awkward. I don't think the assertion is good for anything. If we are
paranoid, we can add an assertion to check that label_to_block_map
points to the label's bb before we set it to the new one.
-Doug
2008-05-01 Doug Kwan <dougkwan@google.com>
* value-prof.c (gimple_divmod_fixed_value): Remove formal parameters
OPERATION, OP1 and OP2 and derive their values from parameter STMT
instead. Update prototype and caller.
(gimple_mod_pow2): Remove formal parameters OPERATION, OP1 and OP2
and derive their values from parameter STMT instead. Update prototype
and caller.
(gimple_mod_pow2_value_transform): Remove temporares OP, OP1 and OP2.
Use a new tempory LHS_TYPE to store assignment LHS type.
(gimple_mode_subtract): Remove formal parameters OPERATION, OP1 and OP2
and derive their values from parameter STMT instead. Update prototype
and caller. Fix a bug in a call to gimple_build_assign_with_ops.
(gimple_mod_subtract_transform): Remove temporares OP, OP1 and OP2.
Use a new tempory LHS_TYPE to store assignment LHS type.
(gimple_ic, gimple_indirect_call_to_profile): Fix bug in tree-code
tests.
* tree-profile.c (File): Re-enable all previously disabled code.
(tree_gen_edge_profiler): Tuplify.
(prepare_instrumented_value): Ditto.
(tree_gen_interval_profiler): Ditto.
(tree_gen_pow2_profiler): Ditto.
(tree_gen_one_value_profiler): Ditto.
(tree_gen_ic_profiler): Ditto.
(tree_gen_ic_func_profiler): Ditto.
(tree_gen_const_delta_profiler): Re-format formal parameters for
proper alignement.
(tree_gen_average_profiler): Tuplify.
(tree_gen_ior_profiler): Ditto.
(do_tree_profiling): Re-enable previously disabled code. Remove
FIXME.
(tree_profiling): Ditto.
* gimple.c (gimple_set_bb): Remove assertion.
* tree-cfg.c (change_bb_for_stmt): Remove. Redirect callers to
gimple_set_bb.
(gimple_merge_blocks): Call gimple_set_bb instead of
change_bb_for_stmt.
(gimple_split_block): Ditto.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080501/82e49d57/attachment.txt>
More information about the Gcc-patches
mailing list