Quiz time
Now that you have completed reading this chapter, try answering the following questions to test your knowledge:
- What is the difference between a
Useobject and aUserobject in LLVM?
A Use object represents the relationship between a definition and an operand of one of its users; that is the entity that uses that value. A user is represented with an instance of the User class.
Put differently, a Use object represents the edge between a definition and a User object, and a definition can have several Use instances for one User object. For example, a = b + b: b has one user (the computation that produces a) and two uses (the first and second operands of the computation that produces a).
See the Def-use and use-def chains in the LLVM IR section for more details.
- Point out the latch basic blocks in the following CFG:
3 and 4. 4 is also an exiting block, but blocks can assume several roles.
See the Loops section for loop...