This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHES][TUPLES] Tuplifying tree-ssa-ifcombine.c


On 6/16/08 7:13 PM, Doug Kwan (éæå) wrote:
Hi Diego,

     Could you please review this? Bootstrapped and tested on
i686-unknown-linux-gnu.

2008-06-16 Doug Kwan <dougkwan@google.com>

        * tree-ssa-ifcombine.c (File): Re-enable all previously diabled code.
        (bb_no_side_effects_p): Tuplify.
        (same_phi_args_p): Likewise.
        (get_name_for_bit_test): Likewise.
        (operand_precision): New.
        (integral_operand_p): New.
        (get_source_def_stmt): New.
        (recognize_single_bit_test): Tuplify.  Refactor the loop for skipping
        copies and casts into get_source_def_stmt.
        (regcognize_bits_test): Tuplify.
        (ifcombine_ifandif): Likewise.
        (ifcombine_iforif): Likewise.
        (tree_ssa_ifcombine): Likewise.
        * passes.c: Re-enable pass_tree_ifcombine.

OK with:

+      gimple def_stmt = SSA_NAME_DEF_STMT (candidate);
+      if (gimple_code (def_stmt) == GIMPLE_ASSIGN

is_gimple_assign()


+ while (gimple_code (stmt) == GIMPLE_ASSIGN

is_gimple_assign() It happens in a few more places.


+  /* FIXME-tuples: Forward propagation is not yet enabled in the tuples
+     branch.  Without it, sometimes we get code like:

s/FIXME-tuples/FIXME tuples/ (otherwise my grep script won't work). This happens in a couple other places.


On second thought, let's not introduce get_source_def_stmt. Forward propagation will be re-enabled soon enough. Aldy is fighting some bugs exposed by it.

It doesn't matter if this produces test failures now.

-  if (TREE_CODE (t) == BIT_AND_EXPR
-      && integer_onep (TREE_OPERAND (t, 1))
-      && TREE_CODE (TREE_OPERAND (t, 0)) == SSA_NAME)
+  if (gimple_subcode (stmt) == BIT_AND_EXPR

gimple_assign_rhs_code() This also happens in a few more places.


In fact, could you just remove gimple_subcode() in a subsequent patch. The subcode field is too special to be given a generic accessor. Each tuple should have its own version.


Diego.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]