<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="">Hmm, I feel we would be better at fixing RBS.<div class=""><br class=""><div class="">I don’t think it would be necessarily expensive compile time wise to do something more sensible in RBS when running in fast:</div><div class="">We could defer the assignment of a register bank until we see the first real use (i.e., not a PHI or copy).</div><div class=""><br class=""></div><div class="">As with every heuristics, there are downsides too, but it feels to me that this is more robust than channeling metadata through a bunch of passes.</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 4, 2020, at 3:07 PM, Amara Emerson <<a href="mailto:aemerson@apple.com" class="">aemerson@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class="">My thinking was no, any regbanks assigned before RBS are only hints and do not have to be preserved. But for good code it would help if the legalizer preserves them.<div class=""><br class=""></div><div class="">This issue would be there with the other approaches too. Propagating information through destructive passes like the legalizer/combined is not going to be free in any case.<br class=""><br class=""><div dir="ltr" class="">Amara</div><div dir="ltr" class=""><br class=""><blockquote type="cite" class="">On May 4, 2020, at 2:53 PM, Quentin Colombet <<a href="mailto:qcolombet@apple.com" class="">qcolombet@apple.com</a>> wrote:<br class=""><br class=""></blockquote></div><blockquote type="cite" class=""><div dir="ltr" class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On May 4, 2020, at 2:01 PM, Matt Arsenault via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On May 1, 2020, at 14:00, Amara Emerson <<a href="mailto:aemerson@apple.com" class="">aemerson@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">The other thing we could do is to assign speculative regbanks to vregs during translation (if the target wants to opt-in), and then RBS can finalize the regbanks, changing some if it deems it necessary/optimal.</span></div></blockquote></div><br class=""><div class="">This seems reasonable to me. It wouldn’t require any new infrastructure</div></div></div></blockquote><div class=""><br class=""></div>How would that work with illegal operations?</div><div class=""><br class=""></div><div class="">Would the legalizer have to preserve them?</div><div class=""><br class=""></div><div class="">Ditto with combines.</div><div class=""><br class=""></div><div class="">What I am saying is although this does not require any new infrastructure, this is not free adopt.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">-Quentin</div><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">-Matt</div></div>_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class=""><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class=""></div></blockquote></div><br class=""></div></blockquote></div></div></div></blockquote></div><br class=""></div></div></body></html>