<html><body><p>Okay, will try it out. Thanks a lot for the help, I think it's becoming more and more clear that I ought to re-design the frontend and make all the decisions about which buffers are going to live on the stack and which are going to live in the register file during a new pre-ISel IR-level pass. It seems like a design of that nature would be much more consistent with llvm and allow both ISel and RA to function much more normally, but I'm hoping to get away with the current design for at least a little while longer while I finalize some post-ISel stuff.<br><br>Cheers,<br>Tyler<br><br><br><img width="16" height="16" src="cid:1__=0ABB0A8ADFDED3538f9e8a93df938690918c0AB@" border="0" alt="Inactive hide details for Matthias Braun ---08/23/2016 05:37:16 PM---This is probably the first target building PHIs in the sel"><font color="#424282">Matthias Braun ---08/23/2016 05:37:16 PM---This is probably the first target building PHIs in the selection DAG, but I don't see a reason why i</font><br><br><font size="2" color="#5F5F5F">From:        </font><font size="2">Matthias Braun <mbraun@apple.com></font><br><font size="2" color="#5F5F5F">To:        </font><font size="2">Tyler Kenney/Marlborough/IBM@IBMUS</font><br><font size="2" color="#5F5F5F">Cc:        </font><font size="2">llvm-dev@lists.llvm.org</font><br><font size="2" color="#5F5F5F">Date:        </font><font size="2">08/23/2016 05:37 PM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">Re: [llvm-dev] Help in understanding physreg LiveVariables</font><br><font size="2" color="#5F5F5F">Sent by:        </font><font size="2">mbraun@apple.com</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><font size="4">This is probably the first target building PHIs in the selection DAG, but I don't see a reason why it wouldn't work.</font><br><br><font size="4">- Matthias</font><br>
<ul><ul><font size="4">On Aug 23, 2016, at 2:35 PM, Tyler Kenney <</font><a href="mailto:tjkenney@us.ibm.com"><u><font size="4" color="#0000FF">tjkenney@us.ibm.com</font></u></a><font size="4">> wrote:</font><br>
<p><font size="4">So if I first create the value in an entry BB and then build a CopyToReg but then I have to read it in a BB that loops back to itself, with it's own CopyToReg at the end, then I have two CopyToReg nodes for the same value. In this case, I need to create 3 virt regs, 1 for each CopyToReg and a third for the CopyFromReg in the beginning of the loop BB, right? And then I need to build a PHI instruction at the beginning of the loop MBB that relates the 3 virt regs, right? Is there anything else I need to do regarding the creation of the new phi instruction, do you know?<br><br>Tyler<br><br><br><graycol.gif></font><font size="4" color="#424282">Matthias Braun ---08/23/2016 05:17:14 PM---> On Aug 23, 2016, at 2:07 PM, Tyler Kenney <</font><a href="mailto:tjkenney@us.ibm.com"><u><font size="4" color="#0000FF">tjkenney@us.ibm.com</font></u></a><font size="4" color="#424282">> wrote: ></font><font size="4"><br></font><font color="#5F5F5F"><br>From: </font>Matthias Braun <<a href="mailto:mbraun@apple.com"><u><font color="#0000FF">mbraun@apple.com</font></u></a>><font color="#5F5F5F"><br>To: </font>Tyler Kenney/Marlborough/IBM@IBMUS<font color="#5F5F5F"><br>Cc: </font><a href="mailto:llvm-dev@lists.llvm.org"><u><font color="#0000FF">llvm-dev@lists.llvm.org</font></u></a><font color="#5F5F5F"><br>Date: </font>08/23/2016 05:17 PM<font color="#5F5F5F"><br>Subject: </font>Re: [llvm-dev] Help in understanding physreg LiveVariables<font color="#5F5F5F"><br>Sent by: </font><a href="mailto:mbraun@apple.com"><u><font color="#0000FF">mbraun@apple.com</font></u></a><p><hr width="100%" size="2" align="left" noshade><font size="4"><br><br></font><ul><ul><ul><ul><font size="5">On Aug 23, 2016, at 2:07 PM, Tyler Kenney <</font><a href="mailto:tjkenney@us.ibm.com"><u><font size="5" color="#0000FF">tjkenney@us.ibm.com</font></u></a><font size="5">> wrote:</font><p><font size="5">So if I create a value with a DAG.getUndef(myVT); call during instruction legalization, how can I access that value as input in another BB/DAG (also during instruction legalization) without worrying about live-ins and/or phi nodes? <br><br>Can I create a single virtual register and build both a CopyToReg and a CopyFromReg node with it? I assumed that would break SSA.</font></ul></ul></ul></ul><font size="5">Yes in Selection to you need to use CopyToReg/CoptFromReg to write to/from vregs that should cross basic blocks. Yes indeed this currently has to respect SSA form, so there should only be a single CopyToReg for each vreg and that def should dominate all users.</font><ul><ul><ul><ul><font size="5"><br>Perhaps I should have said that what stops me is that I don't know how to pass a newly created virtual register from one MBB/DAG to another.</font></ul></ul></ul></ul><font size="5">You have to remember the number somewhere, so you can use CopyFromReg on the vreg.</font><font size="4"><br></font><font size="5"><br>- Matthias</font><font size="4"><br><br></font></ul></ul><br><BR>
</body></html>