CodeQL library for C/C++
codeql/cpp-all 7.0.1-dev (changelog, source)
Search

Class IRCfg::BasicBlock

A basic block, that is, a maximal straight-line sequence of control flow nodes without branches or joins.

Import path

import semmle.code.cpp.ir.IR

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

dominates

Holds if this block dominates block.

getASuccessor

Gets a block to which control flows directly from this block.

getASuccessor

Gets an immediate successor of this basic block of a given type, if any.

getImmediateDominator

Gets the basic block that immediately dominates this basic block, if any.

getLastNode

Gets the last control flow node in this basic block.

getNode

Gets the control flow node at a specific (zero-indexed) position in this basic block.

inDominanceFrontier

Holds if df is in the dominance frontier of this basic block. That is, this basic block dominates a predecessor of df, but does not dominate df itself. I.e., it is equivaluent to: this.dominates(df.getAPredecessor()) and not this.strictlyDominates(df)

length

Gets the length of this basic block.

postDominates

Holds if this block is a post-dominator of block.

strictlyDominates

Holds if this block strictly dominates block.

strictlyPostDominates

Holds if this block strictly post-dominates block.

Inherited predicates

dominanceFrontier

Gets a block on the dominance frontier of this block.

from IRBlock
getAPhiInstruction

Get the Phi instructions that appear at the start of this block.

from IRBlockBase
getAPredecessor

Gets a block from which control flows directly to this block.

from IRBlock
getAnInstruction

Gets an instruction in this block. This includes Phi instructions.

from IRBlockBase
getBackEdgeSuccessor

Gets the block to which control flows directly from this block along a back edge of kind kind.

from IRBlock
getDisplayIndex

INTERNAL: Do not use.

from IRBlockBase
getEnclosingFunction

Gets the Function that contains this block.

from IRBlockBase
getEnclosingIRFunction

Gets the IRFunction that contains this block.

from IRBlockBase
getFirstInstruction

Gets the first non-Phi instruction in this block.

from IRBlockBase
getInstruction

Gets the indexth non-Phi instruction in this block.

from IRBlockBase
getInstructionCount

Gets the number of non-Phi instructions in this block.

from IRBlockBase
getLastInstruction

Gets the last instruction in this block.

from IRBlockBase
getLocation

Gets the source location of the first non-Phi instruction in this block.

from IRBlockBase
getSuccessor

Gets the block to which control flows directly from this block along an edge of kind kind.

from IRBlock
immediatelyDominates

Holds if this block immediately dominates block.

from IRBlock
immediatelyPostDominates

Holds if this block immediately post-dominates block.

from IRBlock
isReachableFromFunctionEntry

Holds if this block is reachable from the entry block of its function.

from IRBlock
postDominanceFrontier

Gets a block on the post-dominance frontier of this block.

from IRBlock
toString

Gets a textual representation of this block.

from IRBlockBase