This is the mail archive of the 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: combine permutations in gimple

On Mon, 13 Aug 2012, Richard Guenther wrote:

+  /* Check that it is only used here. We cannot use has_single_use
+     since the expression is using it twice itself...  */

Ah ... so then

|| num_imm_uses (op0) != 2

Ah, ok, that's simpler indeed, but there were such dire warnings to never use that evil function unless absolutely necessary that I didn't dare use it... Thanks for the permission.

If your new predicate would match more places (can you do a quick search?)

You mean: if there are more optimizations that either already check for double use in the same statement, or could benefit from doing so? I'll take a look.

then we want it in tree-flow-inline.h instead of in
tree-ssa-forwprop.c.  But yes,
num_imm_uses can be expensive.   For now just stick with the above.

I assume "the above" means "num_imm_uses (op0) != 2", since both versions are above ;-)

The natural SSA (and forwprop) way is to look for BIT_FIELD_REF and see
if the def stmt is a VEC_PERM_EXPR.

Thanks again,

Marc Glisse

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