Xiaochu Liu via llvm-dev
2016-Jul-19 17:42 UTC
[llvm-dev] Check sub register relations in RA
Hi there, In my register allocator, I was trying to get the parent of a register in ARM. That is: D0 <-> S0, S1. Given S0, how am I able to get D0? Thanks, Xiaochu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160719/3cc73e78/attachment.html>
Matthias Braun via llvm-dev
2016-Jul-19 18:40 UTC
[llvm-dev] Check sub register relations in RA
A register can have multiple super registers/sub registers which you can query
with the MCSuperRegIterator/MCSubRegIterator. You may also have register aliases
that do not completely overlap a register, you can query those with the
MCRegAliasIterator (super/sub registers count as aliases too), however arbitrary
aliases are rare in llvm I believe the ARM target for example doesn't use
any.
BTW: Most register allocators in llvm work on the register unit level instead of
walking the sub/super register hierarchies.
Greetings
Matthias
> On Jul 19, 2016, at 10:42 AM, Xiaochu Liu via llvm-dev <llvm-dev at
lists.llvm.org> wrote:
>
> Hi there,
>
> In my register allocator, I was trying to get the parent of a register in
ARM.
>
> That is:
>
> D0 <-> S0, S1.
>
> Given S0, how am I able to get D0?
>
> Thanks,
> Xiaochu
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Xiaochu Liu via llvm-dev
2016-Jul-19 19:27 UTC
[llvm-dev] Check sub register relations in RA
Thanks, Matthias! My RA is a legacy one which is ported to LLVM. I will use regunit later for consistency. On Jul 19, 2016 11:40 AM, "Matthias Braun" <mbraun at apple.com> wrote:> A register can have multiple super registers/sub registers which you can > query with the MCSuperRegIterator/MCSubRegIterator. You may also have > register aliases that do not completely overlap a register, you can query > those with the MCRegAliasIterator (super/sub registers count as aliases > too), however arbitrary aliases are rare in llvm I believe the ARM target > for example doesn't use any. > > BTW: Most register allocators in llvm work on the register unit level > instead of walking the sub/super register hierarchies. > > Greetings > Matthias > > > On Jul 19, 2016, at 10:42 AM, Xiaochu Liu via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > Hi there, > > > > In my register allocator, I was trying to get the parent of a register > in ARM. > > > > That is: > > > > D0 <-> S0, S1. > > > > Given S0, how am I able to get D0? > > > > Thanks, > > Xiaochu > > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160719/d34c80a5/attachment.html>