30 #ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H 31 #define LLVM_CODEGEN_MACHINEMODULEINFO_H 49 class LLVMTargetMachine;
50 class MMIAddrLabelMap;
51 class MachineFunction;
63 using SymbolListTy = std::vector<std::pair<MCSymbol *, StubValueTy>>;
100 std::vector<const Function *> Personalities;
103 unsigned CurCallSite;
118 bool DbgInfoAvailable;
122 bool UsesMSVCFloatingPoint;
128 bool UsesMorestackAddr;
138 bool HasNosplitStack;
143 unsigned NextFnNum = 0;
144 const Function *LastRequest =
nullptr;
176 void deleteMachineFunctionFor(
Function &F);
180 template<
typename Ty>
182 if (ObjFileMMI ==
nullptr)
183 ObjFileMMI =
new Ty(*
this);
184 return *
static_cast<Ty*
>(ObjFileMMI);
187 template<
typename Ty>
201 return UsesMorestackAddr;
205 UsesMorestackAddr = b;
209 return HasSplitStack;
217 return HasNosplitStack;
228 return getAddrLabelSymbolToEmit(BB).front();
240 void takeDeletedSymbolsForFunction(
const Function *F,
241 std::vector<MCSymbol*> &Result);
254 void addPersonality(
const Function *Personality);
258 return Personalities;
271 bool doInitialization(
Module &)
override;
272 bool doFinalization(
Module &)
override;
297 #endif // LLVM_CODEGEN_MACHINEMODULEINFO_H
MachineModuleAnalysis(const LLVMTargetMachine *TM)
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. ...
bool hasSplitStack() const
void setCurrentCallSite(unsigned Site)
Set the call site currently being processed.
bool hasNosplitStack() const
Context object for machine code objects.
const MachineModuleInfo & getMMI() const
const MCContext & getContext() const
virtual ~MachineModuleInfoImpl()
unsigned getCurrentCallSite()
Get the call site currently being processed, if any.
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef< StringLiteral > StandardNames)
Initialize the set of available library functions based on the specified target triple.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
MachineModuleInfo & getMMI()
void setHasNosplitStack(bool b)
void setHasSplitStack(bool b)
LLVM Basic Block Representation.
PointerIntPair - This class implements a pair of a pointer and small integer.
void setUsesMSVCFloatingPoint(bool b)
MCSymbol * getAddrLabelSymbol(const BasicBlock *BB)
Return the symbol to be used for the specified basic block when its address is taken.
A CRTP mix-in that provides informational APIs needed for analysis passes.
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)
const LLVMTargetMachine & getTarget() const
An analysis that produces MachineInfo for a module.
bool usesMSVCFloatingPoint() const
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.
const Ty & getObjFileInfo() const
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.
This class can be derived from and used by targets to hold private target-specific information for ea...
A special type used by analysis passes to provide an address that identifies that particular analysis...
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.