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: [RTL, ColdFire 24/63] Add support for a MODE_INDEX_REG_CLASS macro


Jeffrey Law wrote:

>>>> OK.  Just so we're on the same page, what's the blocking issue here?

> THe issue at hand is I think you're solving this problem in a totally
> inappropriate way.  I need to look at it deeper and see if I can
> convince myself otherwise.

FWIW, I read back through this thread.  This isn't an area of the
compiler where I'm an expert, so I had to swim around a bit, and I
didn't understand everything.  But, it sounds like Richard's approach is
to prevent the compiler from using certain index registers to access
memory in certain modes up front because that avoids cases that are
difficult and may result in inferior code.  In contrast, it sounds like
Jeff is suggesting allowing everything, and then doing something in the
back end to fix up problematic accesses that aren't actually supported
on the hardware.

It seems to me like both approaches are reasonable, and that different
back ends might well reasonably take different approaches.  If the
fix-ups are hard enough, and frequent enough, allowing the compiler the
full generality up front seems like it could well be harmful.

Given that Richard's patch is a direct parallel to the BASE_REG_CLASS
case, it seems a reasonable way to give back ends the ability to say
that index registers shouldn't be used to access particular kinds of
memory, because that's not likely to be a very optimal way to do it.

But, I'm not claiming any kind of particular expertise here.  So, this
is just my two cents, not anything particularly insightful.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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