Skip to content
  1. Feb 22, 2014
    • Warren Hunt's avatar
      Complete Rewrite of CGRecordLayoutBuilder · fb00c887
      Warren Hunt authored
      CGRecordLayoutBuilder was aging, complex, multi-pass, and shows signs of 
      existing before ASTRecordLayoutBuilder.  It redundantly performed many 
      layout operations that are now performed by ASTRecordLayoutBuilder and 
      asserted that the results were the same.  With the addition of support 
      for the MS-ABI, such as placement of vbptrs, vtordisps, different 
      bitfield layout and a variety of other features, CGRecordLayoutBuilder 
      was growing unwieldy in its redundancy.
      
      This patch re-architects CGRecordLayoutBuilder to not perform any 
      redundant layout but rather, as directly as possible, lower an 
      ASTRecordLayout to an llvm::type.  The new architecture is significantly 
      smaller and simpler than the CGRecordLayoutBuilder and contains fewer 
      ABI-specific code paths.  It's also one pass.
      
      The architecture of the new system is described in the comments. For the 
      most part, the new system simply takes all of the fields and bases from 
      an ASTRecordLayout, sorts them, inserts padding and dumps a record. 
      Bitfields, unions and primary virtual bases make this process a bit more 
      complicated.  See the inline comments.
      
      In addition, this patch updates a few lit tests due to the fact that the 
      new system computes more accurate llvm types than CGRecordLayoutBuilder. 
      Each change is commented individually in the review.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2795
      
      llvm-svn: 201907
      fb00c887
  2. Feb 21, 2014
  3. Feb 20, 2014
  4. Feb 19, 2014
    • Joerg Sonnenberger's avatar
      Hook up NetBSD/sparc and NetBSD/sparc64 as and ld invocations. · ed3f0693
      Joerg Sonnenberger authored
      llvm-svn: 201730
      ed3f0693
    • Chandler Carruth's avatar
      Teach Clang to provide ::max_align_t in C11 and C++11 modes. · e813984b
      Chandler Carruth authored
      This definition is not chosen idly. There is an unfortunate reality with
      max_align_t -- the specific nature of its definition leaks into the ABI
      almost immediately. Because it is part of C11 and C++11 it becomes
      essential for it to match with other systems on that ABI. There is an
      effort to discourage any further use of this construct as a consequence
      -- using max_align_t introduces an immediate ABI problem. We can never
      update it to have larger alignment even as the microarchitecture changes
      to necessitate higher alignment. =/
      
      The particular definition here exactly matches the ABI of GCC's chosen
      ::max_align_t definition, for better or worse. This was written with the
      help of Richard Smith who was decoding the exact ABI implications of the
      selected definition in GCC. Notably, in-register arguments are impacted
      by the particular definition chosen. =/
      
      No one is under the illusion that this is a "good" or "useful"
      definition of max_align_t, and we are working with the standards
      committee to specify a more useful interface to address this need.
      
      llvm-svn: 201729
      e813984b
    • Reid Kleckner's avatar
      MS ABI: Let non-virtual method overloads participate in vftable ordering · 6701de2a
      Reid Kleckner authored
      In the Microsoft ABI, the vftable is laid out as if all methods in every
      overload set were declared in reverse order of declaration at the point
      of declaration of the first overload in the set.
      
      Previously we only considered virtual methods in an overload set, but
      MSVC includes non-virtual methods for ordering purposes.
      
      Fixes PR18902.
      
      llvm-svn: 201722
      6701de2a
    • Reid Kleckner's avatar
      clang-cl: Pass /Z7 when we fallback to cl with debug info enabled · c688dafe
      Reid Kleckner authored
      Clang itself only emits CodeView line tables, so it seems more
      consistent to ask cl.exe for the same format.
      
      llvm-svn: 201721
      c688dafe
    • Jordan Rose's avatar
      [analyzer] Extend IdenticalExprChecker to check logical and bitwise expressions. · 94008121
      Jordan Rose authored
      IdenticalExprChecker now warns if any expressions in a logical or bitwise
      chain (&&, ||, &, |, or ^) are the same. Unlike the previous patch, this
      actually checks all subexpressions against each other (an O(N^2) operation,
      but N is likely to be small).
      
      Patch by Daniel Fahlgren!
      
      llvm-svn: 201702
      94008121
    • Jordan Rose's avatar
      [analyzer] Extend IdenticalExprChecker to check the two branches of an if. · 70e7e871
      Jordan Rose authored
      This extends the checks for identical expressions to handle identical
      statements, and compares the consequent and alternative ("then" and "else")
      branches of an if-statement to see if they are identical, treating a single
      statement surrounded by braces as equivalent to one without braces.
      
      This does /not/ check subsequent branches in an if/else chain, let alone
      branches that are not consecutive. This may improve in a future patch, but
      it would certainly take more work.
      
      Patch by Daniel Fahlgren!
      
      llvm-svn: 201701
      70e7e871
    • Tim Northover's avatar
      AArch64: look up EmitAArch64Scalar support before calling. · db3e5e24
      Tim Northover authored
      This fixes one immediate bug where an expression with side-effects
      could be emitted twice during a NEON call.
      
      It also prepares the way for folding CodeGen for many of the SISD
      intrinsics into a table, reducing code size and hopefully increasing
      performance eventually ("binary search + few switch cases" should be
      better than "lots of switch cases").
      
      llvm-svn: 201667
      db3e5e24
    • Renato Golin's avatar
      Add FreeBSD ARM EABI hard-float support · f4421f7e
      Renato Golin authored
      Patch by Andrew Turner.
      
      llvm-svn: 201662
      f4421f7e
    • Tim Northover's avatar
      ARM NEON: add vcvtX (with rounding mode) intrinsics to v8 ARM. · 0f6c9d0a
      Tim Northover authored
      These instructions (well, the f32 ones) are supported on 32-bit ARMv8, not just
      AArch64. Now that the arm_neon.td refactoring is complete, adding them is
      surprisingly simple.
      
      rdar://problem/16035743
      
      llvm-svn: 201661
      0f6c9d0a
    • Ted Kremenek's avatar
      8dd916d6
    • David Majnemer's avatar
      Implement DR577 · f703b588
      David Majnemer authored
      DR18 previously forebode typedefs to be used as parameter types if they
      were of type 'void'.  DR577 allows 'void' to be used as a function
      parameter type regardless from where it came.
      
      llvm-svn: 201631
      f703b588
    • Hans Wennborg's avatar
      clang-cl /fallback: turn the note into a warning · 897a69b3
      Hans Wennborg authored
      llvm-svn: 201626
      897a69b3
Loading