周书林 via llvm-dev
2021-Jun-10 11:16 UTC
[llvm-dev] What is relationship between Operator and Instruction?
Hi, Thank you for your suggestions. I have learnt the basic IR structures in simple programs, but not all the objects could be generated. As I mentioned, about the Operators and ConstantExprs. I only got GEPOperator objects from .bc of MySQL. So is there any reference to learn about the relationship between those classes in IR? Sincerely, Shulin rahul utkoor <rahulutkoor4887 at gmail.com> 于2021年6月10日周四 下午5:25写道:> Hello, > Since you are starting to learn IR, I recommend you to start with one > simple program, compile the program, genreate CFG and understand the > hierarchy of types/operands/instructions. > It helped me to understand the compilation pipeline in a quick way. > > > Thanks, > Rahul Utkoor > > > On Thu, 10 Jun, 2021, 2:08 pm 周书林 via llvm-dev, <llvm-dev at lists.llvm.org> > wrote: > >> 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 >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://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/20210610/44c640df/attachment.html>
jeniffer lesley via llvm-dev
2021-Jun-10 11:28 UTC
[llvm-dev] What is relationship between Operator and Instruction?
I second this question. I never undersrood this in LLVM IR. LangRef fails to explain this. On Thu, Jun 10, 2021, 4:46 PM 周书林 via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Hi, > > Thank you for your suggestions. > I have learnt the basic IR structures in simple programs, but not all the > objects could be generated. As I mentioned, about the Operators and > ConstantExprs. I only got GEPOperator objects from .bc of MySQL. So is > there any reference to learn about the relationship between those classes > in IR? > > Sincerely, > Shulin > > rahul utkoor <rahulutkoor4887 at gmail.com> 于2021年6月10日周四 下午5:25写道: > >> Hello, >> Since you are starting to learn IR, I recommend you to start with one >> simple program, compile the program, genreate CFG and understand the >> hierarchy of types/operands/instructions. >> It helped me to understand the compilation pipeline in a quick way. >> >> >> Thanks, >> Rahul Utkoor >> >> >> On Thu, 10 Jun, 2021, 2:08 pm 周书林 via llvm-dev, <llvm-dev at lists.llvm.org> >> wrote: >> >>> 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 >>> _______________________________________________ >>> LLVM Developers mailing list >>> llvm-dev at lists.llvm.org >>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>> >> _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://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/20210610/44b56047/attachment.html>