<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">+ Daniel who added the MCRegister class.</div><div class=""><br class=""></div>Ah sorry, I replied too fast.<div class="">I mixed up MCPhysReg with MCRegister.</div><div class=""><br class=""></div><div class="">I was not aware we had such class.</div><div class=""><br class=""></div><div class="">From a look at it, MCRegister are essentially the same thing as Register. I am guessing that the difference is Register is used in the CodeGen layer, while MCRegister are used in the MC layer.</div><div class=""><br class=""></div><div class="">Until recently Register were just plain unsigned types and we introduced it to have stronger type checking. I don’t know what’s the rationale for MCRegister. It looks redundant to be honest. Maybe it is just solving a layering violation issue.</div><div class=""><br class=""></div><div class="">Let Daniel comment on that.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">-Quentin</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 29, 2020, at 9:12 AM, Mircea Trofin <<a href="mailto:mtrofin@google.com" class="">mtrofin@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 29, 2020 at 9:08 AM Quentin Colombet <<a href="mailto:qcolombet@apple.com" class="">qcolombet@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br class="">
<br class="">
Register can represent virtual or physical registers.<br class="">
MCRegister can only represent physical registers.<br class=""></blockquote><div class=""><br class=""></div><div class="">That's what I thought, but MCRegister has some stack slot APIs. </div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br class="">
Eventually all Register instances are replaced by a MCRegister. <br class=""></blockquote><div class=""><br class=""></div><div class="">What happens in that case to the stack slot APIs?</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br class="">
Cheers,<br class="">
-Quentin<br class="">
<br class="">
> On Sep 28, 2020, at 5:46 PM, Mircea Trofin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class="">
> <br class="">
> Hello,<br class="">
> <br class="">
> I'm trying to understand what the relation between these two types is: do we need them both? Register seems to be delegating to MCRegister without owning any new additional responsibilities.<br class="">
> <br class="">
> Thanks!<br class="">
> _______________________________________________<br class="">
> LLVM Developers mailing list<br class="">
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class="">
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
<br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></div></body></html>