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

Module AliasedSSA

Import path

import semmle.code.cpp.ir.implementation.aliased_ssa.internal.AliasedSSA

Imports

AliasAnalysis
AliasConfiguration
Location

Provides classes and predicates for locations in the source code.

Overlap

Predicates

canReuseSsaForOldResult

Holds if the def/use information for the result of instr can be reused from the previous iteration of the IR.

getEndBitOffset

Gets the end bit offset of a MemoryLocation, if any.

getOperandMemoryLocation
getOverlap

Gets the overlap relationship between the definition location def and the use location use.

getResultMemoryLocation
getStartBitOffset

Gets the start bit offset of a MemoryLocation, if any.

isBusyDef

Holds if def is a busy definition. That is, it has a large number of overlapping uses.

Classes

AliasedVirtualVariable

A virtual variable that groups all escaped memory within a function.

AllAliasedMemory

An access to all aliased memory.

AllNonLocalMemory

An access to memory that is not known to be confined to a specific IRVariable, but is known to not access memory on the current function’s stack frame.

AllocationMemoryLocation
EntireAllocationMemoryLocation
EntireAllocationVirtualVariable
GroupedMemoryLocation

A group of allocations represented as a single memory location.

GroupedVirtualVariable
MemoryLocation

A memory location accessed by a memory operand or memory result. In this implementation, the location is one of the following: - VariableMemoryLocation - A location within a known IRVariable, at an offset that is either a constant or is unknown. - UnknownMemoryLocation - A location not known to be within a specific IRVariable.

MemoryLocation0

A memory location accessed by a memory operand or memory result. In this implementation, the location is one of the following: - VariableMemoryLocation - A location within a known IRVariable, at an offset that is either a constant or is unknown. - UnknownMemoryLocation - A location not known to be within a specific IRVariable.

UnknownMemoryLocation

An access to memory that is not known to be confined to a specific IRVariable.

VariableGroup

An equivalence class of a set of allocations.

VariableMemoryLocation

An access to memory within a single known IRVariable. The variable may be either an unescaped variable (with its own VirtualIRVariable) or an escaped variable (assigned to UnknownVirtualVariable).

VariableVirtualVariable

Represents the MemoryLocation for an IRVariable that acts as its own VirtualVariable. Includes any VariableMemoryLocation that exactly overlaps its entire IRVariable, and only if that IRVariable does not escape.

VirtualVariable

Represents a set of MemoryLocations that cannot overlap with MemoryLocations outside of the set. The VirtualVariable will be represented by a MemoryLocation that totally overlaps all other MemoryLocations in the set.