1. Apr 10, 2013
    • Argyrios Kyrtzidis's avatar
      2bee6665
    • Chad Rosier's avatar
      Revert r179115 as it looks to have killed the ASan tests. · e8d8288d
      Chad Rosier authored
      llvm-svn: 179120
      e8d8288d
    • Chandler Carruth's avatar
      Rationalize the formatting of these case labels. Having two sorted · 9f6b59ae
      Chandler Carruth authored
      columns is essentially impossible to edit.
      
      llvm-svn: 179119
      9f6b59ae
    • Reed Kotler's avatar
      This patch enables llvm to switch between compiling for mips32/mips64 · 1595f36d
      Reed Kotler authored
      and mips16 on a per function basis.
      
      Because this patch is somewhat involved I have provide an overview of the
      key pieces of it.
      
      The patch is written so as to not change the behavior of the non mixed
      mode. We have tested this a lot but it is something new to switch subtargets
      so we don't want any chance of regression in the mainline compiler until
      we have more confidence in this.
      
      Mips32/64 are very different from Mip16 as is the case of ARM vs Thumb1.
      For that reason there are derived versions of the register info, frame info, 
      instruction info and instruction selection classes.
      
      Now we register three separate passes for instruction selection.
      One which is used to switch subtargets (MipsModuleISelDAGToDAG.cpp) and then
      one for each of the current subtargets (Mips16ISelDAGToDAG.cpp and
      MipsSEISelDAGToDAG.cpp).
      
      When the ModuleISel pass runs, it determines if there is a need to switch
      subtargets and if so, the owning pointers in MipsTargetMachine are
      appropriately changed.
      
      When 16Isel or SEIsel is run, they will return immediately without doing
      any work if the current subtarget mode does not apply to them.
      
      In addition, MipsAsmPrinter needs to be reset on a function basis.
      
      The pass BasicTargetTransformInfo is substituted with a null pass since the
      pass is immutable and really needs to be a function pass for it to be
      used with changing subtargets. This will be fixed in a follow on patch.
      
      llvm-svn: 179118
      1595f36d
    • Nadav Rotem's avatar
      Add support for bottom-up SLP vectorization infrastructure. · 2d9dec32
      Nadav Rotem authored
      This commit adds the infrastructure for performing bottom-up SLP vectorization (and other optimizations) on parallel computations.
      The infrastructure has three potential users:
      
        1. The loop vectorizer needs to be able to vectorize AOS data structures such as (sum += A[i] + A[i+1]).
      
        2. The BB-vectorizer needs this infrastructure for bottom-up SLP vectorization, because bottom-up vectorization is faster to compute.
      
        3. A loop-roller needs to be able to analyze consecutive chains and roll them into a loop, in order to reduce code size. A loop roller does not need to create vector instructions, and this infrastructure separates the chain analysis from the vectorization.
      
      This patch also includes a simple (100 LOC) bottom up SLP vectorizer that uses the infrastructure, and can vectorize this code:
      
      void SAXPY(int *x, int *y, int a, int i) {
        x[i]   = a * x[i]   + y[i];
        x[i+1] = a * x[i+1] + y[i+1];
        x[i+2] = a * x[i+2] + y[i+2];
        x[i+3] = a * x[i+3] + y[i+3];
      }
      
      llvm-svn: 179117
      2d9dec32
    • Eric Christopher's avatar
      Make check depend on all. · caeddf5a
      Eric Christopher authored
      llvm-svn: 179116
      caeddf5a
    • Chad Rosier's avatar
      [ms-inline asm] Use parsePrimaryExpr in lieu of parseExpression if we need to · a08f30f0
      Chad Rosier authored
      parse an identifier.  Otherwise, parseExpression may parse multiple tokens,
      which makes it impossible to properly compute an immediate displacement.
      An example of such a case is the source operand (i.e., [Symbol + ImmDisp]) in
      the below example:
      
       __asm mov eax, [Symbol + ImmDisp]
      
      The existing test cases exercise this patch.
      rdar://13611297
      
      llvm-svn: 179115
      a08f30f0
    • Eric Christopher's avatar
      The .dwo section shouldn't contain the unrelocated values (and · 52ce7189
      Eric Christopher authored
      therefore not at all) of the pc or statement list. We also don't
      need to emit the compilation dir so save so space and time
      and don't bother.
      
      Fix up the testcase accordingly and verify that we don't emit
      the attributes or the items that they use.
      
      llvm-svn: 179114
      52ce7189
    • Hal Finkel's avatar
      Cleanup PPCEarlyReturn · 21aad9a8
      Hal Finkel authored
      Some general cleanup and only scan the end of a BB for branches (once we're
      done with the terminators and debug values, then there should not be any other
      branches). These address post-commit review suggestions by Bill Schmidt.
      
      No functionality change intended.
      
      llvm-svn: 179112
      21aad9a8
    • Nadav Rotem's avatar
      Revert r176408 and r176407 to address PR15540. · abcc64fd
      Nadav Rotem authored
      llvm-svn: 179111
      abcc64fd
    • Jim Ingham's avatar
      Fix the help message for “one-shot”. · b2b256af
      Jim Ingham authored
      llvm-svn: 179110
      b2b256af
    • Chad Rosier's avatar
      [ms-inline asm] Maintain a StringRef to reference a symbol in a parsed operand, · e81309b3
      Chad Rosier authored
      rather than deriving the StringRef from the Start and End SMLocs.
      
      Using the Start and End SMLocs works fine for operands such as [Symbol], but
      not for operands such as [Symbol + ImmDisp].  All existing test cases that
      reference a variable exercise this patch.
      rdar://13602265
      
      llvm-svn: 179109
      e81309b3
    • Fariborz Jahanian's avatar
      Objective-C: This patch fixes a none-issuance of warning · ada44a20
      Fariborz Jahanian authored
      when result type of protocol property and getter method
      differ by fixing a more serious problem. When a forward
      protocol declaration comes between its definition and
      its use in class protocol list, the forward protocol
      ast was being used in building the protocol list.
      // rdar://12522752
      
      llvm-svn: 179108
      ada44a20
    • Daniel Jasper's avatar
      Fix comments before labels. · b67cc423
      Daniel Jasper authored
      Before:
      switch (...) {
        // a
        // b
      // c
      case first:
        break;
      }
      
      After:
      switch (...) {
      // a
      // b
      // c
      case first:
        break;
      }
      
      llvm-svn: 179107
      b67cc423
    • Benjamin Kramer's avatar
      DAGCombiner: Fold a shuffle on CONCAT_VECTORS into a new CONCAT_VECTORS if possible. · bbae991d
      Benjamin Kramer authored
      This pattern occurs in SROA output due to the way vector arguments are lowered
      on ARM.
      
      The testcase from PR15525 now compiles into this, which is better than the code
      we got with the old scalarrepl:
      _Store:
      	ldr.w	r9, [sp]
      	vmov	d17, r3, r9
      	vmov	d16, r1, r2
      	vst1.8	{d16, d17}, [r0]
      	bx	lr
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D647
      
      llvm-svn: 179106
      bbae991d
    • Hal Finkel's avatar
      Use virtual base registers on PPC · b5899d57
      Hal Finkel authored
      On PowerPC, non-vector loads and stores have r+i forms; however, in functions
      with large stack frames these were not being used to access slots far from the
      stack pointer because such slots were out of range for the signed 16-bit
      immediate offset field. This increases register pressure because we need a
      separate register for each offset (when the r+r form is used). By enabling
      virtual base registers, we can deal with large stack frames without unduly
      increasing register pressure.
      
      llvm-svn: 179105
      b5899d57
    • Hal Finkel's avatar
      Convert test PowerPC/2007-09-07-LoadStoreIdxForms to FileCheck · 059825b0
      Hal Finkel authored
      llvm-svn: 179104
      059825b0
    • Ariel J. Bernal's avatar
      Fix UseNullptr fails to replace c-style explicit cast in a return statement · 464957e2
      Ariel J. Bernal authored
      This happens whenever there is a c-style explicit cast to nullptr not
      surrounded by parentheses following a return statement.
      
      - Added a white space before nullptr if the character before is alphanumeric
        when replacing the null pointer expression.
      - Simplified visitor
      - Addes tests
      
      llvm-svn: 179103
      464957e2
    • Eli Bendersky's avatar
      Rewrite test/Linker tests to use FileCheck instead of grep. · 1cc814a8
      Eli Bendersky authored
      Some translations here are not 1x1 because there are grep|grep
      chains that are non-trivial to implement in terms of FileCheck features. I
      made an effort for the tests to remain as similar as possible; do let me know
      if you notice anything fishy. The good news are that some buggy tests were
      fixed (grep | not grep - a bug waiting to happen).
      
      llvm-svn: 179102
      1cc814a8
    • Alexander Kornienko's avatar
      Again macros without trailing semicolons: don't care about declaration context. · a04e5e21
      Alexander Kornienko authored
      Summary:
      Some codebases use these kinds of macros in functions, e.g. Chromium's
      IPC_BEGIN_MESSAGE_MAP, IPC_BEGIN_MESSAGE_HANDLER, etc.
      
      Reviewers: djasper, klimek
      
      Reviewed By: klimek
      
      CC: cfe-commits
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D645
      
      llvm-svn: 179099
      a04e5e21
  2. Apr 09, 2013