LLVM daily talk of fifty-six from RegionPass see Region

RegionPass Pass is a subclass of, and other subclasses of Pass (ModulePass, FunctionPass, LoopPass, BasicBlockPass), are of a similar pattern: runs on each XX. (Note: XX represents here for these objects Pass, each is different .FunctionPass run on each Function, RegionPass run on top of each other equally Region.)

But RegionPass there are some special features, mainly due to differences Region and Module, Function, Loop, BasicBlock caused. Known, Module, Function, Loop, BasicBlock LLVM IR are the basic structure, and is relatively easy to understand. In particular Module, Function, BasicBlock this three-tiered structure, LLVM IR contact are more familiar with. The Region can not be regarded as a basic structure, which is defined as:

Region is a connected subgraph of a control flow graph that has exactly two connections to the remaining graph. It can be used to analyze or optimize parts of the control flow graph.(来自:RegionInfo.h 的注释)

Translation is: Region is connected to a sub-picture control flow graph, and the remaining part which has two connections. It can be used to analyze and optimize parts of the control flow graph.

Therefore, a simple and Region FIG remaining edges connecting the two, is a point, a point is out. Region is the first point after entering BasicBlock Region; Region of the first point after leaving BasicBlock Region. All BasicBlock Region Region of the leading point BasicBlock; a point opposite the rear Region Region BasicBlock led all BasicBlock.

To see a specific example with:

FIG Region is an example of the figures there are two Region, a A a B. Here the point is also easy to let a little confusing, try to figure out what needs to be careful with respect to FIG. Region B is the parent of A.

related information:

On the LLVM to talk about the four day Pass: little angel his father

Little angel his father: Eight PASS example LLVM to talk about the daily analysis

Little angel his father: LLVM LLVM twelve Pass to talk about the day of the relevant source code analysis

Little angel his father: LLVM talk about the thirteen daily use LLVM comes PASS

Forty-two add a pass to talk about the daily LLVM instance: his father little angel

Little angel his father: LLVM daily talk utility pass the forty-three the LLVM

Little angel his father: LLVM talk about the daily fifty-five Talking about the wrong perception of and reasons Pass

Guess you like

Origin blog.csdn.net/snsn1984/article/details/92245062