31 #ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H 32 #define LLVM_CODEGEN_MACHINEMODULEINFO_H 49 class LLVMTargetMachine;
50 class MMIAddrLabelMap;
51 class MachineFunction;
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;
136 bool HasNosplitStack;
141 unsigned NextFnNum = 0;
142 const Function *LastRequest =
nullptr;
152 bool doInitialization(
Module &)
override;
153 bool doFinalization(
Module &)
override;
170 void deleteMachineFunctionFor(
Function &F);
174 template<
typename Ty>
176 if (ObjFileMMI ==
nullptr)
177 ObjFileMMI =
new Ty(*
this);
178 return *
static_cast<Ty*
>(ObjFileMMI);
181 template<
typename Ty>
191 return UsesVAFloatArgument;
195 UsesVAFloatArgument = b;
199 return UsesMorestackAddr;
203 UsesMorestackAddr = b;
207 return HasSplitStack;
215 return HasNosplitStack;
226 return getAddrLabelSymbolToEmit(BB).front();
238 void takeDeletedSymbolsForFunction(
const Function *F,
239 std::vector<MCSymbol*> &Result);
252 void addPersonality(
const Function *Personality);
256 return Personalities;
271 #endif // LLVM_CODEGEN_MACHINEMODULEINFO_H
bool hasDebugInfo() const
Returns true if valid debug info is present.
This class represents lattice values for constants.
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. ...
This class represents a function call, abstracting a target machine's calling convention.
bool hasSplitStack() const
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.
bool hasNosplitStack() const
Context object for machine code objects.
const MCContext & getContext() const
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)...
void setHasNosplitStack(bool b)
void setHasSplitStack(bool b)
LLVM Basic Block Representation.
PointerIntPair - This class implements a pair of a pointer and small integer.
MCSymbol * getAddrLabelSymbol(const BasicBlock *BB)
Return the symbol to be used for the specified basic block when its address is taken.
This class describes a target machine that is implemented with the LLVM target-independent code gener...
Ty & getObjFileInfo()
Keep track of various per-function pieces of information for backends that would like to do so...
bool usesMorestackAddr() const
ImmutablePass class - This class is used to provide information that does not need to be run...
void setDebugInfoAvailability(bool avail)
void setUsesMorestackAddr(bool b)
void setUsesVAFloatArgument(bool b)
const Module * getModule() const
std::vector< std::pair< MCSymbol *, StubValueTy > > SymbolListTy
const std::vector< const Function * > & getPersonalities() const
Return array of personality functions ever seen.
bool usesVAFloatArgument() const
const Ty & getObjFileInfo() const
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.