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: [PATCH][5/n] tree LIM TLC


On Tue, Mar 12, 2013 at 4:16 PM, Richard Biener wrote:
> --- 127,145 ----
>                                 /* The locations of the accesses.  Vector
>                                    indexed by the loop number.  */
>
> !   /* The following sets are computed on demand.  We use two bits per
> !      information to represent the not-computed state.  */
> !
> !   /* The set of loops in that the memory reference is independent
> !      (2 * loop->num) or dependent (2 * loop->num + 1) in.
> !      If it is stored in the loop, this store is independent on all other
> !      loads and stores.
> !      If it is only loaded, then it is independent on all stores in the loop.  */
> !   bitmap loop_dependence;
> !
> !   /* The set of memory references on that this reference is independent
> !      (2 * mem->id) or dependent (2 * mem->id + 1).  */
> !   bitmap ref_dependence;
>   } *mem_ref_p;

Perhaps add simple inline functions to test those bits, to avoid:

> --- 2174,2182 ----
>         ref2 = tem;
>       }
>
> !   if (bitmap_bit_p (ref1->ref_dependence, 2 * ref2->id))
>       return true;
> !   if (bitmap_bit_p (ref1->ref_dependence, 2 * ref2->id + 1))
>       return false;
>
>     if (dump_file && (dump_flags & TDF_DETAILS))

?

That kind of explicit 2*x+[01] is bound to go wrong at some point.

Ciao!
Steven


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