Module Instruction

Import path

import semmle.code.cpp.ir.implementation.raw.Instruction

Imports

EdgeKind
IRBlock
IRFunction
IRType

Minimal, language-neutral type system for the IR.

IRVariable
MemoryAccessKind
Opcode
Operand

Classes

AddInstruction
AliasedDefinitionInstruction

An instruction that initializes all escaped memory.

AliasedUseInstruction

An instruction that consumes all escaped memory on exit from the function.

ArithmeticInstruction
BinaryArithmeticInstruction
BinaryBitwiseInstruction
BinaryInstruction
BitAndInstruction
BitComplementInstruction
BitOrInstruction
BitXorInstruction
BitwiseInstruction
BufferMayWriteSideEffectInstruction

An instruction representing the write of an indirect buffer parameter within a function call. Unlike BufferWriteSideEffectInstruction, the buffer might not be completely overwritten.

BufferMustWriteSideEffectInstruction

An instruction representing the write of an indirect buffer parameter within a function call. The entire buffer is overwritten.

BufferReadSideEffectInstruction

An instruction representing the read of an indirect buffer parameter within a function call.

BuiltInInstruction

An instruction representing a built-in operation that does not have a specific opcode. The actual operation is specified by the getBuiltInOperation() predicate.

BuiltInOperationInstruction

An instruction representing a built-in operation. This is used to represent operations such as access to variable argument lists.

CallInstruction

An instruction that calls a function.

CallReadSideEffectInstruction

An instruction representing the side effect of a function call on any memory that might be read by that call. This instruction is emitted instead of CallSideEffectInstruction when it’s certain that the call target cannot write to escaped memory.

CallSideEffectInstruction

An instruction representing the side effect of a function call on any memory that might be accessed by that call.

CatchAnyInstruction

An instruction that catches any exception.

CatchByTypeInstruction

An instruction that catches an exception of a specific type.

CatchInstruction

An instruction that starts a catch handler.

CheckedConvertOrNullInstruction
ChiInstruction

An instruction representing the effect that a write to a memory may have on potential aliases of that memory.

CompareEQInstruction
CompareGEInstruction
CompareGTInstruction
CompareInstruction
CompareLEInstruction
CompareLTInstruction
CompareNEInstruction
ConditionalBranchInstruction
ConstantInstruction
ConstantValueInstruction
ConvertInstruction
ConvertToBaseInstruction

Represents an instruction that converts from the address of a derived class to the address of a base class.

ConvertToDerivedInstruction

Represents an instruction that converts from the address of a base class to the address of a direct non-virtual derived class.

ConvertToNonVirtualBaseInstruction

Represents an instruction that converts from the address of a derived class to the address of a direct non-virtual base class.

ConvertToVirtualBaseInstruction

Represents an instruction that converts from the address of a derived class to the address of a virtual base class.

CopyInstruction
CopyValueInstruction
DivInstruction
EnterFunctionInstruction
ErrorInstruction

An instruction that produces a well-defined but unknown result and has unknown side effects, including side effects that are not conservatively modeled in the SSA graph.

ExitFunctionInstruction
FieldAddressInstruction
FieldInstruction
FloatConstantInstruction
FunctionInstruction
IndexedInstruction
IndirectMayWriteSideEffectInstruction

An instruction representing the potential write of an indirect parameter within a function call. Unlike IndirectWriteSideEffectInstruction, the location might not be completely overwritten. written.

IndirectMustWriteSideEffectInstruction

An instruction representing the write of an indirect parameter within a function call.

IndirectReadSideEffectInstruction

An instruction representing the read of an indirect parameter within a function call.

InheritanceConversionInstruction

Represents an instruction that converts between two addresses related by inheritance.

InitializeDynamicAllocationInstruction

An instruction representing the initial value of newly allocated memory, e.g. the result of a call to malloc.

InitializeIndirectionInstruction
InitializeParameterInstruction
InitializeThisInstruction

An instruction that initializes the this pointer parameter of the enclosing function.

InlineAsmInstruction

An instruction representing a GNU or MSVC inline assembly statement.

Instruction

Represents a single operation in the IR.

IntegerConstantInstruction
LoadInstruction
LogicalNotInstruction
MulInstruction
NegateInstruction
NoOpInstruction
PhiInstruction

An instruction representing the choice of one of multiple input values based on control flow.

PointerAddInstruction
PointerArithmeticInstruction
PointerDiffInstruction
PointerOffsetInstruction
PointerSubInstruction
ReThrowInstruction

An instruction that re-throws the current exception.

ReadSideEffectInstruction

An instruction representing a read side effect of a function call on a specific parameter.

RelationalInstruction

Represents an instruction that does a relative comparison of two values, such as < or >=.

RemInstruction
ReturnIndirectionInstruction
ReturnInstruction
ReturnValueInstruction
ReturnVoidInstruction
ShiftLeftInstruction
ShiftRightInstruction
SideEffectInstruction

An instruction representing a side effect of a function call.

SizedBufferMayWriteSideEffectInstruction

An instruction representing the write of an indirect buffer parameter within a function call. Unlike BufferWriteSideEffectInstruction, the buffer might not be completely overwritten.

SizedBufferMustWriteSideEffectInstruction

An instruction representing the write of an indirect buffer parameter within a function call. The entire buffer is overwritten.

SizedBufferReadSideEffectInstruction

An instruction representing the read of an indirect buffer parameter within a function call.

StoreInstruction
StringConstantInstruction
SubInstruction
SwitchInstruction
ThrowInstruction

An instruction that throws an exception.

ThrowValueInstruction

An instruction that throws a new exception.

UnaryArithmeticInstruction
UnaryBitwiseInstruction
UnaryInstruction
UninitializedInstruction
UnmodeledDefinitionInstruction
UnmodeledUseInstruction
UnreachedInstruction

An instruction representing unreachable code. Inserted in place of the original target instruction of a ConditionalBranch or Switch instruction where that particular edge is infeasible.

UnwindInstruction

An instruction that exits the current function by propagating an exception.

VariableAddressInstruction
VariableInstruction
WriteSideEffectInstruction

An instruction representing a write side effect of a function call on a specific parameter.