30#ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H
31#define LLVM_CODEGEN_MACHINEMODULEINFO_H
46class LLVMTargetMachine;
59 using SymbolListTy = std::vector<std::pair<MCSymbol *, StubValueTy>>;
87 const Module *TheModule =
nullptr;
98 unsigned CurCallSite = 0;
109 bool DbgInfoAvailable =
false;
113 bool UsesMSVCFloatingPoint =
false;
118 unsigned NextFnNum = 0;
119 const Function *LastRequest =
nullptr;
140 return ExternalContext ? *ExternalContext :
Context;
143 return ExternalContext ? *ExternalContext :
Context;
165 template<
typename Ty>
167 if (ObjFileMMI ==
nullptr)
168 ObjFileMMI =
new Ty(*
this);
169 return *
static_cast<Ty*
>(ObjFileMMI);
172 template<
typename Ty>
This file defines the DenseMap class.
Machine Check Debug Module
const char LLVMTargetMachineRef TM
This header defines various interfaces for pass management in LLVM.
This file defines the PointerIntPair class.
API to communicate dependencies between analyses during invalidation.
A container for analyses that lazily runs them and caches their results.
ImmutablePass class - This class is used to provide information that does not need to be run.
This class describes a target machine that is implemented with the LLVM target-independent code gener...
Context object for machine code objects.
An analysis that produces MachineInfo for a module.
MachineModuleAnalysis(const LLVMTargetMachine *TM)
MachineModuleInfo run(Module &M, ModuleAnalysisManager &)
Run the analysis pass and produce machine module information.
This class can be derived from and used by targets to hold private target-specific information for ea...
std::vector< std::pair< MCSymbol *, StubValueTy > > SymbolListTy
static SymbolListTy getSortedStubs(DenseMap< MCSymbol *, StubValueTy > &)
Return the entries from a DenseMap in a deterministic sorted orer.
virtual ~MachineModuleInfoImpl()
const MachineModuleInfo & getMMI() const
bool doFinalization(Module &) override
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...
MachineModuleInfo & getMMI()
bool doInitialization(Module &) override
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
This class contains meta information specific to a module.
void insertFunction(const Function &F, std::unique_ptr< MachineFunction > &&MF)
Add an externally created MachineFunction MF for F.
const Ty & getObjFileInfo() const
const MCContext & getContext() const
const Module * getModule() const
void setCurrentCallSite(unsigned Site)
Set the call site currently being processed.
bool invalidate(Module &, const PreservedAnalyses &, ModuleAnalysisManager::Invalidator &)
MachineFunction & getOrCreateMachineFunction(Function &F)
Returns the MachineFunction constructed for the IR function F.
Ty & getObjFileInfo()
Keep track of various per-module pieces of information for backends that would like to do so.
const LLVMTargetMachine & getTarget() const
bool hasDebugInfo() const
Returns true if valid debug info is present.
bool usesMSVCFloatingPoint() const
MachineFunction * getMachineFunction(const Function &F) const
Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr.
unsigned getCurrentCallSite()
Get the call site currently being processed, if any.
void setUsesMSVCFloatingPoint(bool b)
void deleteMachineFunctionFor(Function &F)
Delete the MachineFunction MF and reset the link in the IR Function to Machine Function map.
A Module instance is used to store all the information related to an LLVM module.
PointerIntPair - This class implements a pair of a pointer and small integer.
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...