This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHES][TUPLES] Tuplifying tree-ssa-ifcombine.c
- From: Diego Novillo <dnovillo at google dot com>
- To: "Doug Kwan (éæå)" <dougkwan at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Aldy Hernandez <aldyh at redhat dot com>
- Date: Mon, 16 Jun 2008 19:27:41 -0400
- Subject: Re: [PATCHES][TUPLES] Tuplifying tree-ssa-ifcombine.c
- References: <498552560806161613r34b9a153yde648f563257906f@mail.gmail.com>
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.