1. Jul 26, 2014
    • Fariborz Jahanian's avatar
      Objective-C. Warn if protocol used in an @protocol · a57d91c2
      Fariborz Jahanian authored
      expression is a forward declaration as this results
      in undefined behavior. rdar://17768630
      
      llvm-svn: 213968
      a57d91c2
    • Akira Hatanaka's avatar
      [stack protector] Fix a potential security bug in stack protector where the · e5b6e0d2
      Akira Hatanaka authored
      address of the stack guard was being spilled to the stack.
      
      Previously the address of the stack guard would get spilled to the stack if it
      was impossible to keep it in a register. This patch introduces a new target
      independent node and pseudo instruction which gets expanded post-RA to a
      sequence of instructions that load the stack guard value. Register allocator
      can now just remat the value when it can't keep it in a register. 
      
      <rdar://problem/12475629>
      
      llvm-svn: 213967
      e5b6e0d2
    • Brad Smith's avatar
      Fix arc4random detection. · a74e3f0c
      Brad Smith authored
      Patch by Pascal Stumpf.
      
      llvm-svn: 213966
      a74e3f0c
    • Todd Fiala's avatar
      Minor fixups to documentation for Process::Launch()/DoLaunch(). · b1d57feb
      Todd Fiala authored
      The code had moved forward with changes for using ProcessLaunchInfo,
      but the documentation still referred to arguments that no longer
      get passed to these methods.
      
      llvm-svn: 213965
      b1d57feb
    • Rafael Espindola's avatar
      Return a StringRef in getDefaultUniversalArchName. · 42db11e1
      Rafael Espindola authored
      Patch by Stephen Drake.
      
      llvm-svn: 213964
      42db11e1
    • Rafael Espindola's avatar
      Remove dead code. · 78cfa0c7
      Rafael Espindola authored
      llvm-svn: 213963
      78cfa0c7
    • Johannes Doerfert's avatar
      [Fix] Added RuntimeDebugBuilder to the build · efa85040
      Johannes Doerfert authored
      llvm-svn: 213962
      efa85040
    • Hal Finkel's avatar
      [PowerPC] Support TLS on PPC32/ELF · 7c8ae535
      Hal Finkel authored
      Patch by Justin Hibbits!
      
      llvm-svn: 213960
      7c8ae535
    • Juergen Ributzka's avatar
      [FastISel][AArch64] Add support for frameaddress intrinsic. · 5d6c43e2
      Juergen Ributzka authored
      This commit implements the frameaddress intrinsic for the AArch64 architecture
      in FastISel.
      
      There were two test cases that pretty much tested the same, so I combined them
      to a single test case.
      
      Fixes <rdar://problem/17811834>
      
      llvm-svn: 213959
      5d6c43e2
    • David Majnemer's avatar
      clang-cl: Add support for /Zp · 104fb54d
      David Majnemer authored
      CL's /Zp flag is analogous to GCC's -fpack-struct, it controls the
      default maximum alignment of records.
      
      Differential Revision: http://reviews.llvm.org/D4671
      
      llvm-svn: 213958
      104fb54d
    • 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
    • Hal Finkel's avatar
      Add code owner of scoped-noalias metadata · df14364f
      Hal Finkel authored
      Add myself as the code owner for the scoped-noalias metadata I've developed.
      
      llvm-svn: 213950
      df14364f
    • Hal Finkel's avatar
      Convert noalias parameter attributes into noalias metadata during inlining · ff0bcb60
      Hal Finkel authored
      This functionality is currently turned off by default.
      
      Part of the motivation for introducing scoped-noalias metadata is to enable the
      preservation of noalias parameter attribute information after inlining.
      Sometimes this can be inferred from the code in the caller after inlining, but
      often we simply lose valuable information.
      
      The overall process if fairly simple:
       1. Create a new unqiue scope domain.
       2. For each (used) noalias parameter, create a new alias scope.
       3. For each pointer, collect the underlying objects. Add a noalias scope for
          each noalias parameter from which we're not derived (and has not been
          captured prior to that point).
       4. Add an alias.scope for each noalias parameter from which we might be
          derived (or has been captured before that point).
      
      Note that the capture checks apply only if one of the underlying objects is not
      an identified function-local object.
      
      llvm-svn: 213949
      ff0bcb60
    • Hal Finkel's avatar
      Simplify and improve scoped-noalias metadata semantics · 029cde63
      Hal Finkel authored
      In the process of fixing the noalias parameter -> metadata conversion process
      that will take place during inlining (which will be committed soon, but not
      turned on by default), I have come to realize that the semantics provided by
      yesterday's commit are not really what we want. Here's why:
      
      void foo(noalias a, noalias b, noalias c, bool x) {
        *q = x ? a : b;
        *c = *q;
      }
      
      Generically, we know that *c does not alias with *a and with *b (so there is an
      'and' in what we know we're not), and we know that *q might be derived from *a
      or from *b (so there is an 'or' in what we know that we are). So we do not want
      the semantics currently, where any noalias scope matching any alias.scope
      causes a NoAlias return. What we want to know is that the noalias scopes form a
      superset of the alias.scope list (meaning that all the things we know we're not
      is a superset of all of things the other instruction might be).
      
      Making that change, however, introduces a composibility problem. If we inline
      once, adding the noalias metadata, and then inline again adding more, and we
      append new scopes onto the noalias and alias.scope lists each time. But, this
      means that we could change what was a NoAlias result previously into a MayAlias
      result because we appended an additional scope onto one of the alias.scope
      lists. So, instead of giving scopes the ability to have parents (which I had
      borrowed from the TBAA implementation, but seems increasingly unlikely to be
      useful in practice), I've given them domains. The subset/superset condition now
      applies within each domain independently, and we only need it to hold in one
      domain. Each time we inline, we add the new scopes in a new scope domain, and
      everything now composes nicely. In addition, this simplifies the
      implementation.
      
      llvm-svn: 213948
      029cde63
    • Duncan P. N. Exon Smith's avatar
      Try to fix a layering violation introduced by r213945 · 20a005f2
      Duncan P. N. Exon Smith authored
      The dragonegg buildbot (and others?) started failing after
      r213945/r213946 because `llvm-as` wasn't linking in the bitcode reader.
      I think moving the verify functions to the same file as the verify pass
      should fix the build.  Adding a command-line option for maintaining
      use-list order in assembly as a drive-by to prevent warnings about
      unused static functions.
      
      llvm-svn: 213947
      20a005f2
    • Duncan P. N. Exon Smith's avatar
      Fix -Werror build after r213945 · f62acab1
      Duncan P. N. Exon Smith authored
      llvm-svn: 213946
      f62acab1
    • Duncan P. N. Exon Smith's avatar
      IPO: Add use-list-order verifier · 6b6fdc99
      Duncan P. N. Exon Smith authored
      Add a -verify-use-list-order pass, which shuffles use-list order, writes
      to bitcode, reads back, and verifies that the (shuffled) order matches.
      
        - The utility functions live in lib/IR/UseListOrder.cpp.
      
        - Moved (and renamed) the command-line option to enable writing
          use-lists, so that this pass can return early if the use-list orders
          aren't being serialized.
      
      It's not clear that this pass is the right direction long-term (perhaps
      a separate tool instead?), but short-term it's a great way to test the
      use-list order prototype.  I've added an XFAIL-ed testcase that I'm
      hoping to get working pretty quickly.
      
      This is part of PR5680.
      
      llvm-svn: 213945
      6b6fdc99
    • Amara Emerson's avatar
      [ARM] Emit ABI_PCS_R9_use build attribute. · 115d2df8
      Amara Emerson authored
      Patch by Ben Foster!
      
      Differential Revision: http://reviews.llvm.org/D4657
      
      llvm-svn: 213944
      115d2df8
    • Dmitry Vyukov's avatar
      tsan: query RSS every 100ms · 6819cf49
      Dmitry Vyukov authored
      Now that it become faster, it's OK to query it every 100ms again.
      
      llvm-svn: 213943
      6819cf49
    • Dmitry Vyukov's avatar
      tsan: fix and make faster GetRSS · fe17080c
      Dmitry Vyukov authored
      It is currently broken because it reads a wrong value from profile (heap instead of total).
      Also make it faster by reading /proc/self/statm. Reading of /proc/self/smaps
      can consume more than 50% of time on beefy apps if done every 100ms.
      
      llvm-svn: 213942
      fe17080c
    • Viktor Kutuzov's avatar
      Allow initialization of Asan interceptors before the general Asan... · d712403b
      Viktor Kutuzov authored
      Allow initialization of Asan interceptors before the general Asan initialization takes place on FreeBSD
      Differential Revision: http://reviews.llvm.org/D4496
      
      llvm-svn: 213941
      d712403b
    • Viktor Kutuzov's avatar
      2fde54f4
    • Benjamin Kramer's avatar
      Run sort_includes.py on the AArch64 backend. · 1f8930e3
      Benjamin Kramer authored
      No functionality change.
      
      llvm-svn: 213938
      1f8930e3
    • Simon Atanasyan's avatar
      [Driver][Mips] Remove "fp64" directories from the mips-mti-linux-gnu toolchain · 5116b4a9
      Simon Atanasyan authored
      directories description. Released version of this toolchain has not separate
      libraries for -mfp64 command line option.
      
      llvm-svn: 213937
      5116b4a9
    • Chandler Carruth's avatar
      [cmake] Use the external project machinery for libcxxabi so that it can · da490d2e
      Chandler Carruth authored
      be disabled in CMake or relocated if desired.
      
      llvm-svn: 213936
      da490d2e
    • James Molloy's avatar
      Revert part of r206963 · 8a157bf8
      James Molloy authored
      Specifically the part where we removed a warning to be compatible with GCC, which has been widely regarded as a bad idea.
      
      I'm not quite happy with how obtuse this warning is, especially in the fairly common case of a 32-bit integer literal, so I've got another patch awaiting review that adds a fixit to reduce confusion.
      
      llvm-svn: 213935
      8a157bf8
    • NAKAMURA Takumi's avatar
    • NAKAMURA Takumi's avatar
      llvm/test/CodeGen/ARM/inlineasm-global.ll: Avoid specifing source file on llc. · dd620a24
      NAKAMURA Takumi authored
      It sometimes confuses FileCheck. Consider the case that path contains 'stmib'. :)
      
      llvm-svn: 213932
      dd620a24
    • Chandler Carruth's avatar
      [SDAG] Enable the new assert for out-of-range result numbers in · 3de980d2
      Chandler Carruth authored
      SDValues, fixing the two bugs left in the regression suite.
      
      The key for both of these was the use a single value type rather than
      a VTList which caused an unintentionally single-result merge-value node.
      Fix this by getting the appropriate VTList in place.
      
      Doing this exposed that the comments in x86's code abouth how MUL_LOHI
      operands are handle is wrong. The bug with the use of out-of-range
      result numbers was hiding the bug about the order of operands here (as
      best i can tell). There are more places where the code appears to get
      this backwards still...
      
      llvm-svn: 213931
      3de980d2
    • Chandler Carruth's avatar
      [SDAG] Don't insert the VRBase into a mapping from SDValues when the def · eae2d28c
      Chandler Carruth authored
      doesn't actually correspond to an SDValue at all. Fixes most of the
      remaining asserts on out-of-range SDValue result numbers.
      
      llvm-svn: 213930
      eae2d28c
    • Alexander Potapenko's avatar
      [lsan] Follow-up for r213518: replace MAP_ANONYMOUS with MAP_ANON · 08cfa79d
      Alexander Potapenko authored
      (despite it's deprecated on Linux) to remove the ifdefs.
      
      llvm-svn: 213929
      08cfa79d
    • Matt Arsenault's avatar
      Store nodes only have 1 result. · 197a1e26
      Matt Arsenault authored
      llvm-svn: 213928
      197a1e26
    • Alexey Bataev's avatar
      d6c57554
    • Chandler Carruth's avatar
      [SDAG] Start plumbing an assert into SDValues that we don't form one · 94bd553e
      Chandler Carruth authored
      with a result number outside the range of results for the node.
      
      I don't know how we managed to not really check this very basic
      invariant for so long, but the code is *very* broken at this point.
      I have over 270 test failures with the assert enabled. I'm committing it
      disabled so that others can join in the cleanup effort and reproduce the
      issues. I've also included one of the obvious fixes that I already
      found. More fixes to come.
      
      llvm-svn: 213926
      94bd553e