LLVM API Documentation

llvm::MachineModuleInfo Class Reference

#include <MachineModuleInfo.h>

Inheritance diagram for llvm::MachineModuleInfo:
[legend]
Collaboration diagram for llvm::MachineModuleInfo:
[legend]

List of all members.

Public Member Functions

 MachineModuleInfo ()
 ~MachineModuleInfo ()
bool doInitialization ()
bool doFinalization ()
void BeginFunction (MachineFunction *MF)
void EndFunction ()
void AnalyzeModule (Module &M)
bool hasDebugInfo () const
void setDebugInfoAvailability (bool avail)
bool callsEHReturn () const
void setCallsEHReturn (bool b)
bool callsUnwindInit () const
void setCallsUnwindInit (bool b)
unsigned NextLabelID ()
unsigned RecordSourceLine (unsigned Line, unsigned Column, unsigned Source)
void InvalidateLabel (unsigned LabelID)
void RemapLabel (unsigned OldLabelID, unsigned NewLabelID)
unsigned MappedLabel (unsigned LabelID) const
const std::vector
< SourceLineInfo > & 
getSourceLines () const
std::vector< MachineMove > & getFrameMoves ()
LandingPadInfo & getOrCreateLandingPadInfo (MachineBasicBlock *LandingPad)
void addInvoke (MachineBasicBlock *LandingPad, unsigned BeginLabel, unsigned EndLabel)
unsigned addLandingPad (MachineBasicBlock *LandingPad)
void addPersonality (MachineBasicBlock *LandingPad, Function *Personality)
unsigned getPersonalityIndex () const
const std::vector< Function * > & getPersonalities () const
 getPersonalities - Return array of personality functions ever seen.
const SmallPtrSet< const
Function *, 32 > & 
getUsedFunctions () const
void addCatchTypeInfo (MachineBasicBlock *LandingPad, std::vector< GlobalVariable * > &TyInfo)
void addFilterTypeInfo (MachineBasicBlock *LandingPad, std::vector< GlobalVariable * > &TyInfo)
void addCleanup (MachineBasicBlock *LandingPad)
unsigned getTypeIDFor (GlobalVariable *TI)
int getFilterIDFor (std::vector< unsigned > &TyIds)
void TidyLandingPads ()
const std::vector
< LandingPadInfo > & 
getLandingPads () const
const std::vector
< GlobalVariable * > & 
getTypeInfos () const
const std::vector< unsigned > & getFilterIds () const
Function * getPersonality () const
 getPersonality - Return the personality function for the current function.

Static Public Attributes

static char ID = 0


Detailed Description

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 100 of file MachineModuleInfo.h.


Constructor & Destructor Documentation

MachineModuleInfo::MachineModuleInfo (  ) 

Definition at line 37 of file MachineModuleInfo.cpp.

MachineModuleInfo::~MachineModuleInfo (  ) 

Definition at line 51 of file MachineModuleInfo.cpp.


Member Function Documentation

bool MachineModuleInfo::doInitialization (  ) 

doInitialization - Initialize the state for a new module.

Definition at line 57 of file MachineModuleInfo.cpp.

bool MachineModuleInfo::doFinalization (  ) 

doFinalization - Tear down the state after completion of a module.

Definition at line 63 of file MachineModuleInfo.cpp.

void MachineModuleInfo::BeginFunction ( MachineFunction *  MF  ) 

BeginFunction - Begin gathering function meta information.

Definition at line 69 of file MachineModuleInfo.cpp.

void MachineModuleInfo::EndFunction (  ) 

EndFunction - Discard function meta information.

Definition at line 75 of file MachineModuleInfo.cpp.

void MachineModuleInfo::AnalyzeModule ( Module &  M  ) 

bool llvm::MachineModuleInfo::hasDebugInfo (  )  const [inline]

void llvm::MachineModuleInfo::setDebugInfoAvailability ( bool  avail  )  [inline]

Definition at line 175 of file MachineModuleInfo.h.

bool llvm::MachineModuleInfo::callsEHReturn (  )  const [inline]

void llvm::MachineModuleInfo::setCallsEHReturn ( bool  b  )  [inline]

Definition at line 178 of file MachineModuleInfo.h.

bool llvm::MachineModuleInfo::callsUnwindInit (  )  const [inline]

Definition at line 180 of file MachineModuleInfo.h.

Referenced by llvm::X86RegisterInfo::hasFP().

void llvm::MachineModuleInfo::setCallsUnwindInit ( bool  b  )  [inline]

Definition at line 181 of file MachineModuleInfo.h.

unsigned llvm::MachineModuleInfo::NextLabelID (  )  [inline]

unsigned llvm::MachineModuleInfo::RecordSourceLine ( unsigned  Line,
unsigned  Column,
unsigned  Source 
)

RecordSourceLine - Records location information and associates it with a label. Returns a unique label ID used to generate a label and provide correspondence to the source line list.

void llvm::MachineModuleInfo::InvalidateLabel ( unsigned  LabelID  )  [inline]

InvalidateLabel - Inhibit use of the specified label # from MachineModuleInfo, for example because the code was deleted.

Definition at line 198 of file MachineModuleInfo.h.

References RemapLabel().

void llvm::MachineModuleInfo::RemapLabel ( unsigned  OldLabelID,
unsigned  NewLabelID 
) [inline]

RemapLabel - Indicate that a label has been merged into another.

Definition at line 205 of file MachineModuleInfo.h.

Referenced by InvalidateLabel(), and llvm::DebugLabelFolder::runOnMachineFunction().

unsigned llvm::MachineModuleInfo::MappedLabel ( unsigned  LabelID  )  const [inline]

MappedLabel - Find out the label's final ID. Zero indicates deletion. ID != Mapped ID indicates that the label was folded into another label.

Definition at line 215 of file MachineModuleInfo.h.

Referenced by TidyLandingPads().

const std::vector<SourceLineInfo>& llvm::MachineModuleInfo::getSourceLines (  )  const [inline]

getSourceLines - Return a vector of source lines.

Definition at line 222 of file MachineModuleInfo.h.

std::vector<MachineMove>& llvm::MachineModuleInfo::getFrameMoves (  )  [inline]

getFrameMoves - Returns a reference to a list of moves done in the current function's prologue. Used to construct frame maps for debug and exception handling comsumers.

Definition at line 229 of file MachineModuleInfo.h.

Referenced by llvm::X86RegisterInfo::emitFrameMoves(), llvm::XCoreRegisterInfo::emitPrologue(), llvm::SPURegisterInfo::emitPrologue(), and llvm::PPCRegisterInfo::emitPrologue().

LandingPadInfo & MachineModuleInfo::getOrCreateLandingPadInfo ( MachineBasicBlock *  LandingPad  ) 

getOrCreateLandingPadInfo - Find or create an LandingPadInfo for the specified MachineBasicBlock.

getOrCreateLandingPadInfo - Find or create an LandingPadInfo for the specified MachineBasicBlock.

Definition at line 112 of file MachineModuleInfo.cpp.

References llvm::LandingPadInfo::LandingPadBlock.

Referenced by addCatchTypeInfo(), addCleanup(), addFilterTypeInfo(), addInvoke(), addLandingPad(), and addPersonality().

void MachineModuleInfo::addInvoke ( MachineBasicBlock *  LandingPad,
unsigned  BeginLabel,
unsigned  EndLabel 
)

addInvoke - Provide the begin and end labels of an invoke style call and associate it with a try landing pad block.

addInvoke - Provide the begin and end labels of an invoke style call and associate it with a try landing pad block.

Definition at line 126 of file MachineModuleInfo.cpp.

References llvm::LandingPadInfo::BeginLabels, llvm::LandingPadInfo::EndLabels, getOrCreateLandingPadInfo(), and llvm::SmallVectorImpl< T >::push_back().

unsigned 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 135 of file MachineModuleInfo.cpp.

References getOrCreateLandingPadInfo(), llvm::LandingPadInfo::LandingPadLabel, and NextLabelID().

void MachineModuleInfo::addPersonality ( MachineBasicBlock *  LandingPad,
Function *  Personality 
)

addPersonality - Provide the personality function for the exception information.

addPersonality - Provide the personality function for the exception information.

Definition at line 144 of file MachineModuleInfo.cpp.

References getOrCreateLandingPadInfo(), and llvm::LandingPadInfo::Personality.

Referenced by llvm::AddCatchInfo().

unsigned MachineModuleInfo::getPersonalityIndex (  )  const

getPersonalityIndex - Get index of the current personality function inside Personalitites array

getPersonalityIndex - Return unique index for current personality function. NULL personality function should always get zero index.

Definition at line 278 of file MachineModuleInfo.cpp.

Referenced by llvm::JITDwarfEmitter::EmitDwarfTable(), and llvm::JITDwarfEmitter::GetDwarfTableSizeInBytes().

const std::vector<Function *>& llvm::MachineModuleInfo::getPersonalities (  )  const [inline]

getPersonalities - Return array of personality functions ever seen.

Definition at line 255 of file MachineModuleInfo.h.

Referenced by llvm::X86ATTAsmPrinter::doFinalization(), llvm::JITDwarfEmitter::EmitDwarfTable(), and llvm::JITDwarfEmitter::GetDwarfTableSizeInBytes().

const SmallPtrSet<const Function *, 32>& llvm::MachineModuleInfo::getUsedFunctions (  )  const [inline]

Definition at line 260 of file MachineModuleInfo.h.

void MachineModuleInfo::addCatchTypeInfo ( MachineBasicBlock *  LandingPad,
std::vector< GlobalVariable * > &  TyInfo 
)

addCatchTypeInfo - Provide the catch typeinfo for a landing pad.

Definition at line 158 of file MachineModuleInfo.cpp.

References getOrCreateLandingPadInfo(), getTypeIDFor(), and llvm::LandingPadInfo::TypeIds.

Referenced by llvm::AddCatchInfo().

void MachineModuleInfo::addFilterTypeInfo ( MachineBasicBlock *  LandingPad,
std::vector< GlobalVariable * > &  TyInfo 
)

addFilterTypeInfo - Provide the filter typeinfo for a landing pad.

Definition at line 167 of file MachineModuleInfo.cpp.

References E, getFilterIDFor(), getOrCreateLandingPadInfo(), getTypeIDFor(), and llvm::LandingPadInfo::TypeIds.

Referenced by llvm::AddCatchInfo().

void MachineModuleInfo::addCleanup ( MachineBasicBlock *  LandingPad  ) 

addCleanup - Add a cleanup action for a landing pad.

Definition at line 178 of file MachineModuleInfo.cpp.

References getOrCreateLandingPadInfo(), and llvm::LandingPadInfo::TypeIds.

Referenced by llvm::AddCatchInfo().

unsigned MachineModuleInfo::getTypeIDFor ( GlobalVariable *  TI  ) 

getTypeIDFor - Return the type id for the specified typeinfo. This is function wide.

getTypeIDFor - Return the type id for the specified typeinfo. This is function wide.

Definition at line 230 of file MachineModuleInfo.cpp.

Referenced by addCatchTypeInfo(), and addFilterTypeInfo().

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 240 of file MachineModuleInfo.cpp.

References E.

Referenced by addFilterTypeInfo().

void MachineModuleInfo::TidyLandingPads (  ) 

TidyLandingPads - Remap landing pad labels and remove any deleted landing pads.

TidyLandingPads - Remap landing pad labels and remove any deleted landing pads.

Definition at line 185 of file MachineModuleInfo.cpp.

References llvm::SmallVectorImpl< T >::begin(), BeginLabel, llvm::LandingPadInfo::BeginLabels, EndLabel, llvm::LandingPadInfo::EndLabels, llvm::SmallVectorImpl< T >::erase(), llvm::LandingPadInfo::LandingPadBlock, llvm::LandingPadInfo::LandingPadLabel, MappedLabel(), and llvm::LandingPadInfo::TypeIds.

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 292 of file MachineModuleInfo.h.

const std::vector<GlobalVariable *>& llvm::MachineModuleInfo::getTypeInfos (  )  const [inline]

getTypeInfos - Return a reference to the C++ typeinfo for the current function.

Definition at line 298 of file MachineModuleInfo.h.

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 304 of file MachineModuleInfo.h.

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 270 of file MachineModuleInfo.cpp.


Member Data Documentation

char MachineModuleInfo::ID = 0 [static]

Definition at line 147 of file MachineModuleInfo.h.

Referenced by NextLabelID().


The documentation for this class was generated from the following files: