1. Feb 05, 2012
  2. Feb 04, 2012
    • Benjamin Kramer's avatar
      Some compilers do require Diagnostic.h to be present here. · 6bc0952b
      Benjamin Kramer authored
      llvm-svn: 149785
      6bc0952b
    • Benjamin Kramer's avatar
      Don't include Diagnostics.h twice when it's required zero times. · 1edced68
      Benjamin Kramer authored
      llvm-svn: 149784
      1edced68
    • Benjamin Kramer's avatar
      Move a method from IdentifierTable.h out of line and remove the SmallString include. · 4903802f
      Benjamin Kramer authored
      Fix all the transitive include users.
      
      llvm-svn: 149783
      4903802f
    • Benjamin Kramer's avatar
      Remove Diagnostic.h include from Preprocessor.h. · 02c746de
      Benjamin Kramer authored
      - Move the offending methods out of line and fix transitive includers.
      - This required changing an enum in the PPCallback API into an unsigned.
      
      llvm-svn: 149782
      02c746de
    • Benjamin Kramer's avatar
      Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h. · 3307c508
      Benjamin Kramer authored
      Fix all the files that depended on transitive includes of Diagnostic.h.
      With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer.
      
      llvm-svn: 149781
      3307c508
    • Benjamin Kramer's avatar
      Move Storage and StorageAllocator out of the PartialDiagnostic class so we can... · 728ed3f3
      Benjamin Kramer authored
      Move Storage and StorageAllocator out of the PartialDiagnostic class so we can forward declare them.
      
      Let ASTContext allocate the storage in its BumpPtrAllocator.
      This will help us remove ASTContext's depedency on PartialDiagnostic.h soon.
      
      llvm-svn: 149780
      728ed3f3
    • Benjamin Kramer's avatar
      StaticAnalyzer: Remove FixIts from PathDiagnosticPieces. · 3f85fb22
      Benjamin Kramer authored
      They were unused and pulled in Diagnostic.h for no reason.
      
      llvm-svn: 149779
      3f85fb22
    • Richard Smith's avatar
      In C++11 mode, when an integral constant expression is desired and we have a · f4c51d9d
      Richard Smith authored
      value of class type, look for a unique conversion operator converting to
      integral or unscoped enumeration type and use that. Implements [expr.const]p5.
      
      Sema::VerifyIntegerConstantExpression now performs the conversion and returns
      the converted result. Some important callers of Expr::isIntegralConstantExpr
      have been switched over to using it (including all of those required for C++11
      conformance); this switch brings a side-benefit of improved diagnostics and, in
      several cases, simpler code. However, some language extensions and attributes
      have not been moved across and will not perform implicit conversions on
      constant expressions of literal class type where an ICE is required.
      
      In passing, fix static_assert to perform a contextual conversion to bool on its
      argument.
      
      llvm-svn: 149776
      f4c51d9d
    • Sean Callanan's avatar
      I have brought LLDB up-to-date with top of tree · 5b26f27f
      Sean Callanan authored
      LLVM/Clang.  This brings in several fixes, including:
      
      - Improvements in the Just-In-Time compiler's
        allocation of memory: the JIT now allocates
        memory in chunks of sections, improving its
        ability to generate relocations.  I have
        revamped the RecordingMemoryManager to reflect
        these changes, as well as to get the memory
        allocation and data copying out fo the
        ClangExpressionParser code.  Jim Grosbach wrote
        the updates to the JIT on the LLVM side.
      
      - A new ExternalASTSource interface to allow LLDB to
        report accurate structure layout information to
        Clang.  Previously we could only report the sizes
        of fields, not their offsets.  This meant that if
        data structures included field alignment
        directives, we could not communicate the necessary
        alignment to Clang and accesses to the data would
        fail.  Now we can (and I have update the relevant
        test case).  Thanks to Doug Gregor for implementing
        the Clang side of this fix.
      
      - The way Objective-C interfaces are completed by
        Clang has been made consistent with RecordDecls;
        with help from Doug Gregor and Greg Clayton I have
        ensured that this still works.
      
      - I have eliminated all local LLVM and Clang patches,
        committing the ones that are still relevant to LLVM
        and Clang as needed.
      
      I have tested the changes extensively locally, but
      please let me know if they cause any trouble for you.
      
      llvm-svn: 149775
      5b26f27f
    • Sean Callanan's avatar
      Modified the Enhanced Disassembler to create and · bdce3885
      Sean Callanan authored
      cache disassemblers according to the string value
      of the target triple, not according to the enum
      of the triple CPU.  The reason for this is that
      certain attributes of the instruction set are not
      reflected in the enum, but only in the string.
      
      llvm-svn: 149773
      bdce3885
    • Richard Smith's avatar
      Don't allow a value of a scoped enumeration to be used as the first bound for an · 8dd34250
      Richard Smith authored
      array new expression. This lays some groundwork for the implicit conversion to
      integral or unscoped enumeration which C++11 ICEs undergo.
      
      llvm-svn: 149772
      8dd34250
    • Anna Zaks's avatar
      [analyzer] Make sure Containers OutOfBounds checker does not crash on... · 88598248
      Anna Zaks authored
      [analyzer] Make sure Containers OutOfBounds checker does not crash on undefined arguments, when CF functions are called with wrong number of arguments. 
      
      llvm-svn: 149771
      88598248
    • Richard Smith's avatar
      Disallow constexpr main. · 3f333f2e
      Richard Smith authored
      llvm-svn: 149770
      3f333f2e
    • Jakob Stoklund Olesen's avatar
      Drop the REDEF_BY_EC VNInfo flag. · abb26bae
      Jakob Stoklund Olesen authored
      A live range that has an early clobber tied redef now looks like a
      normal tied redef, except the early clobber def uses the early clobber
      slot.
      
      This is enough to handle any strange interference problems.
      
      llvm-svn: 149769
      abb26bae
    • Jakob Stoklund Olesen's avatar
      Correctly terminate a physreg redefined by an early clobber. · e3865781
      Jakob Stoklund Olesen authored
      I don't have a test that fails because of this, but a test case like
      CodeGen/X86/2009-12-01-EarlyClobberBug.ll exposes the problem.  EAX is
      redefined by a tied early clobber operand on inline asm, and the live
      range should look like this:
      
        %EAX,inf = [48r,64e:0)[64e,80r:1)  0@48r 1@64e
      
      Previously, the two values got merged:
      
        %EAX,inf = [48r,80r:0)  0@48r
      
      With this bug fixed, the REDEF_BY_EC VNInfo flag is no longer needed.
      
      llvm-svn: 149768
      e3865781
    • Richard Smith's avatar
      Fix a rejects-valid in C++11: array new of a negative size, or overflowing array · bcc9bcb6
      Richard Smith authored
      new, is well-formed with defined semantics of throwing (a type which can be
      caught by a handler for) std::bad_array_new_length, unlike in C++98 where it is
      somewhere nebulous between undefined behavior and ill-formed.
      
      If the array size is an integral constant expression and satisfies one of these
      criteria, we would previous the array new expression, but now in C++11 mode, we
      merely issue a warning (the code is still rejected in C++98 mode, naturally).
      
      We don't yet implement new C++11 semantics correctly (see PR11644), but we do
      implement the overflow checking, and (for the default operator new) convert such
      expressions to an exception, so accepting such code now does not seem especially
      unsafe.
      
      llvm-svn: 149767
      bcc9bcb6
    • Richard Smith's avatar
      Unbreak failing test added in r149738. · 5d8e7593
      Richard Smith authored
      llvm-svn: 149766
      5d8e7593
    • Nick Lewycky's avatar
      Fix a leak! · 6024f9b5
      Nick Lewycky authored
      Andy, in a previous commit you made this into an ImmutablePass so that you could
      add it to the PassManager, then in the next commit you left it a Pass but
      removed the code that added it to the PM. If you do add it to the PM then the PM
      should take care of deleting it, but it's also true that nothing in codegen
      needs this object to exist after it's done its work here. It's not clear to me
      which design you want; this should likely either cease to be a Pass or be added
      to the PM where other parts of CodeGen will request it.
      
      llvm-svn: 149765
      6024f9b5
    • Argyrios Kyrtzidis's avatar
      275a671b
    • Jakob Stoklund Olesen's avatar
      Don't store COPY pointers in VNInfo. · ad6b22eb
      Jakob Stoklund Olesen authored
      If a value is defined by a COPY, that instuction can easily and cheaply
      be found by getInstructionFromIndex(VNI->def).
      
      This reduces the size of VNInfo from 24 to 16 bytes, and improves
      llc compile time by 3%.
      
      llvm-svn: 149763
      ad6b22eb
    • Argyrios Kyrtzidis's avatar
      Remove unused field from FixItRecompile. · 3bd71be4
      Argyrios Kyrtzidis authored
      llvm-svn: 149762
      3bd71be4
    • Hal Finkel's avatar
      Boost the effective chain depth of loads and stores. · 135cac92
      Hal Finkel authored
      By default, boost the chain depth contribution of loads and stores. This will allow a load/store pair to vectorize even when it would not otherwise be long enough to satisfy the chain depth requirement.
      
      llvm-svn: 149761
      135cac92
    • Nick Lewycky's avatar
      Don't warn on use of default allocator with an over-aligned type when the · 96ed7b62
      Nick Lewycky authored
      allocator is given the pointer to allocate into.
      
      llvm-svn: 149760
      96ed7b62