31 #ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H
32 #define LLVM_CODEGEN_MACHINEMODULEINFO_H
49 class MachineFunction;
50 class MMIAddrLabelMap;
63 using SymbolListTy = std::vector<std::pair<MCSymbol *, StubValueTy>>;
97 std::vector<const Function *> Personalities;
100 unsigned CurCallSite;
115 bool DbgInfoAvailable;
120 bool UsesVAFloatArgument;
126 bool UsesMorestackAddr;
131 unsigned NextFnNum = 0;
132 const Function *LastRequest =
nullptr;
165 template<
typename Ty>
167 if (ObjFileMMI ==
nullptr)
168 ObjFileMMI =
new Ty(*
this);
169 return *
static_cast<Ty*
>(ObjFileMMI);
172 template<
typename Ty>
182 return UsesVAFloatArgument;
186 UsesVAFloatArgument = b;
190 return UsesMorestackAddr;
194 UsesMorestackAddr = b;
214 std::vector<MCSymbol*> &Result);
231 return Personalities;
246 #endif // LLVM_CODEGEN_MACHINEMODULEINFO_H
const Ty & getObjFileInfo() const
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...
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.
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...
MachineFunction & getOrCreateMachineFunction(const Function &F)
Returns the MachineFunction constructed for the IR function F.
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)
std::vector< std::pair< MCSymbol *, StubValueTy >> SymbolListTy
MachineFunction * getMachineFunction(const Function &F) const
Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr...
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 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.