1. Aug 04, 2020
    • Arthur Eubanks's avatar
      [NewPM][LoopVersioning] Port LoopVersioning to NPM · 7c19c89d
      Arthur Eubanks authored
      Reviewed By: ychen, fhahn
      
      Differential Revision: https://reviews.llvm.org/D85063
      7c19c89d
    • Kevin P. Neal's avatar
      [FPEnv] IRBuilder fails to add strictfp attribute · d535a91d
      Kevin P. Neal authored
      The strictfp attribute is required on all function calls in a function
      that is itself marked with the strictfp attribute. The IRBuilder knows
      this and has a method for adding the attribute to function call instructions.
      
      If a function being called has the strictfp attribute itself then the
      IRBuilder will refuse to add the attribute to the calling instruction
      despite being asked to add it. Eliminate this error.
      
      Differential Revision: https://reviews.llvm.org/D84878
      d535a91d
    • Fangrui Song's avatar
      [PGO] Change a `NumVSites == 0` workaround to assert · 317e00dc
      Fangrui Song authored
      The root cause was fixed by 3d6f5301.
      The workaround added in 99ad956f can be changed
      to an assert now. (In case the fix regresses, there will be a heap-use-after-free.)
      317e00dc
    • Craig Topper's avatar
      [X86] Use h-register for final XOR of __builtin_parity on 64-bit targets. · ac82b918
      Craig Topper authored
      This adds an isel pattern and special XOR8rr_NOREX instruction
      to enable the use of h-registers for __builtin_parity. This avoids
      a copy and a shift instruction. The NOREX instruction is in case
      register allocation doesn't use the matching l-register for some
      reason. If a R8-R15 register gets picked instead, we won't be
      able to encode the instruction since an h-register can't be used
      with a REX prefix.
      
      Fixes PR46954
      ac82b918
    • MaheshRavishankar's avatar
      [mlir][DialectConversion] Remove usage of std::distance to track position. · 32f3a9a9
      MaheshRavishankar authored
      Remove use of iterator::difference_type to know where to insert a
      moved or erased block during undo actions.
      
      Differential Revision: https://reviews.llvm.org/D85066
      32f3a9a9
    • MaheshRavishankar's avatar
    • Nicolas Vasilache's avatar
      [mlir][Vector] Add transformation + pattern to split vector.transfer_read into... · d313e9c1
      Nicolas Vasilache authored
      [mlir][Vector] Add transformation + pattern to split vector.transfer_read into full and partial copies.
      
      This revision adds a transformation and a pattern that rewrites a "maybe masked" `vector.transfer_read %view[...], %pad `into a pattern resembling:
      
      ```
         %1:3 = scf.if (%inBounds) {
            scf.yield %view : memref<A...>, index, index
          } else {
            %2 = vector.transfer_read %view[...], %pad : memref<A...>, vector<...>
            %3 = vector.type_cast %extra_alloc : memref<...> to
            memref<vector<...>> store %2, %3[] : memref<vector<...>> %4 =
            memref_cast %extra_alloc: memref<B...> to memref<A...> scf.yield %4 :
            memref<A...>, index, index
         }
         %res= vector.transfer_read %1#0[%1#1, %1#2] {masked = [false ... false]}
      ```
      where `extra_alloc` is a top of the function alloca'ed buffer of one vector.
      
      This rewrite makes it possible to realize the "always full tile" abstraction where vector.transfer_read operations are guaranteed to read from a padded full buffer.
      The extra work only occurs on the boundary tiles.
      
      Differential Revision: https://reviews.llvm.org/D84631
      d313e9c1
    • Mircea Trofin's avatar
      [llvm] Add a parser from JSON to TensorSpec · 4b1b109c
      Mircea Trofin authored
      A JSON->TensorSpec utility we will use subsequently to specify
      additional outputs needed for certain training scenarios.
      
      Differential Revision: https://reviews.llvm.org/D84976
      4b1b109c
    • Gui Andrade's avatar
    • Gui Andrade's avatar
      [MSAN] Instrument freeze instruction by clearing shadow · 3ebd1ba6
      Gui Andrade authored
      Freeze always returns a defined value. This also prevents msan from
      checking the input shadow, which happened because freeze wasn't
      explicitly visited.
      
      Differential Revision: https://reviews.llvm.org/D85040
      3ebd1ba6
    • Florian Hahn's avatar
      [SCEV] If Start>=RHS, simplify (Start smin RHS) = RHS for trip counts. · ee1c1270
      Florian Hahn authored
      In some cases, it seems like we can get rid of unnecessary s/umins by
      using information from the loop guards (unless I am missing something).
      
      One place where this seems to be helpful in practice is when computing
      loop trip counts. This patch just changes howManyGreaterThans for now.
      Note that this requires a loop for which we can check 'is guarded'.
      
      On SPEC2000/SPEC2006/MultiSource, there are some notable changes for
      some programs in the number of loops unrolled and trip counts computed.
      
      ```
      Same hash: 179 (filtered out)
      Remaining: 58
      Metric: scalar-evolution.NumTripCountsComputed
      
      Program                                        base    patch   diff
       test-suite...langs-C/compiler/compiler.test    25.00   31.00  24.0%
       test-suite.../Applications/SPASS/SPASS.test   2020.00 2323.00 15.0%
       test-suite...langs-C/allroots/allroots.test    29.00   32.00  10.3%
       test-suite.../Prolangs-C/loader/loader.test    17.00   18.00   5.9%
       test-suite...fice-ispell/office-ispell.test   253.00  265.00   4.7%
       test-suite...006/450.soplex/450.soplex.test   3552.00 3692.00  3.9%
       test-suite...chmarks/MallocBench/gs/gs.test   453.00  470.00   3.8%
       test-suite...ngs-C/assembler/assembler.test    29.00   30.00   3.4%
       test-suite.../Benchmarks/Ptrdist/bc/bc.test   263.00  270.00   2.7%
       test-suite...rks/FreeBench/pifft/pifft.test   722.00  741.00   2.6%
       test-suite...count/automotive-bitcount.test    41.00   42.00   2.4%
       test-suite...0/253.perlbmk/253.perlbmk.test   1417.00 1451.00  2.4%
       test-suite...000/197.parser/197.parser.test   387.00  396.00   2.3%
       test-suite...lications/sqlite3/sqlite3.test   1168.00 1189.00  1.8%
       test-suite...000/255.vortex/255.vortex.test   173.00  176.00   1.7%
      
      Metric: loop-unroll.NumUnrolled
      
      Program                                        base   patch  diff
       test-suite...langs-C/compiler/compiler.test     1.00   3.00 200.0%
       test-suite.../Applications/SPASS/SPASS.test   134.00 234.00 74.6%
       test-suite...count/automotive-bitcount.test     3.00   4.00 33.3%
       test-suite.../Prolangs-C/loader/loader.test     3.00   4.00 33.3%
       test-suite...langs-C/allroots/allroots.test     3.00   4.00 33.3%
       test-suite...Source/Benchmarks/sim/sim.test    10.00  12.00 20.0%
       test-suite...fice-ispell/office-ispell.test    21.00  25.00 19.0%
       test-suite.../Benchmarks/Ptrdist/bc/bc.test    32.00  38.00 18.8%
       test-suite...006/450.soplex/450.soplex.test   300.00 352.00 17.3%
       test-suite...rks/FreeBench/pifft/pifft.test    60.00  69.00 15.0%
       test-suite...chmarks/MallocBench/gs/gs.test    57.00  63.00 10.5%
       test-suite...ngs-C/assembler/assembler.test    10.00  11.00 10.0%
       test-suite...0/253.perlbmk/253.perlbmk.test   145.00 157.00  8.3%
       test-suite...000/197.parser/197.parser.test    43.00  46.00  7.0%
       test-suite...TimberWolfMC/timberwolfmc.test   205.00 214.00  4.4%
       Geomean difference                                           7.6%
      ```
      
      Fixes https://bugs.llvm.org/show_bug.cgi?id=46939
      Fixes https://bugs.llvm.org/show_bug.cgi?id=46924 on X86.
      
      Reviewed By: mkazantsev
      
      Differential Revision: https://reviews.llvm.org/D85046
      ee1c1270
    • Mehdi Amini's avatar
      Revert "[mlir][Vector] Add transformation + pattern to split... · 7ba82a73
      Mehdi Amini authored
      Revert "[mlir][Vector] Add transformation + pattern to split vector.transfer_read into full and partial copies."
      
      This reverts commit 35b65be0.
      
      Build is broken with -DBUILD_SHARED_LIBS=ON with some undefined
      references like:
      
      VectorTransforms.cpp:(.text._ZN4llvm12function_refIFvllEE11callback_fnIZL24createScopedInBoundsCondN4mlir25VectorTransferOpInterfaceEE3$_8EEvlll+0xa5): undefined reference to `mlir::edsc::op::operator+(mlir::Value, mlir::Value)'
      7ba82a73
  2. Aug 03, 2020