Skip to content
  1. Aug 28, 2018
    • Kirill Bobyrev's avatar
      Pull google/benchmark library to the LLVM tree · 0addd170
      Kirill Bobyrev authored
      This patch pulls google/benchmark v1.4.1 into the LLVM tree so that any
      project could use it for benchmark generation. A dummy benchmark is
      added to `llvm/benchmarks/DummyYAML.cpp` to validate the correctness of
      the build process.
      
      The current version does not utilize LLVM LNT and LLVM CMake
      infrastructure, but that might be sufficient for most users. Two
      introduced CMake variables:
      
      * `LLVM_INCLUDE_BENCHMARKS` (`ON` by default) generates benchmark
        targets
      * `LLVM_BUILD_BENCHMARKS` (`OFF` by default) adds generated
        benchmark targets to the list of default LLVM targets (i.e. if `ON`
        benchmarks will be built upon standard build invocation, e.g. `ninja` or
        `make` with no specific targets)
      
      List of modifications:
      
      * `BENCHMARK_ENABLE_TESTING` is disabled
      * `BENCHMARK_ENABLE_EXCEPTIONS` is disabled
      * `BENCHMARK_ENABLE_INSTALL` is disabled
      * `BENCHMARK_ENABLE_GTEST_TESTS` is disabled
      * `BENCHMARK_DOWNLOAD_DEPENDENCIES` is disabled
      
      Original discussion can be found here:
      http://lists.llvm.org/pipermail/llvm-dev/2018-August/125023.html
      
      Reviewed by: dberris, lebedev.ri
      
      Subscribers: ilya-biryukov, ioeric, EricWF, lebedev.ri, srhines,
      dschuff, mgorny, krytarowski, fedor.sergeev, mgrang, jfb, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50894
      
      llvm-svn: 340809
      0addd170
    • Max Kazantsev's avatar
      [NFC] A loop can never contain Ret instruction · 0c4b84e2
      Max Kazantsev authored
      llvm-svn: 340808
      0c4b84e2
    • David Chisnall's avatar
      Fix in getAllocationDataForFunction · 5e52cadf
      David Chisnall authored
      Summary:
      Correct to use set like behaviour of AllocType.  Should check for
      subset, not precise value.
      
      Reviewers: theraven
      
      Reviewed By: theraven
      
      Subscribers: hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50959
      
      llvm-svn: 340807
      5e52cadf
    • Craig Topper's avatar
      [X86] Fix some comments to refer to KORTEST not KTEST. NFC · c1436db7
      Craig Topper authored
      KTEST is a different instruction. All of this code uses KORTEST.
      
      llvm-svn: 340799
      c1436db7
    • Craig Topper's avatar
      [DAGCombiner][AMDGPU][Mips] Fold bitcast with volatile loads if the resulting... · c7506b28
      Craig Topper authored
      [DAGCombiner][AMDGPU][Mips] Fold bitcast with volatile loads if the resulting load is legal for the target.
      
      Summary:
      I'm not sure if this patch is correct or if it needs more qualifying somehow. Bitcast shouldn't change the size of the load so it should be ok? We already do something similar for stores. We'll change the type of a volatile store if the resulting store is Legal or Custom. I'm not sure we should be allowing Custom there...
      
      I was playing around with converting X86 atomic loads/stores(except seq_cst) into regular volatile loads and stores during lowering. This would allow some special RMW isel patterns in X86InstrCompiler.td to be removed. But there's some floating point patterns in there that didn't work because we don't fold (f64 (bitconvert (i64 volatile load))) or (f32 (bitconvert (i32 volatile load))).
      
      Reviewers: efriedma, atanasyan, arsenm
      
      Reviewed By: efriedma
      
      Subscribers: jvesely, arsenm, sdardis, kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, arichardson, jrtc27, atanasyan, jfb, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50491
      
      llvm-svn: 340797
      c7506b28
    • Craig Topper's avatar
      [InstCombine] Extend (add (sext x), cst) --> (sext (add x, cst')) and (add... · a6cd4b9b
      Craig Topper authored
      [InstCombine] Extend (add (sext x), cst) --> (sext (add x, cst')) and (add (zext x), cst) --> (zext (add x, cst')) to work for vectors
      
      Differential Revision: https://reviews.llvm.org/D51236
      
      llvm-svn: 340796
      a6cd4b9b
    • Kit Barton's avatar
      [PPC] Remove Darwin support from POWER backend. · 7c80f98b
      Kit Barton authored
      This patch issues an error message if Darwin ABI is attempted with the PPC
      backend. It also cleans up existing test cases, either converting the test to
      use an alternative triple or removing the test if the coverage is no longer
      needed.
      
      Updated Tests
      -------------
      The majority of test cases were updated to use a different triple that does not
      include the Darwin ABI. Many tests were also updated to use FileCheck, in place
      of grep.
      
      Deleted Tests
      -------------
      llvm/test/tools/dsymutil/PowerPC/sibling.test was originally added to test
      specific functionality of dsymutil using an object file created with an old
      version of llvm-gcc for a Powerbook G4. After a discussion with @JDevlieghere he
      suggested removing the test.
      
      llvm/test/CodeGen/PowerPC/combine_loads_from_build_pair.ll was converted from a
      PPC test to a SystemZ test, as the behavior is also reproducible there.
      
      All other tests that were deleted were specific to the darwin/ppc ABI and no
      longer necessary.
      
      Phabricator Review: https://reviews.llvm.org/D50988
      
      llvm-svn: 340795
      7c80f98b
    • David Blaikie's avatar
      Revert "[CodeGenPrepare] Scan past debug intrinsics to find select candidates (NFC)" · 7d306532
      David Blaikie authored
      This causes crashes due to the interleaved dbg.value intrinsics being
      left at the end of basic blocks, causing the actual terminators (br,
      etc) to be not where they should be (not at the end of the block),
      leading to later crashes.
      
      Further discussion on the original commit thread.
      
      This reverts commit r340368.
      
      llvm-svn: 340794
      7d306532
    • George Burgess IV's avatar
      [MemorySSA] Add NDEBUG checks to verifiers; NFC · 6a9aa02f
      George Burgess IV authored
      verify*() methods are intended to have no side-effects (unless we detect
      broken MSSA, in which case they assert()), and all of the other verify
      methods are wrapped by `#ifndef NDEBUG`.
      
      llvm-svn: 340793
      6a9aa02f
    • Sanjay Patel's avatar
      [InstCombine] fix formatting; NFC · c615910b
      Sanjay Patel authored
      llvm-svn: 340790
      c615910b
    • Craig Topper's avatar
      [InstCombine] Add test cases for D51236. NFC · e23e8a4f
      Craig Topper authored
      llvm-svn: 340789
      e23e8a4f
    • Lang Hames's avatar
      [RuntimeDyld] Add test case that was accidentally left out of r340125. · 35c47027
      Lang Hames authored
      llvm-svn: 340788
      35c47027
    • Sanjay Patel's avatar
      [InstCombine] allow shuffle+binop canonicalization with widening shuffles · 42d31c20
      Sanjay Patel authored
      This lines up with the behavior of an existing transform where if both 
      operands of the binop are shuffled, we allow moving the binop before the 
      shuffle regardless of whether the shuffle changes the size of the vector.
      
      llvm-svn: 340787
      42d31c20
    • Lang Hames's avatar
      [ORC] Add unit tests for the new RTDyldObjectLinkingLayer2 class. · 20d78921
      Lang Hames authored
      The new unit tests match the old ones, which will remain in tree until the
      old RTDyldObjectLinkingLayer is removed.
      
      llvm-svn: 340786
      20d78921
    • Sanjay Patel's avatar
      fe0b5d21
    • Evandro Menezes's avatar
      [PATCH] [InstCombine] Fix issue in the simplification of pow() with nested exp{,2}() · 253991cf
      Evandro Menezes authored
      Fix the issue of duplicating the call to `exp{,2}()` when it's nested in
      `pow()`, as exposed by rL340462.
      
      Differential revision: https://reviews.llvm.org/D51194
      
      llvm-svn: 340784
      253991cf
    • George Burgess IV's avatar
      s/std::set/DenseSet/; NFC · aa09a82b
      George Burgess IV authored
      We only use this set for `insert` and `count`, so a hashing container
      seems better here.
      
      llvm-svn: 340783
      aa09a82b
    • Brendon Cahoon's avatar
      [Pipeliner] Fix incorrect phi values in the epilog and kernel · e3841eea
      Brendon Cahoon authored
      The code that generates the loop definition operand for phis
      in the epilog and kernel is incorrect in some cases.
      
      In the kernel, when a phi refers to another phi, the code that
      updates PhiOp2 needs to include the stage difference between
      the two phis.
      
      In the epilog, the check for using the loop definition instead
      of the phi definition uses the StageDiffAdj value (the difference
      between the phi stage and the loop definition stage), but the
      adjustment is not needed to determine if the current stage
      contains an iteration with the loop definition.
      
      Differential Revision: https://reviews.llvm.org/D51167
      
      llvm-svn: 340782
      e3841eea
    • Thomas Lively's avatar
      [WebAssembly] TableGen backend for stackifying instructions · 211874d2
      Thomas Lively authored
      Summary:
      The new stackification backend generates the giant switch statement
      used to translate instructions to their stackified forms. I did this
      because it was more interesting than adding all the different vector
      versions of the various SIMD instructions to the switch statment
      manually.
      
      Reviewers: aardappel, aheejin, dschuff
      
      Subscribers: mgorny, sbc100, jgravelle-google, sunfish, jfb, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D51318
      
      llvm-svn: 340781
      211874d2
  2. Aug 27, 2018
    • Zachary Turner's avatar
      Update the Visual Studio Integration from user feedback. · 522f9aec
      Zachary Turner authored
      This patch removes the MSBuild warnings about options that
      clang-cl ignores.  It also adds several additional fields to
      the LLVM Configuration options page.  The first is that it
      adds support for LLD!  To give the user flexibility though,
      we don't want to force LLD to always-on, and if we're not
      forcing LLD then we might as well not force clang-cl either.
      So we add options that can enable or disable lld, clang-cl,
      or any combination of the two.  Whenever one is disabled,
      it falls back to the Microsoft equivalent.
      
      Additionally, for each of clang-cl and lld-link, we add a new
      configuration setting that allows Additional Options to be
      passed for that specific tool only.  This is similar to the
      C/C++ > Command Line > Additional Options entry box, but
      it serves the use case where a user switches back and forth
      between the toolsets in their vcxproj, but where cl.exe
      won't accept some options that clang-cl will.  In this case
      you can pass those options in the clang-cl additional options
      and whenever clang-cl is disabled (or the other toolset is
      selected entirely), those options won't get passed at all.
      
      llvm-svn: 340780
      522f9aec
    • Roman Tereshin's avatar
      Revert "[SCEV][NFC] Check NoWrap flags before lexicographical comparison of SCEVs" · 02320eee
      Roman Tereshin authored
      This reverts r319889.
      
      Unfortunately, wrapping flags are not a part of SCEV's identity (they
      do not participate in computing a hash value or in equality
      comparisons) and in fact they could be assigned after the fact w/o
      rebuilding a SCEV.
      
      Grep for const_cast's to see quite a few of examples, apparently all
      for AddRec's at the moment.
      
      So, if 2 expressions get built in 2 slightly different ways: one with
      flags set in the beginning, the other with the flags attached later
      on, we may end up with 2 expressions which are exactly the same but
      have their operands swapped in one of the commutative N-ary
      expressions, and at least one of them will have "sorted by complexity"
      invariant broken.
      
      2 identical SCEV's won't compare equal by pointer comparison as they
      are supposed to.
      
      A real-world reproducer is added as a regression test: the issue
      described causes 2 identical SCEV expressions to have different order
      of operands and therefore compare not equal, which in its turn
      prevents LoadStoreVectorizer from vectorizing a pair of consecutive
      loads.
      
      On a larger example (the source of the test attached, which is a
      bugpoint) I have seen even weirder behavior: adding a constant to an
      existing SCEV changes the order of the existing terms, for instance,
      getAddExpr(1, ((A * B) + (C * D))) returns (1 + (C * D) + (A * B)).
      
      Differential Revision: https://reviews.llvm.org/D40645
      
      llvm-svn: 340777
      02320eee
    • Zachary Turner's avatar
      Set line endings to Windows on MSBuild files. · 4e039d64
      Zachary Turner authored
      Normally we force Unix line endings in the repository, but since these are Windows files which are consumed by Microsoft tools that we don't have the source of, we should probably err on the side of caution and force CRLF.
      
      llvm-svn: 340776
      4e039d64
    • Craig Topper's avatar
      [X86] Reverse the check prefixes in the test added in r340774. · 171c6fe6
      Craig Topper authored
      The 32-bit and 64-bit checks were reversed.
      
      llvm-svn: 340775
      171c6fe6
    • Craig Topper's avatar
      [X86] Add test cases to show current codegen of v2i32 div/rem in 32-bit and 64-bit modes · 76b18bee
      Craig Topper authored
      In particular this shows that we end up using libcalls in 32-bit mode even for division by constant.
      
      llvm-svn: 340774
      76b18bee
    • Sanjay Patel's avatar
      [x86] add tests for possibly avoiding scalar->vector move; NFC · 7b6df506
      Sanjay Patel authored
      llvm-svn: 340773
      7b6df506
    • Andrea Di Biagio's avatar
      [llvm-mca] Remove unused include. NFC · 1a87a80d
      Andrea Di Biagio authored
      llvm-svn: 340768
      1a87a80d
    • Matt Arsenault's avatar
      DAG: Check transformed type for forming fminnum/fmaxnum from vselect · cea7c696
      Matt Arsenault authored
      Follow up to r340655 to fix vector types which are split.
      
      llvm-svn: 340766
      cea7c696
    • Matt Arsenault's avatar
      MachineVerifier: Fix assert on implicit virtreg use · 9eb3dda0
      Matt Arsenault authored
      If the liveness of a physical register was invalid, this
      was attempting to iterate the subregisters of all register
      uses of the instruction, which would assert when it
      encountered an implicit virtual register operand.
      
      llvm-svn: 340763
      9eb3dda0
    • Matt Arsenault's avatar
      LangRef: Clarify expected sNaN behavior for minnum/maxnum · 937003cf
      Matt Arsenault authored
      This matches the de-facto behavior based on constant folding
      and the default lowering to fmin/fmax.
      
      llvm-svn: 340762
      937003cf
    • Sean Fertile's avatar
      [PowerPC][MC] Support expressions in getMemRIX16Encoding. · a2f095f1
      Sean Fertile authored
      Loosens an assert in getMemRIX16Encoding that restricts DQ-form instructions to
      using an immediate, so that we can assemble instructions like lxv/stxv where the
      offset is an expression.
      
      Differential Revision: https://reviews.llvm.org/D51122
      
      llvm-svn: 340761
      a2f095f1
    • Benjamin Kramer's avatar
      [NVPTX] Implement isLegalToVectorizeLoadChain · 759e7d98
      Benjamin Kramer authored
      This lets LSV nicely split up underaligned chains.
      
      Differential Revision: https://reviews.llvm.org/D51306
      
      llvm-svn: 340760
      759e7d98
    • Craig Topper's avatar
      [X86] When lowering v32i8 MULHS/MULHU, shuffle after the PACKUS rather than before. · 4be11c05
      Craig Topper authored
      We're using a 256-bit PACKUS to do the truncation, but that instruction operates on 128-bit lanes. So previously we shuffled first to rearrange the lanes. But that requires 2 shuffles. Instead we can shuffle after the PACKUS using a single VPERMQ. This matches what our normal LowerTRUNCATE code does when it uses PACKUS.
      
      Differential Revision: https://reviews.llvm.org/D51284
      
      llvm-svn: 340757
      4be11c05
    • Craig Topper's avatar
      [X86] Add support for matching paddus patterns where one of the vectors is a constant. · fff90377
      Craig Topper authored
      InstCombine mucks these up a bit. So we need to do some additional pattern matching to fix it. There are a still a few special cases not handled, but this covers the general case.
      
      Differential Revision: https://reviews.llvm.org/D50952
      
      llvm-svn: 340756
      fff90377
    • Matt Davis's avatar
      [llvm-mca] Introduce the llvm-mca library and organize the directory accordingly. NFC. · 271ce763
      Matt Davis authored
      Summary:
      This patch introduces llvm-mca as a library.  The driver (llvm-mca.cpp), views, and stats, are not part of the library. 
      Those are separate components that are not required for the functioning of llvm-mca.
      
      The directory has been organized as follows:
      All library source files now reside in:
        - `lib/HardwareUnits/` - All subclasses of HardwareUnit (these represent the simulated hardware components of a backend).
            (LSUnit does not inherit from HardwareUnit, but Scheduler does which uses LSUnit).  
        - `lib/Stages/` - All subclasses of the pipeline stages.
        - `lib/` - This is the root of the library and contains library code that does not fit into the Stages or HardwareUnit subdirs.
      
      All library header files now reside in the `include` directory and mimic the same layout as the `lib` directory mentioned above.
      
      In the (near) future we would like to move the library (include and lib) contents from tools and into the core of llvm somewhere.
      That change would allow various analysis and optimization passes to make use of MCA  functionality for things like cost modeling.
      
      I left all of the non-library code just where it has always been, in the root of the llvm-mca directory. 
      The include directives for the non-library source file have been updated to refer to the llvm-mca library headers.
      I updated the llvm-mca/CMakeLists.txt file to include the library headers, but I made the non-library code
      explicitly reference the library's 'include' directory.  Once we eventually (hopefully) migrate the MCA library
      components into llvm the include directives used by the non-library source files will be updated to point to the
      proper location in llvm.
      
      Reviewers: andreadb, courbet, RKSimon
      
      Reviewed By: andreadb
      
      Subscribers: mgorny, javed.absar, tschuett, gbedwell, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D50929
      
      llvm-svn: 340755
      271ce763
    • Matt Davis's avatar
      [llvm-mca] Remove unused method. NFC. · b09ecf93
      Matt Davis authored
      llvm-svn: 340754
      b09ecf93
    • Stella Stamenova's avatar
      [lit, python] Remove quotes around %python in cache.ll · 79a40ebb
      Stella Stamenova authored
      Summary: We needed quotes around %python before to make python work correctly (on Windows) if the path contains spaces. I recently made a change so that %python now inherently has quotes, so now adding quotes around %python makes the test fail because the quotes cancel each other.
      
      Reviewers: asmith, inglorion
      
      Subscribers: mehdi_amini, eraman, steven_wu, dexonsmith, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D51244
      
      llvm-svn: 340753
      79a40ebb
    • Hans Wennborg's avatar
      Use a lambda for calls to ::open in RetryAfterSignal · 0a0e4112
      Hans Wennborg authored
      In Bionic, open can be overloaded for _FORTIFY_SOURCE support, causing
      compile errors of RetryAfterSignal due to overload resolution. Wrapping
      the call in a lambda avoids this.
      
      Based on a patch by Chih-Wei Huang <cwhuang@linux.org.tw>!
      
      llvm-svn: 340751
      0a0e4112
    • Wouter van Oortmerssen's avatar
      [WebAssembly] Added default stack-only instruction mode for MC. · 8a9cb242
      Wouter van Oortmerssen authored
      Summary:
      Made it convert from register to stack based instructions, and removed the registers.
      Fixes to related code that was expecting register based instructions.
      Added the correct testing flag to all tests, depending on what the
      format they were expecting so far.
      Translated one test to stack format as example: reg-stackify-stack.ll
      
      tested:
      llvm-lit -v `find test -name WebAssembly`
      unittests/MC/*
      
      Reviewers: dschuff, sunfish
      
      Subscribers: sbc100, jgravelle-google, eraman, aheejin, llvm-commits, jfb
      
      Differential Revision: https://reviews.llvm.org/D51241
      
      llvm-svn: 340750
      8a9cb242
    • Andrea Di Biagio's avatar
      [llvm-mca] Improved report generated by the SchedulerStatistics view. · b89b96c1
      Andrea Di Biagio authored
      Before this patch, the SchedulerStatistics only printed the maximum number of
      buffer entries consumed in each scheduler's queue at a given point of the
      simulation.
      
      This patch restructures the reported table, and adds an extra field named
      "Average number of used buffer entries" to it.
      This patch also uses different colors to help identifying bottlenecks caused by
      high scheduler's buffer pressure.
      
      llvm-svn: 340746
      b89b96c1
    • Nico Weber's avatar
      fix comment typo · e75fd1b1
      Nico Weber authored
      llvm-svn: 340744
      e75fd1b1
Loading