and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

  1. 24 Dec, 2013 3 commits
  2. 23 Dec, 2013 1 commit
    • Bill Wendling's avatar
      ---Merging r196453 · 0e1066e6
      Bill Wendling authored
          Parse: Recover better from bad definitions with base specifiers
          
          We would skip until the next comma, hoping good things whould lie there,
          however this would fail when we have such things as this:
          
          struct A {};
          template <typename>
          struct D;
          template <>
          struct D<C> : B, A::D;
          
          Once this happens, we would believe that D with a nested namespace
          specifier of A was a variable that was being declared. We would go on
          to complain that there was an extraneous 'template <>' on their variable
          declaration.
          
          Crashes would happen when 'A' gets defined as 'enum class A {}' as
          various asserts would fire.
          
          Instead, we should skip up until the semicolon if we see that we are in
          the middle of a definition and the current token is a ':'
          
          This fixes PR17084.
      
      llvm-svn: 197905
      0e1066e6
  3. 20 Dec, 2013 4 commits
    • Bill Wendling's avatar
      Remove help notes from the ReleaseNotes. · 04501dbc
      Bill Wendling authored
      llvm-svn: 197841
      04501dbc
    • Bill Wendling's avatar
      Remove help notes from the ReleaseNotes. · 5fc9a797
      Bill Wendling authored
      llvm-svn: 197840
      5fc9a797
    • Bill Wendling's avatar
      Merging r197492: · 849a06ce
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197492 | dyatkovskiy | 2013-12-17 04:07:33 -0800 (Tue, 17 Dec 2013) | 26 lines
      
      Fix for PR18045:
      http://llvm.org/bugs/show_bug.cgi?id=18045
      
      Short issue description:
      For X86 machines with sse < sse4.1 we got failures for some
      particular load/store vector sequences:
      
      $ clang-trunk -m32 -O2 test-case.c
      fatal error: error in backend: Cannot select: 0x4200920: v4i32,ch = load 0x41d6ab0, 0x4205850,
            0x41dcb10<LD16[getelementptr inbounds ([4 x i32]* @e, i32 0, i32 0)](align=4)> [ORD=82]
            [ID=58]
        0x4205850: i32 = X86ISD::Wrapper 0x41d5490 [ORD=26] [ID=43]
          0x41d5490: i32 = TargetGlobalAddress<[4 x i32]* @e> 0 [ORD=26] [ID=23]
        0x41dcb10: i32 = undef [ID=2]
      
      The reason is that EltsFromConsecutiveLoads could emit such load instruction
      both before and after legalize stage. Though this instruction is not legal for
      machines with SSSE3 and lower.
      
      The fix: In EltsFromConsecutiveLoads, if we have passed legalize stage, we
      check whether nodes it emits are legal. 
      
      P.S.: If you get failure in time from 12:00 and till 22:00 (UTC-8),
      perhaps I'll slow with response, so you better reject this commit. Thanks!
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197779
      849a06ce
    • Bill Wendling's avatar
      Merging r197718: · 4ed3bde6
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197718 | hans | 2013-12-19 12:32:44 -0800 (Thu, 19 Dec 2013) | 10 lines
      
      Make sys::ThreadLocal<> zero-initialized on non-thread builds (PR18205)
      
      According to the docs, ThreadLocal<>::get() should return NULL
      if no object has been set. This patch makes that the case also for non-thread
      builds and adds a very basic unit test to check it.
      
      (This was causing PR18205 because PrettyStackTraceHead didn't get zero-
      initialized and we'd crash trying to read past the end of that list. We didn't
      notice this so much on Linux since we'd crash after printing all the entries,
      but on Mac we print into a SmallString, and would crash before printing that.)
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197778
      4ed3bde6
  4. 19 Dec, 2013 1 commit
  5. 17 Dec, 2013 4 commits
    • Bill Wendling's avatar
      Update notes. · 48b544e6
      Bill Wendling authored
      llvm-svn: 197468
      48b544e6
    • Bill Wendling's avatar
      Merging r197409: · e4b2a6e3
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197409 | rikka | 2013-12-16 11:19:18 -0800 (Mon, 16 Dec 2013) | 4 lines
      
      Make Sema::BuildCXXNestedNameSpecifier correctly clear the previous
      CXXScopeSpec when necessary while performing typo correction. This fixes
      the crash reported in PR18213 (the problem existed since r185487, and
      r193020 made it easier to hit).
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197463
      e4b2a6e3
    • Bill Wendling's avatar
      Merging r197449: · 55637a32
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197449 | arnolds | 2013-12-16 17:11:01 -0800 (Mon, 16 Dec 2013) | 7 lines
      
      LoopVectorizer: Don't if-convert constant expressions that can trap
      
      A phi node operand or an instruction operand could be a constant expression that
      can trap (division). Check that we don't vectorize such cases.
      
      PR16729
      radar://15653590
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197453
      55637a32
    • Bill Wendling's avatar
      Fix link. · 4a062ea7
      Bill Wendling authored
      llvm-svn: 197443
      4a062ea7
  6. 16 Dec, 2013 8 commits
    • Bill Wendling's avatar
      Add blurb about leak sanitizer. · dd9a1386
      Bill Wendling authored
      llvm-svn: 197417
      dd9a1386
    • Sylvestre Ledru's avatar
      Remove a duplicate declaration which broke the compiler-rt build · d4ae9fdf
      Sylvestre Ledru authored
      llvm-svn: 197381
      d4ae9fdf
    • Gabor Greif's avatar
      fix a weird phrase · 551c3277
      Gabor Greif authored
      llvm-svn: 197379
      551c3277
    • Sylvestre Ledru's avatar
      Rewrite the static analyzer changes description for the 3.4 release. · b2cefb48
      Sylvestre Ledru authored
      After chatting with Anna Zaks, she believes that my code samples were
      more bugs in the previous releases of the static analyzer.
      
      llvm-svn: 197377
      b2cefb48
    • Sylvestre Ledru's avatar
      Add a missing declaration of Log in lldb. · 58d24ac4
      Sylvestre Ledru authored
      Bill accepted this commit for the 3.4 release.
      
      The build was failing with:
      /tmp/buildd/llvm-toolchain-3.4-3.4~+/tools/lldb/source/Host/common/Host.cpp:1222:30: error: request for member 'Printf' in 'log', which is of non-class type 'double(double)throw ()'
      log->Printf("Host::GetLLDBPath(ePathTypeLLDBTempSystemDir) => '%s'", g_lldb_tmp_dir.GetCString());
      
      llvm-svn: 197376
      58d24ac4
    • Bill Wendling's avatar
      Merging r195411: · 5c20ec3b
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r195411 | mgottesman | 2013-11-21 21:00:51 -0800 (Thu, 21 Nov 2013) | 1 line
      
      [block-freq] Update data in test case to be unsigned long long to fix mingw build.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197363
      5c20ec3b
    • Bill Wendling's avatar
      Merging r-196802: · 0f6f2cda
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r196802 | chandlerc | 2013-12-09 11:25:51 -0800 (Mon, 09 Dec 2013) | 11 lines
      
      Revert three patches which were committed without explicit contribution
      by their authors.
      
      This may break builds where others added code relying on these patches,
      but please *do not* revert this commit. Instead, we will prepare patches
      which fix the failures.
      
      Reverts the following commits:
      r168306: "[asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu"
      r168356: "[asan] more support for powerpc, patch by Peter Bergner"
      r196489: "[sanitizer] fix the ppc32 build (patch by Jakub Jelinek)"
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197360
      0f6f2cda
    • Bill Wendling's avatar
      Merging r196212: · a0cdb61c
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r196212 | alp | 2013-12-02 22:13:01 -0800 (Mon, 02 Dec 2013) | 22 lines
      
      Emit an extension warning when changing system header tokens
      
      clang converts keywords to identifiers for compatibility with various system
      headers such as GNU libc.
      
      Implement a -Wkeyword-compat extension warning to diagnose those cases. The
      warning is on by default but will generally be ignored in system headers. It
      can however be enabled globally to aid standards conformance testing.
      
      This also changes the __uptr keyword avoidance from r195710 to no longer
      special-case system headers, bringing it in line with other similar workarounds
      in clang.
      
      Implementation returns bool for symmetry with token annotation functions.
      
      Some examples:
      
      warning: keyword '__is_pod' will be treated as an identifier for the remainder of the translation unit [-Wkeyword-compat]
      struct __is_pod
      
      warning: keyword '__uptr' will be treated as an identifier here [-Wkeyword-compat]
      union w *__uptr;
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197359
      a0cdb61c
  7. 15 Dec, 2013 5 commits
    • Bill Wendling's avatar
      Merging r197047: · 0637cda9
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197047 | d0k | 2013-12-11 08:36:09 -0800 (Wed, 11 Dec 2013) | 3 lines
      
      SelectionDAG: Fix a typo.
      
      Found by "cppcheck". PR18208.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197355
      0637cda9
    • Bill Wendling's avatar
      Merging r195710: · fe81660c
      Bill Wendling authored
      ------------------------------------------------------------------------
      
      llvm-svn: 197354
      fe81660c
    • Bill Wendling's avatar
      Merging r196779: · 9cae9546
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r196779 | samsonov | 2013-12-09 05:21:43 -0800 (Mon, 09 Dec 2013) | 11 lines
      
      PR17977: don't assume EOWNERDEAD is always defined
      
      Summary: See details in http://llvm.org/bugs/show_bug.cgi?id=17977
      
      Reviewers: dvyukov
      
      Reviewed By: dvyukov
      
      CC: glider, llvm-commits
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2340
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197353
      9cae9546
    • Bill Wendling's avatar
      Merging r197216: · 411ef185
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197216 | chandlerc | 2013-12-13 00:00:01 -0800 (Fri, 13 Dec 2013) | 9 lines
      
      [inliner] Fix PR18206 by preventing inlining functions that call setjmp
      through an invoke instruction.
      
      The original patch for this was written by Mark Seaborn, but I've
      reworked his test case into the existing returns_twice test case and
      implemented the fix by the prior refactoring to actually run the cost
      analysis over invoke instructions, and then here fixing our detection of
      the returns_twice attribute to work for both calls and invokes. We never
      noticed because we never saw an invoke. =[
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197352
      411ef185
    • Bill Wendling's avatar
      Merging r197215: · 4e547a68
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197215 | chandlerc | 2013-12-12 23:59:56 -0800 (Thu, 12 Dec 2013) | 24 lines
      
      [inliner] Completely change (and fix) how the inline cost analysis
      handles terminator instructions.
      
      The inline cost analysis inheritted some pretty rough handling of
      terminator insts from the original cost analysis, and then made it much,
      much worse by factoring all of the important analyses into a separate
      instruction visitor. That instruction visitor never visited the
      terminator.
      
      This works fine for things like conditional branches, but for many other
      things we simply computed The Wrong Value. First example are
      unconditional branches, which should be free but were counted as full
      cost. This is most significant for conditional branches where the
      condition simplifies and folds during inlining. We paid a 1 instruction
      tax on every branch in a straight line specialized path. =[
      
      Oh, we also claimed that the unreachable instruction had cost.
      
      But it gets worse. Let's consider invoke. We never applied the call
      penalty. We never accounted for the cost of the arguments. Nope. Worse
      still, we didn't handle the *correctness* constraints of not inlining
      recursive invokes, or exception throwing returns_twice functions. Oops.
      See PR18206. Sadly, PR18206 requires yet another fix, but this
      refactoring is at least a huge step in that direction.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197351
      4e547a68
  8. 14 Dec, 2013 5 commits
    • Hal Finkel's avatar
      Add release notes for the PowerPC backend · 8817229b
      Hal Finkel authored
      llvm-svn: 197325
      8817229b
    • Bill Wendling's avatar
      Merging r197178: · 1c2dbf2d
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197178 | hfinkel | 2013-12-12 12:45:24 -0800 (Thu, 12 Dec 2013) | 9 lines
      
      Fix a use-after-free error in GlobalOpt CleanupConstantGlobalUsers
      
      GlobalOpt's CleanupConstantGlobalUsers function uses a worklist array to manage
      constant users to be visited. The pointers in this array need to be weak
      handles because when we delete a constant array, we may also be holding a
      pointer to one of its elements (or an element of one of its elements if we're
      dealing with an array of arrays) in the worklist.
      
      Fixes PR17347.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197322
      1c2dbf2d
    • Bill Wendling's avatar
      Merging r197228: · 041b14f9
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197228 | d0k | 2013-12-13 05:40:24 -0800 (Fri, 13 Dec 2013) | 8 lines
      
      X86: When lowering shl_parts, don't emit shift amounts larger than the bit width.
      
      While it's safe for the X86-specific shift nodes, dag combining will
      kill generic nodes. Insert an AND to make it safe, isel will nuke it
      as x86's shift instructions have an implicit AND.
      
      Fixes PR16108, which contains a contraption to hit this case in between
      constant folders.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197321
      041b14f9
    • Bill Wendling's avatar
      Merging r197298: · c710da24
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197298 | rsmith | 2013-12-13 17:04:22 -0800 (Fri, 13 Dec 2013) | 3 lines
      
      PR18232: implement instantiation for class-scope explicit specializations of
      class templates (a Microsoft extension).
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197320
      c710da24
    • Bill Wendling's avatar
      Merging r197305: · 8f456a6c
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197305 | rsmith | 2013-12-13 19:18:05 -0800 (Fri, 13 Dec 2013) | 7 lines
      
      PR18246: When performing template argument deduction to decide which template
      is specialized by an explicit specialization, start from the first declaration
      in case we've got a member of a class template (redeclarations might not number
      the template parameters the same way).
      
      Our recover here is still far from ideal.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197319
      8f456a6c
  9. 13 Dec, 2013 2 commits
  10. 12 Dec, 2013 7 commits
    • Bill Wendling's avatar
      Merging r197061: · bceb7a62
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197061 | marshall | 2013-12-11 11:32:32 -0800 (Wed, 11 Dec 2013) | 1 line
      
      Move std::begin(array) and std::end(array) out from under an #ifdef that was preventing people from building libc++ using gcc. This corrects a mistake that I introduced in r196058
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197134
      bceb7a62
    • Bill Wendling's avatar
      Merging r196058: · 9fb5fc96
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r196058 | marshall | 2013-12-01 19:24:33 -0800 (Sun, 01 Dec 2013) | 1 line
      
      Fix for PRPR17934; based on a fix suggested by Peter Sommerlad
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197133
      9fb5fc96
    • Bill Wendling's avatar
      Merging r-197100: · 26d28e51
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197100 | hfinkel | 2013-12-11 16:23:29 -0800 (Wed, 11 Dec 2013) | 1 line
      
      Remove unused multiclass from PPCInstrInfo.td
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197131
      26d28e51
    • Bill Wendling's avatar
      Merging r197100: · 87298e51
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197100 | hfinkel | 2013-12-11 16:23:29 -0800 (Wed, 11 Dec 2013) | 1 line
      
      Remove unused multiclass from PPCInstrInfo.td
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197130
      87298e51
    • Bill Wendling's avatar
      Merging r197120: · 317f672d
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197120 | rsmith | 2013-12-11 18:42:17 -0800 (Wed, 11 Dec 2013) | 2 lines
      
      Update user manual to note that implementation for C++11 and C++1y is complete, and fix a bunch of other issues here.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197127
      317f672d
    • Bill Wendling's avatar
      Merging r197089: · d92b12df
      Bill Wendling authored
      ```---------------------------------------------------------------------
      r197089 | hfinkel | 2013-12-11 15:12:25 -0800 (Wed, 11 Dec 2013) | 6 lines
      
      Fix the PPC subsumes-predicate check
      
      For one predicate to subsume another, they must both check the same condition
      register. Failure to check this prerequisite was causing miscompiles.
      
      Fixes PR18003.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 197126
      d92b12df
    • Richard Smith's avatar
      Fix another formatting bug. · 82930e70
      Richard Smith authored
      llvm-svn: 197118
      82930e70