[AArch64] A question about rematerialization of simple add

Jiangning Liu liujiangning1 at gmail.com
Thu Jun 26 01:01:33 PDT 2014


Hi Tim,

I see! So do you know if we have any micro-architecture hook API I can
follow?

Thanks,
-Jiangning

2014-06-26 15:26 GMT+08:00 Tim Northover <t.p.northover at gmail.com>:

> Hi Jiangning,
>
> On 26 June 2014 07:42, Jiangning Liu <liujiangning1 at gmail.com> wrote:
> > But ADDWri/ADDXri represents "Add (immediate) : Rd = Rn + shift(imm)" and
> > shift can be either #0 or #12. For add with "lsl #12", it may not be the
> > same cost as mov, so we would have to split Wri/Xri into two separate
> defs.
>
> This is a microarchitectural property, so splitting the defs won't
> really help anyway.
>
> > Since ADDWri/ADDXri are being used around the back-end code, I not sure
> if
> > this change meet your expectation and it seems not a very clean solution
> for
> > me as well. Or do you know is there any smarter method in td file to
> > dynamically assign isReMaterializable to 1 based on shift value?
>
> I don't think there is a cleaner method at the moment; just this
> comment in MachineInstr.h:
>
>     bool isAsCheapAsAMove(QueryType Type = AllInBundle) const {
>       // Only returns true for a bundle if all bundled instructions are
> cheap.
>       // FIXME: This probably requires a target hook.
>       return hasProperty(MCID::CheapAsAMove, Type);
>     }
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140626/5d39453b/attachment.html>


More information about the llvm-commits mailing list