[llvm-commits] [llvm] r169758 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/CodeGen/AsmPrinter/DwarfDebug.h test/DebugInfo/X86/fission-cu.ll
Eric Christopher
echristo at gmail.com
Mon Dec 10 11:51:21 PST 2012
Author: echristo
Date: Mon Dec 10 13:51:21 2012
New Revision: 169758
URL: http://llvm.org/viewvc/llvm-project?rev=169758&view=rev
Log:
Use the somewhat semantic term "split dwarf" it more matches what's
going on and makes a lot of the terminology in comments make more sense.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/trunk/test/DebugInfo/X86/fission-cu.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=169758&r1=169757&r2=169758&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Dec 10 13:51:21 2012
@@ -1,3 +1,4 @@
+
//===-- llvm/CodeGen/DwarfDebug.cpp - Dwarf Debug Framework ---------------===//
//
// The LLVM Compiler Infrastructure
@@ -78,8 +79,8 @@
clEnumValEnd),
cl::init(Default));
-static cl::opt<DefaultOnOff> DwarfFission("dwarf-fission", cl::Hidden,
- cl::desc("Output prototype dwarf fission."),
+static cl::opt<DefaultOnOff> SplitDwarf("split-dwarf", cl::Hidden,
+ cl::desc("Output prototype dwarf split debug info."),
cl::values(
clEnumVal(Default, "Default for platform"),
clEnumVal(Enable, "Enabled"),
@@ -156,7 +157,7 @@
: Asm(A), MMI(Asm->MMI), FirstCU(0),
AbbreviationsSet(InitAbbreviationsSetSize),
SourceIdMap(DIEValueAllocator), StringPool(DIEValueAllocator),
- PrevLabel(NULL), GlobalCUIndexCount(0), FissionCU(0) {
+ PrevLabel(NULL), GlobalCUIndexCount(0), SkeletonCU(0) {
NextStringPoolNumber = 0;
DwarfInfoSectionSym = DwarfAbbrevSectionSym = 0;
@@ -183,10 +184,10 @@
} else
HasDwarfAccelTables = DwarfAccelTables == Enable ? true : false;
- if (DwarfFission == Default)
- HasDwarfFission = false;
+ if (SplitDwarf == Default)
+ HasSplitDwarf = false;
else
- HasDwarfFission = DwarfFission == Enable ? true : false;
+ HasSplitDwarf = SplitDwarf == Enable ? true : false;
{
NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);
@@ -652,8 +653,8 @@
if (!FirstCU)
FirstCU = NewCU;
- if (useDwarfFission() && !FissionCU)
- FissionCU = constructFissionCU(N);
+ if (useSplitDwarf() && !SkeletonCU)
+ SkeletonCU = constructSkeletonCU(N);
CUMap.insert(std::make_pair(N, NewCU));
return NewCU;
@@ -903,7 +904,7 @@
// Emit initial sections.
emitSectionLabels();
- if (!useDwarfFission()) {
+ if (!useSplitDwarf()) {
// Emit all the DIEs into a debug info section.
emitDebugInfo();
@@ -982,11 +983,11 @@
E = CUMap.end(); I != E; ++I)
delete I->second;
- delete FissionCU;
+ delete SkeletonCU;
// Reset these for the next Module if we have one.
FirstCU = NULL;
- FissionCU = NULL;
+ SkeletonCU = NULL;
}
// Find abstract variable, if any, associated with Var.
@@ -1678,14 +1679,14 @@
// Compute the size and offset of all the DIEs.
void DwarfDebug::computeSizeAndOffsets() {
- if (FissionCU) {
+ if (SkeletonCU) {
unsigned Offset =
sizeof(int32_t) + // Length of Compilation Unit Info
sizeof(int16_t) + // DWARF version number
sizeof(int32_t) + // Offset Into Abbrev. Section
sizeof(int8_t); // Pointer Size (in bytes)
- computeSizeAndOffset(FissionCU->getCUDie(), Offset);
+ computeSizeAndOffset(SkeletonCU->getCUDie(), Offset);
}
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),
E = CUMap.end(); I != E; ++I) {
@@ -1852,10 +1853,10 @@
// Emit the debug info section.
void DwarfDebug::emitDebugInfo() {
- if (!useDwarfFission())
+ if (!useSplitDwarf())
emitCompileUnits(Asm->getObjFileLowering().getDwarfInfoSection());
else
- emitFissionSkeletonCU(Asm->getObjFileLowering().getDwarfInfoSection());
+ emitSkeletonCU(Asm->getObjFileLowering().getDwarfInfoSection());
}
// Emit the abbreviation section.
@@ -2324,7 +2325,7 @@
// DW_AT_low_pc, DW_AT_high_pc, DW_AT_ranges, DW_AT_dwo_name, DW_AT_dwo_id,
// DW_AT_ranges_base, DW_AT_addr_base. If DW_AT_ranges is present,
// DW_AT_low_pc and DW_AT_high_pc are not used, and vice versa.
-CompileUnit *DwarfDebug::constructFissionCU(const MDNode *N) {
+CompileUnit *DwarfDebug::constructSkeletonCU(const MDNode *N) {
DICompileUnit DIUnit(N);
StringRef FN = DIUnit.getFilename();
CompilationDir = DIUnit.getDirectory();
@@ -2354,13 +2355,13 @@
return NewCU;
}
-void DwarfDebug::emitFissionSkeletonCU(const MCSection *Section) {
+void DwarfDebug::emitSkeletonCU(const MCSection *Section) {
Asm->OutStreamer.SwitchSection(Section);
- DIE *Die = FissionCU->getCUDie();
+ DIE *Die = SkeletonCU->getCUDie();
// Emit the compile units header.
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("skel_info_begin",
- FissionCU->getUniqueID()));
+ SkeletonCU->getUniqueID()));
// Emit size of content not including length itself
unsigned ContentSize = Die->getSize() +
@@ -2380,7 +2381,7 @@
emitDIE(Die);
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("skel_info_end",
- FissionCU->getUniqueID()));
+ SkeletonCU->getUniqueID()));
}
@@ -2388,6 +2389,6 @@
// Emit the .debug_info.dwo section for fission. This contains the compile
// units that would normally be in debug_info.
void DwarfDebug::emitDebugInfoDWO() {
- assert(useDwarfFission() && "Got fission?");
+ assert(useSplitDwarf() && "No split dwarf debug info?");
emitCompileUnits(Asm->getObjFileLowering().getDwarfInfoDWOSection());
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=169758&r1=169757&r2=169758&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Mon Dec 10 13:51:21 2012
@@ -318,7 +318,7 @@
// DWARF5 Experimental Options
bool HasDwarfAccelTables;
- bool HasDwarfFission;
+ bool HasSplitDwarf;
// Fission Variables
// In general these will all be for bits that are left in the
@@ -326,7 +326,7 @@
// to be in the .dwo sections.
// The CU left in the original object file for Fission debug info.
- CompileUnit *FissionCU;
+ CompileUnit *SkeletonCU;
private:
@@ -428,13 +428,14 @@
/// \brief Emit inline info using custom format.
void emitDebugInlineInfo();
- /// DWARF 5 Experimental Fission Emitters
+ /// DWARF 5 Experimental Split Dwarf Emitters
- /// \brief Construct the fission compile unit for the debug info section.
- CompileUnit *constructFissionCU(const MDNode *);
+ /// \brief Construct the split debug info compile unit for the debug info
+ /// section.
+ CompileUnit *constructSkeletonCU(const MDNode *);
- /// \brief Emit the fission debug info section.
- void emitFissionSkeletonCU(const MCSection *);
+ /// \brief Emit the local split debug info section.
+ void emitSkeletonCU(const MCSection *);
/// \brief Emit the debug info dwo section.
void emitDebugInfoDWO();
@@ -543,8 +544,8 @@
bool useDwarfAccelTables() { return HasDwarfAccelTables; }
/// \brief Returns whether or not to change the current debug info for the
- /// fission proposal support.
- bool useDwarfFission() { return HasDwarfFission; }
+ /// split dwarf proposal support.
+ bool useSplitDwarf() { return HasSplitDwarf; }
};
} // End of namespace llvm
Modified: llvm/trunk/test/DebugInfo/X86/fission-cu.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-cu.ll?rev=169758&r1=169757&r2=169758&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-cu.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-cu.ll Mon Dec 10 13:51:21 2012
@@ -1,4 +1,4 @@
-; RUN: llc -dwarf-fission=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
; RUN: llvm-dwarfdump %t | FileCheck %s
@a = common global i32 0, align 4
More information about the llvm-commits
mailing list