1. Nov 20, 2018
  2. Nov 19, 2018
    • David Stuttard's avatar
      [AMDGPU] Derive GCNSubtarget from MF to get overridden target features · be3d7ba9
      David Stuttard authored
      Summary:
      AMDGPUAsmPrinter has a getSTI function that derives a GCNSubtarget from the
      TM. However, this means that overridden target features are not detected and can
      result in incorrect behaviour.
      
      Switch to using STM which is a GCNSubtarget derived from the MF (used elsewhere
      in the same function).
      
      Change-Id: Ib6328ad667b7fcdc87e9c06344e59859207db9b0
      
      Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54301
      
      llvm-svn: 347221
      be3d7ba9
    • Anna Thomas's avatar
      [LV] Avoid vectorizing unsafe dependencies in uniform address · 5e9215f0
      Anna Thomas authored
      Summary:
      Currently, when vectorizing stores to uniform addresses, the only
      instance we prevent vectorization is if there are multiple stores to the
      same uniform address causing an unsafe dependency.
      This patch teaches LAA to avoid vectorizing loops that have an unsafe
      cross-iteration dependency between a load and a store to the same uniform address.
      
      Fixes PR39653.
      
      Reviewers: Ayal, efriedma
      
      Subscribers: rkruppe, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54538
      
      llvm-svn: 347220
      5e9215f0
    • Louis Dionne's avatar
      [libcxx] Add availability markup for bad_optional_access, bad_variant_access and bad_any_cast · 8a063df1
      Louis Dionne authored
      Reviewers: dexonsmith, EricWF
      
      Subscribers: christof, arphaman, libcxx-commits
      
      Differential Revision: https://reviews.llvm.org/D53256
      
      llvm-svn: 347219
      8a063df1
    • Sanjay Patel's avatar
      [Hexagon] make test immune to improvements in undef simplification · 08c0a0ac
      Sanjay Patel authored
      llvm-svn: 347218
      08c0a0ac
    • Sanjay Patel's avatar
      [x86] add/make tests immune to improvements in undef simplification · 60abc29b
      Sanjay Patel authored
      llvm-svn: 347217
      60abc29b
    • Zachary Turner's avatar
      Fix some issues with LLDB's lit configuration files. · 58db03a1
      Zachary Turner authored
      Recently I tried to port LLDB's lit configuration files over to use a
      on the surface, but broke some cases that weren't broken before and also
      exposed some additional problems with the old approach that we were just
      getting lucky with.
      
      When we set up a lit environment, the goal is to make it as hermetic as
      possible. We should not be relying on PATH and enabling the use of
      arbitrary shell commands. Instead, only whitelisted commands should be
      allowed. These are, generally speaking, the lit builtins such as echo,
      cd, etc, as well as anything for which substitutions have been
      explicitly set up for. These substitutions should map to the build
      output directory, but in some cases it's useful to be able to override
      this (for example to point to an installed tools directory).
      
      This is, of course, how it's supposed to work. What was actually
      happening is that we were bringing in PATH and LD_LIBRARY_PATH and then
      just running the given run line as a shell command. This led to problems
      such as finding the wrong version of clang-cl on PATH since it wasn't
      even a substitution, and flakiness / non-determinism since the
      environment the tests were running in would change per-machine. On the
      other hand, it also made other things possible. For example, we had some
      tests that were explicitly running cl.exe and link.exe instead of
      clang-cl and lld-link and the only reason it worked at all is because it
      was finding them on PATH. Unfortunately we can't entirely get rid of
      these tests, because they support a few things in debug info that
      clang-cl and lld-link don't (notably, the LF_UDT_MOD_SRC_LINE record
      which makes some of the tests fail.
      
      The high level changes introduced in this patch are:
      
      1. Removal of functionality - The lit test suite no longer respects
         LLDB_TEST_C_COMPILER and LLDB_TEST_CXX_COMPILER. This means there is no
         more support for gcc, but nobody was using this anyway (note: The
         functionality is still there for the dotest suite, just not the lit test
         suite). There is no longer a single substitution %cxx and %cc which maps
         to <arbitrary-compiler>, you now explicitly specify the compiler with a
         substitution like %clang or %clangxx or %clang_cl. We can revisit this
         in the future when someone needs gcc.
      
      2. Introduction of the LLDB_LIT_TOOLS_DIR directory. This does in spirit
         what LLDB_TEST_C_COMPILER and LLDB_TEST_CXX_COMPILER used to do, but now
         more friendly. If this is not specified, all tools are expected to be
         the just-built tools. If it is specified, the tools which are not
         themselves being tested but are being used to construct and run checks
         (e.g. clang, FileCheck, llvm-mc, etc) will be searched for in this
         directory first, then the build output directory.
      
      3. Changes to core llvm lit files. The use_lld() and use_clang()
         functions were introduced long ago in anticipation of using them in
         lldb, but since they were never actually used anywhere but their
         respective problems, there were some issues to be resolved regarding
         generality and ability to use them outside their project.
      
      4. Changes to .test files - These are all just replacing things like
         clang-cl with %clang_cl and %cxx with %clangxx, etc.
      
      5. Changes to lit.cfg.py - Previously we would load up some system
         environment variables and then add some new things to them. Then do a
         bunch of work building out our own substitutions. First, we delete the
         system environment variable code, making the environment hermetic. Then,
         we refactor the substitution logic into two separate helper functions,
         one which sets up substitutions for the tools we want to test (which
         must come from the build output directory), and another which sets up
         substitutions for support tools (like compilers, etc).
      
      6. New substitutions for MSVC -- Previously we relied on location of
         MSVC by bringing in the entire parent's PATH and letting
         subprocess.Popen just run the command line. Now we set up real
         substitutions that should have the same effect. We use PATH to find
         them, and then look for INCLUDE and LIB to construct a substitution
         command line with appropriate /I and /LIBPATH: arguments. The nice thing
         about this is that it opens the door to having separate %msvc-cl32 and
         %msvc-cl64 substitutions, rather than only requiring the user to run
         vcvars first. Because we can deduce the path to 32-bit libraries from
         64-bit library directories, and vice versa. Without these substitutions
         this would have been impossible.
      
      Differential Revision: https://reviews.llvm.org/D54567
      
      llvm-svn: 347216
      58db03a1
    • Fedor Sergeev's avatar
      [LoopPass] fixing 'Modification' messages in -debug-pass=Executions for loop passes · 3a3d688c
      Fedor Sergeev authored
      Legacy loop pass manager is issuing "Made Modification" message after each Loop Pass
      run, however condition for issuing it is accumulated among all the runs.
      That leads to confusing 'modification' messages as soon as the first modification is done.
      
      Changing condition to be "current pass made modifications", similar to how
      it is being done in all other pass managers.
      
      llvm-svn: 347215
      3a3d688c
    • Patrick Lyster's avatar
      [OpenMP] Check target architecture supports unified shared memory for requires... · 8f7f586e
      Patrick Lyster authored
      [OpenMP] Check target architecture supports unified shared memory for requires directive. Differential Review: https://reviews.llvm.org/D54493
      
      llvm-svn: 347214
      8f7f586e
    • Zachary Turner's avatar
      Don't use -O in lit tests. · 28d0131d
      Zachary Turner authored
      Because of different shell quoting rules, and the fact that LLDB
      commands often contain spaces, -O is not portable for writing command
      lines. Instead, we should use explicit lldbinit files.
      
      Differential Revision: https://reviews.llvm.org/D54680
      
      llvm-svn: 347213
      28d0131d
    • Sanjay Patel's avatar
      [SelectionDAG] simplify select FP with undef condition · a1dca355
      Sanjay Patel authored
      llvm-svn: 347212
      a1dca355
    • Sanjay Patel's avatar
      [x86] add test for select FP with undef condition; NFC · 7a51bdcf
      Sanjay Patel authored
      llvm-svn: 347211
      7a51bdcf
    • Sanjay Patel's avatar
      [SelectionDAG] add simplifySelect() to reduce code duplication; NFC · c036d844
      Sanjay Patel authored
      This should be extended to handle FP and vectors in follow-up patches.
      
      llvm-svn: 347210
      c036d844
    • Clement Courbet's avatar
      [llvm-exegesis][NFC] More tests for ExegesisTarget::fillMemoryOperands(). · bbab546a
      Clement Courbet authored
      Reviewers: gchatelet
      
      Subscribers: tschuett, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54304
      
      llvm-svn: 347209
      bbab546a
    • Martin Elshuber's avatar
      Subject: [PATCH] [CodeGen] Add pass to combine interleaved loads. · fef3036d
      Martin Elshuber authored
      This patch defines an interleaved-load-combine pass. The pass searches
      for ShuffleVector instructions that represent interleaved loads. Matches are
      converted such that they will be captured by the InterleavedAccessPass.
      
      The pass extends LLVMs capabilities to use target specific instruction
      selection of interleaved load patterns (e.g.: ld4 on Aarch64
      architectures).
      
      Differential Revision: https://reviews.llvm.org/D52653
      
      llvm-svn: 347208
      fef3036d
    • Eugene Leviant's avatar
      [ThinLTO] Fix comment. NFC · 0c7460ad
      Eugene Leviant authored
      llvm-svn: 347207
      0c7460ad
    • Sanjay Patel's avatar
      [SelectionDAG] fix formatting; NFC · 3fa76bd0
      Sanjay Patel authored
      llvm-svn: 347206
      3fa76bd0
    • Sam McCall's avatar
      [FileManager] getFile(open=true) after getFile(open=false) should open the file. · e84385fe
      Sam McCall authored
      Summary:
      Old behavior is to just return the cached entry regardless of opened-ness.
      That feels buggy (though I guess nobody ever actually needed this).
      
      This came up in the context of clangd+clang-tidy integration: we're
      going to getFile(open=false) to replay preprocessor actions obscured by
      the preamble, but the compilation may subsequently getFile(open=true)
      for non-preamble includes.
      
      Reviewers: ilya-biryukov
      
      Subscribers: ioeric, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D54691
      
      llvm-svn: 347205
      e84385fe
    • Roman Lebedev's avatar
      [llvm-exegesis] (+final perf overview)... · 71fdb576
      Roman Lebedev authored
      [llvm-exegesis] (+final perf overview) InstructionBenchmarkClustering::rangeQuery(): reserve for the upper bound of Neighbors
      
      Summary:
      As it was pointed out in D54388+D54390, the maximal size of `Neighbors` is known,
      it will contain at most Points_.size() minus one (the center of the cluster)
      
      While that is the upper bound, meaning in the most cases, the actual count
      will be much smaller, since D54390 made the allocation persistent,
      we no longer have to worry about overly-optimistically `reserve()`ing.
      
      Old: (D54393)
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (16 runs):
      
             6553.167456      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.21% )
      ...
                  6.5547 +- 0.0134 seconds time elapsed  ( +-  0.20% )
      ```
      New:
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (16 runs):
      
             6315.057872      task-clock (msec)         #    0.999 CPUs utilized            ( +-  0.24% )
      ...
                  6.3187 +- 0.0160 seconds time elapsed  ( +-  0.25% )
      ```
      And that is another -~4%.
      
      
      Since this is the last (as of this moment) patch in this patch series,
      it is a good time to summarize:
      Old: (svn trunk, as stated in D54381)
      ```
      $ time ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html &> /dev/null
      
      real    0m24.884s
      user    0m24.099s
      sys     0m0.785s
      ```
      So these patches, on a given benchmark,
      has decreased llvm-exegesis analysis time by 74.62%.
      
      There surely is more room for further improvements.
      D54514 may improve thins by -11.5% more (relative to this patch).
      Parallelization may improve things further significantly, too.
      
      
      Reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn
      
      Reviewed By: courbet, MaskRay
      
      Subscribers: tschuett, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54415
      
      llvm-svn: 347204
      71fdb576
    • Roman Lebedev's avatar
      [llvm-exegesis] Move InstructionBenchmarkClustering::isNeighbour() into header · 8e315b66
      Roman Lebedev authored
      Summary:
      Old: (D54390)
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
      
             7432.421721      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.15% )
      ...
                  7.4336 +- 0.0115 seconds time elapsed  ( +-  0.15% )
      ```
      New:
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
      
             6569.936144      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.22% )
      ...
                  6.5711 +- 0.0143 seconds time elapsed  ( +-  0.22% )
      ```
      And another -12%. You'd think it would be `inline`d anyway, but no! :)
      
      Reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn
      
      Reviewed By: courbet, MaskRay
      
      Subscribers: tschuett, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54393
      
      llvm-svn: 347203
      8e315b66
    • Roman Lebedev's avatar
      [llvm-exegesis] InstructionBenchmarkClustering::rangeQuery(): write into... · 666d855f
      Roman Lebedev authored
      [llvm-exegesis] InstructionBenchmarkClustering::rangeQuery(): write into llvm::SmallVectorImpl& output parameter
      
      Summary:
      I do believe this is the correct fix.
      We call `rangeQuery()` *very* often. And many times it's output vector is large (tens of thousands entries), so small-size-opt won't help.
      
      Old: (D54389)
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
      
             7934.528363      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.19% )
      ...
                  7.9354 +- 0.0148 seconds time elapsed  ( +-  0.19% )
      ```
      New:
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
      
             7383.793440      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.47% )
      ...
                  7.3868 +- 0.0340 seconds time elapsed  ( +-  0.46% )
      ```
      And another -7%. And that isn't even the good bit yet.
      
      Old:
      * calls to allocation functions: 2081419
      * temporary allocations: 219658 (10.55%)
      * bytes allocated in total (ignoring deallocations): 4.31 GB
      
      New:
      * calls to allocation functions: 1880295 (-10%)
      * temporary allocations: 18758 (1%) (-91% *sic*)
      * bytes allocated in total (ignoring deallocations): 545.15 MB (-88% *sic*)
      
      Reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn
      
      Reviewed By: courbet, MaskRay
      
      Subscribers: tschuett, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54390
      
      llvm-svn: 347202
      666d855f
    • Roman Lebedev's avatar
      [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): replace... · 5c5b1ea7
      Roman Lebedev authored
      [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): replace std::vector<> with std::deque<> in llvm::SetVector<>
      
      Summary:
      Old: (D54388)
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
      
             8606.323981      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.11% )
      ...
                 8.60773 +- 0.00978 seconds time elapsed  ( +-  0.11% )
      ```
      New:
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
      
             7971.403653      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.14% )
      ...
                  7.9728 +- 0.0113 seconds time elapsed  ( +-  0.14% )
      ```
      Another -~7%.
      
      Reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn
      
      Reviewed By: courbet, RKSimon
      
      Subscribers: tschuett, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54389
      
      llvm-svn: 347201
      5c5b1ea7
    • Roman Lebedev's avatar
      [llvm-exegesis] InstructionBenchmarkClustering::rangeQuery(): use... · 8aecb0c4
      Roman Lebedev authored
      [llvm-exegesis] InstructionBenchmarkClustering::rangeQuery(): use llvm::SmallVector<size_t, 0> for storage.
      
      Summary:
      Old: (D54383)
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
      
             9098.781978      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.16% )
      ...
                  9.1015 +- 0.0148 seconds time elapsed  ( +-  0.16% )
      ```
      New:
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (10 runs):
      
             8553.352480      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.12% )
      ...
                  8.5539 +- 0.0105 seconds time elapsed  ( +-  0.12% )
      ```
      So another -6%.
      That is because the `SmallVector` **doubles** it size when reallocating, which is great here,
      since we can't `reserve()` since we can't know how many `Neighbors` we will have.
      
      Reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn
      
      Subscribers: tschuett, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54388
      
      llvm-svn: 347200
      8aecb0c4
    • Roman Lebedev's avatar
      [llvm-exegesis] Analysis: writeMeasurementValue(): don't alloc string for double each time. · b311c1d6
      Roman Lebedev authored
      Summary:
      Test data: 500kLOC of benchmark.yaml, 23Mb. (that is a subset of the actual uops benchmark i was trying to analyze!)
      Old time: (D54382)
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (16 runs):
      
             9024.354355      task-clock (msec)         #    1.000 CPUs utilized            ( +-  0.18% )
      ...
                  9.0262 +- 0.0161 seconds time elapsed  ( +-  0.18% )
      ```
      New time:
      ```
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html' (16 runs):
      
             8996.541057      task-clock (msec)         #    0.999 CPUs utilized            ( +-  0.19% )
      ...
                  9.0045 +- 0.0172 seconds time elapsed  ( +-  0.19% )
      ```
      -~0.3%, not that much. But this isn't the important part.
      
      Old:
      * calls to allocation functions: 2109712
      * temporary allocations: 33112
      * bytes allocated in total (ignoring deallocations): 4.43 GB
      
      New:
      * calls to allocation functions: 2095345 (-0.68%)
      * temporary allocations: 18745 (-43.39% !!!)
      * bytes allocated in total (ignoring deallocations): 4.31 GB (-2.71%)
      
      Reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn
      
      Reviewed By: courbet
      
      Subscribers: tschuett, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54383
      
      llvm-svn: 347199
      b311c1d6
    • Roman Lebedev's avatar
      [llvm-exegesis] Analysis::writeSnippet(): be smarter about memory allocations. · f8b28e9b
      Roman Lebedev authored
      Summary:
      Test data: 500kLOC of benchmark.yaml, 23Mb. (that is a subset of the actual uops benchmark i was trying to analyze!)
      Old time: (D54381)
      ```
      $ time ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html &> /dev/null
      
      real    0m10.487s
      user    0m9.745s
      sys     0m0.740s
      ```
      New time:
      ```
      $ time ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html &> /dev/null
      
      real    0m9.599s
      user    0m8.824s
      sys     0m0.772s
      
      ```
      Not that much, around -9%. But that is not the good part yet, again.
      
      Old:
      * calls to allocation functions: 3347676
      * temporary allocations: 277818
      * bytes allocated in total (ignoring deallocations): 10.52 GB
      
      New:
      * calls to allocation functions: 2109712 (-36%)
      * temporary allocations: 33112 (-88%)
      * bytes allocated in total (ignoring deallocations): 4.43 GB (-58% *sic*)
      
      Reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn
      
      Reviewed By: courbet, MaskRay
      
      Subscribers: tschuett, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54382
      
      llvm-svn: 347198
      f8b28e9b
    • Roman Lebedev's avatar
      [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): use... · 0b4b5128
      Roman Lebedev authored
      [llvm-exegesis] InstructionBenchmarkClustering::dbScan(): use llvm::SetVector<> instead of ILLEGAL std::unordered_set<>
      
      Summary:
      Test data: 500kLOC of benchmark.yaml, 23Mb. (that is a subset of the actual uops benchmark i was trying to analyze!)
      Old time:
      ```
      $ time ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html &> /dev/null
      
      real    0m24.884s
      user    0m24.099s
      sys     0m0.785s
      ```
      New time:
      ```
      $ time ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=100000 -benchmarks-file=/tmp/benchmarks.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html &> /dev/null
      
      real    0m10.469s
      user    0m9.797s
      sys     0m0.672s
      ```
      So -60%. And that isn't the good bit yet.
      
      Old:
      * calls to allocation functions: 106560180  (yes, 107 *million* allocations.)
      * bytes allocated in total (ignoring deallocations): 12.17 GB
      
      New:
      * calls to allocation functions: 3347676  (-96.86%)  (just 3 mil)
      * bytes allocated in total (ignoring deallocations): 10.52 GB (~2GB less)
      
      ---
      
      Two points i want to raise:
      * `std::unordered_set<>` should not have been used there in the first place.
        It is banned by the https://llvm.org/docs/ProgrammersManual.html#other-set-like-container-options
      * There is no tests, so i'm not fully sure this is correct.
        Since it was unordered set, i guess there are zero restrictions on the order, and anything will be ok?
      * I tried other containers suggested in https://llvm.org/docs/ProgrammersManual.html#set-like-containers-std-set-smallset-setvector-etc,
        this `llvm::SetVector<>` seems to be best here.
      
      Reviewers: courbet, MaskRay, RKSimon, gchatelet, john.brawn
      
      Reviewed By: courbet
      
      Subscribers: kristina, bobsayshilol, tschuett, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54381
      
      llvm-svn: 347197
      0b4b5128
    • Anastasia Stulova's avatar
      Fixed uninitialized variable issue. · b879df24
      Anastasia Stulova authored
      This commit should fix failing bots.
      
      llvm-svn: 347196
      b879df24
    • Simon Pilgrim's avatar
      [X86] Add codegen tests for slow-shld scalar funnel shifts · f6c2fbdd
      Simon Pilgrim authored
      llvm-svn: 347195
      f6c2fbdd
    • Michael Platings's avatar
      Test commit - delete trailing space. · 49af7486
      Michael Platings authored
      llvm-svn: 347194
      49af7486
    • Michael Platings's avatar
      Test commit - delete a trailing space. · dad611c1
      Michael Platings authored
      llvm-svn: 347193
      dad611c1
    • Nicolai Haehnle's avatar
      AMDGPU/InsertWaitcnts: Some more const-correctness · c548d914
      Nicolai Haehnle authored
      Reviewers: msearles, rampitec, scott.linder, kanarayan
      
      Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits, hakzsam
      
      Differential Revision: https://reviews.llvm.org/D54225
      
      llvm-svn: 347192
      c548d914
    • Sam Parker's avatar
      [ARM] Remove trunc sinks in ARM CGP · e7c42dd7
      Sam Parker authored
          
      Truncs are treated as sources if their produce a value of the same
      type as the one we currently trying to promote. Truncs used to be
      considered as a sink if their operand was the same value type.
          
      We now allow smaller types in the search, so we should search through
      truncs that produce a smaller value. These truncs can then be
      converted to an AND mask.
          
      This leaves sinks as being:
        - points where the value in the register is being observed, such as
          an icmp, switch or store.
        - points where value types have to match, such as calls and returns.
        - zext are included to ease the transformation and are generally
          removed later on.
          
      During this change, it also became apart from truncating sinks was
      broken: if a sink used a source, its type information had already
      been lost by the time the truncation happens. So I've changed the
      method of caching the type information.
      
      Differential Revision: https://reviews.llvm.org/D54515
      
      llvm-svn: 347191
      e7c42dd7
    • John Brawn's avatar
      [LICM] Make LICM able to hoist phis · 12c046fb
      John Brawn authored
      The general approach taken is to make note of loop invariant branches, then when
      we see something conditional on that branch, such as a phi, we create a copy of
      the branch and (empty versions of) its successors and hoist using that.
      
      This has no impact by itself that I've been able to see, as LICM typically
      doesn't see such phis as they will have been converted into selects by the time
      LICM is run, but once we start doing phi-to-select conversion later it will be
      important.
      
      Differential Revision: https://reviews.llvm.org/D52827
      
      llvm-svn: 347190
      12c046fb
    • Anastasia Stulova's avatar
      [OpenCL] Fix address space deduction in template args. · 7eb6938c
      Anastasia Stulova authored
      Don't deduce address spaces for non-pointer-like types
      in template args.
      
      Fixes PR38603!
      
      Differential Revision: https://reviews.llvm.org/D54634
      
      llvm-svn: 347189
      7eb6938c
    • Benjamin Kramer's avatar
      Remove unused variable. NFC. · 2775b5ca
      Benjamin Kramer authored
      llvm-svn: 347188
      2775b5ca
    • Anton Korobeynikov's avatar
      [MSP430] Optimize srl/sra in case of A >> (8 + N) · 4df19b75
      Anton Korobeynikov authored
      There is no variable-length shifts on MSP430. Therefore
      "eat" 8 bits of shift via bswap & ext.
      
      Path by Kristina Bessonova!
      
      Differential Revision: https://reviews.llvm.org/D54623
      
      llvm-svn: 347187
      4df19b75
    • Serge Guelton's avatar
      Fix disturbing warning - NFCI · 12c7a960
      Serge Guelton authored
      llvm-svn: 347186
      12c7a960