Go to the documentation of this file.
30 #ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H
31 #define LLVM_CODEGEN_MACHINEMODULEINFO_H
46 class LLVMTargetMachine;
47 class MachineFunction;
60 using SymbolListTy = std::vector<std::pair<MCSymbol *, StubValueTy>>;
100 std::vector<const Function *> Personalities;
103 unsigned CurCallSite;
114 bool DbgInfoAvailable;
118 bool UsesMSVCFloatingPoint;
123 unsigned NextFnNum = 0;
124 const Function *LastRequest =
nullptr;
145 return ExternalContext ? *ExternalContext :
Context;
148 return ExternalContext ? *ExternalContext :
Context;
170 template<
typename Ty>
172 if (ObjFileMMI ==
nullptr)
173 ObjFileMMI =
new Ty(*
this);
174 return *
static_cast<Ty*
>(ObjFileMMI);
177 template<
typename Ty>
204 return Personalities;
252 #endif // LLVM_CODEGEN_MACHINEMODULEINFO_H
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
bool doFinalization(Module &) override
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes...
const MCContext & getContext() const
ImmutablePass class - This class is used to provide information that does not need to be run.
Context object for machine code objects.
MachineModuleAnalysis(const LLVMTargetMachine *TM)
void insertFunction(const Function &F, std::unique_ptr< MachineFunction > &&MF)
Add an externally created MachineFunction MF for F.
std::vector< std::pair< MCSymbol *, StubValueTy > > SymbolListTy
bool hasDebugInfo() const
Returns true if valid debug info is present.
This class can be derived from and used by targets to hold private target-specific information for ea...
An analysis that produces MachineInfo for a module.
void setUsesMSVCFloatingPoint(bool b)
MachineModuleInfo & getMMI()
virtual ~MachineModuleInfoImpl()
void setCurrentCallSite(unsigned Site)
Set the call site currently being processed.
bool invalidate(Module &, const PreservedAnalyses &, ModuleAnalysisManager::Invalidator &)
unsigned getCurrentCallSite()
Get the call site currently being processed, if any.
MachineModuleInfo run(Module &M, ModuleAnalysisManager &)
Run the analysis pass and produce machine module information.
const Ty & getObjFileInfo() const
const LLVMTargetMachine & getTarget() const
the resulting code requires compare and branches when and if the revised code is with conditional branches instead of More there is a byte word extend before each where there should be only and the condition codes are not remembered when the same two values are compared twice More LSR enhancements i8 and i32 load store addressing modes are identical int b
This class contains meta information specific to a module.
MachineModuleInfo(const LLVMTargetMachine *TM=nullptr)
API to communicate dependencies between analyses during invalidation.
const MachineModuleInfo & getMMI() const
static SymbolListTy getSortedStubs(DenseMap< MCSymbol *, StubValueTy > &)
Return the entries from a DenseMap in a deterministic sorted orer.
const std::vector< const Function * > & getPersonalities() const
Return array of personality functions ever seen.
void deleteMachineFunctionFor(Function &F)
Delete the MachineFunction MF and reset the link in the IR Function to Machine Function map.
A special type used by analysis passes to provide an address that identifies that particular analysis...
@ BasicBlock
Various leaf nodes.
A Module instance is used to store all the information related to an LLVM module.
A CRTP mix-in that provides informational APIs needed for analysis passes.
bool doInitialization(Module &) override
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before ...
MachineFunction & getOrCreateMachineFunction(Function &F)
Returns the MachineFunction constructed for the IR function F.
Machine Check Debug Module
MachineFunction * getMachineFunction(const Function &F) const
Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr.
MachineModuleInfoWrapperPass(const LLVMTargetMachine *TM=nullptr)
This class describes a target machine that is implemented with the LLVM target-independent code gener...
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.
A container for analyses that lazily runs them and caches their results.
const char LLVMTargetMachineRef TM
const Module * getModule() const
Ty & getObjFileInfo()
Keep track of various per-module pieces of information for backends that would like to do so.
bool usesMSVCFloatingPoint() const