B2R2


B2R2.MiddleEnd.ControlFlowGraph Namespace

Type/Module Description

BasicBlock

The base type for basic block.

CallCFG (Module)

CallCFG (Type)

Call graph, where each node represents a function.

CallGraphBlock

Basic block type for a call graph (CallCFG).

CFGEdgeKind (Module)

CFGEdgeKind (Type)

TODO: Make DU types for Call, Jmp, FallThrough edges We distinguish edges of a CFG by classifying them into several kinds.

CFGExport

CGVertex

ControlFlowGraph<'D, 'E>

DefSites

Mapping from a variable to a set of defining SSA basic blocks.

DefsPerNode

Defined variables per node in a SSACFG.

DisasmBasicBlock

Basic block type for a disassembly-based CFG (DisasmCFG).

DisasmCFG (Module)

DisasmCFG (Type)

Disassembly-based CFG, where each node contains disassembly code.

DisasmVertex

FakeBlockInfo

IRBasicBlock can be either a fake block or a regular block. FakeBlockInfo exists only for fake blocks.

FakeIRBasicBlock

Fake IRBasicBlock. We create a fake block when there is a function call, and thus, a fake block represents a function. Note, fake blocks do not uniquely represent a function. That is, when there are multiple function calls to the same function, we create a fake block for each of the call sites.

FakeSSABasicBlock

Fake SSABasicBlock, which may or may not hold a function summary with ReturnVal expressions.

FakeVMap

This is a mapping from an edge to a dummy vertex (for external function calls). We first separately create dummy vertices even if they are associated with the same node (address) in order to compute dominance relationships without introducing incorrect paths or cycles. For convenience, we will always consider as a key "a return edge" from a fake vertex to a fall-through vertex.

GetPCThunkInfo (Module)

GetPCThunkInfo (Type)

Is this a get-pc-thunk function?

IDStack

Variable ID stack.

InlinedAssembly

InlinedAssemblyPattern

InlinedAssemblyTypes

Sometimes, inlined assembly creates branches that jump into the middle of an instruction. For example, the following pattern is commonly found in Libc. 41af15: 64 83 3c 25 18 00 00 00 00 cmpl $0x0,%fs:0x18 41af1e: 74 01 je 41af21 41af20: f0 48 ff 0d c0 57 0a 00 lock decq 0xa57c0(%rip) We call such the above code pattern as the "jump-after-lock" pattern.

InstructionInfo

Abstract information about the instruction and its corresponding IR statements.

IRBasicBlock (Module)

IRBasicBlock (Type)

A basic block that consists of IR (LowUIR) statements. It contains all the InstructionInfo of the basic block. We say an IRBasicBlock is a fake block if it contains no instruction, i.e., when the instrs is [||].

IRCFG (Module)

IRCFG (Type)

IRVertex

RegularIRBasicBlock

Regular IRBasicBlock; a basic block with IR statements.

RegularSSABasicBlock

Regular SSABasicBlock with regular instructions.

SSABasicBlock (Module)

SSABasicBlock (Type)

Basic block type for an SSA-based CFG (SSACFG). It holds an array of SSAStmtInfos (ProgramPoint * SSA.Stmt).

SSACFG (Module)

SSACFG (Type)

SSA-based CFG, where each node contains disassembly code.

SSAEdges

SSAStmtInfo

SSA statement information.

SSAVertex

SSACFG's vertex.

SSAVMap

A mapping from an address to a SSACFG vertex.

SyscallTailInfo

A basic block may end with a syscall instruction, and the syscall may terminate the program or not. We store such information for each basic block to easily track them.

VarCountMap

Counter for each variable.

VisualBlock (Module)

VisualBlock (Type)

A visual representation of a basic block.

VisualLine (Module)

VisualLine (Type)

A visual line of a basic block.