[llvm-dev] Break nested instructions?

mats petersson via llvm-dev llvm-dev at lists.llvm.org
Fri Oct 16 05:38:18 PDT 2015


On 16 October 2015 at 13:28, Irini Stavrakantonaki via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

>
>
> On 16/10/15 15:06, David Chisnall wrote:
>
> *LLVM does not allow nested instructions*.  Functions contain basic blocks, basic blocks contain instructions.  Instructions *refer to* other values as operands.  *These values are either local registers (other instructions)*, 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).
>
> The language of LLVM allows an *operand* (as it is a Value) to refer to
> an Argument, Basic Block , User (-> Constant, *Instruction*, Operator).
> 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?!
> How can we say that LLVM doesn't allow nested instructions?!
> Sorry, if I miss something here, but this confuses me.
>

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.

--
Mats

>
> --istavrak
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151016/5466a8fd/attachment.html>


More information about the llvm-dev mailing list