1. Aug 15, 2014
    • Rafael Espindola's avatar
      adbe0243
    • Rafael Espindola's avatar
      Remove HasLEB128. · d610ba99
      Rafael Espindola authored
      We already require CFI, so it should be safe to require .leb128 and .uleb128.
      
      llvm-svn: 215712
      d610ba99
    • Bill Schmidt's avatar
      [PPC64] Add test case for r215685. · 9bac9ca7
      Bill Schmidt authored
      I had deferred adding this test case until I could get it down to a
      reasonable size.  That's done now.
      
      Thanks,
      Bill
      
      llvm-svn: 215711
      9bac9ca7
    • Timur Iskhodzhanov's avatar
      cc01fad1
    • Timur Iskhodzhanov's avatar
    • Aaron Ballman's avatar
      Const-correctness, return-after-else, and formatting updates. NFC. · 71291bc4
      Aaron Ballman authored
      llvm-svn: 215706
      71291bc4
    • Aaron Ballman's avatar
    • Aaron Ballman's avatar
      Adding const-qualifiers to auto declarations. NFC. · b0088589
      Aaron Ballman authored
      llvm-svn: 215704
      b0088589
    • Benjamin Kramer's avatar
      PPC: Clean up pointer casting, no functionality change. · 769989c4
      Benjamin Kramer authored
      Silences GCC's -Wcast-qual.
      
      llvm-svn: 215703
      769989c4
    • Chandler Carruth's avatar
      [x86] Add the initial skeleton of type-based dispatch for AVX vectors in · f8861258
      Chandler Carruth authored
      the new shuffle lowering and an implementation for v4 shuffles.
      
      This allows us to handle non-half-crossing shuffles directly for v4
      shuffles, both integer and floating point. This currently misses places
      where we could perform the blend via UNPCK instructions, but otherwise
      generates equally good or better code for the test cases included to the
      existing vector shuffle lowering. There are a few cases that are
      entertainingly better. ;]
      
      llvm-svn: 215702
      f8861258
    • Chandler Carruth's avatar
      [x86] Teach the instruction printer to decode immediate operands to · 0288620f
      Chandler Carruth authored
      BLENDPS, BLENDPD, and PBLENDW instructions into pretty shuffle comments.
      
      These will be used in my next commit as part of test cases for AVX
      shuffles which can directly use blend in more places.
      
      llvm-svn: 215701
      0288620f
    • Tim Northover's avatar
      ARM: implement MRS/MSR (banked reg) system instructions. · ee843ef0
      Tim Northover authored
      These are system-only instructions for CPUs with virtualization
      extensions, allowing a hypervisor easy access to all of the various
      different AArch32 registers.
      
      rdar://problem/17861345
      
      llvm-svn: 215700
      ee843ef0
    • Erik Verbruggen's avatar
      Remove testcase from README which we didn't get. We do get it now. · ccc517c4
      Erik Verbruggen authored
      llvm-svn: 215699
      ccc517c4
    • Vladimir Medic's avatar
      Current implementation of c.cond.fmt instructions only accept default cc0... · 8d380fa3
      Vladimir Medic authored
      Current implementation of c.cond.fmt instructions only accept default cc0 register. This patch enables the instruction to accept other fcc registers. The aliases with default fcc0 registers are also defined.
      
      llvm-svn: 215698
      8d380fa3
    • Yi Kong's avatar
      arm_acle.h: Small cleanup · 70cf4c62
      Yi Kong authored
      Since __SIZEOF_LONG_LONG__ is always defined as 8 on ARM targets,
      there's no point in checking this. NFC.
      
      Patch by Moritz Roth.
      
      llvm-svn: 215697
      70cf4c62
    • Chandler Carruth's avatar
      [x86] Remove the duplicated code for testing whether we can widen the · 6649f532
      Chandler Carruth authored
      elements of a shuffle mask and simplify how it works. No functionality
      changed now that the bug that was here has been fixed.
      
      llvm-svn: 215696
      6649f532
    • Eric Fiselier's avatar
      6c53c869
    • Eric Fiselier's avatar
      Fix incorrect locale requirements in tests · d237ac80
      Eric Fiselier authored
      llvm-svn: 215694
      d237ac80
    • Daniel Jasper's avatar
      clang-format: Prefer breaking after return type over template param · ea79ea16
      Daniel Jasper authored
      Before:
        typename aaaaaaaaaa<aaaaaa>::aaaaaaaaaaa aaaaaaaaaa<
            aaaaaa>::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(bool *aaaaaaaaaaaaaaaaaa,
                                                         bool *aa) {}
      
      After:
        typename aaaaaaaaaa<aaaaaa>::aaaaaaaaaaa
        aaaaaaaaaa<aaaaaa>::aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
            bool *aaaaaaaaaaaaaaaaaa, bool *aa) {}
      
      llvm-svn: 215693
      ea79ea16
    • Daniel Jasper's avatar
      clang-format: [proto] Understand text-format nesting without : · 497d9fdc
      Daniel Jasper authored
      Before:
        option (MyProto.options) = {
          field_c : "OK" msg_field{field_d : 123}
        };
      
      After:
        option (MyProto.options) = {
          field_c : "OK"
          msg_field{field_d : 123}
        };
      
      (Note that the colon after "msg_field" is optional).
      
      llvm-svn: 215692
      497d9fdc
    • Eric Fiselier's avatar
    • Chandler Carruth's avatar
      [x86] Fix the very broken formation of vpunpck instructions in the · 17fd848b
      Chandler Carruth authored
      target-specific shuffl DAG combines.
      
      We were recognizing the paired shuffles backwards. This code needs to be
      replaced anyways as we have the same functionality elsewhere, but I'll
      do the refactoring in a follow-up, this is the minimal fix to the
      behavior.
      
      In addition to fixing miscompiles with the new vector shuffle lowering,
      it also causes the canonicalization to kick in much better, selecting
      the smaller encoding variants in lots of places in the new AVX path.
      This still isn't quite ideal as we don't need both the shufpd and the
      punpck instructions, but that'll get fixed in a follow-up patch.
      
      llvm-svn: 215690
      17fd848b
    • Rafael Espindola's avatar
      Don't print comments to an object streamer :-) · fe963b17
      Rafael Espindola authored
      llvm-svn: 215689
      fe963b17
    • Rafael Espindola's avatar
      EmitAbsValue is the same as EmitValue on non-darwin. NFC. · 91f6621e
      Rafael Espindola authored
      llvm-svn: 215688
      91f6621e
    • Chandler Carruth's avatar
      [x86] Fix PR20540 where the x86 shuffle DAG combiner had completely · 372c143c
      Chandler Carruth authored
      broken logic for merging shuffle masks in the face of SM_SentinelZero
      mask operands.
      
      While these are '-1' they don't mean 'undef' the way '-1' means in the
      pre-legalized shuffle masks. Instead, they mean that the shuffle
      operation is forcibly zeroing that lane. Reflect this and explicitly
      handle it in a bunch of places. In one place the effect is equivalent
      but much more clear. In the rest it was really weirdly broken.
      
      Also, rewrite the entire merging thing to be a more directy operation
      with a single loop and just doing math to map the indices through the
      various masks.
      
      Also add a bunch of asserts to try to make in extremely clear what the
      different masks can possibly look like.
      
      Finally, add some comments to clarify that we're merging shuffle masks
      *up* here rather than *down* as we do everywhere else, and thus the
      logic is quite confusing.
      
      Thanks to several different people for sending test cases, and for
      Robert Khasanov for an initial attempt at fixing.
      
      llvm-svn: 215687
      372c143c
    • Keno Fischer's avatar
      Make sure CallExpr::getLocStart doesn't segfault · 070db177
      Keno Fischer authored
      Summary:
      When the CallExpr passed to Sema::ConvertArgumentsForCall has all default parameters, and the number of actual arguments passed is zero, this function will segfault in the call to Call->getLocStart() if the Callee has an invalid getLocStart(), the reason being that since ConvertArgumentsForCall has set the correct number of arguments, but has not filled them in yet, getLocStart() will try to access the first (not yet existent) argument and thus segfaults.
      
      This fixes that by making getLocStart return an invalid source location if the queried argument is NULL rather than segfaulting.
      
      Reviewers: rnk
      
      Reviewed By: rnk
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D4917
      
      llvm-svn: 215686
      070db177
    • Bill Schmidt's avatar
      [PPC64] Add missing dependency on X2 to LDinto_toc. · 3755e17d
      Bill Schmidt authored
      The LDinto_toc pattern has been part of 64-bit PowerPC for a long
      time, and represents loading from a memory location into the TOC
      register (X2).  However, this pattern doesn't explicitly record that
      it modifies that register.  This patch adds the missing dependency.
      
      It was very surprising to me that this has never shown up as a problem
      in the past, and that we only saw this problem recently in a single
      scenario when building a self-hosted clang.  It turns out that in most
      cases we have another dependency present that keeps the LDinto_toc
      instruction tied in place.  LDinto_toc is used for TOC restore
      following a call site, so this is a typical sequence:
      
         BCTRL8 <regmask>, %CTR8<imp-use>, %RM<imp-use>, %X3<imp-use>, %X12<imp-use>, %X1<imp-def>, ...
         LDinto_toc 24, %X1
         ADJCALLSTACKUP 96, 0, %R1<imp-def>, %R1<imp-use>
      
      Because the LDinto_toc is inserted prior to the ADJCALLSTACKUP, there
      is a natural anti-dependency between the two that keeps it in place.
      
      Therefore we don't usually see a problem.  However, in one particular
      case, one call is followed immediately by another call, and the second
      call requires a parameter that is a TOC-relative address.  This is the
      code sequence:
      
        BCTRL8 <regmask>, %CTR8<imp-use>, %RM<imp-use>, %X3<imp-use>, %X4<imp-use>, %X5<imp-use>, %X12<imp-use>, %X1<imp-def>, ...
        LDinto_toc 24, %X1
        ADJCALLSTACKUP 96, 0, %R1<imp-def>, %R1<imp-use>
        ADJCALLSTACKDOWN 96, %R1<imp-def>, %R1<imp-use>
        %vreg39<def> = ADDIStocHA %X2, <ga:@.str>; G8RC_and_G8RC_NOX0:%vreg39
        %vreg40<def> = ADDItocL %vreg39<kill>, <ga:@.str>; G8RC:%vreg40 G8RC_and_G8RC_NOX0:%vreg39
      
      Note that the back-to-back stack adjustments are the same size!  The
      back end is smart enough to recognize this and optimize them away:
      
        BCTRL8 <regmask>, %CTR8<imp-use>, %RM<imp-use>, %X3<imp-use>, %X4<imp-use>, %X5<imp-use>, %X12<imp-use>, %X1<imp-def>, ...
        LDinto_toc 24, %X1
        %vreg39<def> = ADDIStocHA %X2, <ga:@.str>; G8RC_and_G8RC_NOX0:%vreg39
        %vreg40<def> = ADDItocL %vreg39<kill>, <ga:@.str>; G8RC:%vreg40 G8RC_and_G8RC_NOX0:%vreg39
      
      Now there is nothing to prevent the ADDIStocHA instruction from moving
      ahead of the LDinto_toc instruction, and because of the longest-path
      heuristic, this is what happens.
      
      With the accompanying patch, %X2 is represented as an implicit def:
      
        BCTRL8 <regmask>, %CTR8<imp-use>, %RM<imp-use>, %X3<imp-use>, %X4<imp-use>, %X5<imp-use>, %X12<imp-use>, %X1<imp-def>, ...
        LDinto_toc 24, %X1, %X2<imp-def,dead>
        ADJCALLSTACKUP 96, 0, %R1<imp-def,dead>, %R1<imp-use>
        ADJCALLSTACKDOWN 96, %R1<imp-def,dead>, %R1<imp-use>
        %vreg39<def> = ADDIStocHA %X2, <ga:@.str>; G8RC_and_G8RC_NOX0:%vreg39
        %vreg40<def> = ADDItocL %vreg39<kill>, <ga:@.str>; G8RC:%vreg40 G8RC_and_G8RC_NOX0:%vreg39
      
      So now when the two stack adjustments are removed, ADDIStocHA is
      prevented from being moved above LDinto_toc.
      
      I have not yet created a test case for this, because the original
      failure occurs on a relatively large function that needs reduction.
      However, this is a fairly serious bug, despite its infrequency, and I
      wanted to get this patch onto the list as soon as possible so that it
      can be considered for a 3.5 backport.  I'll work on whittling down a
      test case.
      
      Have we missed the boat for 3.5 at this point?
      
      Thanks,
      Bill
      
      llvm-svn: 215685
      3755e17d
    • Johannes Doerfert's avatar
      Added support for modulo expressions · 5130c849
      Johannes Doerfert authored
        The support is limited to signed modulo access and condition
        expressions with a constant right hand side, e.g., A[i % 2] or
        A[i % 9]. Test cases are modified according to this new feature and
        new test cases are added.
      
      Differential Revision: http://reviews.llvm.org/D4843
      
      llvm-svn: 215684
      5130c849
    • Reid Kleckner's avatar
      Limit our MSVC compat hack for nested names from dependent bases · 062be331
      Reid Kleckner authored
      Previously, any undeclared unqualified id starting a nested name
      specifier in a dependent context would have its lookup retried during
      template instantiation.  Now we limit that retry hack to methods of a
      class with dependent bases.  Free function templates in particular are
      no longer affected by this hack.
      
      Also, diagnose this as a Microsoft extension. This has the downside that
      template authors may see this warning *and* an error during
      instantiation time about this identifier. Fixing that will probably
      require formalizing some kind of "delayed" identifier, instead of our
      ad-hoc solutions of forming dependent AST nodes when lookup fails.
      
      Based on a patch by Kim Gräsman!
      
      Differential Revision: http://reviews.llvm.org/D4854
      
      llvm-svn: 215683
      062be331
    • Juergen Ributzka's avatar
      [FastISel][ARM] Fall-back to constant pool loads when materializing an i32 constant. · 81db58e1
      Juergen Ributzka authored
      FastEmit_i won't always succeed to materialize an i32 constant and just fail.
      This would trigger a fall-back to SelectionDAG, which is really not necessary.
      
      This fix will first fall-back to a constant pool load to materialize the constant
      before giving up for good.
      
      This fixes <rdar://problem/18022633>.
      
      llvm-svn: 215682
      81db58e1
    • Eric Christopher's avatar
      Fix typo in error message. · 7cbd2b99
      Eric Christopher authored
      llvm-svn: 215681
      7cbd2b99
    • Nick Kledzik's avatar
      [mach-o] Support -F and -framework options in darwin driver · 2d835dad
      Nick Kledzik authored
      Darwin has a packaging mechanism for shared libraries and headers called
      frameworks.  A directory Foo.framework contains a shared library binary file
      "Foo" and a subdirectory "Headers". Most OS frameworks are all in one
      directory /System/Library/Frameworks/.  As a linking convenience, the linker
      option "-framework Foo" means search the framework directories specified
      with -F (analogous to -L) looking for a shared library Foo.framework/Foo.
      
      llvm-svn: 215680
      2d835dad
    • DeLesley Hutchins's avatar
      Thread Safety Analysis: Move -Wthread-safety-negative out of the · e8d2a9d7
      DeLesley Hutchins authored
      -Wthread-safety umbrella flag, pending updates to documentation.  The flag
      works, but is likely to be confusing to existing users of -Wthread-safety.
      
      llvm-svn: 215679
      e8d2a9d7
    • Brad Smith's avatar
      Use a switch statement for IsIntegratedAssemblerDefault(). · d4cb911d
      Brad Smith authored
      llvm-svn: 215678
      d4cb911d
    • DeLesley Hutchins's avatar
      Thread safety analysis: add -Wthread-safety-verbose flag, which adds... · eb0ea5f4
      DeLesley Hutchins authored
      Thread safety analysis: add -Wthread-safety-verbose flag, which adds additional notes that are helpful when compiling statistics on thread safety warnings.
      
      llvm-svn: 215677
      eb0ea5f4
    • Hal Finkel's avatar
      Copy noalias metadata from call sites to inlined instructions · 61c38612
      Hal Finkel authored
      When a call site with noalias metadata is inlined, that metadata can be
      propagated directly to the inlined instructions (only those that might access
      memory because it is not useful on the others). Prior to inlining, the noalias
      metadata could express that a call would not alias with some other memory
      access, which implies that no instruction within that called function would
      alias. By propagating the metadata to the inlined instructions, we preserve
      that knowledge.
      
      This should complete the enhancements requested in PR20500.
      
      llvm-svn: 215676
      61c38612
    • Richard Smith's avatar
      [modules] Turn off a broken optimization: we need to pick up implicit special · 462b6fc6
      Richard Smith authored
      members from all redefinitions of a class that have them, in case the special
      member is defined in one module but only declared in another.
      
      llvm-svn: 215675
      462b6fc6
    • Zachary Turner's avatar
      Update .gitignore for MacOSX · 015ebbc8
      Zachary Turner authored
      Differential Revision: http://reviews.llvm.org/D4912
      
      llvm-svn: 215674
      015ebbc8
    • Juergen Ributzka's avatar
      Revert several FastISel commits to track down a buildbot error. · 790bacf2
      Juergen Ributzka authored
      This reverts:
      r215595 "[FastISel][X86] Add large code model support for materializing floating-point constants."
      r215594 "[FastISel][X86] Use XOR to materialize the "0" value."
      r215593 "[FastISel][X86] Emit more efficient instructions for integer constant materialization."
      r215591 "[FastISel][AArch64] Make use of the zero register when possible."
      r215588 "[FastISel] Let the target decide first if it wants to materialize a constant."
      r215582 "[FastISel][AArch64] Cleanup constant materialization code. NFCI."
      
      llvm-svn: 215673
      790bacf2
    • Reid Kleckner's avatar
      Don't Lex past EOF when lexing _Pragma · 53e6a5d6
      Reid Kleckner authored
      Fixes PR20662.
      
      llvm-svn: 215672
      53e6a5d6