1. Sep 26, 2014
    • Ben Langmuir's avatar
      Move calls to ResolveExceptionSpec out of SetDeclDefaulted and into DefineImplicit* · 2f8e6b87
      Ben Langmuir authored
      This fixes an assertion failure in CodeGen where we were not resolving
      an exception specification.
      
      llvm-svn: 218466
      2f8e6b87
    • Ehsan Akhgari's avatar
      Add support for intercepting functions from msvcr110.dll · 5bb7234b
      Ehsan Akhgari authored
      Summary: This finishes support for ASAN on MSVC2012.
      
      Test Plan: |ninja check-asan| passes locally with this on MSVC2012.
      
      Reviewers: timurrrr
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D5494
      
      llvm-svn: 218465
      5bb7234b
    • Ehsan Akhgari's avatar
      Fix a mistake in r217762 · 045423f2
      Ehsan Akhgari authored
      Summary:
      The extra macro definition needs to go into COMPILER_RT_GTEST_CFLAGS
      in order to be used for gtests on MSVC2012.
      
      Test Plan: This is part of the fixes necessary for the ASAN tests to pass with MSVC2012.
      
      Reviewers: timurrrr
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D5493
      
      llvm-svn: 218464
      045423f2
    • Nick Kledzik's avatar
      [Support] Add type-safe alternative to llvm::format() · e6480374
      Nick Kledzik authored
      llvm::format() is somewhat unsafe. The compiler does not check that integer
      parameter size matches the %x or %d size and it does not complain when a 
      StringRef is passed for a %s.  And correctly using a StringRef with format() is  
      ugly because you have to convert it to a std::string then call c_str().
       
      The cases where llvm::format() is useful is controlling how numbers and
      strings are printed, especially when you want fixed width output.  This
      patch adds some new formatting functions to raw_streams to format numbers
      and StringRefs in a type safe manner. Some examples:
      
         OS << format_hex(255, 6)        => "0x00ff"
         OS << format_hex(255, 4)        => "0xff"
         OS << format_decimal(0, 5)      => "    0"
         OS << format_decimal(255, 5)    => "  255"
         OS << right_justify(Str, 5)     => "  foo"
         OS << left_justify(Str, 5)      => "foo  "
      
      llvm-svn: 218463
      e6480374
    • Anton Yartsev's avatar
      Refactoring: raw pointer -> unique_ptr · 3fa65d4e
      Anton Yartsev authored
      llvm-svn: 218462
      3fa65d4e
    • David Majnemer's avatar
      MS ABI: Avoid hashing back reference keys in mangler · 0d0560c3
      David Majnemer authored
      This patch replaces the back reference StringMap from the MS mangler
      with a SmallVector of strings. My previous patches reduced the number of
      hashes involved in back reference lookups, this one removes them
      completely. The back reference map contains at most 10 entries, which
      are likely to be of varying sizes and different initial subsequences,
      and which can easily became huge (due to templates and namespaces).
      
      The solution presented is the simplest possible one. Nevertheless, it's
      enough to reduce compilation times for a particular test case from 11.1s
      to 9s, versus 8.58s for the Itanium ABI. Possible further improvements
      include using a sorted vector (carefully to not introduce an extra
      comparison), storing the string contents in a common arena, and/or keep
      the string storage in the context for reuse.
      
      Patch by Agustín Bergé.
      
      llvm-svn: 218461
      0d0560c3
    • Todd Fiala's avatar
      Fixup gtest layout, add Linux ThreadStateCoordinator.cpp. · b3185e71
      Todd Fiala authored
      This change does the following:
      * Remove test/c++/...
      * Add gtest.
      * Add gtest/unittest directory for unittesting individual classes.
      * Add an initial Plugins/Process?linux/ThreadStateCoordinatorTest.cpp.
        - currently failing a test (intentional).
        - added a bare-bones ThreadStateCoordinator.cpp to Plugins/Process/Linux,
          more soon. Just enough to prove out running gtest on Ubuntu and MacOSX.
      * Added recursive make machinery so that doing a 'make' in gtest/ is
        sufficient to kick off the existing test several directories down.
        - Caveat - I currently short circuit from gtest/unittest/Makefile directly to
          the one and only gtest/unittest/Plugins/Process/Linux directory.  We'll need
          to add the intervening layers.  I haven't done this yet since to fix the
          Xcode test failure correspondence, I may need to add a python layer which
          might just handle the directory crawling.
      * Added an Xcode project to the lldb workspace for gtest.
        - Runs the recursive make system in gtest/Makefile.
        - Default target is 'test'.  test and clean are supported.
        - Currently does not support test failure file/line correspondence.
          Requires a bit of text transformation to hook that up.
      
      llvm-svn: 218460
      b3185e71
    • Tom Stellard's avatar
      ARM: Remove unneeded check for MI->hasPostISelHook() · 1fa1ce61
      Tom Stellard authored
      llvm-svn: 218459
      1fa1ce61
    • Tom Stellard's avatar
      SelectionDAG: Remove #if NDEBUG from check for a post-isel hook · 529efcf9
      Tom Stellard authored
      The InstrEmitter will skip the check of MI.hasPostISelHook()
      before calling AdjustInstrPostInstrSelection() when NDEBUG
      is not defined.
      
      This was added in r140228, and I'm not sure if it is intentional or not,
      but it is a likely source for bugs, because it means with
      Release+Asserts builds you can forget to set the hasPostISelHook
      flag on TableGen definitions and AdjustInstrPostInstrSelection() will
      still be called.
      
      llvm-svn: 218458
      529efcf9
    • Tom Stellard's avatar
      R600/SI: Add support for global atomic add · 7980fc85
      Tom Stellard authored
      llvm-svn: 218457
      7980fc85
    • Robin Morisset's avatar
      Lower idempotent RMWs to fence+load · 810739d1
      Robin Morisset authored
      Summary:
      I originally tried doing this specifically for X86 in the backend in D5091,
      but it was rather brittle and generally running too late to be general.
      Furthermore, other targets may want to implement similar optimizations.
      So I reimplemented it at the IR-level, fitting it into AtomicExpandPass
      as it interacts with that pass (which could not be cleanly done before
      at the backend level).
      
      This optimization relies on a new target hook, which is only used by X86
      for now, as the correctness of the optimization on other targets remains
      an open question. If it is found correct on other targets, it should be
      trivial to enable for them.
      
      Details of the optimization are discussed in D5091.
      
      Test Plan: make check-all + a new test
      
      Reviewers: jfb
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D5422
      
      llvm-svn: 218455
      810739d1
  2. Sep 25, 2014