In well formed LLVM IR each Instruction is embedded in a BasicBlock. You can get the BasicBlock from getParent().
getParent() will always go one step up in the LLVM IR hierarchy, i.e., you get a Function as parent from a BasicBlock, and the Module from a Function.
Vu
few.vu.nl › ~lsc300 › LLVM › doxygen › classllvm_1_1Instruction.html
LLVM: llvm::Instruction Class Reference
References llvm::iplist< NodeTy, Traits >::erase(), llvm::BasicBlock::getInstList(), and getParent().
LLVM
llvm.org › doxygen › classllvm_1_1BasicBlock.html
LLVM: llvm::BasicBlock Class Reference
Referenced by llvm::CodeExtrac... print(), llvm::GCNTTIImpl::simplifyAMDGCNLaneIntrinsicDemanded(), and useTpOffset(). Return the DbgMarker for the position that comes after I. ... BasicBlock::getMarker, this can be nullptr, a DbgMarker, or TrailingDbgRecords if there is no next instruction. Definition at line 1003 of file BasicBlock.cpp. Definition at line 95 of file BasicBlock.h. References assert(), and getParent(...
LLVM
llvm.org › doxygen › classllvm_1_1Argument.html
LLVM: llvm::Argument Class Reference
References F, Function, and LLVM_ABI. Referenced by Function, getParent(), and getParent().
LLVM
llvm.org › doxygen › classllvm_1_1Function.html
LLVM: llvm::Function Class Reference
References getParent(). removes the attribute from the list of attributes. Definition at line 678 of file Function.cpp. removes the attribute from the list of attributes. Definition at line 682 of file Function.cpp. Remove function attributes from this function.
LLVM
llvm.org › doxygen › group__LLVMCCoreValueInstruction.html
LLVM: Instructions
llvm::Instruction::getParent() Definition at line 2993 of file Core.cpp. References getParent(), llvm::unwrap(), and llvm::wrap(). Referenced by LLVM_ATTRIBUTE_C_DEPRECATED(). Obtain the last debug record attached to an instruction. Return the last DbgRecord attached to Inst or NULL if there ...
LLVM
llvm.org › doxygen › classllvm_1_1ilist__node__with__parent.html
LLVM: llvm::ilist_node_with_parent< NodeTy, ParentTy, Options > Class Template Reference
template<typename NodeTy, typename ParentTy, class... Options> class llvm::ilist_node_with_parent< NodeTy, ParentTy, Options > An ilist node that can access its parent list. Requires NodeTy to have getParent() to find the parent node, and the ParentTy to have getSublistAccess() to get a reference ...
LLVM
llvm.org › doxygen › classllvm_1_1MachineBasicBlock.html
LLVM: llvm::MachineBasicBlock Class Reference
References assert(), llvm::MachineFunction::erase(), and getParent(). Referenced by llvm::MachineDomTreeUpdater::deleteBB(), and rollbackRestoreSplit(). Find and return the merged DebugLoc of the branch instructions of the block. Return UnknownLoc if there is none.
LLVM
llvm.org › doxygen › classllvm_1_1MachineInstr.html
LLVM: llvm::MachineInstr Class Reference
References getOperand(), llvm::MachineOperand::getParent(), llvm::MachineOperand::getReg(), isReg(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::MachineRegisterInfo::use_operands().
LLVM
llvm.org › doxygen › classllvm_1_1GlobalValue.html
LLVM: llvm::GlobalValue Class Reference
Referenced by llvm::GlobalObject::canIncreaseAlignment(), llvm::GlobalAlias::create(), getParent(), getParent(), llvm::GlobalAlias::operator=(), llvm::GlobalIFunc::operator=(), setParent(), and llvm::GlobalIFunc::SymbolTableListTraits< GlobalIFunc >.
Gatech
cs6340.cc.gatech.edu › LLVM8Doxygen › group__LLVMCCoreValueFunctionParameters.html
LLVM: Function Parameters
The returned LLVMValueRef is the llvm::Function to which this argument belongs. Definition at line 2427 of file Core.cpp. References getParent(), and llvm::wrap(). Obtain the parameters in a function. The takes a pointer to a pre-allocated array of LLVMValueRef that is at least LLVMCountParams() long.
LLVM
llvm.org › doxygen › classllvm_1_1Loop.html
LLVM: llvm::Loop Class Reference
References llvm::LoopBase< BasicBlock, Loop >::getHeader(), llvm::Module::getModuleIdentifier(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), and getStartLoc(). Return the loop guard branch, if it exists. This currently only works on simplified loop, as it requires a preheader and a latch to identify the guard.
Clang
clang.llvm.org › doxygen › classclang_1_1DeclContext.html
clang: clang::DeclContext Class Reference
References clang::cast(), DeclContext(), getParent(), and isClosure(). Referenced by diagnoseImplicitlyRetainedSelf(). getLexicalParent - Returns the containing lexical DeclContext. May be different from getParent, e.g.: namespace A { struct S; } struct A::S {}; // getParent() == namespace 'A' // getLexicalParent() == translation unit ·
Hdoc
docs.hdoc.io › hdoc › llvm-project › rE266D8602316BABC.html
class Instruction: LLVM/Clang 15.x documentation
public inline llvm::BasicBlock * getParent() public inline const llvm::BasicBlock * getParent() const · public const llvm::Instruction * getPrevNonDebugInstruction(bool SkipPseudoOp = false) const · public llvm::Instruction * getPrevNonDebugInstruction(bool SkipPseudoOp = false) protected template <typename BitfieldElement>typename BitfieldElement::Type getSubclassData() const ·
Hdoc
docs.hdoc.io › hdoc › llvm-project › fA531FC3D14063289.html
function clang_Module_getParent: LLVM/Clang 15.x documentation
LLVM/Clang 15.x · Navigation · Home · Search · Repository · Made with hdoc · Pages · Getting Started · Building LLVM · Coding Standards · API Documentation · Functions · Records · Enums · Namespaces · Declared at: clang/include/clang-c/Index.h:4792 ·
LLVM Discussion Forums
discourse.llvm.org › t › get-module-from-an-ir-instruction-is-it-necessary-to-check-nullptr-in-the-chain-of-getparent-function-call › 63336
LLVM Discussion Forums - Our community includes both users and ...
June 21, 2022 - A place to discuss both usage and development of the LLVM project.
Vu
few.vu.nl › ~lsc300 › LLVM › doxygen › classllvm_1_1BasicBlock.html
LLVM: llvm::BasicBlock Class Reference
Referenced by getUniquePredecessor(), isDynamicConstant(), and llvm::MergeBlockIntoPredecessor(). Definition at line 186 of file BasicBlock.h. References getUniquePredecessor(). Returns a pointer to the symbol table if one exists. Definition at line 27 of file BasicBlock.cpp. References F(), and getParent().
Vu
few.vu.nl › ~lsc300 › LLVM › doxygen › classllvm_1_1Function.html
LLVM: llvm::Function Class Reference
References llvm::iplist< NodeTy, Traits >::erase(), llvm::Module::getFunctionList(), and llvm::GlobalValue::getParent().