<div dir="ltr"><div dir="ltr">On Mon, Nov 2, 2020 at 8:13 PM Xun Li <<a href="mailto:lxfind@gmail.com">lxfind@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Is a special "tail call" instruction that is both a call and return<br>
practical to add? It would need to inherit from both call and return<br>
inst, otherwise all the places where it's checking against either of<br>
them will need to remember to check this special instruction as well,<br>
which also sounds error-prone to me.<br></blockquote><div><br></div><div>My sense is that the current design is better for LLVM as it is today, but at the end of the day, these are design tradeoffs. I think the current design makes IPO easier, but makes instrumentation harder. Most scalar optimization passes don't run into problems because they generally remove or replace instructions rather than inserting new instructions, and when they insert new instructions, they tend to be casts, which are permitted.</div></div></div>