<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 16 October 2015 at 13:28, Irini Stavrakantonaki via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><span class="">
<br>
<br>
<div>On 16/10/15 15:06, David Chisnall
wrote:<br>
</div>
<blockquote type="cite">
<pre><b>LLVM does not allow nested instructions</b>. Functions contain basic blocks, basic blocks contain instructions. Instructions <span><span>*</span>refer to<span>*</span></span> other values as operands. <b>These values are either local registers (other instructions)</b>, global values, or constant expressions. Constant expressions can only refer to globals or other constant expressions (and then, only to the address of the global, which is a constant, not to its value).</pre>
</blockquote></span>
The language of LLVM allows an <b>operand</b> (as it is a Value) to
refer to an Argument, Basic Block , User (-> Constant, <b>Instruction</b>,
Operator). <br>
So, an operand of an instruction can be an instruction. But, doesn't
this mean that we CAN have an "inlined" instruction inside another
one?!<br>
How can we say that LLVM doesn't allow nested instructions?!<br>
Sorry, if I miss something here, but this confuses me.<br></div></blockquote><div><br></div><div>Sorry to cause confusion, what David says is entirely correct: If the operand to an instruction is another instruction, that is never directly the operand, but the result of that instruction is passed as the operand value. <br><br>--<br></div><div>Mats<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<br>
--istavrak<br>
<br>
</div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>