This is the mail archive of the
mailing list for the GCC project.
RE: [PATCH ARM]Refine scaled address expression on ARM
- From: "bin.cheng" <bin dot cheng at arm dot com>
- To: "Richard Earnshaw" <Richard dot Earnshaw at arm dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 2 Sep 2013 15:08:42 +0800
- Subject: RE: [PATCH ARM]Refine scaled address expression on ARM
- Authentication-results: sourceware.org; auth=none
- References: <002a01cea3bc$43d36670$cb7a3350$ at arm dot com> <521F474A dot 9000905 at arm dot com>
> -----Original Message-----
> From: Richard Earnshaw
> Sent: Thursday, August 29, 2013 9:06 PM
> To: Bin Cheng
> Cc: email@example.com
> Subject: Re: [PATCH ARM]Refine scaled address expression on ARM
> On 28/08/13 08:00, bin.cheng wrote:
> > Hi,
> > This patch refines scaled address expression on ARM. It supports
> > "base+index*scale" in arm_legitimate_address_outer_p. It also tries
> > to legitimize "base + index * scale + offset" with "reg <- base +
> > offset; reg
> > + index * scale" by introducing thumb2_legitimize_address. For now
> > + function
> > thumb2_legitimize_address is a kind of placeholder and just does the
> > mentioned transformation by calling to try_multiplier_address. Hoping
> > we can improve it in the future.
> > With this patch:
> > 1) "base+index*scale" is recognized.
> That's because (PLUS (REG) (MULT (REG) (CONST))) is not canonical form.
> So this shouldn't be necessary. Can you identify where this
non-canoncial form is being generated?
Oh, for now ivopt constructs "index*scale" to test whether backend supports
scaled addressing mode, which is not valid on ARM, so I was going to
construct "base + index*scale" instead. Since "base + index * scale" is not
canonical form, I will construct the canonical form and drop this part of
Is rest of this patch OK?