<html><body><p>Tim,<br><br>Thanks for the response. Since I started this project I've become quite familiar with isel for single basic blocks but moving up a level and looking at CFGs and multi-BB functions is a bit new to me, so I really appreciate the feedback. <br><br>I've got a few questions on your example if you don't mind:<br><br> 1.) Can you provide another example of a BB that would have an unreferenced live-in live-out var without making a function call? My target is an embedded chip and, at least for the foreseeable future, we do not intend to support function calls. It's inline everything or bust (which I believe is also how the AMD GPU backend functions?). Although I don't really want to eliminate the possibility of supporting function calls down the line, this particular example is not my highest concern at the moment if I could catch it and throw an error in this case, that would be OK.<br><br> 2.) What is the problem with having a basic-block that ignores an unreferenced live-in, live out? I am sure that will cause an issue, but I'd like to understand a little better what the issue will be. To put it another way, what would happen if I was somehow able to surgically remove res as a live-in & live-out from the BB calling bar() in your example, but change nothing else? <br><br> 3.) Just to make sure I understand, I assume you would say the following has the opposite problem:<br><br> <tt> I'd like to add this newly-created big vector value as an input reg for all BBs in the func except the one that contains its LIFETIME_START node, and I'd like to add it as an output reg for all BBs in the func except the one that does not contain its LIFETIME_END node.</tt><br><br><tt> That has the problem that I may add the inputs & outputs to BBs that shouldn't have them, right? Again, do you know how this issue would manifest itself?</tt><br><br><br><tt> 4.) More generic LLVM question here: is there any sort of convention for distinguishing between live-ins/outs for a func and live-ins/outs for a BB? It seems like most of the time I see those terms they're referring to function live-ins/outs, but not always.</tt><br><br><br><tt>Tyler</tt><br><br><br><img width="16" height="16" src="cid:1__=0ABBF556DFCFA5388f9e8a93df938690918c0AB@" border="0" alt="Inactive hide details for Tim Northover ---06/01/2016 12:25:13 PM---On 1 June 2016 at 08:13, Tyler Kenney via llvm-dev <llvm-de"><font color="#424282">Tim Northover ---06/01/2016 12:25:13 PM---On 1 June 2016 at 08:13, Tyler Kenney via llvm-dev <llvm-dev@lists.llvm.org> wrote:</font><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">Tim Northover <t.p.northover@gmail.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 Developers Mailing List <llvm-dev@lists.llvm.org></font><br><font size="2" color="#5F5F5F">Date: </font><font size="2">06/01/2016 12:25 PM</font><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">Re: [llvm-dev] Adding BB input/output registers during ISel</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt>On 1 June 2016 at 08:13, Tyler Kenney via llvm-dev<br><llvm-dev@lists.llvm.org> wrote:<br>> I'd like to<br>> add this newly-created big vector value as an input reg for all BBs that<br>> reference the original stack object but do not contain it's LIFETIME_START<br>> node, and I'd like to add it as an output reg for all BBs that reference the<br>> original stack object but do not contain it's LIFETIME_END node.<br><br>This doesn't sound sufficient. For example:<br><br> int foo(int res, int tst) {<br> if (tst) bar();<br> return res;<br> }<br><br>Whatever register contains "res" is also a live-in & out for the<br>basic-block calling bar even though it's not referenced there. I think<br>you need some kind of real CFG analysis.<br><br>Tim.<br><br></tt><br><BR>
</body></html>