31 #ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H
32 #define LLVM_CODEGEN_MACHINEMODULEINFO_H
44 #include "llvm/Support/DataTypes.h"
56 class MMIAddrLabelMap;
57 class MachineBasicBlock;
58 class MachineFunction;
59 class MachineFunctionInitializer;
74 typedef std::vector<std::pair<MCSymbol*, StubValueTy> >
SymbolListTy;
106 std::vector<const Function *> Personalities;
109 unsigned CurCallSite;
124 bool DbgInfoAvailable;
129 bool UsesVAFloatArgument;
135 bool UsesMorestackAddr;
141 unsigned NextFnNum = 0;
142 const Function *LastRequest =
nullptr;
162 MFInitializer = MFInit;
176 template<
typename Ty>
178 if (ObjFileMMI ==
nullptr)
179 ObjFileMMI =
new Ty(*
this);
180 return *
static_cast<Ty*
>(ObjFileMMI);
183 template<
typename Ty>
193 return UsesVAFloatArgument;
197 UsesVAFloatArgument = b;
201 return UsesMorestackAddr;
205 UsesMorestackAddr = b;
225 std::vector<MCSymbol*> &Result);
242 return Personalities;
const Ty & getObjFileInfo() const
PointerIntPair< MCSymbol *, 1, bool > StubValueTy
bool doFinalization(Module &) override
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
A Module instance is used to store all the information related to an LLVM module. ...
void deleteMachineFunctionFor(Function &F)
Delete the MachineFunction MF and reset the link in the IR Function to Machine Function map...
std::vector< std::pair< MCSymbol *, StubValueTy > > SymbolListTy
void computeUsesVAFloatArgument(const CallInst &I, MachineModuleInfo &MMI)
Determine if any floating-point values are being passed to this variadic function, and set the MachineModuleInfo's usesVAFloatArgument flag if so.
void setCurrentCallSite(unsigned Site)
Set the call site currently being processed.
void takeDeletedSymbolsForFunction(const Function *F, std::vector< MCSymbol * > &Result)
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.
~MachineModuleInfo() override
const Module * getModule() const
MachineModuleInfo(const TargetMachine *TM=nullptr)
bool hasDebugInfo() const
Returns true if valid debug info is present.
bool usesVAFloatArgument() const
Context object for machine code objects.
unsigned getCurrentCallSite()
Get the call site currently being processed, if any.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
ArrayRef< MCSymbol * > getAddrLabelSymbolToEmit(const BasicBlock *BB)
Return the symbol to be used for the specified basic block when its address is taken.
MachineFunction & getMachineFunction(const Function &F)
Returns the MachineFunction constructed for the IR function F.
LLVM Basic Block Representation.
PointerIntPair - This class implements a pair of a pointer and small integer.
void addPersonality(const Function *Personality)
Provide the personality function for the exception information.
MCSymbol * getAddrLabelSymbol(const BasicBlock *BB)
Return the symbol to be used for the specified basic block when its address is taken.
const std::vector< const Function * > & getPersonalities() const
Return array of personality functions ever seen.
Ty & getObjFileInfo()
Keep track of various per-function pieces of information for backends that would like to do so...
void setMachineFunctionInitializer(MachineFunctionInitializer *MFInit)
ImmutablePass class - This class is used to provide information that does not need to be run...
void setDebugInfoAvailability(bool avail)
const MCContext & getContext() const
bool usesMorestackAddr() const
void setUsesMorestackAddr(bool b)
bool doInitialization(Module &) override
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
void setModule(const Module *M)
void setUsesVAFloatArgument(bool b)
Primary interface to the complete machine description for the target machine.
This interface provides a way to initialize machine functions after they are created by the machine f...
This class can be derived from and used by targets to hold private target-specific information for ea...
virtual ~MachineModuleInfoImpl()
static SymbolListTy getSortedStubs(DenseMap< MCSymbol *, StubValueTy > &)
Return the entries from a DenseMap in a deterministic sorted orer.
This class contains meta information specific to a module.