[llvm-dev] What is relationship between Operator and Instruction?

周书林 via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 10 01:38:01 PDT 2021


Hello everyone,

I am learning the IR in LLVM and trying to do some analysis. Now I am doing
a dataflow analysis via the def-use chain provided by Users.

In my opinion, the Users of a Value should be an instruction. However, when
I iterate the User of a Value, sometimes I get an Operator, like
GEPOperator, or an ConstantExpr.
I am quite confused about these situations. My question is, what is
Operator in IR? and what is the difference between Operator and
Instruction? Why can I get a GEPOperator as an Operand in a instruction
rather than two instruction( a gep instruction and the next User
instruction) ?

Best regards,
Shulin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210610/0bb67c20/attachment.html>


More information about the llvm-dev mailing list