LLVM: Instructions (original) (raw)

Functions in this group relate to the inspection and manipulation of individual instructions. More...

Topics
Functions
LLVM_C_ABI int LLVMHasMetadata (LLVMValueRef Val)
Determine whether an instruction has any metadata attached.
LLVM_C_ABI LLVMValueRef LLVMGetMetadata (LLVMValueRef Val, unsigned KindID)
Return metadata associated with an instruction value.
LLVM_C_ABI void LLVMSetMetadata (LLVMValueRef Val, unsigned KindID, LLVMValueRef Node)
Set metadata associated with an instruction value.
LLVM_C_ABI LLVMValueMetadataEntry * LLVMInstructionGetAllMetadataOtherThanDebugLoc (LLVMValueRef Instr, size_t *NumEntries)
Returns the metadata associated with an instruction value, but filters out all the debug locations.
LLVM_C_ABI LLVMBasicBlockRef LLVMGetInstructionParent (LLVMValueRef Inst)
Obtain the basic block to which an instruction belongs.
LLVM_C_ABI LLVMValueRef LLVMGetNextInstruction (LLVMValueRef Inst)
Obtain the instruction that occurs after the one specified.
LLVM_C_ABI LLVMValueRef LLVMGetPreviousInstruction (LLVMValueRef Inst)
Obtain the instruction that occurred before this one.
LLVM_C_ABI void LLVMInstructionRemoveFromParent (LLVMValueRef Inst)
Remove an instruction.
LLVM_C_ABI void LLVMInstructionEraseFromParent (LLVMValueRef Inst)
Remove and delete an instruction.
LLVM_C_ABI void LLVMDeleteInstruction (LLVMValueRef Inst)
Delete an instruction.
LLVM_C_ABI LLVMOpcode LLVMGetInstructionOpcode (LLVMValueRef Inst)
Obtain the code opcode for an individual instruction.
LLVM_C_ABI LLVMIntPredicate LLVMGetICmpPredicate (LLVMValueRef Inst)
Obtain the predicate of an instruction.
LLVM_C_ABI LLVMBool LLVMGetICmpSameSign (LLVMValueRef Inst)
Get whether or not an icmp instruction has the samesign flag.
LLVM_C_ABI void LLVMSetICmpSameSign (LLVMValueRef Inst, LLVMBool SameSign)
Set the samesign flag on an icmp instruction.
LLVM_C_ABI LLVMRealPredicate LLVMGetFCmpPredicate (LLVMValueRef Inst)
Obtain the float predicate of an instruction.
LLVM_C_ABI LLVMValueRef LLVMInstructionClone (LLVMValueRef Inst)
Create a copy of 'this' instruction that is identical in all ways except the following:
LLVM_C_ABI LLVMValueRef LLVMIsATerminatorInst (LLVMValueRef Inst)
Determine whether an instruction is a terminator.
LLVM_C_ABI LLVMDbgRecordRef LLVMGetFirstDbgRecord (LLVMValueRef Inst)
Obtain the first debug record attached to an instruction.
LLVM_C_ABI LLVMDbgRecordRef LLVMGetLastDbgRecord (LLVMValueRef Inst)
Obtain the last debug record attached to an instruction.
LLVM_C_ABI LLVMDbgRecordRef LLVMGetNextDbgRecord (LLVMDbgRecordRef DbgRecord)
Obtain the next DbgRecord in the sequence or NULL if there are no more.
LLVM_C_ABI LLVMDbgRecordRef LLVMGetPreviousDbgRecord (LLVMDbgRecordRef DbgRecord)
Obtain the previous DbgRecord in the sequence or NULL if there are no more.
LLVMMetadataRef LLVMDbgRecordGetDebugLoc (LLVMDbgRecordRef Rec)
Get the debug location attached to the debug record.
LLVMDbgRecordKind LLVMDbgRecordGetKind (LLVMDbgRecordRef Rec)
LLVMValueRef LLVMDbgVariableRecordGetValue (LLVMDbgRecordRef Rec, unsigned OpIdx)
Get the value of the DbgVariableRecord.
LLVMMetadataRef LLVMDbgVariableRecordGetVariable (LLVMDbgRecordRef Rec)
Get the debug info variable of the DbgVariableRecord.
LLVMMetadataRef LLVMDbgVariableRecordGetExpression (LLVMDbgRecordRef Rec)
Get the debug info expression of the DbgVariableRecord.

Functions in this group relate to the inspection and manipulation of individual instructions.

In the C++ API, an instruction is modeled by llvm::Instruction. This class has a large number of descendents. llvm::Instruction is a llvm::Value and in the C API, instructions are modeled by LLVMValueRef.

This group also contains sub-groups which operate on specific llvm::Instruction types, e.g. llvm::CallInst.

LLVMDbgRecordGetDebugLoc()

LLVMDbgRecordGetKind()

Definition at line 3057 of file Core.cpp.

References assert(), llvm::dyn_cast(), llvm::isa(), llvm::DbgVariableRecord::isDbgAssign(), llvm::DbgVariableRecord::isDbgDeclare(), llvm::DbgVariableRecord::isDbgValue(), LLVMDbgRecordAssign, LLVMDbgRecordDeclare, LLVMDbgRecordLabel, LLVMDbgRecordValue, and llvm::unwrap().

LLVMDbgVariableRecordGetExpression()

LLVMDbgVariableRecordGetValue()

LLVMDbgVariableRecordGetVariable()

LLVMDeleteInstruction()

LLVMGetFCmpPredicate()

LLVMGetFirstDbgRecord()

LLVMGetICmpPredicate()

LLVMGetICmpSameSign()

LLVMGetInstructionOpcode()

LLVMGetInstructionParent()

LLVMGetLastDbgRecord()

LLVMGetMetadata()

LLVMGetNextDbgRecord()

LLVMGetNextInstruction()

Obtain the instruction that occurs after the one specified.

The next instruction will be from the same basic block.

If this is the last instruction in a basic block, NULL will be returned.

Definition at line 2952 of file Core.cpp.

References I, llvm::unwrap(), and llvm::wrap().

LLVMGetPreviousDbgRecord()

LLVMGetPreviousInstruction()

Obtain the instruction that occurred before this one.

If the instruction is the first instruction in a basic block, NULL will be returned.

Definition at line 2960 of file Core.cpp.

References I, llvm::unwrap(), and llvm::wrap().

LLVMHasMetadata()

LLVMInstructionClone()

LLVMInstructionEraseFromParent()

LLVMInstructionGetAllMetadataOtherThanDebugLoc()

LLVMInstructionRemoveFromParent()

LLVMIsATerminatorInst()

LLVMSetICmpSameSign()

LLVMSetMetadata()