1. Jun 26, 2014
    • Nico Weber's avatar
      Minor libc++abi changes to make things build better with gcc. · 49f09fd8
      Nico Weber authored
      llvm-svn: 211748
      49f09fd8
    • Argyrios Kyrtzidis's avatar
      For CrashRecoveryContext::RunSafelyOnThread, propagate Darwin's PRIO_DARWIN_BG... · e9012b03
      Argyrios Kyrtzidis authored
      For CrashRecoveryContext::RunSafelyOnThread, propagate Darwin's PRIO_DARWIN_BG to the new thread if it is
      set on the calling thread.
      
      This allows libclang's indexing threads to propagate their priority to the clang module building threads.
      
      rdar://17459872
      
      llvm-svn: 211747
      e9012b03
    • Ben Langmuir's avatar
      Make -Wincomplete-umbrella go through the VFS · 54cbc706
      Ben Langmuir authored
      By using vfs::recursive_directory_iterator, this warning will now fire
      when some or all of a module's headers are from VFS mappings.
      
      llvm-svn: 211746
      54cbc706
    • Nico Weber's avatar
      Update libc++abi to use the ARM EHABI unwinder from its libunwind. · ae543870
      Nico Weber authored
      llvm-svn: 211745
      ae543870
    • Michael Liao's avatar
      Fix typo · f2b98709
      Michael Liao authored
      llvm-svn: 211744
      f2b98709
    • Nico Weber's avatar
      Land support for ARM EHABI unwinding for libunwind. · 97080e0c
      Nico Weber authored
      This was written by:
      Albert Wong <ajwong@chromium.org>
      Antoine Labour <piman@chromium.org>
      Dana Jansen <danakj@chromium.org
      Jonathan Roelofs <jonathan@codesourcery.com>
      Nico Weber <thakis@chromium.org>
      
      llvm-svn: 211743
      97080e0c
    • David Blaikie's avatar
      Make PR20038.cpp test case portable to non-Itanium ABIs · e44fd66f
      David Blaikie authored
      The only call in this function is to the dtor, so there's no need to
      name a non-portable mangled function name to match it.
      
      llvm-svn: 211742
      e44fd66f
    • NAKAMURA Takumi's avatar
      2d8dcc5b
    • Juergen Ributzka's avatar
      a13d7d6e
    • Nico Weber's avatar
      Start landing support for ARM EHABI unwinding. · af5ca957
      Nico Weber authored
      The new code will be behind a LIBCXXABI_ARM_EHABI define (so that platforms
      that don't want it can continue using e.g. SJLJ). This commit mostly just
      adds the LIBCXXABI_ARM_EHABI define.
      
      llvm-svn: 211739
      af5ca957
    • Alp Toker's avatar
      Remove REQUIRES lines from portable tests · 262510a4
      Alp Toker authored
      These tests are target-independent and shouldn't ever be suppressed.
      
      llvm-svn: 211738
      262510a4
    • Eric Christopher's avatar
      The includes were sorted. Revert r210578. · dda00098
      Eric Christopher authored
      llvm-svn: 211737
      dda00098
    • Hans Wennborg's avatar
      Don't allow dllimport variables in constant initializers · 82dd877e
      Hans Wennborg authored
      This is a follow-up to David's r211677. For the following code,
      we would end up referring to 'foo' in the initializer for 'arr',
      and then fail to link, because 'foo' is dllimport and needs to be
      accessed through the __imp_?foo.
      
        __declspec(dllimport) extern const char foo[];
        const char* f() {
          static const char* const arr[] = { foo };
          return arr[0];
        }
      
      Differential Revision: http://reviews.llvm.org/D4299
      
      llvm-svn: 211736
      82dd877e
    • Juergen Ributzka's avatar
      [FastISel][X86] Refactor XALU folding. NFC. · c010ddb7
      Juergen Ributzka authored
      llvm-svn: 211735
      c010ddb7
    • Sanjay Patel's avatar
      fixed typos in comment · f0a39960
      Sanjay Patel authored
      llvm-svn: 211734
      f0a39960
    • Aaron Watry's avatar
      relational: Fix signbit · d7f158e0
      Aaron Watry authored
      
      
      The vector components were mistakenly using () instead of {}, which caused
      all but the last vector component to be dropped on the floor.
      
      Signed-off-by: default avatarAaron Watry <awatry@gmail.com>
      Reviewed-by: default avatarJeroen Ketema <j.ketema@imperial.ac.uk>
      llvm-svn: 211733
      d7f158e0
    • Ben Langmuir's avatar
      Add vfs::recursive_directory_iterator · 7c9f6c86
      Ben Langmuir authored
      For now, this is only used by its unit tests.  It is similar to the API
      in llvm::sys::fs::recursive_directory_iterator, but without some of the
      more complex features like requesting that the iterator not recurse into
      the next directory, for example.
      
      llvm-svn: 211732
      7c9f6c86
    • Reid Kleckner's avatar
      Mention that Phabricator users should subscribe to *-commits · 8b91d365
      Reid Kleckner authored
      This probably explains why a lot of messages get lost for first time
      Phabricator users.
      
      llvm-svn: 211731
      8b91d365
    • Juergen Ributzka's avatar
      [FastISel][X86] Only fold the cmp into the select when both instructions are... · 296833cd
      Juergen Ributzka authored
      [FastISel][X86] Only fold the cmp into the select when both instructions are in the same basic block.
      
      If the cmp is in a different basic block, then it is possible that not all
      operands of that compare have defined registers. This can happen when one of
      the operands to the cmp is a load and the load gets folded into the cmp. In
      this case FastISel will skip the load instruction and the vreg is never
      defined.
      
      llvm-svn: 211730
      296833cd
    • Zachary Turner's avatar
      Fix silly compilation error. · cfcd7914
      Zachary Turner authored
      llvm-svn: 211728
      cfcd7914
    • Rafael Espindola's avatar
      Merge the used symbol scanning of MCObjectStreamer and RecordStreamer. · 591c6419
      Rafael Espindola authored
      This completes the refactoring of RecordStreamer.
      
      llvm-svn: 211727
      591c6419
    • Zachary Turner's avatar
      Fix a bug in the IRMemoryMap which generated bogus allocations. · 15362445
      Zachary Turner authored
      Previously, only the starting locations of the candidate interval
      and the existing interval were compared.  To correctly detect
      range intersections, it is necessary to compare the entire range
      of both intervals against each other.
      
      Reviewed by: scallanan
      
      Differential Revision: http://reviews.llvm.org/D4286
      
      llvm-svn: 211726
      15362445
    • Hans Wennborg's avatar
      MS ABI: Propagate class-level DLL attributes to class template specialization bases (PR11170) · 9bea9cc7
      Hans Wennborg authored
      Consider the following code:
      
        template <typename T> class Base {};
        class __declspec(dllexport) class Derived : public Base<int> {}
      
      When the base of an exported or imported class is a class template
      specialization, MSVC will propagate the dll attribute to the base.
      In the example code, Base<int> becomes a dllexported class.
      
      This commit makes Clang do the proopagation when the base hasn't been
      instantiated yet, and warns about it being unsupported otherwise.
      This is different from MSVC, which allows changing a specialization
      back and forth between dllimport and dllexport and seems to let the
      last one win. Changing the dll attribute after instantiation would be
      hard for us, and doesn't seem to come up in practice, so I think this
      is a reasonable limitation to have.
      
      MinGW doesn't do this kind of propagation.
      
      Differential Revision: http://reviews.llvm.org/D4264
      
      llvm-svn: 211725
      9bea9cc7
    • David Blaikie's avatar
      Revert "PR20038: DebugInfo: Inlined call sites where the caller has debug info... · 2952956f
      David Blaikie authored
      Revert "PR20038: DebugInfo: Inlined call sites where the caller has debug info but the call itself has no debug location."
      
      This reverts commit r211723.
      
      Breaks the ASan/compiler-rt build... guess I didn't test very far at all
      :/.
      
      llvm-svn: 211724
      2952956f
    • David Blaikie's avatar
      PR20038: DebugInfo: Inlined call sites where the caller has debug info but the... · 44258458
      David Blaikie authored
      PR20038: DebugInfo: Inlined call sites where the caller has debug info but the call itself has no debug location.
      
      This situation does bad things when inlined, so I've fixed Clang not to
      produce inlinable call sites without locations when the caller has debug
      info (in the one case where I could find that this occurred). This
      updates the PR20038 test case to be what clang now produces, and readds
      the assertion that had to be removed due to this bug.
      
      I've also beefed up the debug info verifier to help diagnose these
      issues in the future, and I hope to add checks to the inliner to just
      assert-fail if it encounters this situation. If, in the future, we
      decide we have to cope with this situation, the right thing to do is
      probably to just remove all the DebugLocs from the inlined instructions.
      
      llvm-svn: 211723
      44258458
    • David Blaikie's avatar
      PR20038: DebugInfo: Call sites without DebugLocs for temporary dtors after a conditional · 21cd7cfd
      David Blaikie authored
      With && at the top level of an expression, the last thing done when
      emitting the expression was an unconditional jump to the cleanup block.
      To reduce the amount of stepping, the DebugLoc is omitted from the
      unconditional jump. This is done by clearing the IRBuilder's
      "CurrentDebugLocation"*. If this is not set to some non-empty value
      before the cleanup block is emitted, the cleanups don't get a location
      either. If a call without a location is emitted in a function with debug
      info, and that call is then inlined - bad things happen. (without a
      location for the call site, the inliner would just leave the inlined
      DebugLocs as they were - pointing to roots in the original function, not
      inlined into the current function)
      
      Follow up commit to LLVM will ensure that breaking the invariants of the
      DebugLoc chains by having chains that don't lead to the current function
      will fail assertions, so we shouldn't accidentally slip any of these
      cases in anymore. Those assertions may reveal further cases that need to
      be fixed in clang, though I've tried to test heavily to avoid that.
      
      * See r128471, r128513 for the code that clears the
        CurrentDebugLocation. Simply removing this code or moving the code
        into IRBuilder to apply to all unconditional branches would regress
        desired behavior, unfortunately.
      
      llvm-svn: 211722
      21cd7cfd
    • Tyler Nowicki's avatar
      Add Rpass-missed and Rpass-analysis reports to the loop vectorizer. The... · 4b07b007
      Tyler Nowicki authored
      Add Rpass-missed and Rpass-analysis reports to the loop vectorizer. The remarks give the vector width of vectorized loops and a brief analysis of loops that fail to be vectorized. For example, an analysis will be generated for loops containing control flow that cannot be simplified to a select. The optimization remarks also give the debug location of expressions that cannot be vectorized, for example the location of an unvectorizable call.
      
      Reviewed by: Arnold Schwaighofer
      
      llvm-svn: 211721
      4b07b007
    • Andrea Di Biagio's avatar
      [X86] Always prefer to lower a VECTOR_SHUFFLE into a BLENDI instead of SHUFP (or VPERM2X128). · 07cdffc3
      Andrea Di Biagio authored
      This patch teaches method 'LowerVECTOR_SHUFFLE' to give higher precedence to
      the check for 'isBlendMask'; the idea is that, when possible, we should firstly
      check if a shuffle performs a blend, and in case, try to lower it into a BLENDI
      instead of selecting a SHUFP or (worse) a VPERM2X128.
      
      In general:
       - AVX VBLENDPS/D always have better latency and throughput than VPERM2F128;
       - BLENDPS/D instructions tend to always have better 'reciprocal throughput'
         than the equivalent SHUFPS/D;
       - Both BLENDPS/D and SHUFPS/D are often decoded into the same number of
         m-ops; however, a m-op obtained from a BLENDPS/D can be scheduled to more
         than one execution port.
      
      This patch:
       - Moves the check for 'isBlendMask' immediately before the check for
         'isSHUFPMask' within method 'LowerVECTOR_SHUFFLE';
       - Updates existing tests for sse/avx shuffle/blend instructions to verify
         that we select (v)blendps/d when possible (instead of (v)shufps/d or
         vperm2f128).
      
      llvm-svn: 211720
      07cdffc3
    • Serge Pavlov's avatar
      Fix treatment of types defined in function prototype · a826147e
      Serge Pavlov authored
      Types defined in function prototype are diagnosed earlier in C++ compilation.
      They are put into declaration context where the prototype is introduced. Later on,
      when FunctionDecl object is created, these types are moved into the function context.
      
      This patch fixes PR19018 and PR18963.
      
      Differential Revision: http://reviews.llvm.org/D4145
      
      llvm-svn: 211718
      a826147e
    • Juergen Ributzka's avatar
      Fix indentation. · 9029bda8
      Juergen Ributzka authored
      llvm-svn: 211717
      9029bda8
    • Saleem Abdulrasool's avatar
      Headers: be a bit more careful about inline asm · 702eefed
      Saleem Abdulrasool authored
      Conditionally include x86intrin.h if we are building for x86 or x86_64.
      Conditionalise definition of inline assembly routines which use x86 or x86_64
      inline assembly. This is needed as clang can target Windows on ARM where these
      definitions may be included into user code.
      
      llvm-svn: 211716
      702eefed
  2. Jun 25, 2014