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

Module Instruction

Provides classes that represent the individual instructions in the IR for a function.

Import path

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

Imports

EdgeKind

Provides classes that specify the conditions under which control flows along a given edge.

IRBlock

Provides classes describing basic blocks in the IR of a function.

IRFunction

Provides the class IRFunction, which represents the Intermediate Representation for the definition of a function.

IRType

Minimal, language-neutral type system for the IR.

IRVariable

Provides classes that represent variables accessed by the IR.

MemoryAccessKind

Provides classes that describe how a particular Instruction or its operands access memory.

Opcode

Provides Opcodes that specify the operation performed by an Instruction, as well as metadata about those opcodes, such as operand kinds and memory accesses.

Operand

Provides classes that represent the input values of IR instructions.

Classes

AddInstruction

An instruction that computes the sum of two numeric operands.

AliasedDefinitionInstruction

An instruction that initializes all escaped memory.

AliasedUseInstruction

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

ArithmeticInstruction

An instruction that computes the result of an arithmetic operation.

BinaryArithmeticInstruction

An instruction that performs an arithmetic operation on two numeric operands.

BinaryBitwiseInstruction

An instruction that performs a bitwise operation on two integer operands.

BinaryInstruction

An instruction whose result is computed from two operands.

BitAndInstruction

An instruction that computes the bitwise “and” of two integer operands.

BitComplementInstruction

An instruction that computes the bitwise complement of its operand.

BitOrInstruction

An instruction that computes the bitwise “or” of two integer operands.

BitXorInstruction

An instruction that computes the bitwise “xor” of two integer operands.

BitwiseInstruction

An instruction that computes the result of a bitwise operation.

BufferMayWriteSideEffectInstruction

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

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.

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.

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

An instruction that converts the address of a polymorphic object to the address of a different subobject of the same polymorphic object, returning a null address if the dynamic type of the object is not compatible with the result type.

CheckedConvertOrThrowInstruction

An instruction that converts the address of a polymorphic object to the address of a different subobject of the same polymorphic object, throwing an exception if the dynamic type of the object is not compatible with the result type.

ChiInstruction

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

CompareEQInstruction

An instruction that returns a true result if its operands are equal.

CompareGEInstruction

An instruction that returns a true result if its left operand is greater than or equal to its right operand.

CompareGTInstruction

An instruction that returns a true result if its left operand is greater than its right operand.

CompareInstruction

An instruction that compares two numeric operands.

CompareLEInstruction

An instruction that returns a true result if its left operand is less than or equal to its right operand.

CompareLTInstruction

An instruction that returns a true result if its left operand is less than its right operand.

CompareNEInstruction

An instruction that returns a true result if its operands are not equal.

CompleteObjectAddressInstruction

An instruction that returns the address of the complete object that contains the subobject pointed to by its operand.

ConditionalBranchInstruction

An instruction that branches to one of two successor instructions based on the value of a Boolean operand.

ConstantInstruction

An instruction whose result is a constant value.

ConstantValueInstruction

An instruction whose result is a compile-time constant value.

ConvertInstruction

An instruction that converts the value of its operand to a value of a different type.

ConvertToBaseInstruction

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

ConvertToDerivedInstruction

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

ConvertToNonVirtualBaseInstruction

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

ConvertToVirtualBaseInstruction

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

CopyInstruction

An instruction that returns a copy of its operand.

CopyValueInstruction

An instruction that returns a register result containing a copy of its register operand.

DivInstruction

An instruction that computes the quotient of two numeric operands.

ElementsAddressInstruction

An instruction that computes the address of the first element of a managed array.

EnterFunctionInstruction

An instruction representing the entry point to a function.

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

An instruction representing the exit point of a function.

FieldAddressInstruction

An instruction that computes the address of a non-static field of an object.

FieldInstruction

An instruction that refers to a field of a class, struct, or union.

FloatConstantInstruction

An instruction whose result is a constant value of floating-point type.

FunctionAddressInstruction

An instruction that returns the address of a function.

FunctionInstruction

An instruction that refers to a function.

IndexedInstruction

An instruction that refers to an argument of a Call instruction.

IndirectMayWriteSideEffectInstruction

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

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

An instruction that converts the address of an object to the address of a different subobject of the same object, without any type checking at runtime.

InitializeDynamicAllocationInstruction

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

InitializeIndirectionInstruction

An instruction that initializes the memory pointed to by a parameter of the enclosing function with the value of that memory on entry to the function.

InitializeNonLocalInstruction

An instruction that initializes all memory that existed before this function was called.

InitializeParameterInstruction

An instruction that initializes a parameter of the enclosing function with the value of the corresponding argument passed by the caller.

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

A single instruction in the IR.

IntegerConstantInstruction

An instruction whose result is a constant value of integer or Boolean type.

LoadInstruction

An instruction that returns a register result containing a copy of its memory operand.

LogicalNotInstruction

An instruction that computes the logical complement of its operand.

MulInstruction

An instruction that computes the product of two numeric operands.

NegateInstruction

An instruction that negates a single numeric operand.

NewObjInstruction

An instruction that allocates a new object on the managed heap.

NextVarArgInstruction

An instruction that modifies a va_list to point to the next argument that was passed to the ... parameter.

NoOpInstruction

An instruction that has no effect.

PhiInstruction

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

PointerAddInstruction

An instruction that adds an integer offset to a pointer.

PointerArithmeticInstruction

An instruction that performs a binary arithmetic operation involving at least one pointer operand.

PointerDiffInstruction

An instruction that computes the difference between two pointers.

PointerOffsetInstruction

An instruction that adds or subtracts an integer offset from a pointer.

PointerSubInstruction

An instruction that subtracts an integer offset from a pointer.

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

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

RemInstruction

An instruction that computes the remainder of two integer operands.

ReturnIndirectionInstruction

An instruction that represents the use of the value pointed to by a parameter of the function after the function returns control to its caller.

ReturnInstruction

An instruction that returns control to the caller of the function.

ReturnValueInstruction

An instruction that returns control to the caller of the function, including a return value.

ReturnVoidInstruction

An instruction that returns control to the caller of the function, without returning a value.

ShiftLeftInstruction

An instruction that shifts its left operand to the left by the number of bits specified by its right operand.

ShiftRightInstruction

An instruction that shifts its left operand to the right by the number of bits specified by its right operand.

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.

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

An instruction that returns a memory result containing a copy of its register operand.

StringConstantInstruction

An instruction whose result is the address of a string literal.

SubInstruction

An instruction that computes the difference of two numeric operands.

SwitchInstruction

An instruction that branches to one of multiple successor instructions based on the value of an integer operand.

ThrowInstruction

An instruction that throws an exception.

ThrowValueInstruction

An instruction that throws a new exception.

UnaryArithmeticInstruction

An instruction whose result is computed by performing an arithmetic operation on a single numeric operand.

UnaryBitwiseInstruction

An instruction that performs a bitwise operation on a single integer operand.

UnaryInstruction

An instruction whose result is computed from a single operand.

UninitializedInstruction

An instruction that returns an uninitialized value.

UnreachedInstruction

An instruction representing unreachable code.

UnsignedShiftRightInstruction

An instruction that shifts its left operand to the right by the number of bits specified by its right operand.

UnwindInstruction

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

VarArgInstruction

An instruction that returns the address of the argument currently pointed to by a va_list.

VarArgsEndInstruction

An instruction that cleans up a va_list after it is no longer in use.

VarArgsStartInstruction

An instruction that returns a va_list to access the arguments passed to the ... parameter.

VariableAddressInstruction

An instruction that returns the address of a variable.

VariableInstruction

An instruction that refers to a variable.

VirtualDeleteFunctionAddressInstruction

An instruction that returns the address of a “virtual” delete function.

WriteSideEffectInstruction

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