Changes in directory llvm/lib/CodeGen:
AsmPrinter.cpp updated: 1.140 -> 1.141 BranchFolding.cpp updated: 1.40 -> 1.41 DwarfWriter.cpp updated: 1.116 -> 1.117 PrologEpilogInserter.cpp updated: 1.67 -> 1.68 --- Log message: Change the MachineDebugInfo to MachineModuleInfo to better reflect usage for debugging and exception handling. --- Diffs of the changes: (+41 -41) AsmPrinter.cpp | 4 +-- BranchFolding.cpp | 12 ++++----- DwarfWriter.cpp | 60 +++++++++++++++++++++++------------------------ PrologEpilogInserter.cpp | 6 ++-- 4 files changed, 41 insertions(+), 41 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.140 llvm/lib/CodeGen/AsmPrinter.cpp:1.141 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.140 Fri Jan 26 08:34:51 2007 +++ llvm/lib/CodeGen/AsmPrinter.cpp Fri Jan 26 15:22:28 2007 @@ -102,8 +102,8 @@ SwitchToDataSection(""); // Reset back to no section. - if (MachineDebugInfo *DebugInfo = getAnalysisToUpdate<MachineDebugInfo>()) { - DebugInfo->AnalyzeModule(M); + if (MachineModuleInfo *MMI = getAnalysisToUpdate<MachineModuleInfo>()) { + MMI->AnalyzeModule(M); } return false; Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.40 llvm/lib/CodeGen/BranchFolding.cpp:1.41 --- llvm/lib/CodeGen/BranchFolding.cpp:1.40 Fri Jan 26 08:34:51 2007 +++ llvm/lib/CodeGen/BranchFolding.cpp Fri Jan 26 15:22:28 2007 @@ -18,7 +18,7 @@ #define DEBUG_TYPE "branchfolding" #include "llvm/CodeGen/Passes.h" -#include "llvm/CodeGen/MachineDebugInfo.h" +#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/Target/TargetInstrInfo.h" @@ -40,7 +40,7 @@ virtual bool runOnMachineFunction(MachineFunction &MF); virtual const char *getPassName() const { return "Control Flow Optimizer"; } const TargetInstrInfo *TII; - MachineDebugInfo *MDI; + MachineModuleInfo *MMI; bool MadeChange; private: // Tail Merging. @@ -75,13 +75,13 @@ MBB->removeSuccessor(MBB->succ_end()-1); // If there is DWARF info to active, check to see if there are any LABEL - // records in the basic block. If so, unregister them from MachineDebugInfo. - if (MDI && !MBB->empty()) { + // records in the basic block. If so, unregister them from MachineModuleInfo. + if (MMI && !MBB->empty()) { for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; ++I) { if ((unsigned)I->getOpcode() == TargetInstrInfo::LABEL) { // The label ID # is always operand #0, an immediate. - MDI->InvalidateLabel(I->getOperand(0).getImm()); + MMI->InvalidateLabel(I->getOperand(0).getImm()); } } } @@ -94,7 +94,7 @@ TII = MF.getTarget().getInstrInfo(); if (!TII) return false; - MDI = getAnalysisToUpdate<MachineDebugInfo>(); + MMI = getAnalysisToUpdate<MachineModuleInfo>(); bool EverMadeChange = false; bool MadeChangeThisIteration = true; Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.116 llvm/lib/CodeGen/DwarfWriter.cpp:1.117 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.116 Fri Jan 26 08:19:17 2007 +++ llvm/lib/CodeGen/DwarfWriter.cpp Fri Jan 26 15:22:28 2007 @@ -19,7 +19,7 @@ #include "llvm/Module.h" #include "llvm/Type.h" #include "llvm/CodeGen/AsmPrinter.h" -#include "llvm/CodeGen/MachineDebugInfo.h" +#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineLocation.h" #include "llvm/Support/Dwarf.h" @@ -786,9 +786,9 @@ /// MachineFunction *MF; - /// DebugInfo - Collected debug information. + /// MMI - Collected machine module information. /// - MachineDebugInfo *DebugInfo; + MachineModuleInfo *MMI; /// didInitial - Flag to indicate if initial emission has been done. /// @@ -807,7 +807,7 @@ // /// CompileUnits - All the compile units involved in this build. The index - /// of each entry in this vector corresponds to the sources in DebugInfo. + /// of each entry in this vector corresponds to the sources in MMI. std::vector<CompileUnit *> CompileUnits; /// AbbreviationsSet - Used to uniquely define abbreviations. @@ -1702,8 +1702,8 @@ // FIXME - Ignore inlined functions for the time being. if (!Scope->getParent()) continue; - unsigned StartID = DebugInfo->MappedLabel(Scope->getStartLabelID()); - unsigned EndID = DebugInfo->MappedLabel(Scope->getEndLabelID()); + unsigned StartID = MMI->MappedLabel(Scope->getStartLabelID()); + unsigned EndID = MMI->MappedLabel(Scope->getEndLabelID()); // Ignore empty scopes. if (StartID == EndID && StartID != 0) continue; @@ -1933,7 +1933,7 @@ unsigned LabelID = Move.getLabelID(); if (LabelID) { - LabelID = DebugInfo->MappedLabel(LabelID); + LabelID = MMI->MappedLabel(LabelID); // Throw out move if the label is invalid. if (!LabelID) continue; @@ -2120,9 +2120,9 @@ Asm->EmitInt8(0); Asm->EOL("DW_LNS_const_add_pc arg count"); Asm->EmitInt8(1); Asm->EOL("DW_LNS_fixed_advance_pc arg count"); - const UniqueVector<std::string> &Directories = DebugInfo->getDirectories(); + const UniqueVector<std::string> &Directories = MMI->getDirectories(); const UniqueVector<SourceFileInfo> - &SourceFiles = DebugInfo->getSourceFiles(); + &SourceFiles = MMI->getSourceFiles(); // Emit directories. for (unsigned DirectoryID = 1, NDID = Directories.size(); @@ -2162,7 +2162,7 @@ // Construct rows of the address, source, line, column matrix. for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) { const SourceLineInfo &LineInfo = LineInfos[i]; - unsigned LabelID = DebugInfo->MappedLabel(LineInfo.getLabelID()); + unsigned LabelID = MMI->MappedLabel(LineInfo.getLabelID()); if (!LabelID) continue; unsigned SourceID = LineInfo.getSourceID(); @@ -2295,7 +2295,7 @@ "func_begin", SubprogramCount); Asm->EOL("FDE address range"); - std::vector<MachineMove> &Moves = DebugInfo->getFrameMoves(); + std::vector<MachineMove> &Moves = MMI->getFrameMoves(); EmitFrameMoves("func_begin", SubprogramCount, Moves); @@ -2433,10 +2433,10 @@ /// ConstructCompileUnitDIEs - Create a compile unit DIE for each source and /// header file. void ConstructCompileUnitDIEs() { - const UniqueVector<CompileUnitDesc *> CUW = DebugInfo->getCompileUnits(); + const UniqueVector<CompileUnitDesc *> CUW = MMI->getCompileUnits(); for (unsigned i = 1, N = CUW.size(); i <= N; ++i) { - unsigned ID = DebugInfo->RecordSource(CUW[i]); + unsigned ID = MMI->RecordSource(CUW[i]); CompileUnit *Unit = NewCompileUnit(CUW[i], ID); CompileUnits.push_back(Unit); } @@ -2446,7 +2446,7 @@ /// global variables. void ConstructGlobalDIEs() { std::vector<GlobalVariableDesc *> GlobalVariables = - DebugInfo->getAnchoredDescriptors<GlobalVariableDesc>(*M); + MMI->getAnchoredDescriptors<GlobalVariableDesc>(*M); for (unsigned i = 0, N = GlobalVariables.size(); i < N; ++i) { GlobalVariableDesc *GVD = GlobalVariables[i]; @@ -2458,7 +2458,7 @@ /// subprograms. void ConstructSubprogramDIEs() { std::vector<SubprogramDesc *> Subprograms = - DebugInfo->getAnchoredDescriptors<SubprogramDesc>(*M); + MMI->getAnchoredDescriptors<SubprogramDesc>(*M); for (unsigned i = 0, N = Subprograms.size(); i < N; ++i) { SubprogramDesc *SPD = Subprograms[i]; @@ -2482,7 +2482,7 @@ , RI(Asm->TM.getRegisterInfo()) , M(NULL) , MF(NULL) - , DebugInfo(NULL) + , MMI(NULL) , didInitial(false) , shouldEmit(false) , SubprogramCount(0) @@ -2508,12 +2508,12 @@ // const TargetAsmInfo *getTargetAsmInfo() const { return TAI; } - /// SetDebugInfo - Set DebugInfo when it's known that pass manager has - /// created it. Set by the target AsmPrinter. - void SetDebugInfo(MachineDebugInfo *DI) { + /// SetModuleInfo - Set machine module information when it's known that pass + /// manager has created it. Set by the target AsmPrinter. + void SetModuleInfo(MachineModuleInfo *mmi) { // Make sure initial declarations are made. - if (!DebugInfo && DI->hasInfo()) { - DebugInfo = DI; + if (!MMI && mmi->hasDebugInfo()) { + MMI = mmi; shouldEmit = true; // Emit initial sections @@ -2600,7 +2600,7 @@ Asm->EOL("Dwarf Begin Function"); // Begin accumulating function debug information. - DebugInfo->BeginFunction(MF); + MMI->BeginFunction(MF); // Assumes in correct section after the entry point. EmitLabel("func_begin", ++SubprogramCount); @@ -2616,7 +2616,7 @@ EmitLabel("func_end", SubprogramCount); // Get function line info. - const std::vector<SourceLineInfo> &LineInfos = DebugInfo->getSourceLines(); + const std::vector<SourceLineInfo> &LineInfos = MMI->getSourceLines(); if (!LineInfos.empty()) { // Get section line info. @@ -2629,16 +2629,16 @@ } // Construct scopes for subprogram. - ConstructRootScope(DebugInfo->getRootScope()); + ConstructRootScope(MMI->getRootScope()); // Emit function frame information. EmitFunctionDebugFrame(); // Reset the line numbers for the next function. - DebugInfo->ClearLineInfo(); + MMI->ClearLineInfo(); // Clear function debug information. - DebugInfo->EndFunction(); + MMI->EndFunction(); } }; @@ -2948,10 +2948,10 @@ delete DW; } -/// SetDebugInfo - Set DebugInfo when it's known that pass manager has -/// created it. Set by the target AsmPrinter. -void DwarfWriter::SetDebugInfo(MachineDebugInfo *DI) { - DW->SetDebugInfo(DI); +/// SetModuleInfo - Set machine module info when it's known that pass manager +/// has created it. Set by the target AsmPrinter. +void DwarfWriter::SetModuleInfo(MachineModuleInfo *MMI) { + DW->SetModuleInfo(MMI); } /// BeginModule - Emit all Dwarf sections that should come prior to the Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.67 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.68 --- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.67 Thu Jan 25 16:12:41 2007 +++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Fri Jan 26 15:22:28 2007 @@ -38,10 +38,10 @@ /// frame indexes with appropriate references. /// bool runOnMachineFunction(MachineFunction &Fn) { - // Get MachineDebugInfo so that we can track the construction of the + // Get MachineModuleInfo so that we can track the construction of the // frame. - if (MachineDebugInfo *DI = getAnalysisToUpdate<MachineDebugInfo>()) { - Fn.getFrameInfo()->setMachineDebugInfo(DI); + if (MachineModuleInfo *MMI = getAnalysisToUpdate<MachineModuleInfo>()) { + Fn.getFrameInfo()->setMachineModuleInfo(MMI); } // Allow the target machine to make some adjustments to the function _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits