1. Jul 26, 2014
    • Duncan P. N. Exon Smith's avatar
      Move -verify-use-list-order into llvm-uselistorder · 4b4d8ecd
      Duncan P. N. Exon Smith authored
      Ugh.  Turns out not even transformation passes link in how to read IR.
      I sincerely believe the buildbots will finally agree with my system
      after this though.  (I don't really understand why all of this has been
      working on my system, but not on all the buildbots.)
      
      Create a new tool called llvm-uselistorder to use for verifying use-list
      order.  For now, just dump everything from the (now defunct)
      -verify-use-list-order pass into the tool.
      
      This might be a better way to test use-list order anyway.
      
      Part of PR5680.
      
      llvm-svn: 213957
      4b4d8ecd
    • David Blaikie's avatar
      Reapply "DebugInfo: Don't put fission type units in comdat sections." · 29459ae8
      David Blaikie authored
      This recommits r208930, r208933, and r208975 (by reverting r209338) and
      reverts r209529 (the FIXME to readd this functionality once the tools
      were fixed) now that DWP has been fixed to cope with a single section
      for all fission type units.
      
      Original commit message:
      
      "Since type units in the dwo file are handled by a debug aware tool,
      they don't need to leverage the ELF comdat grouping to implement
      deduplication. Avoid creating all the .group sections for these as a
      space optimization."
      
      llvm-svn: 213956
      29459ae8
    • Hal Finkel's avatar
      Claim AA generally as code owner · 869b0a1f
      Hal Finkel authored
      As per nominations from Chandler and Arnold.
      
      llvm-svn: 213955
      869b0a1f
    • Hans Wennborg's avatar
      Fix MSVC2012 build error in UseListOrder.cpp · 82f490c0
      Hans Wennborg authored
      I think the compiler got confused by the nested DEBUG macros.
      It was failing with:
      
        UseListOrder.cpp(80) : error C2059: syntax error : '}'
      
      llvm-svn: 213954
      82f490c0
    • Duncan P. N. Exon Smith's avatar
      Bitcode: Don't optimize constants when preserving use-list order · 15eb0ab2
      Duncan P. N. Exon Smith authored
      `ValueEnumerator::OptimizeConstants()` creates forward references within
      the constant pools, which makes predicting constants' use-list order
      difficult.  For now, just disable the optimization.
      
      This can be re-enabled in the future in one of two ways:
      
        - Enable a limited version of this optimization that doesn't create
          forward references.  One idea is to categorize constants by their
          "height" and make that the top-level sort.
      
        - Enable it entirely.  This requires predicting how may times each
          constant will be recreated as its operands' and operands' operands'
          (etc.) forward references get resolved.
      
      This is part of PR5680.
      
      llvm-svn: 213953
      15eb0ab2
    • David Blaikie's avatar
      Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for... · 2f040114
      David Blaikie authored
      Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information.
      
      Reverted by Eric Christopher (Thanks!) in r212203 after Bob Wilson
      reported LTO issues. Duncan Exon Smith and Aditya Nandakumar helped
      provide a reduced reproduction, though the failure wasn't too hard to
      guess, and even easier with the example to confirm.
      
      The assertion that the subprogram metadata associated with an
      llvm::Function matches the scope data referenced by the DbgLocs on the
      instructions in that function is not valid under LTO. In LTO, a C++
      inline function might exist in multiple CUs and the subprogram metadata
      nodes will refer to the same llvm::Function. In this case, depending on
      the order of the CUs, the first intance of the subprogram metadata may
      not be the one referenced by the instructions in that function and the
      assertion will fail.
      
      A test case (test/DebugInfo/cross-cu-linkonce-distinct.ll) is added, the
      assertion removed and a comment added to explain this situation.
      
      This was then reverted again in r213581 as it caused PR20367. The root
      cause of this was the early exit in LiveDebugVariables meant that
      spurious DBG_VALUE intrinsics that referenced dead variables were not
      removed, causing an assertion/crash later on. The fix is to have
      LiveDebugVariables strip all DBG_VALUE intrinsics in functions without
      debug info as they're not needed anyway. Test case added to cover this
      situation (that occurs when a debug-having function is inlined into a
      nodebug function) in test/DebugInfo/X86/nodebug_with_debug_loc.ll
      
      Original commit message:
      
      If a function isn't actually in a CU's subprogram list in the debug info
      metadata, ignore all the DebugLocs and don't try to build scopes, track
      variables, etc.
      
      While this is possibly a minor optimization, it's also a correctness fix
      for an incoming patch that will add assertions to LexicalScopes and the
      debug info verifier to ensure that all scope chains lead to debug info
      for the current function.
      
      Fix up a few test cases that had broken/incomplete debug info that could
      violate this constraint.
      
      Add a test case where this occurs by design (inlining a
      debug-info-having function in an attribute nodebug function - we want
      this to work because /if/ the nodebug function is then inlined into a
      debug-info-having function, it should be fine (and will work fine - we
      just stitch the scopes up as usual), but should the inlining not happen
      we need to not assert fail either).
      
      llvm-svn: 213952
      2f040114
    • David Blaikie's avatar
      DebugInfo: Fix up some test cases to have more correct debug info metadata. · 48af9c35
      David Blaikie authored
      * Add CUs to the named CU node
      * Add missing DW_TAG_subprogram nodes
      * Add llvm::Functions to the DW_TAG_subprogram nodes
      
      This cleans up the tests so that they don't break under a
      soon-to-be-made change that is more strict about such things.
      
      llvm-svn: 213951
      48af9c35
  2. Jul 25, 2014