This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RTL, ColdFire 24/63] Add support for a MODE_INDEX_REG_CLASS macro
- From: Mark Mitchell <mark at codesourcery dot com>
- To: law at redhat dot com
- Cc: Richard Sandiford <richard at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Feb 2007 14:40:05 -0800
- Subject: Re: [RTL, ColdFire 24/63] Add support for a MODE_INDEX_REG_CLASS macro
- References: <874pqzw4w1.fsf@firetop.home> <87wt3vtalc.fsf_-_@firetop.home> <87slejtaia.fsf_-_@firetop.home> <87odp7tag7.fsf_-_@firetop.home> <87k5zvtad6.fsf_-_@firetop.home> <87fyajtaas.fsf_-_@firetop.home> <87bql7ta58.fsf_-_@firetop.home> <877ivvt9ws.fsf_-_@firetop.home> <873b6jt9r5.fsf_-_@firetop.home> <87y7obrv3h.fsf_-_@firetop.home> <87tzyzrv1p.fsf_-_@firetop.home> <87ps9nruzl.fsf_-_@firetop.home> <87lkkbrux2.fsf_-_@firetop.home> <87hcuzruvd.fsf_-_@firetop.home> <87d55nruu3.fsf_-_@firetop.home> <878xgbruqs.fsf_-_@firetop.home> <1168457319.28081.615.camel@sweet.slc.redhat.com> <87k5zuinc0.fsf@firetop.home> <1168983686.28081.842.camel@sweet.slc.redhat.com> <87ps9efc4t.fsf@talisman.home> <87fya82kk3.fsf@talisman.home> <87r6szfjoh.fsf@firetop.home> <1171301680.4134.124.camel@sweet.slc.redhat.com>
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