May 2015
Intermediate to advanced
296 pages
5h 10m
English
Similar to basic blocks in the LLVM IR, a MachineBasicBlock class has a set of machine instructions in sequential order. Mostly, a MachineBasicBlock class maps to a single LLVM IR basic block. However, there can be cases where multiple MachineBasicBlocks classes map to a single LLVM IR basic block. The MachineBasicBlock class has a method, called getBasicBlock(), that returns the IR basic block to which it is mapping.
The following steps show how machine basic blocks are added:
getBasicBlock method will return only the current basic block:const BasicBlock *getBasicBlock() const { return BB; }
Read now
Unlock full access