summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-10-15 17:16:32 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-10-15 17:16:32 +0000
commit7fa42c8a8c0eea076a3f114ee7e2f4b1cc4ddd16 (patch)
treee960634edf5a471935ad7d47e60c9fbbca56cd1c /llvm/lib/CodeGen/AsmPrinter
parentd9189ceb23bde1758cc2fa5dd3497679e5fab3dc (diff)
downloadbcm5719-llvm-7fa42c8a8c0eea076a3f114ee7e2f4b1cc4ddd16.tar.gz
bcm5719-llvm-7fa42c8a8c0eea076a3f114ee7e2f4b1cc4ddd16.zip
[AsmPrinter] Prune dead code. NFC.
I left all (dead) print and dump methods in place. llvm-svn: 250433
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp12
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp32
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIEHash.h3
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp13
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h41
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h10
6 files changed, 0 insertions, 111 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
index dfeca1bf2f3..8efa03a8862 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
@@ -56,18 +56,6 @@ void AsmPrinter::EmitULEB128(uint64_t Value, const char *Desc,
OutStreamer->EmitULEB128IntValue(Value, PadTo);
}
-/// EmitCFAByte - Emit a .byte 42 directive for a DW_CFA_xxx value.
-void AsmPrinter::EmitCFAByte(unsigned Val) const {
- if (isVerbose()) {
- if (Val >= dwarf::DW_CFA_offset && Val < dwarf::DW_CFA_offset + 64)
- OutStreamer->AddComment("DW_CFA_offset + Reg (" +
- Twine(Val - dwarf::DW_CFA_offset) + ")");
- else
- OutStreamer->AddComment(dwarf::CallFrameString(Val));
- }
- OutStreamer->EmitIntValue(Val, 1);
-}
-
static const char *DecodeDWARFEncoding(unsigned Encoding) {
switch (Encoding) {
case dwarf::DW_EH_PE_absptr:
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
index 5e60156fdfc..02010654a6f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
@@ -470,38 +470,6 @@ void DIEHash::computeHash(const DIE &Die) {
}
/// This is based on the type signature computation given in section 7.27 of the
-/// DWARF4 standard. It is the md5 hash of a flattened description of the DIE
-/// with the exception that we are hashing only the context and the name of the
-/// type.
-uint64_t DIEHash::computeDIEODRSignature(const DIE &Die) {
-
- // Add the contexts to the hash. We won't be computing the ODR hash for
- // function local types so it's safe to use the generic context hashing
- // algorithm here.
- // FIXME: If we figure out how to account for linkage in some way we could
- // actually do this with a slight modification to the parent hash algorithm.
- if (const DIE *Parent = Die.getParent())
- addParentContext(*Parent);
-
- // Add the current DIE information.
-
- // Add the DWARF tag of the DIE.
- addULEB128(Die.getTag());
-
- // Add the name of the type to the hash.
- addString(getDIEStringAttr(Die, dwarf::DW_AT_name));
-
- // Now get the result.
- MD5::MD5Result Result;
- Hash.final(Result);
-
- // ... take the least significant 8 bytes and return those. Our MD5
- // implementation always returns its results in little endian, swap bytes
- // appropriately.
- return support::endian::read64le(Result + 8);
-}
-
-/// This is based on the type signature computation given in section 7.27 of the
/// DWARF4 standard. It is an md5 hash of the flattened description of the DIE
/// with the inclusion of the full CU and all top level CU entities.
// TODO: Initialize the type chain at 0 instead of 1 for CU signatures.
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIEHash.h b/llvm/lib/CodeGen/AsmPrinter/DIEHash.h
index 833ca0276fd..44f0ce88523 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIEHash.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DIEHash.h
@@ -84,9 +84,6 @@ class DIEHash {
public:
DIEHash(AsmPrinter *A = nullptr) : AP(A) {}
- /// \brief Computes the ODR signature.
- uint64_t computeDIEODRSignature(const DIE &Die);
-
/// \brief Computes the CU signature.
uint64_t computeCUSignature(const DIE &Die);
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 5ceafde575d..b037a162cf1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -214,7 +214,6 @@ static LLVM_CONSTEXPR DwarfAccelTable::Atom TypeAtoms[] = {
DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
: Asm(A), MMI(Asm->MMI), DebugLocs(A->OutStreamer->isVerboseAsm()),
PrevLabel(nullptr), InfoHolder(A, "info_string", DIEValueAllocator),
- UsedNonDefaultText(false),
SkeletonHolder(A, "skel_string", DIEValueAllocator),
IsDarwin(Triple(A->getTargetTriple()).isOSDarwin()),
AccelNames(DwarfAccelTable::Atom(dwarf::DW_ATOM_die_offset,
@@ -343,18 +342,6 @@ void DwarfDebug::addSubprogramNames(const DISubprogram *SP, DIE &Die) {
}
}
-/// isSubprogramContext - Return true if Context is either a subprogram
-/// or another context nested inside a subprogram.
-bool DwarfDebug::isSubprogramContext(const MDNode *Context) {
- if (!Context)
- return false;
- if (isa<DISubprogram>(Context))
- return true;
- if (auto *T = dyn_cast<DIType>(Context))
- return isSubprogramContext(resolve(T->getScope()));
- return false;
-}
-
/// Check whether we should create a DIE for the given Scope, return true
/// if we don't create a DIE (the corresponding DIE is null).
bool DwarfDebug::isLexicalScopeDIENull(LexicalScope *Scope) {
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index e3302d18cac..ffe96ff9f43 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -49,24 +49,6 @@ class DwarfUnit;
class MachineModuleInfo;
//===----------------------------------------------------------------------===//
-/// This class is used to record source line correspondence.
-class SrcLineInfo {
- unsigned Line; // Source line number.
- unsigned Column; // Source column.
- unsigned SourceID; // Source ID number.
- MCSymbol *Label; // Label in code ID number.
-public:
- SrcLineInfo(unsigned L, unsigned C, unsigned S, MCSymbol *label)
- : Line(L), Column(C), SourceID(S), Label(label) {}
-
- // Accessors
- unsigned getLine() const { return Line; }
- unsigned getColumn() const { return Column; }
- unsigned getSourceID() const { return SourceID; }
- MCSymbol *getLabel() const { return Label; }
-};
-
-//===----------------------------------------------------------------------===//
/// This class is used to track local variable information.
///
/// Variables can be created from allocas, in which case they're generated from
@@ -323,13 +305,6 @@ class DwarfDebug : public AsmPrinterHandler {
/// Whether to emit the pubnames/pubtypes sections.
bool HasDwarfPubSections;
- /// Whether or not to use AT_ranges for compilation units.
- bool HasCURanges;
-
- /// Whether we emitted a function into a section other than the
- /// default text.
- bool UsedNonDefaultText;
-
/// Whether to use the GNU TLS opcode (instead of the standard opcode).
bool UseGNUTLSOpcode;
@@ -402,12 +377,6 @@ class DwarfDebug : public AsmPrinterHandler {
/// Construct a DIE for this abstract scope.
void constructAbstractSubprogramScopeDIE(LexicalScope *Scope);
- /// Compute the size and offset of a DIE given an incoming Offset.
- unsigned computeSizeAndOffset(DIE *Die, unsigned Offset);
-
- /// Compute the size and offset of all the DIEs.
- void computeSizeAndOffsets();
-
/// Collect info for variables that were optimized out.
void collectDeadVariables();
@@ -473,9 +442,6 @@ class DwarfDebug : public AsmPrinterHandler {
/// Emit visible names into a debug ranges section.
void emitDebugRanges();
- /// Emit inline info using custom format.
- void emitDebugInlineInfo();
-
/// DWARF 5 Experimental Split Dwarf Emitters
/// Initialize common features of skeleton units.
@@ -486,10 +452,6 @@ class DwarfDebug : public AsmPrinterHandler {
/// section.
DwarfCompileUnit &constructSkeletonCU(const DwarfCompileUnit &CU);
- /// Construct the split debug info compile unit for the debug info
- /// section.
- DwarfTypeUnit &constructSkeletonTU(DwarfTypeUnit &TU);
-
/// Emit the debug info dwo section.
void emitDebugInfoDWO();
@@ -649,9 +611,6 @@ public:
DwarfCompileUnit *lookupUnit(const DIE *CU) const {
return CUDieMap.lookup(CU);
}
- /// isSubprogramContext - Return true if Context is either a subprogram
- /// or another context nested inside a subprogram.
- bool isSubprogramContext(const MDNode *Context);
void addSubprogramNames(const DISubprogram *SP, DIE &Die);
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
index ee13c390abc..82760bf2183 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
@@ -113,13 +113,6 @@ protected:
DwarfUnit(unsigned UID, dwarf::Tag, const DICompileUnit *CU, AsmPrinter *A,
DwarfDebug *DW, DwarfFile *DWU);
- /// Add a string attribute data and value.
- ///
- /// This is guaranteed to be in the local string pool instead of indirected.
- void addLocalString(DIE &Die, dwarf::Attribute Attribute, StringRef Str);
-
- void addIndexedString(DIE &Die, dwarf::Attribute Attribute, StringRef Str);
-
bool applySubprogramDefinitionAttributes(const DISubprogram *SP, DIE &SPDie);
public:
@@ -162,9 +155,6 @@ public:
virtual void addGlobalType(const DIType *Ty, const DIE &Die,
const DIScope *Context) {}
- /// Add a new name to the namespace accelerator table.
- void addAccelNamespace(StringRef Name, const DIE &Die);
-
/// Returns the DIE map slot for the specified debug variable.
///
/// We delegate the request to DwarfDebug when the MDNode can be part of the
OpenPOWER on IntegriCloud