<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/113432>113432</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            How to measure the complexity of debug information?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          IOVOVHS
      </td>
    </tr>
</table>

<pre>
    The compiler generates debugging information, and the debugger knows how to debug the program by parsing the debugging information. Compared to simple debugging information, complex debugging information must be meaningful to the test debugger, the question is how to measure the complexity of debugging information? Here is a formula to measure the complexity of debugging information, probably equivalent to the significance of this program for testing a debugger. For example:


$$
debugInfoComplexity = \sum_{i=1}^n(LocExprComplexity(i)+LocRangeCount(i)+RegSwitchCount(i))+(InlineDepth*InlineFactor=1.5)
$$

LocExprComplexity(i):loction expression complexity for variable i
LocRangeCount(i):Number of loction ranges
RegSwitchCount:Number of transitions of variable i between registers
InlineDepth:Depth of inlined function
inlinedFactor:maybe 1.5?


$$
CS = (1 * OpCount) + (3 * MemAccesses) + ( 2 * RegAccess) + (2* CondComp) + (1.5*StackOps) + 2.5 * TypeConv + 1.5 * ArithLogicOps
$$

OpCount:Number of opcodes
MemAccesses:Number of memory accesses
RegAccess:Number of register accesses
CondComp:Number of condition calculation
TypeConv:Number of type conversion
...

My understanding of debuggers is shallow, so I can't tell if it makes some sense to use this formula to measure the complexity of a test case for testing a debugger. I'd like to get an acknowledgement or outright dismissal from the developers if I can.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVVtv2zgT_TX0y6CCTPn6oAfHrtEA6RcgKfr6YUSNJG4oUiUpJ_73i5FvSrpZFAsYusycOXM58hBD0LUlysX8Tsx3E-xj43x-__jz8ee350nhymP-oyFQru20IQ81WfIYKUBJRV_X2tagbeV8i1E7K-QW0JYQGzoDyMOLda8BGvcK0Z2sg7_zrvbYQnGE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