[autovect] [patch] tree-ifcvt enhancements

Victor Kaplansky VICTORK@il.ibm.com
Sun May 7 09:20:00 GMT 2006


Implementation of some enhancements to tree-ifcvt


1. Allow loads not only in header but also in any dominator of exit_bb.
2. Allow stores not only in exit_bb but also in any dominator of exit_bb.
3. Allow speculative load motion.
4. Perform a store-motion pass before actual ifcvt pass:

      if (c)
        *out = expr1;
      else
        *out = expr2;

will be converted into:

      if (c)
        tmp1 = expr1;
      else
        tmp2 = expr2;

      # tmp3 = PHI <tmp1, tmp2>
      *out = tmp3;


5. Allow several ifs in a loop body.


Bootstrapped and tested on powerpc-linux.
Committed to autovect-branch.

-- Victor

2006-05-07  Victor Kaplansky   <victork@il.ibm.com>

        * tree-if-conv.c (store_movable_loop_p): New.
        (store_movable_modify_expr_p): New.
        (last_store_found): New.
        (remove_all_phi_uses): New.
        (remove_store): New.
        (sink_store): New.
        (store_motion): New.
        (tree_if_conversion): Add call to store_movable_loop_p,
        store_motion and update_ssa.
        (if_convertible_modify_expr_p): Remove check of tree_could_trap_p
        on loads, Replace call to bb_with_exit_edge_p by dominated_by_p.
        (store_movable_stmt_p): New.
        (if_convertible_loop_p): Single call to calculate_dominance_info.
        (ifc_temp_var): Remove call to is_gimple_reg.
        (main_tree_if_conversion): add call to dump_tree_ssa.

(see attachment file: autovect.ifcvt.patch.txt)
(See attached file: autovect.ifcvt.patch.txt)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: autovect.ifcvt.patch.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060507/5f3397da/attachment.txt>


More information about the Gcc-patches mailing list