LLVM API Documentation
#include <MachineModuleInfo.h>
MachineModuleInfo - This class contains meta information specific to a module. Queries can be made by different debugging and exception handling schemes and reformated for specific use.
Definition at line 97 of file MachineModuleInfo.h.
Definition at line 172 of file MachineModuleInfo.h.
Definition at line 260 of file MachineModuleInfo.cpp.
References llvm_unreachable.
MachineModuleInfo::MachineModuleInfo | ( | const MCAsmInfo & | MAI, |
const MCRegisterInfo & | MRI, | ||
const MCObjectFileInfo * | MOFI | ||
) |
Definition at line 253 of file MachineModuleInfo.cpp.
References llvm::PassRegistry::getPassRegistry(), and llvm::initializeMachineModuleInfoPass().
Definition at line 267 of file MachineModuleInfo.cpp.
void MachineModuleInfo::addCatchTypeInfo | ( | MachineBasicBlock * | LandingPad, |
ArrayRef< const GlobalVariable * > | TyInfo | ||
) |
addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
Definition at line 429 of file MachineModuleInfo.cpp.
References getOrCreateLandingPadInfo(), getTypeIDFor(), N, llvm::ArrayRef< T >::size(), and llvm::LandingPadInfo::TypeIds.
Referenced by llvm::AddCatchInfo(), and llvm::AddLandingPadInfo().
void MachineModuleInfo::addCleanup | ( | MachineBasicBlock * | LandingPad | ) |
addCleanup - Add a cleanup action for a landing pad.
Definition at line 450 of file MachineModuleInfo.cpp.
References getOrCreateLandingPadInfo(), and llvm::LandingPadInfo::TypeIds.
Referenced by llvm::AddCatchInfo(), and llvm::AddLandingPadInfo().
void MachineModuleInfo::addFilterTypeInfo | ( | MachineBasicBlock * | LandingPad, |
ArrayRef< const GlobalVariable * > | TyInfo | ||
) |
addFilterTypeInfo - Provide the filter typeinfo for a landing pad.
Definition at line 439 of file MachineModuleInfo.cpp.
References getFilterIDFor(), getOrCreateLandingPadInfo(), getTypeIDFor(), I, llvm::ArrayRef< T >::size(), and llvm::LandingPadInfo::TypeIds.
Referenced by llvm::AddCatchInfo(), and llvm::AddLandingPadInfo().
unsigned LLVM_ATTRIBUTE_UNUSED_RESULT llvm::MachineModuleInfo::addFrameInst | ( | const MCCFIInstruction & | Inst | ) | [inline] |
Definition at line 241 of file MachineModuleInfo.h.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), EmitCfiOffset(), EmitDefCfaOffset(), EmitDefCfaRegister(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), and llvm::SystemZFrameLowering::emitPrologue().
void MachineModuleInfo::addInvoke | ( | MachineBasicBlock * | LandingPad, |
MCSymbol * | BeginLabel, | ||
MCSymbol * | EndLabel | ||
) |
addInvoke - Provide the begin and end labels of an invoke style call and associate it with a try landing pad block.
Definition at line 391 of file MachineModuleInfo.cpp.
References llvm::LandingPadInfo::BeginLabels, llvm::LandingPadInfo::EndLabels, getOrCreateLandingPadInfo(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
Referenced by llvm::SelectionDAGBuilder::LowerCallTo().
MCSymbol * MachineModuleInfo::addLandingPad | ( | MachineBasicBlock * | LandingPad | ) |
addLandingPad - Add a new panding pad. Returns the label ID for the landing pad entry.
addLandingPad - Provide the label of a try LandingPad block.
Definition at line 400 of file MachineModuleInfo.cpp.
References llvm::MCContext::CreateTempSymbol(), getOrCreateLandingPadInfo(), and llvm::LandingPadInfo::LandingPadLabel.
void MachineModuleInfo::addPersonality | ( | MachineBasicBlock * | LandingPad, |
const Function * | Personality | ||
) |
addPersonality - Provide the personality function for the exception information.
Definition at line 409 of file MachineModuleInfo.cpp.
References getOrCreateLandingPadInfo(), and llvm::LandingPadInfo::Personality.
Referenced by llvm::AddCatchInfo(), and llvm::AddLandingPadInfo().
void MachineModuleInfo::AnalyzeModule | ( | const Module & | M | ) |
AnalyzeModule - Scan the module for global debug information.
Definition at line 319 of file MachineModuleInfo.cpp.
References F(), llvm::Module::getGlobalVariable(), llvm::GlobalVariable::getInitializer(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::GlobalVariable::hasInitializer(), llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::Value::stripPointerCasts().
Referenced by llvm::AsmPrinter::doInitialization().
bool llvm::MachineModuleInfo::callsEHReturn | ( | ) | const [inline] |
Definition at line 219 of file MachineModuleInfo.h.
Referenced by findDeadCallerSavedReg(), llvm::X86FrameLowering::hasFP(), and llvm::XCoreFrameLowering::processFunctionBeforeCalleeSavedScan().
bool llvm::MachineModuleInfo::callsUnwindInit | ( | ) | const [inline] |
Definition at line 222 of file MachineModuleInfo.h.
Referenced by llvm::X86FrameLowering::hasFP(), and llvm::XCoreFrameLowering::processFunctionBeforeCalleeSavedScan().
bool MachineModuleInfo::doFinalization | ( | Module & | ) | [override, virtual] |
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run.
Reimplemented from llvm::Pass.
Definition at line 285 of file MachineModuleInfo.cpp.
References llvm::MCContext::reset().
bool MachineModuleInfo::doInitialization | ( | Module & | ) | [override, virtual] |
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run.
Reimplemented from llvm::Pass.
Definition at line 270 of file MachineModuleInfo.cpp.
void MachineModuleInfo::EndFunction | ( | ) |
EndFunction - Discard function meta information.
Definition at line 302 of file MachineModuleInfo.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::clear(), llvm::SmallVectorImpl< T >::clear(), and VariableDbgInfos.
Referenced by llvm::AsmPrinter::EmitFunctionBody().
getAddrLabelSymbol - Return the symbol to be used for the specified basic block when its address is taken. This cannot be its normal LBB label because the block may be accessed outside its containing function.
Definition at line 340 of file MachineModuleInfo.cpp.
References llvm::MMIAddrLabelMap::getAddrLabelSymbol().
Referenced by llvm::AsmPrinter::GetBlockAddressSymbol().
std::vector< MCSymbol * > MachineModuleInfo::getAddrLabelSymbolToEmit | ( | const BasicBlock * | BB | ) |
getAddrLabelSymbolToEmit - Return the symbol to be used for the specified basic block when its address is taken. If other blocks were RAUW'd to this one, we may have to emit them as well, return the whole set.
Definition at line 351 of file MachineModuleInfo.cpp.
References llvm::MMIAddrLabelMap::getAddrLabelSymbolToEmit().
Referenced by llvm::AsmPrinter::EmitBasicBlockStart().
unsigned llvm::MachineModuleInfo::getCallSiteBeginLabel | ( | MCSymbol * | BeginLabel | ) | [inline] |
getCallSiteBeginLabel - Get the call site number for a begin label.
Definition at line 356 of file MachineModuleInfo.h.
References hasCallSiteBeginLabel().
Referenced by llvm::EHStreamer::computeCallSiteTable().
SmallVectorImpl<unsigned>& llvm::MachineModuleInfo::getCallSiteLandingPad | ( | MCSymbol * | Sym | ) | [inline] |
getCallSiteLandingPad - Get the call site indexes for a landing pad EH symbol.
Definition at line 338 of file MachineModuleInfo.h.
References hasCallSiteLandingPad().
const MCContext& llvm::MachineModuleInfo::getContext | ( | ) | const [inline] |
Definition at line 189 of file MachineModuleInfo.h.
Referenced by addPassesToGenerateCode(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::DwarfDebug::beginInstruction(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::DwarfDebug::endInstruction(), and llvm::SelectionDAGBuilder::LowerCallTo().
MCContext& llvm::MachineModuleInfo::getContext | ( | ) | [inline] |
Definition at line 190 of file MachineModuleInfo.h.
unsigned llvm::MachineModuleInfo::getCurrentCallSite | ( | ) | [inline] |
getCurrentCallSite - Get the call site currently being processed, if any. return zero if none.
Definition at line 373 of file MachineModuleInfo.h.
Referenced by llvm::SelectionDAGBuilder::LowerCallTo().
int MachineModuleInfo::getFilterIDFor | ( | std::vector< unsigned > & | TyIds | ) |
getFilterIDFor - Return the id of the filter encoded by TyIds. This is function wide.
getFilterIDFor - Return the filter id for the specified typeinfos. This is function wide.
Definition at line 519 of file MachineModuleInfo.cpp.
References I.
Referenced by addFilterTypeInfo().
const std::vector<unsigned>& llvm::MachineModuleInfo::getFilterIds | ( | ) | const [inline] |
getFilterIds - Return a reference to the typeids encoding filters used in the current function.
Definition at line 383 of file MachineModuleInfo.h.
Referenced by llvm::EHStreamer::computeActionsTable(), llvm::EHStreamer::emitExceptionTable(), and llvm::EHStreamer::emitTypeInfos().
const std::vector<MCCFIInstruction>& llvm::MachineModuleInfo::getFrameInstructions | ( | ) | const [inline] |
Returns a reference to a list of cfi instructions in the current function's prologue. Used to construct frame maps for debug and exception handling comsumers.
Definition at line 236 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::emitCFIInstruction().
const std::vector<LandingPadInfo>& llvm::MachineModuleInfo::getLandingPads | ( | ) | const [inline] |
getLandingPads - Return a reference to the landing pad info for the current function.
Definition at line 328 of file MachineModuleInfo.h.
Referenced by llvm::Win64Exception::beginFunction(), llvm::DwarfCFIException::beginFunction(), llvm::EHStreamer::emitExceptionTable(), and llvm::ARMException::endFunction().
const Module* llvm::MachineModuleInfo::getModule | ( | ) | const [inline] |
Definition at line 193 of file MachineModuleInfo.h.
Referenced by llvm::DwarfDebug::beginModule(), llvm::DwarfDebug::DwarfDebug(), EmitGCCInlineAsmStr(), EmitMSInlineAsmStr(), and llvm::WinCodeViewLineTables::WinCodeViewLineTables().
Ty& llvm::MachineModuleInfo::getObjFileInfo | ( | ) | [inline] |
getInfo - Keep track of various per-function pieces of information for backends that would like to do so.
Definition at line 199 of file MachineModuleInfo.h.
Referenced by llvm::SystemZAsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), getMachOMMI(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), and printSymbolOperand().
const Ty& llvm::MachineModuleInfo::getObjFileInfo | ( | ) | const [inline] |
Definition at line 206 of file MachineModuleInfo.h.
LandingPadInfo & MachineModuleInfo::getOrCreateLandingPadInfo | ( | MachineBasicBlock * | LandingPad | ) |
getOrCreateLandingPadInfo - Find or create an LandingPadInfo for the specified MachineBasicBlock.
Definition at line 377 of file MachineModuleInfo.cpp.
References llvm::LandingPadInfo::LandingPadBlock, and N.
Referenced by addCatchTypeInfo(), addCleanup(), addFilterTypeInfo(), addInvoke(), addLandingPad(), and addPersonality().
const std::vector<const Function *>& llvm::MachineModuleInfo::getPersonalities | ( | ) | const [inline] |
getPersonalities - Return array of personality functions ever seen.
Definition at line 289 of file MachineModuleInfo.h.
Referenced by llvm::Win64Exception::beginFunction(), llvm::DwarfCFIException::beginFunction(), llvm::ARMException::endFunction(), and llvm::DwarfCFIException::endModule().
const Function * MachineModuleInfo::getPersonality | ( | ) | const |
getPersonality - Return the personality function for the current function.
getPersonality - Return a personality function if available. The presence of one is required to emit exception handling info.
Definition at line 548 of file MachineModuleInfo.cpp.
getPersonalityIndex - Get index of the current personality function inside Personalitites array
getPersonalityIndex - Return unique index for current personality function. NULL/first personality function should always get zero index.
Definition at line 556 of file MachineModuleInfo.cpp.
Referenced by llvm::Win64Exception::beginFunction(), llvm::DwarfCFIException::beginFunction(), and llvm::ARMException::endFunction().
getTypeIDFor - Return the type id for the specified typeinfo. This is function wide.
Definition at line 509 of file MachineModuleInfo.cpp.
References N.
Referenced by addCatchTypeInfo(), and addFilterTypeInfo().
const std::vector<const GlobalVariable *>& llvm::MachineModuleInfo::getTypeInfos | ( | ) | const [inline] |
getTypeInfos - Return a reference to the C++ typeinfo for the current function.
Definition at line 377 of file MachineModuleInfo.h.
Referenced by llvm::EHStreamer::emitExceptionTable(), and llvm::EHStreamer::emitTypeInfos().
Definition at line 398 of file MachineModuleInfo.h.
References VariableDbgInfos.
bool llvm::MachineModuleInfo::hasCallSiteBeginLabel | ( | MCSymbol * | BeginLabel | ) | [inline] |
hasCallSiteBeginLabel - Return true if the begin label has a call site number associated with it.
Definition at line 364 of file MachineModuleInfo.h.
Referenced by getCallSiteBeginLabel().
bool llvm::MachineModuleInfo::hasCallSiteLandingPad | ( | MCSymbol * | Sym | ) | [inline] |
hasCallSiteLandingPad - Return true if the landing pad Eh symbol has an associated call site.
Definition at line 346 of file MachineModuleInfo.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::empty().
Referenced by getCallSiteLandingPad().
bool llvm::MachineModuleInfo::hasDebugInfo | ( | ) | const [inline] |
hasDebugInfo - Returns true if valid debug info is present.
Definition at line 216 of file MachineModuleInfo.h.
Referenced by llvm::WinCodeViewLineTables::beginFunction(), llvm::DwarfDebug::beginFunction(), llvm::AsmPrinter::EmitFunctionBody(), llvm::PPCFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::DwarfDebug::endFunction(), llvm::AsmPrinter::needsCFIMoves(), llvm::XCoreRegisterInfo::needsFrameMoves(), llvm::FastISel::selectIntrinsicCall(), and llvm::FunctionLoweringInfo::set().
bool llvm::MachineModuleInfo::isUsedFunction | ( | const Function * | F | ) | const [inline] |
isUsedFunction - Return true if the functions in the llvm.used list. This does not return true for things in llvm.compiler.used unless they are also in llvm.used.
Definition at line 296 of file MachineModuleInfo.h.
References llvm::SmallPtrSetImpl< PtrType >::count().
void llvm::MachineModuleInfo::setCallsEHReturn | ( | bool | b | ) | [inline] |
Definition at line 220 of file MachineModuleInfo.h.
void llvm::MachineModuleInfo::setCallSiteBeginLabel | ( | MCSymbol * | BeginLabel, |
unsigned | Site | ||
) | [inline] |
setCallSiteBeginLabel - Map the begin label for a call site.
Definition at line 351 of file MachineModuleInfo.h.
Referenced by llvm::SelectionDAGBuilder::LowerCallTo().
void MachineModuleInfo::setCallSiteLandingPad | ( | MCSymbol * | Sym, |
ArrayRef< unsigned > | Sites | ||
) |
setCallSiteLandingPad - Map the landing pad's EH symbol to the call site indexes.
Definition at line 502 of file MachineModuleInfo.cpp.
References llvm::ArrayRef< T >::begin(), and llvm::ArrayRef< T >::end().
void llvm::MachineModuleInfo::setCallsUnwindInit | ( | bool | b | ) | [inline] |
Definition at line 223 of file MachineModuleInfo.h.
void llvm::MachineModuleInfo::setCurrentCallSite | ( | unsigned | Site | ) | [inline] |
setCurrentCallSite - Set the call site currently being processed.
Definition at line 369 of file MachineModuleInfo.h.
Referenced by llvm::SelectionDAGBuilder::LowerCallTo().
void llvm::MachineModuleInfo::setDebugInfoAvailability | ( | bool | avail | ) | [inline] |
Definition at line 217 of file MachineModuleInfo.h.
Referenced by llvm::DwarfDebug::beginModule(), and llvm::WinCodeViewLineTables::WinCodeViewLineTables().
void llvm::MachineModuleInfo::setModule | ( | const Module * | M | ) | [inline] |
Definition at line 192 of file MachineModuleInfo.h.
void llvm::MachineModuleInfo::setUsesVAFloatArgument | ( | bool | b | ) | [inline] |
Definition at line 229 of file MachineModuleInfo.h.
Referenced by llvm::ComputeUsesVAFloatArgument().
void llvm::MachineModuleInfo::setVariableDbgInfo | ( | MDNode * | N, |
unsigned | Slot, | ||
DebugLoc | Loc | ||
) | [inline] |
setVariableDbgInfo - Collect information used to emit debugging information of a variable.
Definition at line 393 of file MachineModuleInfo.h.
References llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and VariableDbgInfos.
Referenced by llvm::FunctionLoweringInfo::set().
void MachineModuleInfo::takeDeletedSymbolsForFunction | ( | const Function * | F, |
std::vector< MCSymbol * > & | Result | ||
) |
takeDeletedSymbolsForFunction - If the specified function has had any references to address-taken blocks generated, but the block got deleted, return the symbol now so we can emit it. This prevents emitting a reference to a symbol that has no definition.
Definition at line 364 of file MachineModuleInfo.cpp.
Referenced by llvm::AsmPrinter::EmitFunctionHeader().
void MachineModuleInfo::TidyLandingPads | ( | DenseMap< MCSymbol *, uintptr_t > * | LPMap = nullptr | ) |
TidyLandingPads - Remap landing pad labels and remove any deleted landing pads.
Definition at line 457 of file MachineModuleInfo.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::LandingPadInfo::BeginLabels, llvm::LandingPadInfo::EndLabels, llvm::SmallVectorImpl< T >::erase(), llvm::MCSymbol::isDefined(), llvm::LandingPadInfo::LandingPadBlock, llvm::LandingPadInfo::LandingPadLabel, and llvm::LandingPadInfo::TypeIds.
Referenced by llvm::Win64Exception::endFunction(), llvm::DwarfCFIException::endFunction(), and llvm::ARMException::endFunction().
bool llvm::MachineModuleInfo::usesVAFloatArgument | ( | ) | const [inline] |
Definition at line 225 of file MachineModuleInfo.h.
Referenced by llvm::ComputeUsesVAFloatArgument(), and llvm::X86AsmPrinter::EmitEndOfAsmFile().
char llvm::MachineModuleInfo::ID [static] |
Definition at line 165 of file MachineModuleInfo.h.
Definition at line 173 of file MachineModuleInfo.h.
Referenced by EndFunction(), getVariableDbgInfo(), and setVariableDbgInfo().