1. Oct 13, 2014
  2. Oct 12, 2014
  3. Oct 11, 2014
    • Benjamin Kramer's avatar
      MC: Bit pack MCSymbolData. · 3e67db92
      Benjamin Kramer authored
      On x86_64 this brings it from 80 bytes to 64 bytes. Also make any member
      variables private and clean up uses to go through the existing accessors.
      
      NFC.
      
      llvm-svn: 219573
      3e67db92
    • Simon Pilgrim's avatar
      Test commit access · d89591e0
      Simon Pilgrim authored
      Fix comment typo + spelling.
      
      llvm-svn: 219572
      d89591e0
    • Chandler Carruth's avatar
      Suppress a warning about an unused variable in NDEBUG builds. · 60fdc413
      Chandler Carruth authored
      llvm-svn: 219571
      60fdc413
    • Chandler Carruth's avatar
      [complex] Teach the other two binary operators on complex numbers (== · b29a7438
      Chandler Carruth authored
      and !=) to support mixed complex and real operand types.
      
      This requires removing an assert from SemaChecking, and adding support
      both to the constant evaluator and the code generator to synthesize the
      imaginary part when needed. This seemed somewhat cleaner than having
      just the comparison operators force real-to-complex conversions.
      
      I've added test cases for these operations. I'm really terrified that
      there were *no* tests in-tree which exercised this.
      
      This turned up when trying to build R after my change to the complex
      type lowering.
      
      llvm-svn: 219570
      b29a7438
    • Renato Golin's avatar
      Fix typo in ARM reserved-r9 test case · 8d57d251
      Renato Golin authored
      Patch by Charlie Turner.
      
      llvm-svn: 219569
      8d57d251
    • David Majnemer's avatar
      InstCombine: Don't fold (X <<s log(INT_MIN)) /s INT_MIN to X · fe7fccff
      David Majnemer authored
      Consider the case where X is 2.  (2 <<s 31)/s-2147483648 is zero but we
      would fold to X.  Note that this is valid when we are in the unsigned
      domain because we require NUW: 2 <<u 31 results in poison.
      
      This fixes PR21245.
      
      llvm-svn: 219568
      fe7fccff
    • David Majnemer's avatar
      InstCombine, InstSimplify: (%X /s C1) /s C2 isn't always 0 when C1 * C2 overflow · cb9d5966
      David Majnemer authored
      consider:
      C1 = INT_MIN
      C2 = -1
      
      C1 * C2 overflows without a doubt but consider the following:
      %x = i32 INT_MIN
      
      This means that (%X /s C1) is 1 and (%X /s C1) /s C2 is -1.
      
      N. B.  Move the unsigned version of this transform to InstSimplify, it
      doesn't create any new instructions.
      
      This fixes PR21243.
      
      llvm-svn: 219567
      cb9d5966
    • David Majnemer's avatar
      InstCombine: mul to shl shouldn't preserve nsw · 3cac85e0
      David Majnemer authored
      consider:
      mul i32 nsw %x, -2147483648
      
      this instruction will not result in poison if %x is 1
      
      however, if we transform this into:
      shl i32 nsw %x, 31
      
      then we will be generating poison because we just shifted into the sign
      bit.
      
      This fixes PR21242.
      
      llvm-svn: 219566
      3cac85e0
    • Chandler Carruth's avatar
      [complex] Use the much more powerful EmitCall routine to call libcalls · 686de241
      Chandler Carruth authored
      for complex math.
      
      This should fix the windows build bots that started having trouble here
      and generally fix complex libcall emission on targets which use sret for
      complex data types. It also makes the code a bit simpler (despite
      calling into a much more complex bucket of code).
      
      llvm-svn: 219565
      686de241
    • Daniel Jasper's avatar
      clang-format: [ObjC] Wrap ObjC method declarations before annotations. · ec8e838b
      Daniel Jasper authored
      Before:
        - (instancetype)initXxxxxxxxxxxxxxxxxxxxxxxxx:(id<x>)x
                                                    y:(id<yyyyyyyyyyyyyyyyyyyy>)
                                                          y NS_DESIGNATED_INITIALIZER;
      After:
        - (instancetype)initXxxxxxxxxxxxxxxxxxxxxxxxx:(id<x>)x
                                                    y:(id<yyyyyyyyyyyyyyyyyyyy>)y
            NS_DESIGNATED_INITIALIZER;
      
      llvm-svn: 219564
      ec8e838b
    • Chandler Carruth's avatar
      [UBSan] Disable one run line of this test to allow the test as a whole · 30bdfa7f
      Chandler Carruth authored
      to pass in an opt build.
      
      The test case in question does show UBSan catching the error, but it
      doesn't then successfully set the exit code of the program. I'll let the
      UBSan folks sort out why. It should reproduce trivially with an
      optimized build.
      
      llvm-svn: 219563
      30bdfa7f
    • Chandler Carruth's avatar
      [SCEV] Fix one more caller blindly passing the latch to SCEV's · bff0ae77
      Chandler Carruth authored
      getSmallConstantTripCount even when it isn't the exiting block.
      
      I missed this in my first audit, very sorry. This was found in LNT and
      elsewhere. I don't have a test case, but it was completely obvious from
      inspection that this was the problem. I'll see if I can reduce a test
      case, but I'm not really hopeful, and the value seems quite low.
      
      llvm-svn: 219562
      bff0ae77
    • Alexey Bataev's avatar
      Fix deserialization of PredefinedExpr in dependent context. · 8d4fae3d
      Alexey Bataev authored
      llvm-svn: 219561
      8d4fae3d
    • Kuba Brecka's avatar
      Add a IsInstrumentationRuntimePresent SB API · 63927548
      Kuba Brecka authored
      Reviewed at http://reviews.llvm.org/D5738
      
      This adds an SB API into SBProcess:
        bool SBProcess::IsInstrumentationRuntimePresent(InstrumentationRuntimeType type);
      which simply tells whether a particular InstrumentationRuntime (read "ASan") plugin is present and active.
      
      llvm-svn: 219560
      63927548
    • Alexey Samsonov's avatar
      19c2e631
    • Chandler Carruth's avatar
      Guard the definition of the stack tracing function with the same macros · bc97a4f4
      Chandler Carruth authored
      that guard its usage. Without this, we can get unused function warnings
      when backtraces are disabled.
      
      llvm-svn: 219558
      bc97a4f4
    • Chandler Carruth's avatar
      [complex] Teach Clang to preserve different-type operands to arithmetic · a216cad0
      Chandler Carruth authored
      operators where one type is a C complex type, and to emit both the
      efficient and correct implementation for complex arithmetic according to
      C11 Annex G using this extra information.
      
      For both multiply and divide the old code was writing a long-hand
      reduced version of the math without any of the special handling of inf
      and NaN recommended by the standard here. Instead of putting more
      complexity here, this change does what GCC does which is to emit
      a libcall for the fully general case.
      
      However, the old code also failed to do the proper minimization of the
      set of operations when there was a mixed complex and real operation. In
      those cases, C provides a spec for much more minimal operations that are
      valid. Clang now emits the exact suggested operations. This change isn't
      *just* about performance though, without minimizing these operations, we
      again lose the correct handling of infinities and NaNs. It is critical
      that this happen in the frontend based on assymetric type operands to
      complex math operations.
      
      The performance implications of this change aren't trivial either. I've
      run a set of benchmarks in Eigen, an open source mathematics library
      that makes heavy use of complex. While a few have slowed down due to the
      libcall being introduce, most sped up and some by a huge amount: up to
      100% and 140%.
      
      In order to make all of this work, also match the algorithm in the
      constant evaluator to the one in the runtime library. Currently it is
      a broken port of the simplifications from C's Annex G to the long-hand
      formulation of the algorithm.
      
      Splitting this patch up is very hard because none of this works without
      the AST change to preserve non-complex operands. Sorry for the enormous
      change.
      
      Follow-up changes will include support for sinking the libcalls onto
      cold paths in common cases and fastmath improvements to allow more
      aggressive backend folding.
      
      Differential Revision: http://reviews.llvm.org/D5698
      
      llvm-svn: 219557
      a216cad0
    • Reed Kotler's avatar
      Add basic conditional branches in mips fast-isel · 62de6b96
      Reed Kotler authored
      Summary: Implement the most basic form of conditional branches in Mips fast-isel.
      
      Test Plan:
      br1.ll
      run 4 flavors of test-suite. mips32 r1/r2 and at -O0/O2
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits, rfuhler
      
      Differential Revision: http://reviews.llvm.org/D5583
      
      llvm-svn: 219556
      62de6b96
    • Kuba Brecka's avatar
      include compiler-rt in build-llvm.pl · 9b7f36b5
      Kuba Brecka authored
      Reviewed at http://reviews.llvm.org/D5736
      
      The new test cases for ASan fail if the llvm build that is used with LLDB doesn't have compiler-rt (because the resulting compiler then cannot build with -fsanitize=address). Let's include compiler-rt in build-llvm.pl script and make sure we actually *build* it by removing the NO_RUNTIME_LIBS=1 argument used in the make line. After this, the ASan tests pass on a fresh svn checkout.
      
      llvm-svn: 219555
      9b7f36b5
    • Eric Christopher's avatar
      Fix the build after the recent plugin additions for · e7098213
      Eric Christopher authored
      AddressSanitizer by adding dependencies and definitions.
      
      llvm-svn: 219554
      e7098213