<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 29, 2016, at 5:23 PM, Krzysztof Parzyszek <<a href="mailto:kparzysz@codeaurora.org" class="">kparzysz@codeaurora.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 9/29/2016 9:45 AM, Krzysztof Parzyszek via llvm-dev wrote:<br class=""><blockquote type="cite" class="">In the x86-64 case, if EAX had an extra reg unit that it would share<br class="">with RAX (for the unaddressable part extending from bit 16 upwards),<br class="">then none of AL=, AH=, or AX= would invalidate the rest of EAX and RAX,<br class="">while EAX= would, since it would store into the "hidden" reg unit.<br class=""></blockquote><br class="">Quentin,<br class="">If such units were something that targets could explicitly request via some construct in a .td file, would you find that acceptable?<br class=""></div></div></blockquote><div><br class=""></div><div>Quick thought (I haven’t had time to look closely to your other emails).</div><div><br class=""></div><div>If we add some explicit construct in the .td files, how could we use them?</div><div><br class=""></div><div>Basically, I am wondering if say in RDF we would you have some mode where we check for that property to be on and support two different modes, or we would have everything working on RegUnit and if we don’t use the unaddressable mode in the td files, we get conservative answers (due to the nature of RegUnit)?</div><div><br class=""></div><div>The reason I am asking is because I believe it may already be possible to add unaddressable register units by hand.</div><div>One would need to create additional subregs in their td file to fill the holes, then mark all the registers mapping to those subregs as unallocatable.</div><div><br class=""></div><div>E.g.,</div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">let SubRegIndices = [sub_16bit] in {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">def EAX : X86Reg<"eax", 0, [AX]>, DwarfRegNum<[-2, 0, 0]>;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">—></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">let SubRegIndices = [<b class="">dummysubIdx_16bit,</b> sub_16bit] in {</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">def EAX : X86Reg<"eax", 0, [<b class="">ADummyXH</b>, AX]>, DwarfRegNum<[-2, 0, 0]>;</span></div><div style="margin: 0px; line-height: normal;" class="">[…]</div><div style="margin: 0px; line-height: normal;" class="">def DummyRegClass : RegisterClass[…]/*list all dummy regs*/ {</div><div style="margin: 0px; line-height: normal;" class="">isAllocatable = 0;</div><div style="margin: 0px; line-height: normal;" class="">}</div></span></div></div><div><br class=""></div><div>In other words, you may be able to explore if that would solve your problem or if we have to come up with something smarter.</div><div><br class=""></div><div>Cheers,</div><div>-Quentin</div><blockquote type="cite" class=""><div class=""><div class=""><br class="">-Krzysztof<br class=""><br class=""></div></div></blockquote></div><br class=""></body></html>