Skip to content
  1. Sep 10, 2015
    • Johannes Doerfert's avatar
      Replace ScalarEvolution based domain generation · 5b9ff8b6
      Johannes Doerfert authored
      This patch replaces the last legacy part of the domain generation, namely the
      ScalarEvolution part that was used to obtain loop bounds. We now iterate over
      the loops in the region and propagate the back edge condition to the header
      blocks. Afterwards we propagate the new information once through the whole
      region. In this process we simply ignore unbounded parts of the domain and
      thereby assume the absence of infinite loops.
      
        + This patch already identified a couple of broken unit tests we had for
          years.
        + We allow more loops already and the step to multiple exit and multiple back
          edges is minimal.
        + It allows to model the overflow checks properly as we actually visit
          every block in the SCoP and know where which condition is evaluated.
        - It is currently not compatible with modulo constraints in the
          domain.
      
      Differential Revision: http://reviews.llvm.org/D12499
      
      llvm-svn: 247279
      5b9ff8b6
    • Johannes Doerfert's avatar
      Disable support for modulo expressions · 171f07ed
      Johannes Doerfert authored
        The support for modulo expressions is not comlete and makes the new
        domain generation harder. As the currently broken domain generation
        needs to be replaced, we will first swap in the new, fixed domain
        generation and make it compatible with the modulo expressions later.
      
      llvm-svn: 247278
      171f07ed
    • Igor Breger's avatar
      AVX-512: Changed nidx parameter in extractf64/32 intrinsic from i8 to i32... · 86be1c5c
      Igor Breger authored
      AVX-512: Changed nidx parameter in extractf64/32 intrinsic from i8 to i32 according to the Intel Spec
      
      Differential Revision: http://reviews.llvm.org/D12752
      
      llvm-svn: 247277
      86be1c5c
    • Igor Breger's avatar
      AVX512: Implemented encoding and intrinsics for · 7f69a99c
      Igor Breger authored
        vextracti64x4 ,vextracti64x2, vextracti32x8, vextracti32x4, vextractf64x4, vextractf64x2, vextractf32x8, vextractf32x4
      Added tests for intrinsics and encoding.
      
      Differential Revision: http://reviews.llvm.org/D11802
      
      llvm-svn: 247276
      7f69a99c
    • Aaron Ballman's avatar
      Silencing C4141 warnings that were introduced en masse because __forceinline... · e11ce627
      Aaron Ballman authored
      Silencing C4141 warnings that were introduced en masse because __forceinline cannot be combined with inline in MSVC without triggering this diagnostic. This is safe to disable because clang will catch instances of the issue with -Wduplicate-decl-specifier, so we are not losing diagnostic coverage.
      
      llvm-svn: 247275
      e11ce627
    • Michael Kruse's avatar
      Merge TempScopInfo.{cpp|h} into ScopInfo.{cpp|h} · 7bf3944d
      Michael Kruse authored
      This prepares for a series of patches that merges TempScopInfo into ScopInfo to
      reduce Polly's code complexity. Only ScopInfo.{cpp|h} will be left thereafter.
      Moving the code of TempScopInfo in one commit makes the mains diffs simpler to
      understand.
      
      In detail, merging the following classes is planned:
      TempScopInfo into ScopInfo
      TempScop into Scop
      IRAccess into MemoryAccess
      
      Only moving code, no functional changes intended.
      
      Differential Version: http://reviews.llvm.org/D12693
      
      llvm-svn: 247274
      7bf3944d
    • Alexey Bataev's avatar
      [OPENMP] Generate threadprivates as TLS variables by default. · 6a43c00e
      Alexey Bataev authored
      If target supports TLS all threadprivates are generated as TLS. If target does not support TLS, use runtime calls for proper codegen of threadprivate variables.
      
      llvm-svn: 247273
      6a43c00e
    • Benjamin Kramer's avatar
      [FileCheck] Use range-based for loops. NFC. · 8f870499
      Benjamin Kramer authored
      llvm-svn: 247272
      8f870499
    • Jakub Kuderski's avatar
      There is a trunc(lshr (zext A), Cst) optimization in InstCombineCasts that · 58ea4eeb
      Jakub Kuderski authored
      removes cast by performing the lshr on smaller types. However, currently there
      is no trunc(lshr (sext A), Cst) variant.
      This patch add such optimization by transforming trunc(lshr (sext A), Cst)
      to ashr A, Cst.
      
      Differential Revision: http://reviews.llvm.org/D12520
      
      llvm-svn: 247271
      58ea4eeb
    • Alexey Bataev's avatar
      [OPENMP] Fix test incompatibility with Windows. · 5852e429
      Alexey Bataev authored
      llvm-svn: 247270
      5852e429
    • Chandler Carruth's avatar
      [ADT] Rewrite the StringRef::find implementation to be simpler, clearer, · 233edd20
      Chandler Carruth authored
      and tremendously less reliant on the optimizer to fix things.
      
      The code is always necessarily looking for the entire length of the
      string when doing the equality tests in this find implementation, but it
      previously was needlessly re-checking the size each time among other
      annoyances.
      
      By writing this so simply an ddirectly in terms of memcmp, it also is
      about 8x faster in a debug build, which in turn makes FileCheck about 2x
      faster in 'ninja check-llvm'. This saves about 8% of the time for
      FileCheck-heavy parts of the test suite like the x86 backend tests.
      
      llvm-svn: 247269
      233edd20
    • Alexey Bataev's avatar
      [OPENMP] Fix test incompatibility with Windows codegen. · e19facb9
      Alexey Bataev authored
      llvm-svn: 247268
      e19facb9
    • Tamas Berghammer's avatar
      Fix crash in lldb-server caused by an API change in LLVM · bb973210
      Tamas Berghammer authored
      llvm-svn: 247267
      bb973210
    • Alexander Kornienko's avatar
      a24501b2
    • Silviu Baranga's avatar
      [DAGCombine] Truncate BUILD_VECTOR operators if necessary when constant folding vectors · df9ce840
      Silviu Baranga authored
      Summary:
      The BUILD_VECTOR node will truncate its operators to match the
      type. We need to take this into account when constant folding -
      we need to perform a truncation before constant folding the elements.
      This is because the upper bits can change the result, depending on
      the operation type (for example this is the case for min/max).
      
      This change also adds a regression test.
      
      Reviewers: jmolloy
      
      Subscribers: jmolloy, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D12697
      
      llvm-svn: 247265
      df9ce840
    • James Molloy's avatar
      Enable GlobalsAA by default · d47634d7
      James Molloy authored
      This can give significant improvements to alias analysis in some situations, and improves its testing coverage in all situations.
      
      llvm-svn: 247264
      d47634d7
    • James Molloy's avatar
      Add GlobalsAA as preserved to a bunch of transforms · efbba72c
      James Molloy authored
      GlobalsAA must by definition be preserved in function passes, but the passmanager doesn't know that. Make each pass explicitly preserve GlobalsAA.
      
      llvm-svn: 247263
      efbba72c
    • Ewan Crawford's avatar
      New RenderScript command to break on all kernels · 7dc7771c
      Ewan Crawford authored
      Patch adds a command to RenderScript plugin allowing users to automatically set breakpoints on every RS kernel.
      
      Command syntax is 'language renderscript kernel breakpoint all <enable/disable>.'
      Enable sets breakpoints on all currently loaded kernels, and any kernels which will be loaded in future.
      Disable results in breakpoints no longer being set on loaded kernels, but doesn't affect existing breakpoints.
      
      Current command 'language renderscript kernel breakpoint' is changed to 'language renderscript kernel breakpoint set'
      
      Reviewed by: clayborg, jingham
      Subscribers: lldb-commits, ADodds, domipheus
      Differential Revision: http://reviews.llvm.org/D12728
      
      llvm-svn: 247262
      7dc7771c
    • Alexander Kornienko's avatar
      [clang-tidy] Add inconsistent declaration parameter name check · 11d4d644
      Alexander Kornienko authored
      This is first of series of patches, porting code from my project colobot-lint,
      as I mentioned recently in cfe-dev mailing list.
      
      This patch adds a new check in readability module:
      readability-inconsistent-declaration-parameter-name. I also added appropriate
      testcases and documentation.
      
      I chose readability module, as it seems it is the best place for it.
      
      I think I followed the rules of LLVM coding guideline, but I may have missed
      something, as I usually use other code formatting style.
      
      http://reviews.llvm.org/D12462
      
      Patch by Piotr Dziwinski!
      
      llvm-svn: 247261
      11d4d644
    • Alexey Bataev's avatar
      [OPENMP] Propagate alignment from original variables to the private copies. · 1d7f0faf
      Alexey Bataev authored
      Currently private copies of captured variables have default alignment. Patch makes private variables to have same alignment as original variables.
      
      llvm-svn: 247260
      1d7f0faf
    • Chandler Carruth's avatar
      [ADT] Force inline several super boring and unusually hot methods on · 9e1c0c15
      Chandler Carruth authored
      SmallVector to further help debug builds not waste their time calling
      one line functions.
      
      To give you an idea of why this is worthwhile, this change alone gets
      another >10% reduction in the runtime of TripleTest.Normalization! It's
      now under 9 seconds for me. Sadly, this is the end of the easy wins for
      that test. Anything further will require some different architecture of
      the test itself. Still, I'm pretty happy. 'check-llvm' now is under 35s
      for me.
      
      llvm-svn: 247259
      9e1c0c15
    • Alexander Kornienko's avatar
      Add a deprecation notice to the clang-modernize documentation. · f4e8b92f
      Alexander Kornienko authored
      Summary:
      Add a deprecation notice to the clang-modernize documentation. Remove
      the reference to the external JIRA tracker.
      
      Reviewers: revane, klimek
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D12732
      
      llvm-svn: 247258
      f4e8b92f
    • Chandler Carruth's avatar
      [ADT] Micro-optimize and force inlining for string switches. · 69368342
      Chandler Carruth authored
      These are now quite heavily used in unit tests and the host tools,
      making it worth having them be reasonably fast even in an unoptimized
      build. This change reduces the total runtime of TripleTest.Normalization
      by yet another 10% to 15%. It is now under 10 seconds on my machine, and
      the total check-llvm time has dropped from 38s to around 36s.
      
      I experimented with a number of different options, and the code pattern
      here consistently seemed to lower the cleanest, likely due to the
      significantly simple CFG and far fewer redundant tests of 'Result'.
      
      llvm-svn: 247257
      69368342
    • Ilia K's avatar
      Fix an AttributeError in dotest.py if --executable points to a wrong place · dae2e564
      Ilia K authored
      This patch fixes the following case:
      ```
        $ ./dotest.py --executable=~/p/llvm/build_ninja/bin/lldb tools/lldb-mi/
        '~/p/llvm/build_ninja/bin/lldb' is not a path to a valid executable
        Traceback (most recent call last):
          File "./dotest.py", line 1306, in <module>
            setupSysPath()
          File "./dotest.py", line 1004, in setupSysPath
            if not lldbtest_config.lldbExec:
        AttributeError: 'module' object has no attribute 'lldbExec'
      ```
      
      And with this fix:
      ```
        $ ./dotest.py --executable=~/p/llvm/build_ninja/bin/lldb tools/lldb-mi/
        '~/p/llvm/build_ninja/bin/lldb' is not a path to a valid executable
        The 'lldb' executable cannot be located.  Some of the tests may not be run as a result.
      ```
      
      llvm-svn: 247256
      dae2e564
    • Alexey Bataev's avatar
      [OPENMP] Fix test incompatibility with 32-bit platforms · 22b46291
      Alexey Bataev authored
      llvm-svn: 247255
      22b46291
    • James Molloy's avatar
      [ARM] Do not use vtrn for vectorshuffle if the order is reversed · 8c995a93
      James Molloy authored
      The tests in isVTRNMask and isVTRN_v_undef_Mask should also check that the elements of the upper and lower half of the vectorshuffle occur in the correct order when both halves are used. Without this test the code assumes that it is correct to use vector transpose (vtrn) for the masks <1, 1, 0, 0> and <1, 3, 0, 2>, among others, but the transpose actually incorrectly generates shuffles for <0, 0, 1, 1> and <0, 2, 1, 3> in this case.
      
      Patch by Jeroen Ketema!
      
      llvm-svn: 247254
      8c995a93
    • Chandler Carruth's avatar
      [ADT] Apply a large hammer to StringRef functions: attribute always_inline. · 6f77949d
      Chandler Carruth authored
      The logic of this follows something Howard does in libc++ and something
      I discussed with Chris eons ago -- for a lot of functions, there is
      really no benefit to preserving "debug information" by leaving the
      out-of-line even in debug builds. This is especially true as we now do
      a very good job of preserving most debug information even in the face of
      inlining. There are a bunch of methods in StringRef that we are paying
      a completely unacceptable amount for with every debug build of every
      LLVM developer.
      
      Some day, we should fix Clang/LLVM so that developers can reasonable
      use a default of something other than '-O0' and not waste their lives
      waiting on *completely* unoptimized code to execute. We should have
      a default that doesn't impede debugging while providing at least
      plausable performance.
      
      But today is not that day.
      
      So today, I'm applying always_inline to the functions that are really
      hurting the critical path for stuff like 'check_llvm'. I'm being very
      cautious here, but there are a few other APIs that we really should do
      this for as a matter of pragmatism. Hopefully we can rip this out some
      day.
      
      With this change, TripleTest.Normalization runtime decreases by over
      10%, and the total 'check-llvm' time on my 48-core box goes from 38s to
      just under 37s.
      
      llvm-svn: 247253
      6f77949d
    • Chandler Carruth's avatar
      [Support] Fix the always_inline attribute macro to not include the · 4f454135
      Chandler Carruth authored
      'inline' specifier. That specifier may or may not be valid for a given
      function, or it may be required for correct linkage even when the
      compiler doesn't support the always_inline attribute.
      
      llvm-svn: 247252
      4f454135
    • Alexey Bataev's avatar
      [OPENMP] Outlined function for parallel and other regions with list of captured variables. · 2377fe95
      Alexey Bataev authored
      Currently all variables used in OpenMP regions are captured into a record and passed to outlined functions in this record. It may result in some poor performance because of too complex analysis later in optimization passes. Patch makes to emit outlined functions for parallel-based regions with a list of captured variables. It reduces code for 2*n GEPs, stores and loads at least.
      Codegen for task-based regions remains unchanged because runtime requires that all captured variables are passed in captured record.
      
      llvm-svn: 247251
      2377fe95
    • Chandler Carruth's avatar
      [ADT] Micro-optimize the Triple constructor by doing a single split and · f054eca1
      Chandler Carruth authored
      re-using the resulting components rather than repeatedly splitting and
      re-splitting to compute each component as part of the initializer list.
      
      This is more work on PR23676. Sadly, it doesn't help much. It removes
      the constructor from my profile, but doesn't make a sufficient dent in
      the total time. But it should play together nicely with subsequent
      changes.
      
      llvm-svn: 247250
      f054eca1
    • Chandler Carruth's avatar
      [ADT] Fix a confusing interface spec and some annoying peculiarities · 4425c91d
      Chandler Carruth authored
      with the StringRef::split method when used with a MaxSplit argument
      other than '-1' (which nobody really does today, but which should
      actually work).
      
      The spec claimed both to split up to MaxSplit times, but also to append
      <= MaxSplit strings to the vector. One of these doesn't make sense.
      Given the name "MaxSplit", let's go with it being a max over how many
      *splits* occur, which means the max on how many strings get appended is
      MaxSplit+1. I'm not actually sure the implementation correctly provided
      this logic either, as it used a really opaque loop structure.
      
      The implementation was also playing weird games with nullptr in the data
      field to try to rely on a totally opaque hidden property of the split
      method that returns a pair. Nasty IMO.
      
      Replace all of this with what is (IMO) simpler code that doesn't use the
      pair returning split method, and instead just finds each separator and
      appends directly. I think this is a lot easier to read, and it most
      definitely matches the spec. Added some tests that exercise the corner
      cases around StringRef() and StringRef("") that all now pass.
      
      I'll start using this in code in the next commit.
      
      llvm-svn: 247249
      4425c91d
    • David Majnemer's avatar
      [MS ABI] Select a pointer to member representation more often · cca07d7c
      David Majnemer authored
      Given a reference to a pointer to member whose class's inheritance model
      is unspecified, make sure we come up with an inheritance model in
      plausible places.  One place we were missing involved LValue to RValue
      conversion, another involved unary type traits.
      
      llvm-svn: 247248
      cca07d7c
    • NAKAMURA Takumi's avatar
      GlobalsAAResult(&&): Move every members. · 1a296ec6
      NAKAMURA Takumi authored
      Or, one of MSVC builders failed with unexpected behavior.
      
      llvm-svn: 247247
      1a296ec6
    • Elena Demikhovsky's avatar
      Added isUndef() interface for SDNode · 5cf3a029
      Elena Demikhovsky authored
      Differential Revision: http://reviews.llvm.org/D12720
      
      llvm-svn: 247246
      5cf3a029
    • Chandler Carruth's avatar
      [ADT] Switch a bunch of places in LLVM that were doing single-character · e4405e94
      Chandler Carruth authored
      splits to actually use the single character split routine which does
      less work, and in a debug build is *substantially* faster.
      
      llvm-svn: 247245
      e4405e94
    • Chandler Carruth's avatar
      [ADT] Add a single-character version of the small vector split routine · 47712172
      Chandler Carruth authored
      on StringRef. Finding and splitting on a single character is
      substantially faster than doing it on even a single character StringRef
      -- we immediately get to a *very* tuned memchr call this way.
      
      Even nicer, we get to this even in a debug build, shaving 18% off the
      runtime of TripleTest.Normalization, helping PR23676 some more.
      
      llvm-svn: 247244
      47712172
    • Chandler Carruth's avatar
      Add a way to skip the Go bindings tests even when Go is configured in · 93d5d3b5
      Chandler Carruth authored
      CMake.
      
      The Go bindings tests in an unoptimized build take over 30 seconds for
      me, making it the slowest test in 'check-llvm' by a factor of two.
      
      I've only rigged this up fully to the CMake build. If someone is
      interested in rigging it up to the autoconf build, they're welcome to do
      so.
      
      llvm-svn: 247243
      93d5d3b5
    • Sanjoy Das's avatar
      [ScalarEvolution] Fix PR24757. · f3132d3b
      Sanjoy Das authored
      Summary:
      PR24757 was caused by some incorect math in
      `ScalarEvolution::HowFarToZero` -- the smallest unsigned solution for X
      in
      
        2^N * A = 2^N * X
      
      is not necessarily A.
      
      Reviewers: atrick, majnemer, meheff
      
      Subscribers: llvm-commits, sanjoy
      
      Differential Revision: http://reviews.llvm.org/D12721
      
      llvm-svn: 247242
      f3132d3b
    • Chandler Carruth's avatar
      [LPM] Simplify this code and fix a compile error for compilers that · 87275186
      Chandler Carruth authored
      don't correctly implement the scoping rules of C++11 range based for
      loops. This kind of aliasing isn't a good idea anyways (and wasn't
      really intended).
      
      llvm-svn: 247241
      87275186
    • Chandler Carruth's avatar
      [LPM] Use a map from analysis ID to immutable passes in the legacy pass · b1e3a9ae
      Chandler Carruth authored
      manager to avoid a slow linear scan of every immutable pass and on every
      attempt to find an analysis pass.
      
      This speeds up 'check-llvm' on an unoptimized build for me by 15%, YMMV.
      It should also help (a tiny bit) other folks that are really
      bottlenecked on repeated runs of tiny pass pipelines across small IR
      files.
      
      llvm-svn: 247240
      b1e3a9ae
Loading