From 166f843a9f6913e1699b343b8adeecce568274d7 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 26 Jun 2009 01:49:18 +0000 Subject: Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprograms and llvm.dbg.global_variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74251 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/SourceLevelDebugging.html | 53 ------------------------------------------ 1 file changed, 53 deletions(-) (limited to 'docs/SourceLevelDebugging.html') diff --git a/docs/SourceLevelDebugging.html b/docs/SourceLevelDebugging.html index 0b6ed47..11b3600 100644 --- a/docs/SourceLevelDebugging.html +++ b/docs/SourceLevelDebugging.html @@ -24,7 +24,6 @@
  1. Debug information descriptors
      -
    • Anchor descriptors
    • Compile unit descriptors
    • Global variable descriptors
    • Subprogram descriptors
    • @@ -336,58 +335,6 @@ height="369"> - -
      - -
      -
      -%llvm.dbg.anchor.type = type {
      -  i32,   ;; Tag = 0 + LLVMDebugVersion
      -  i32    ;; Tag of descriptors grouped by the anchor
      -}
      -
      -
      - -

      One important aspect of the LLVM debug representation is that it allows the - LLVM debugger to efficiently index all of the global objects without having - to scan the program. To do this, all of the global objects use "anchor" - descriptors with designated names. All of the global objects of a particular - type (e.g., compile units) contain a pointer to the anchor. This pointer - allows a debugger to use def-use chains to find all global objects of that - type.

      - -

      The following names are recognized as anchors by LLVM:

      - -
      -
      -%llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type {
      -  i32 0,
      -  i32 17
      -} ;; DW_TAG_compile_unit
      -%llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type {
      -  i32 0,
      -  i32 52
      -} ;; DW_TAG_variable
      -%llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type {
      -  i32 0,
      -  i32 46
      -} ;; DW_TAG_subprogram
      -
      -
      - -

      Using anchors in this way (where the compile unit descriptor points to the - anchors, as opposed to having a list of compile unit descriptors) allows for - the standard dead global elimination and merging passes to automatically - remove unused debugging information. If the globals were kept track of - through lists, there would always be an object pointing to the descriptors, - thus would never be deleted.

      - -
      - - - -- cgit v1.1