diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2024-07-26 13:10:08 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 13:10:08 +0400 |
commit | 63e1647827f3427c5f3ad37461d84a63ba5fcdaf (patch) | |
tree | a0c9d1914ab82081e3245aebbbee1fff0dbfdcaa /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | 4ce3993ee2b6ee883ef62100df68db9e10ef1dc9 (diff) | |
download | llvm-63e1647827f3427c5f3ad37461d84a63ba5fcdaf.zip llvm-63e1647827f3427c5f3ad37461d84a63ba5fcdaf.tar.gz llvm-63e1647827f3427c5f3ad37461d84a63ba5fcdaf.tar.bz2 |
CodeGen: Remove MachineModuleInfo reference from MachineFunction (#100357)
This avoids another unserializable field. Move the DbgInfoAvailable
field into the AsmPrinter, which is only really a cache/convenience
bit for checking a direct IR module metadata check.
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index f382df1..c664959 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -27,7 +27,6 @@ MachineModuleInfoImpl::~MachineModuleInfoImpl() = default; void MachineModuleInfo::initialize() { ObjFileMMI = nullptr; NextFnNum = 0; - DbgInfoAvailable = false; } void MachineModuleInfo::finalize() { @@ -87,7 +86,7 @@ MachineFunction &MachineModuleInfo::getOrCreateMachineFunction(Function &F) { if (I.second) { // No pre-existing machine function, create a new one. const TargetSubtargetInfo &STI = *TM.getSubtargetImpl(F); - MF = new MachineFunction(F, TM, STI, NextFnNum++, *this); + MF = new MachineFunction(F, TM, STI, getContext(), NextFnNum++); MF->initTargetMachineFunctionInfo(STI); // MRI callback for target specific initializations. @@ -207,7 +206,6 @@ bool MachineModuleInfoWrapperPass::doInitialization(Module &M) { Ctx.diagnose( DiagnosticInfoSrcMgr(SMD, M.getName(), IsInlineAsm, LocCookie)); }); - MMI.DbgInfoAvailable = !M.debug_compile_units().empty(); return false; } @@ -232,6 +230,5 @@ MachineModuleAnalysis::run(Module &M, ModuleAnalysisManager &) { Ctx.diagnose( DiagnosticInfoSrcMgr(SMD, M.getName(), IsInlineAsm, LocCookie)); }); - MMI.DbgInfoAvailable = !M.debug_compile_units().empty(); return Result(MMI); } |