Skip to content
  1. May 28, 2014
    • Jim Grosbach's avatar
      Update CREDITS to be at least moderately more current. · 92f11f44
      Jim Grosbach authored
      llvm-svn: 209770
      92f11f44
    • Sanjay Patel's avatar
      fixed a few typos · 8cf3bb4f
      Sanjay Patel authored
      llvm-svn: 209768
      8cf3bb4f
    • Sanjay Patel's avatar
      test check-in: added missing parenthesis in comment · 26b6edcf
      Sanjay Patel authored
      llvm-svn: 209763
      26b6edcf
    • Rafael Espindola's avatar
      Revert "InstCombine: Improvement to check if signed addition overflows." · fb59b05c
      Rafael Espindola authored
      This reverts commit r209746.
      
      It looks it is causing a crash while building libcxx. I am trying to get a
      reduced testcase.
      
      llvm-svn: 209762
      fb59b05c
    • Reid Kleckner's avatar
      Fix standard integer definitions for MSVC in DataTypes.h · 8a03f53c
      Reid Kleckner authored
      Previously, DataTypes.h would #define a variety of symbols any time
      they weren't already defined.  However, some versions of Visual
      Studio do provide the appropriate headers, so if those headers are
      included after DataTypes.h, it can lead to macro redefinition
      warnings.
      
      The fix is to include the appropriate headers if they exist, and
      only #define the symbols if the required header does not exist.
      
      Patch by Zachary Turner!
      
      ---
      
      The big change here is that we no longer have our own stdint.h
      typedefs because now all supported toolchains have stdint.h.
      Hooray!
      
      llvm-svn: 209760
      8a03f53c
    • Rafael Espindola's avatar
      [pr19844] Add thread local mode to aliases. · 59f7eba2
      Rafael Espindola authored
      This matches gcc's behavior. It also seems natural given that aliases
      contain other properties that govern how it is accessed (linkage,
      visibility, dll storage).
      
      Clang still has to be updated to expose this feature to C.
      
      llvm-svn: 209759
      59f7eba2
    • Louis Gerbarg's avatar
      Add support for combining GEPs across PHI nodes · 727f1cbb
      Louis Gerbarg authored
      Currently LLVM will generally merge GEPs. This allows backends to use more
      complex addressing modes. In some cases this is not happening because there
      is PHI inbetween the two GEPs:
      
        GEP1--\
              |-->PHI1-->GEP3
        GEP2--/
      
      This patch checks to see if GEP1 and GEP2 are similiar enough that they can be
      cloned (GEP12) in GEP3's BB, allowing GEP->GEP merging (GEP123):
      
        GEP1--\                     --\                           --\
              |-->PHI1-->GEP3  ==>    |-->PHI2->GEP12->GEP3 == >    |-->PHI2->GEP123
        GEP2--/                     --/                           --/
      
      This also breaks certain use chains that are preventing GEP->GEP merges that the
      the existing instcombine would merge otherwise.
      
      Tests included.
      
      llvm-svn: 209755
      727f1cbb
    • Hal Finkel's avatar
      Revert "[DAGCombiner] Split up an indexed load if only the base pointer value is live" · 2c77fe59
      Hal Finkel authored
      This reverts r208640 (I've just XFAILed the test) because it broke ppc64/Linux
      self-hosting. Because nearly every regression test triggers a segfault, I hope
      this will be easy to fix.
      
      llvm-svn: 209747
      2c77fe59
    • Rafael Espindola's avatar
      InstCombine: Improvement to check if signed addition overflows. · 085b5794
      Rafael Espindola authored
      This patch implements two things:
      
      1. If we know one number is positive and another is negative, we return true as
         signed addition of two opposite signed numbers will never overflow.
      
      2. Implemented TODO : If one of the operands only has one non-zero bit, and if
         the other operand has a known-zero bit in a more significant place than it
         (not including the sign bit) the ripple may go up to and fill the zero, but
         won't change the sign. e.x -  (x & ~4) + 1
      
      We make sure that we are ignoring 0 at MSB.
      
      Patch by Suyog Sarda.
      
      llvm-svn: 209746
      085b5794
    • Hal Finkel's avatar
      Revert "[PPC] Use alias symbols in address computation." · f5c07ada
      Hal Finkel authored
      This reverts commit r209638 because it broke self-hosting on ppc64/Linux. (the
      Clang-compiled TableGen would segfault because it jumped to an invalid address
      from within _ZNK4llvm17ManagedStaticBase21RegisterManagedStaticEPFPvvEPFvS1_E
      (which is within the command-line parameter registration process)).
      
      llvm-svn: 209745
      f5c07ada
    • Joerg Sonnenberger's avatar
      Don't hard-code ld when extracting host linker version, use ${LD} if · e6aafbb2
      Joerg Sonnenberger authored
      it is set.
      
      llvm-svn: 209742
      e6aafbb2
    • Evgeniy Stepanov's avatar
      386b58d0
    • Tilmann Scheller's avatar
      [AArch64] Add store post-index update folding regression tests for the load/store optimizer. · 7c747fc7
      Tilmann Scheller authored
      Add regression tests for the following transformation:
      
        str X, [x20]
         ...
        add x20, x20, #32
         ->
        str X, [x20], #32
      
      with X being either w0, x0, s0, d0 or q0.
      
      llvm-svn: 209715
      7c747fc7
    • Justin Bogner's avatar
      utils: Teach lldbDataFormatters to load automatically · dc30fbf7
      Justin Bogner authored
      Add an __lldb_init_module function so that importing the
      lldbDataFormatters script automatically adds the formatters.
      
      llvm-svn: 209712
      dc30fbf7
    • Tilmann Scheller's avatar
      [AArch64] Add load post-index update folding regression tests for the load/store optimizer. · 35e45146
      Tilmann Scheller authored
      Add regression tests for the following transformation:
      
       ldr X, [x20]
        ...
       add x20, x20, #32
        ->
       ldr X, [x20], #32
      
       with X being either w0, x0, s0, d0 or q0.
      
      llvm-svn: 209711
      35e45146
    • Alexey Samsonov's avatar
      Change representation of instruction ranges where variable is accessible. · bb2990df
      Alexey Samsonov authored
      Use more straightforward way to represent the set of instruction
      ranges where the location of a user variable is defined - vector of pairs
      of instructions (defining start/end of each range),
      instead of a flattened vector of instructions where some instructions
      are supposed to start the range, and the rest are supposed to "clobber" it.
      
      Simplify the code which generates actual .debug_loc entries.
      
      No functionality change.
      
      llvm-svn: 209698
      bb2990df
    • Alexey Samsonov's avatar
      Factor out looking for prologue end into a function · 8a86d6da
      Alexey Samsonov authored
      llvm-svn: 209697
      8a86d6da
    • Sebastian Pop's avatar
      avoid type mismatch when building SCEVs · f93ef123
      Sebastian Pop authored
      This is a corner case I have stumbled upon when dealing with ARM64 type
      conversions. I was not able to extract a testcase for the community codebase to
      fail on. The patch conservatively discards a division that would have ended up
      in an ICE due to a type mismatch when building a multiply expression. I have
      also added code to a place that builds add expressions and in which we should be
      careful not to pass in operands of different types.
      
      llvm-svn: 209694
      f93ef123
    • Sebastian Pop's avatar
      do not use the GCD to compute the delinearization strides · e30bd351
      Sebastian Pop authored
      We do not need to compute the GCD anymore after we removed the constant
      coefficients from the terms: the terms are now all parametric expressions and
      there is no need to recognize constant terms that divide only a subset of the
      terms. We only rely on the size of the terms, i.e., the number of operands in
      the multiply expressions, to sort the terms and recognize the parametric
      dimensions.
      
      llvm-svn: 209693
      e30bd351
    • Sebastian Pop's avatar
      remove BasePointer before delinearizing · 28e6b97b
      Sebastian Pop authored
      No functional change is intended: instead of relying on the delinearization to
      come up with the base pointer as a remainder of the divisions in the
      delinearization, we just compute it from the array access and use that value.
      We substract the base pointer from the SCEV to be delinearized and that
      simplifies the work of the delinearizer.
      
      llvm-svn: 209692
      28e6b97b
    • Sebastian Pop's avatar
      remove constant terms · a6e58605
      Sebastian Pop authored
      The delinearization is needed only to remove the non linearity induced by
      expressions involving multiplications of parameters and induction variables.
      There is no problem in dealing with constant times parameters, or constant times
      an induction variable.
      
      For this reason, the current patch discards all constant terms and multipliers
      before running the delinearization algorithm on the terms. The only thing
      remaining in the term expressions are parameters and multiply expressions of
      parameters: these simplified term expressions are passed to the array shape
      recognizer that will not recognize constant dimensions anymore: these will be
      recognized as different strides in parametric subscripts.
      
      The only important special case of a constant dimension is the size of elements.
      Instead of relying on the delinearization to infer the size of an element,
      compute the element size from the base address type. This is a much more precise
      way of computing the element size than before, as we would have mixed together
      the size of an element with the strides of the innermost dimension.
      
      llvm-svn: 209691
      a6e58605
    • Alexey Samsonov's avatar
      Don't pre-populate the set of keys in the map with variable locations history. · f0e0cca0
      Alexey Samsonov authored
      Current implementation of calculateDbgValueHistory already creates the
      keys in the expected order (user variables are listed in order of appearance),
      and should do so later by contract.
      
      No functionality change.
      
      llvm-svn: 209690
      f0e0cca0
    • Arnaud A. de Grandmaison's avatar
      No need for those tests to go thru llvm-as and/or llvm-dis. · de5ff268
      Arnaud A. de Grandmaison authored
      opt can handle them by itself.
      
      llvm-svn: 209689
      de5ff268
  2. May 27, 2014
    • Arnaud A. de Grandmaison's avatar
      Factor out comparison of Instruction "special" states. · 6a90dc4f
      Arnaud A. de Grandmaison authored
      No functional change.
      
      llvm-svn: 209688
      6a90dc4f
    • Reid Kleckner's avatar
      Wording fix for llvm.global_dtors docs. · bffbcc59
      Reid Kleckner authored
      llvm-svn: 209687
      bffbcc59
    • David Blaikie's avatar
      DebugInfo: partially revert cleanup committed in r209680 · 6900674a
      David Blaikie authored
      I'm not sure exactly where/how we end up with an abstract DbgVariable
      with a null DIE, but we do... looking into it & will add a test and/or
      fix when I figure it out.
      
      Currently shows up in selfhost or compiler-rt builds.
      
      llvm-svn: 209683
      6900674a
    • David Blaikie's avatar
      DebugInfo: Simplify solution to avoid DW_AT_artificial on inlined parameters. · b85f0080
      David Blaikie authored
      Originally committed in r207717, I clearly didn't look very closely at
      the code to understand how existing things were working...
      
      llvm-svn: 209680
      b85f0080
    • Sasa Stankovic's avatar
      [mips] Optimize long branch for MIPS64 by removing %higher and %highest. · e41db2fe
      Sasa Stankovic authored
      %higher and %highest can have non-zero values only for offsets greater
      than 2GB, which is highly unlikely, if not impossible when compiling a
      single function. This makes long branch for MIPS64 3 instructions smaller.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D3281.diff
      
      llvm-svn: 209678
      e41db2fe
    • David Blaikie's avatar
      DebugInfo: Create abstract function definitions even when concrete definitions... · 482097d0
      David Blaikie authored
      DebugInfo: Create abstract function definitions even when concrete definitions preceed inline definitions.
      
      After much puppetry, here's the major piece of the work to ensure that
      even when a concrete definition preceeds all inline definitions, an
      abstract definition is still created and referenced from both concrete
      and inline definitions.
      
      Variables are still broken in this case (see comment in
      dbg-value-inlined-parameter.ll test case) and will be addressed in
      follow up work.
      
      llvm-svn: 209677
      482097d0
    • David Blaikie's avatar
      2910f620
    • David Blaikie's avatar
      DebugInfo: Lazily construct subprogram definition DIEs. · 3c2fff3f
      David Blaikie authored
      A further step to correctly emitting concrete out of line definitions
      preceeding inlined instances of the same program.
      
      To do this, emission of subprograms must be delayed until required since
      we don't know which (abstract only (if there's no out of line
      definition), concrete only (if there are no inlined instances), or both)
      DIEs are required at the start of the module.
      
      To reduce the test churn in the following commit that actually fixes the
      bug, this commit introduces the lazy DIE construction and cleans up test
      cases that are impacted by the changes in the resulting DIE ordering.
      
      llvm-svn: 209675
      3c2fff3f
    • David Blaikie's avatar
      DebugInfo: Lazily attach definition attributes to definitions. · f7221adb
      David Blaikie authored
      This is a precursor to fixing inlined debug info where the concrete,
      out-of-line definition may preceed any inlined usage. To cope with this,
      the attributes that may appear on the concrete definition or the
      abstract definition are delayed until the end of the module. Then, if an
      abstract definition was created, it is referenced (and no other
      attributes are added to the out-of-line definition), otherwise the
      attributes are added directly to the out-of-line definition.
      
      In a couple of cases this causes not just reordering of attributes, but
      reordering of types. When the creation of the attribute is delayed, if
      that creation would create a type (such as for a DW_AT_type attribute)
      then other top level DIEs may've been constructed during the delay,
      causing the referenced type to be created and added after those
      intervening DIEs. In the extreme case, in cross-cu-inlining.ll, this
      actually causes the DW_TAG_basic_type for "int" to move from one CU to
      another.
      
      llvm-svn: 209674
      f7221adb
    • David Blaikie's avatar
      DebugInfo: Separate out the addition of subprogram attribute additions so that... · 7f91686f
      David Blaikie authored
      DebugInfo: Separate out the addition of subprogram attribute additions so that they can be added later depending on whether or not the function is inlined.
      
      llvm-svn: 209673
      7f91686f
    • Jingyue Wu's avatar
      Fixed a test in r209670 · 76cbea6b
      Jingyue Wu authored
      The test was outdated with r209537.
      
      llvm-svn: 209671
      76cbea6b
    • Jingyue Wu's avatar
      Distribute sext/zext to the operands of and/or/xor · 80a738dc
      Jingyue Wu authored
      This is an enhancement to SeparateConstOffsetFromGEP. With this patch, we can
      extract a constant offset from "s/zext and/or/xor A, B".
      
      Added a new test @ext_or to verify this enhancement.
      
      Refactoring the code, I also extracted some common logic to function
      Distributable. 
      
      llvm-svn: 209670
      80a738dc
    • David Blaikie's avatar
      DebugInfo: Fix argument ordering in test by adding argument numbering. · 66c30774
      David Blaikie authored
      This old test didn't have the argument numbering that's now squirelled
      away in the high bits of the line number in the DW_TAG_arg_variable
      metadata.
      
      Add the numbering and update the test to ensure arguments are in-order.
      
      llvm-svn: 209669
      66c30774
    • Filipe Cabecinhas's avatar
      Post-commit fixes for r209643 · e8d6a1e8
      Filipe Cabecinhas authored
      Detected by Daniel Jasper, Ilia Filippov, and Andrea Di Biagio
      Fixed the argument order to select (the mask semantics to blendv* are the
      inverse of select) and fixed the tests
      Added parenthesis to the assert condition
      Ran clang-format
      
      llvm-svn: 209667
      e8d6a1e8
    • Tim Northover's avatar
      AArch64: add test for NZCV cross-copy save. · 9a6217b6
      Tim Northover authored
      llvm-svn: 209665
      9a6217b6
    • Tim Northover's avatar
      AArch64: add AArch64-specific test for 'c' and 'n'. · de9402d3
      Tim Northover authored
      llvm-svn: 209664
      de9402d3
    • Bill Schmidt's avatar
      [PATCH] Correct type used for VADD_SPLAT optimization on PowerPC · 71dddd51
      Bill Schmidt authored
      In PPCISelLowering.cpp: PPCTargetLowering::LowerBUILD_VECTOR(), there
      is an optimization for certain patterns to generate one or two vector
      splats followed by a vector add or subtract.  This operation is
      represented by a VADD_SPLAT in the selection DAG.  Prior to this
      patch, it was possible for the VADD_SPLAT to be assigned the wrong
      data type, causing incorrect code generation.  This patch corrects the
      problem.
      
      Specifically, the code previously assigned the value type of the
      BUILD_VECTOR node to the newly generated VADD_SPLAT node.  This is
      correct much of the time, but not always.  The problem is that the
      call to isConstantSplat() may return a SplatBitSize that is not the
      same as the number of bits in the original element vector type.  The
      correct type to assign is a vector type with the same element bit size
      as SplatBitSize.
      
      The included test case shows an example of this, where the
      BUILD_VECTOR node has a type of v16i8.  The vector to be built is {0,
      16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16}.  isConstantSplat
      detects that we can generate a splat of 16 for type v8i16, which is
      the type we must assign to the VADD_SPLAT node.  If we do not, we
      generate a vspltisb of 8 and a vaddubm, which generates the incorrect
      result {16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
      16}.  The correct code generation is a vspltish of 8 and a vadduhm.
      
      This patch also corrected code generation for
      CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll, which had been marked
      as an XFAIL, so we can remove the XFAIL from the test case.
      
      llvm-svn: 209662
      71dddd51
Loading