[PATCH] Fix PR43023: fuse_partitions_with_similar_memory_accesses.

Sebastian Pop sebpop@gmail.com
Fri Dec 10 19:45:00 GMT 2010


On Fri, Dec 10, 2010 at 06:56, Richard Guenther <rguenther@suse.de> wrote:
>> -/* { dg-do compile } */
>> +/* { dg-do compile } */
>>  /* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-all" } */
>
> These seems to be spurious changes.
>

I removed these white space changes.

>> +static inline bool
>> +stmt_stores_zero (gimple stmt)
>
> stmt_with_adjacent_zero_store_dr_p would be a better name, at
> least stmt_stores_zero suggests something simpler.
>
>> +{
>> +  tree op0, op1;
>> +  bool res;
>> +  struct data_reference *dr;
>> +
>> +  if (!stmt
>> +      || !gimple_vdef (stmt)
>> +      || !is_gimple_assign (stmt)
>> +      || !gimple_assign_single_p (stmt)
>> +      || !(op1 = gimple_assign_rhs1 (stmt))
>> +      || !(integer_zerop (op1) || real_zerop (op1)))
>> +    return false;
>> +
>> +  dr = XCNEW (struct data_reference);
>> +  op0 = gimple_assign_lhs (stmt);
>> +
>> +  DR_STMT (dr) = stmt;
>> +  DR_REF (dr) = op0;
>> +
>> +  res = dr_analyze_innermost (dr)
>> +    && stride_of_unit_type_p (DR_STEP (dr), TREE_TYPE (op0));
>> +
>> +  free_data_ref (dr);
>> +  return res;
>> +}
>
> Please move this to tree-data-ref.c instead, the function is too
> large for inlining anyway.
>
>
> Ok with that change(s).

Done.  See the attached patch that I committed to trunk after regstrap
on amd64-linux.
Should I backport these changes to the 4.5 branch?

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-PR43023-fuse_partitions_with_similar_memory_acce.patch
Type: text/x-diff
Size: 18241 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101210/3adcfcb4/attachment.bin>


More information about the Gcc-patches mailing list