llvm-project/llvm/test/DebugInfo/MIR/X86
Adrian Prantl 274bcbc139 Improve the accuracy of variable ranges .debug_loc location lists.
For the following motivating example
  bool c();
  void f();
  bool start() {
    bool result = c();
    if (!c()) {
      result = false;
      goto exit;
    }
    f();
    result = true;
  exit:
    return result;
  }

we would previously generate a single DW_AT_const_value(1) because
only the DBG_VALUE in the second-to-last basic block survived
codegen. This patch improves the heuristic used to determine when a
DBG_VALUE is available at the beginning of its variable's enclosing
lexical scope:

- Stop giving singular constants blanket permission to take over the
  entire scope. There is still a special case for constants in the
  function prologue that we also miight want to retire later.

- Use the lexical scope information to determine available-at-entry
  instead of proximity to the function prologue.

After this patch we generate a location list with a more accurate
narrower availability for the constant true value. As a pleasant side
effect, we also generate inline locations instead of location lists
where a loacation covers the entire range of the enclosing lexical
scope.

Measured on compiling llc with four targets this doesn't have an
effect on compile time and reduces the size of the debug info for llc
by ~600K.

rdar://problem/30286912

llvm-svn: 305599
2017-06-16 22:40:04 +00:00
..
bit-piece-dh.mir Improve the accuracy of variable ranges .debug_loc location lists. 2017-06-16 22:40:04 +00:00
empty-inline.mir MIR: remove explicit "noVRegs" property. 2017-05-30 21:28:57 +00:00
lit.local.cfg Recommit LiveDebugValues pass after fixing a couple of minor issues. 2015-12-16 11:09:48 +00:00
live-debug-values-3preds.mir MachineFunctionProperties/MIRParser: Rename AllVRegsAllocated->NoVRegs, compute it 2016-08-25 01:27:13 +00:00
live-debug-values-spill.mir Reapply r294532, reverted in r294787. 2017-02-14 19:08:45 +00:00
live-debug-values.mir [IR] Remove the DIExpression field from DIGlobalVariable. 2016-12-20 02:09:43 +00:00
livedebugvalues-limit.mir Teach LiveDebugValues about lexical scopes. 2016-09-28 17:51:14 +00:00
mlicm-hoist.mir [IR] Remove the DIExpression field from DIGlobalVariable. 2016-12-20 02:09:43 +00:00
no-cfi-loc.mir Recommit r288212: Emit 'no line' information for interesting 'orphan' instructions. 2016-12-12 20:49:11 +00:00