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: A new gimple pass (LRS: live range shrinking) to reduce register pressure


>
> All the normalize_gimple_stmt stuff looks weird - you basically copy
> the whole IL
> into yet another representation?  Note that all the uses/defs you collect are
> readily and easily available by the SSA operand interface.

Andrew mentioned that too. The only benefit of that is that the
normalized lrs stmt is like a cached stmt -- it is slightly more
efficient to walk through than using op_iter_next_use (via macro),
especially when the traverse happens often.


>
> Btw, I don't see why you would need to care about memory operations - or do you
> schedule them?

Yes -- gimple statements with memory reads are candidates for
scheduling. Memory writes are not yet handled.

 Note that on the alias-improvements branch dealing with this
> will be either easier or more complicated (dependent on how much precision
> you want).  I am about to implement RD for memory there, so a split-off RU
> implementation would be prefered to hooking one into the LRS pass.

Ok -- I am more than happy to use any existing support.

>
> It would be nice to have the file more structured (also for review), clearly
> grouping/separating the different tasks and having an overview comment before
> them.  In it's presence it's just a bunch of (a lot of) routines with
> no clear connection
> (looking at the all the *_ref_gen_* stuff right now).

Ok -- can be done.

>
> Can you have somebody go over the function comments with you regarding
> to grammar?  I cannot parse for example
>
> +/* The function updates the map from ssa names to set of their use references.
> +   OP is the use reference, *OP is the ssa name, MP is the map, and REFED_NAMES
> +   is a vector of referenced ssa names.  */
>
> How do SSA names reference other SSA names?  Are you talking about immediate
> uses?  Those are available already, no need to build another map for them.

 In LRS, use references refer to instances of ssa name use
(represented as pointer to trees). The set of use references includes
those occurs in the LRS region (thus a subset of the immediate use
set).  The name to use ref map is used temporarily and destroyed after
the bitmap template is created (one bit for useRef, and all useRefs
corresponding to one name needs to be grouped together).


>
> I think you duplicate quite some functionality and data structures
> that are already
> available in GCC here ... (likewise for virtual operands)
>

That is quite likely.

Thanks,

David

> Thanks,
> Richard.
>


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