This is the mail archive of the gcc@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: [gsoc] Generic addressing mode selection


On Sun, 2015-03-22 at 21:21 +0100, Erik Varga wrote:
> Hi all,
> 
> I'm Erik KrisztiÃn Varga, a 2nd year Electrical Engineering student,
> and I'd be interested in contributing to gcc as part of GSoC 2015.
> I'd like to work on adding an addressing mode selection pass to the
> RTL based on the ideas described in Eckstein et. al.'s paper on the
> subject [1].
> The basic idea is to reduce the problem to a Partitioned Boolean
> Quadratic Programming (PBQP) problem and to find a close-to-optimal
> solution with a heuristic algorithm. It should be possible to model a
> lot of addressing modes with the cost matrix approach described in the
> paper, so this would be a generic way to do AMS for different
> architectures.
> 
> Quite a few things would have to be done to implement the algorithm,
> like finding the correct models for the various addressing
> instructions in the supported architectures, or implementing an
> efficient representation of the cost vectors and matrices, but I think
> it should be possible in the scope of a Summer to have at least a
> working prototype ready.
> Would someone be interested in mentoring this project for GSoC? Is
> there anything similar currently being worked on? I think Oleg Endo
> has started implementing such a pass a while ago (mentioned in
> PR56590).
> 
> Best regards,
> Erik
> 
> [1] http://sydney.edu.au/engineering/it/~scholz/publications/cgo03.pdf

Very nice!  I did start doing some research in that area and started
writing down some ideas.  Unfortunately, whenever I started writing
code, something else came along etc.  I have accumulated a pile of
use/test cases, some papers on other approaches than PBQP and a rough
plan how I think it should be done.  Although my point of view is a bit
SH biased, I believe that once it's working on SH, other platforms will
benefit from it.  The problem is quite difficult, especially the
"generic" part.  The PBQP approach is indeed very tempting, but there
are a lot more things to it than just the solver.  To get good
improvements of the generated code, the optimization also has to be able
to reorder memory accesses and perform other transformations such as
converting pre-inc into post-inc modes in loops etc.  The scope would
need to be narrowed down a bit for a GSoC project, but if you want, we
could give it a try and I would step forward as a mentor.

Cheers,
Oleg


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