1. Feb 21, 2019
  2. Feb 20, 2019
    • Clement Courbet's avatar
      Re-land the refactoring part of r354244 "[DAGCombiner] Eliminate dead stores to stack." · 62b3b91a
      Clement Courbet authored
      This is an NFC.
      
      llvm-svn: 354476
      62b3b91a
    • Sanjay Patel's avatar
      [CGP][x86] add tests for usubo special-case; NFC · 8d91faa4
      Sanjay Patel authored
      This is another example from PR31754:
      https://bugs.llvm.org/show_bug.cgi?id=31754
      
      llvm-svn: 354475
      8d91faa4
    • James Henderson's avatar
      [obj2yaml][yaml2obj]Locate all .yaml and .test tests · 1498a59d
      James Henderson authored
      A number of the obj2yaml tests end in .yaml, but .yaml is not a default
      file type picked up by lit, so these tests weren't being run when
      running the testsuite as a whole (they could be run explicitly still).
      This change adds a lit local config file to specify the known file types
      for obj2yaml tests (.yaml and .test). Additionally, it fixes the
      yaml2obj config file to allow both .test and .yaml suffixed tests
      (previously, the two tests ending in '.test' were not being run).
      
      Reviewed by: grimar
      
      Differential Revision: https://reviews.llvm.org/D58439
      
      llvm-svn: 354474
      1498a59d
    • Krzysztof Parzyszek's avatar
      6128ac5a
    • Hans Wennborg's avatar
      Speculative buildfix for Mac · 8df4fbc5
      Hans Wennborg authored
      Our builds were failing with
      
      FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o
      [..]
      In file included from /b/c/b/ToTMac/src/third_party/llvm/lib/Support/ARMBuildAttrs.cpp:9:
      In file included from /b/c/b/ToTMac/src/third_party/llvm/include/llvm/ADT/StringRef.h:12:
      In file included from /b/c/b/ToTMac/src/third_party/llvm/include/llvm/ADT/STLExtras.h:19:
      /b/c/b/ToTMac/src/third_party/llvm/include/llvm/ADT/Optional.h:88:25: error: no member named 'addressof' in namespace 'std'
          ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...);
                         ~~~~~^
      
      Try to fix by including <memory>
      
      llvm-svn: 354472
      8df4fbc5
    • Gheorghe-Teodor Bercea's avatar
      [OpenMP][libomptarget] New reduction scheme for team reductions · 06e08f0b
      Gheorghe-Teodor Bercea authored
      Summary:
      This patch adds a more sophisticated team reduction scheme to the OpenMP libomptarget-nvptx runtime.
      
      The scheme uses a fixed size global memory buffer whose length can be adjusted via compiler flag:
      ```
      -fopenmp-cuda-teams-reduction-recs-num=1024
      ```
      The global buffer is a structure of arrays (with default size of 1024 each and controlled by the above flag), one array for each reduction variable.
      
      Values in the buffer are processed by the last team to finish executing the body of the target region.
      
      In addition to adding support for the new flag, the compiler also emits special functions used for the reduction of the intermediate reduction values. These changes will be added in a separate compiler patch following this one.
      
      
      
      
      Reviewers: ABataev, caomhin
      
      Reviewed By: ABataev
      
      Subscribers: guansong, jfb, jdoerfert, openmp-commits
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D58409
      
      llvm-svn: 354471
      06e08f0b
    • Andrea Di Biagio's avatar
      [MCA][ResourceManager] Add a table that maps processor resource indices to... · d882ad5e
      Andrea Di Biagio authored
      [MCA][ResourceManager] Add a table that maps processor resource indices to processor resource identifiers.
      
      This patch adds a lookup table to speed up resource queries in the ResourceManager.
      This patch also moves helper function 'getResourceStateIndex()' from
      ResourceManager.cpp to Support.h, so that we can reuse that logic in the
      SummaryView (and potentially other views in llvm-mca).
      No functional change intended.
      
      llvm-svn: 354470
      d882ad5e
    • Hans Wennborg's avatar
      Fix the build with gcc/libstdc++ 4.8.2 after r354441 · 14e15ec1
      Hans Wennborg authored
      llvm-svn: 354469
      14e15ec1
    • Simon Atanasyan's avatar
      [mips] Put some MIPS-specific sections to separate segments · 14b09810
      Simon Atanasyan authored
      Three MIPS-specific sections `.reginfo`, `.MIPS.options`, and `.MIPS.abiflags`
      are used by loader to read their contents and setup environment for running
      a program. Loader looks up these data in the corresponding segments:
      `PT_MIPS_REGINFO`, `PT_MIPS_OPTIONS`, and `PT_MIPS_ABIFLAGS` respectively.
      
      This patch put these sections to separate segments like we do already
      for ARM `SHT_ARM_EXIDX` section.
      
      Differential Revision: http://reviews.llvm.org/D58381
      
      llvm-svn: 354468
      14b09810
    • Sanjay Patel's avatar
      [InstSimplify] use any-zero matcher for fcmp folds · 68171e3c
      Sanjay Patel authored
      The m_APFloat matcher does not work with anything but strict
      splat vector constants, so we could miss these folds and then
      trigger an assertion in instcombine:
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13201
      
      The previous attempt at this in rL354406 had a logic bug that
      actually triggered a regression test failure, but I failed to
      notice it the first time.
      
      llvm-svn: 354467
      68171e3c
    • Michal Gorny's avatar
      [lldb] [ObjectFile/ELF] Fix recognizing NetBSD images · 4f134fb6
      Michal Gorny authored
      Split the recognition into NetBSD executables & shared libraries
      and core(5) files.
      
      Introduce new owner type: "NetBSD-CORE", as core(5) files are not tagged
      in the same way as regular NetBSD executables.
      
      Stop using incorrectly ABI_TAG and ABI_SIZE.  Introduce IDENT_TAG,
      IDENT_DECSZ, IDENT_NAMESZ and PROCINFO.
      
      The new values detect correctly the NetBSD images.
      
      The patch has been originally written by Kamil Rytarowski.  I've added
      tests and applied minor code changes per review.  The work has been
      sponsored by the NetBSD Foundation.
      
      Differential Revision: https://reviews.llvm.org/D42870
      
      llvm-svn: 354466
      4f134fb6
    • George Rimar's avatar
      [yaml2elf] - Rename a variable. NFC. · dac37fb3
      George Rimar authored
      Was suggested during review of D58441.
      
      llvm-svn: 354463
      dac37fb3
    • George Rimar's avatar
      [yaml2obj] - Simplify implementation. NFCI. · d063c7d8
      George Rimar authored
      Knowing about how types are declared for 32/64 bit platforms:
      https://github.com/llvm-mirror/llvm/blob/master/include/llvm/BinaryFormat/ELF.h#L28
      
      it is possible to simplify code that writes a binary a bit.
      The patch does that.
      
      Differential revision: https://reviews.llvm.org/D58441
      
      llvm-svn: 354462
      d063c7d8
    • Petar Avramovic's avatar
      [MIPS MSA] Avoid some DAG combines for vector shifts · dee5846b
      Petar Avramovic authored
      DAG combiner combines two shifts into shift + and with bitmask.
      Avoid such combines for vectors since leaving two vector shifts
      as they are produces better end results.
      
      Differential Revision: https://reviews.llvm.org/D58225
      
      llvm-svn: 354461
      dee5846b
    • Ilya Biryukov's avatar
      [clangd] Fix a typo. NFC · 97ed3c1e
      Ilya Biryukov authored
      The documentation for -index-file mentioned clang-index instead of
      clangd-indexer.
      
      llvm-svn: 354456
      97ed3c1e
    • Petar Avramovic's avatar
      [MIPS MSA] Add test for vector shift combines · 9f38f0ed
      Petar Avramovic authored
      Add test for vector shift combines.
      
      llvm-svn: 354455
      9f38f0ed
    • Simon Pilgrim's avatar
      [SLPVectorizer][X86] Add add/sub/mul overflow tests · 9921e73d
      Simon Pilgrim authored
      Baseline tests - overflow intrinsics aren't flagged as vectorizable yet
      
      llvm-svn: 354454
      9921e73d
    • Kadir Cetinkaya's avatar
      [clangd] Revert r354442 and r354444 · 592e7c9b
      Kadir Cetinkaya authored
      Looks like sysroot is only working on linux.
      
      llvm-svn: 354453
      592e7c9b
    • Krasimir Georgiev's avatar
      [clang-format] Do not emit replacements if Java imports are OK · 777bb825
      Krasimir Georgiev authored
      Summary:
      Currently clang-format would always emit a replacement for a block of Java imports even if it is correctly formatted:
      ```
      % cat /tmp/Aggregator.java
      import X;
      % clang-format /tmp/Aggregator.java
      import X;
      % clang-format -output-replacements-xml /tmp/Aggregator.java
      <?xml version='1.0'?>
      <replacements xml:space='preserve' incomplete_format='false'>
      <replacement offset='0' length='9'>import X;</replacement>
      </replacements>
      %
      ```
      This change makes clang-format not emit replacements in this case. Note that
      there is logic to not emit replacements in this case for C++.
      
      Reviewers: ioeric
      
      Reviewed By: ioeric
      
      Subscribers: jdoerfert, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58436
      
      llvm-svn: 354452
      777bb825
    • H.J. Lu's avatar
      [sanitizers] Restore internal_readlink for x32 · 6716f4af
      H.J. Lu authored
      r316591 has
      
      @@ -389,13 +383,11 @@ uptr internal_dup2(int oldfd, int newfd) {
       }
      
       uptr internal_readlink(const char *path, char *buf, uptr bufsize) {
      -#if SANITIZER_NETBSD
      -  return internal_syscall_ptr(SYSCALL(readlink), path, buf, bufsize);
      -#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
      +#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
         return internal_syscall(SYSCALL(readlinkat), AT_FDCWD,
                                 (uptr)path, (uptr)buf, bufsize);
       #else
      -  return internal_syscall(SYSCALL(readlink), (uptr)path, (uptr)buf, bufsize);
      +  return internal_syscall_ptr(SYSCALL(readlink), path, buf, bufsize);
       #endif
       }
      
      which dropped the (uptr) cast and broke x32.  This patch puts back the
      (uptr) cast to restore x32 and fixes:
      
      https://bugs.llvm.org/show_bug.cgi?id=40783
      
      Differential Revision: https://reviews.llvm.org/D58413
      
      llvm-svn: 354451
      6716f4af
    • Fangrui Song's avatar
      ELF: Remove field for .gdb_index in InStruct. NFC. · eaa0db02
      Fangrui Song authored
      Summary: This field is unreferenced outside of createSyntheticSections.
      
      Reviewers: ruiu, pcc, espindola, grimar
      
      Reviewed By: grimar
      
      Subscribers: grimar, emaste, arichardson, arphaman, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D58423
      
      llvm-svn: 354449
      eaa0db02
    • Kadir Cetinkaya's avatar
      [clangd] Try to fix windows build bots · 60ba9b44
      Kadir Cetinkaya authored
      llvm-svn: 354444
      60ba9b44
    • David Green's avatar
      [Codegen] Remove dead flags on Physical Defs in machine cse · cb5a48b0
      David Green authored
      We may leave behind incorrect dead flags on instructions that are CSE'd. Make
      sure we remove the dead flags on physical registers to prevent other incorrect
      code motion.
      
      Differential Revision: https://reviews.llvm.org/D58115
      
      llvm-svn: 354443
      cb5a48b0
    • Kadir Cetinkaya's avatar
      [clangd] Testcase for bug 39811 · 30d34083
      Kadir Cetinkaya authored
      Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58133
      
      llvm-svn: 354442
      30d34083
    • Roman Lebedev's avatar
      [llvm-exegesis] Opcode stabilization / reclusterization (PR40715) · 69716394
      Roman Lebedev authored
      Summary:
      Given an instruction `Opcode`, we can make benchmarks (measurements) of the
      instruction characteristics/performance. Then, to facilitate further analysis
      we group the benchmarks with *similar* characteristics into clusters.
      Now, this is all not entirely deterministic. Some instructions have variable
      characteristics, depending on their arguments. And thus, if we do several
      benchmarks of the same instruction `Opcode`, we may end up with *different*
      performance characteristics measurements. And when we then do clustering,
      these several benchmarks of the same instruction `Opcode` may end up being
      clustered into *different* clusters. This is not great for further analysis.
      
      We shall find every `Opcode` with benchmarks not in just one cluster, and move
      *all* the benchmarks of said `Opcode` into one new unstable cluster per `Opcode`.
      
      I have solved this by making `ClusterId` a bit field, adding a `IsUnstable` bit,
      and introducing `-analysis-display-unstable-clusters` switch to toggle between
      displaying stable-only clusters and unstable-only clusters.
      
      The reclusterization is deterministically stable, produces identical reports
      between runs. (Or at least that is what i'm seeing, maybe it isn't)
      
      Timings/comparisons:
      old (current trunk/head) {F8303582}
      ```
      $ perf stat -r 25 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=0.5 -benchmarks-file=/home/lebedevri/PileDriver-Sched/benchmarks-inverse_throughput.yaml -analysis-inconsistencies-output-file=/tmp/clusters-old.html
      no exegesis target for x86_64-unknown-linux-gnu, using default
      Parsed 43970 benchmark points
      Printing sched class consistency analysis results to file '/tmp/clusters-old.html'
      ...
      no exegesis target for x86_64-unknown-linux-gnu, using default
      Parsed 43970 benchmark points
      Printing sched class consistency analysis results to file '/tmp/clusters-old.html'
      
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=0.5 -benchmarks-file=/home/lebedevri/PileDriver-Sched/benchmarks-inverse_throughput.yaml -analysis-inconsistencies-output-file=/tmp/clusters-old.html' (25 runs):
      
                 6624.73 msec task-clock                #    0.999 CPUs utilized            ( +-  0.53% )
                     172      context-switches          #   25.965 M/sec                    ( +- 29.89% )
                       0      cpu-migrations            #    0.042 M/sec                    ( +- 56.54% )
                   31073      page-faults               # 4690.754 M/sec                    ( +-  0.08% )
             26538711696      cycles                    # 4006230.292 GHz                   ( +-  0.53% )  (83.31%)
              2017496807      stalled-cycles-frontend   #    7.60% frontend cycles idle     ( +-  0.93% )  (83.32%)
             13403650062      stalled-cycles-backend    #   50.51% backend cycles idle      ( +-  0.33% )  (33.37%)
             19770706799      instructions              #    0.74  insn per cycle
                                                        #    0.68  stalled cycles per insn  ( +-  0.04% )  (50.04%)
              4419821812      branches                  # 667207369.714 M/sec               ( +-  0.03% )  (66.69%)
               121741669      branch-misses             #    2.75% of all branches          ( +-  0.28% )  (83.34%)
      
                  6.6283 +- 0.0358 seconds time elapsed  ( +-  0.54% )
      ```
      
      patch, with reclustering but without filtering (i.e. outputting all the stable *and* unstable clusters) {F8303586}
      ```
      $ perf stat -r 25 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=0.5 -benchmarks-file=/home/lebedevri/PileDriver-Sched/benchmarks-inverse_throughput.yaml -analysis-inconsistencies-output-file=/tmp/clusters-new-all.html
      no exegesis target for x86_64-unknown-linux-gnu, using default
      Parsed 43970 benchmark points
      Printing sched class consistency analysis results to file '/tmp/clusters-new-all.html'
      ...
      no exegesis target for x86_64-unknown-linux-gnu, using default
      Parsed 43970 benchmark points
      Printing sched class consistency analysis results to file '/tmp/clusters-new-all.html'
      
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=0.5 -benchmarks-file=/home/lebedevri/PileDriver-Sched/benchmarks-inverse_throughput.yaml -analysis-inconsistencies-output-file=/tmp/clusters-new-all.html' (25 runs):
      
                 6475.29 msec task-clock                #    0.999 CPUs utilized            ( +-  0.31% )
                     213      context-switches          #   32.952 M/sec                    ( +- 23.81% )
                       1      cpu-migrations            #    0.130 M/sec                    ( +- 43.84% )
                   31287      page-faults               # 4832.057 M/sec                    ( +-  0.08% )
             25939086577      cycles                    # 4006160.279 GHz                   ( +-  0.31% )  (83.31%)
              1958812858      stalled-cycles-frontend   #    7.55% frontend cycles idle     ( +-  0.68% )  (83.32%)
             13218961512      stalled-cycles-backend    #   50.96% backend cycles idle      ( +-  0.29% )  (33.37%)
             19752995402      instructions              #    0.76  insn per cycle
                                                        #    0.67  stalled cycles per insn  ( +-  0.04% )  (50.04%)
              4417079244      branches                  # 682195472.305 M/sec               ( +-  0.03% )  (66.70%)
               121510065      branch-misses             #    2.75% of all branches          ( +-  0.19% )  (83.34%)
      
                  6.4832 +- 0.0229 seconds time elapsed  ( +-  0.35% )
      ```
      Funnily, *this* measurement shows that said reclustering actually improved performance.
      
      patch, with reclustering, only the stable clusters {F8303594}
      ```
      $ perf stat -r 25 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=0.5 -benchmarks-file=/home/lebedevri/PileDriver-Sched/benchmarks-inverse_throughput.yaml -analysis-inconsistencies-output-file=/tmp/clusters-new-stable.html
      no exegesis target for x86_64-unknown-linux-gnu, using default
      Parsed 43970 benchmark points
      Printing sched class consistency analysis results to file '/tmp/clusters-new-stable.html'
      ...
      no exegesis target for x86_64-unknown-linux-gnu, using default
      Parsed 43970 benchmark points
      Printing sched class consistency analysis results to file '/tmp/clusters-new-stable.html'
      
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=0.5 -benchmarks-file=/home/lebedevri/PileDriver-Sched/benchmarks-inverse_throughput.yaml -analysis-inconsistencies-output-file=/tmp/clusters-new-stable.html' (25 runs):
      
                 6387.71 msec task-clock                #    0.999 CPUs utilized            ( +-  0.13% )
                     133      context-switches          #   20.792 M/sec                    ( +- 23.39% )
                       0      cpu-migrations            #    0.063 M/sec                    ( +- 61.24% )
                   31318      page-faults               # 4903.256 M/sec                    ( +-  0.08% )
             25591984967      cycles                    # 4006786.266 GHz                   ( +-  0.13% )  (83.31%)
              1881234904      stalled-cycles-frontend   #    7.35% frontend cycles idle     ( +-  0.25% )  (83.33%)
             13209749965      stalled-cycles-backend    #   51.62% backend cycles idle      ( +-  0.16% )  (33.36%)
             19767554347      instructions              #    0.77  insn per cycle
                                                        #    0.67  stalled cycles per insn  ( +-  0.04% )  (50.03%)
              4417480305      branches                  # 691618858.046 M/sec               ( +-  0.03% )  (66.68%)
               118676358      branch-misses             #    2.69% of all branches          ( +-  0.07% )  (83.33%)
      
                  6.3954 +- 0.0118 seconds time elapsed  ( +-  0.18% )
      ```
      Performance improved even further?! Makes sense i guess, less clusters to print.
      
      patch, with reclustering, only the unstable clusters {F8303601}
      ```
      $ perf stat -r 25 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=0.5 -benchmarks-file=/home/lebedevri/PileDriver-Sched/benchmarks-inverse_throughput.yaml -analysis-inconsistencies-output-file=/tmp/clusters-new-unstable.html -analysis-display-unstable-clusters
      no exegesis target for x86_64-unknown-linux-gnu, using default
      Parsed 43970 benchmark points
      Printing sched class consistency analysis results to file '/tmp/clusters-new-unstable.html'
      ...
      no exegesis target for x86_64-unknown-linux-gnu, using default
      Parsed 43970 benchmark points
      Printing sched class consistency analysis results to file '/tmp/clusters-new-unstable.html'
      
       Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=0.5 -benchmarks-file=/home/lebedevri/PileDriver-Sched/benchmarks-inverse_throughput.yaml -analysis-inconsistencies-output-file=/tmp/clusters-new-unstable.html -analysis-display-unstable-clusters' (25 runs):
      
                 6124.96 msec task-clock                #    1.000 CPUs utilized            ( +-  0.20% )
                     194      context-switches          #   31.709 M/sec                    ( +- 20.46% )
                       0      cpu-migrations            #    0.039 M/sec                    ( +- 49.77% )
                   31413      page-faults               # 5129.261 M/sec                    ( +-  0.06% )
             24536794267      cycles                    # 4006425.858 GHz                   ( +-  0.19% )  (83.31%)
              1676085087      stalled-cycles-frontend   #    6.83% frontend cycles idle     ( +-  0.46% )  (83.32%)
             13035595603      stalled-cycles-backend    #   53.13% backend cycles idle      ( +-  0.16% )  (33.36%)
             18260877653      instructions              #    0.74  insn per cycle
                                                        #    0.71  stalled cycles per insn  ( +-  0.05% )  (50.03%)
              4112411983      branches                  # 671484364.603 M/sec               ( +-  0.03% )  (66.68%)
               114066929      branch-misses             #    2.77% of all branches          ( +-  0.11% )  (83.32%)
      
                  6.1278 +- 0.0121 seconds time elapsed  ( +-  0.20% )
      ```
      This tells us that the actual `-analysis-inconsistencies-output-file=` outputting only takes ~0.4 sec for 43970 benchmark points (3 whole sweeps)
      (Also, wow this is fast, it used to take several minutes originally)
      
      Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=40715 | PR40715 ]].
      
      Reviewers: courbet, gchatelet
      
      Reviewed By: courbet
      
      Subscribers: tschuett, jdoerfert, llvm-commits, RKSimon
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D58355
      
      llvm-svn: 354441
      69716394
    • Mikael Holmen's avatar
      [RegAllocGreedy] Take last chance recoloring into account in split and assign · 2d6bb134
      Mikael Holmen authored
      Summary:
      This is a follow-up to r353988 where tryEvict was extended to take last
      chance recoloring into account. Now we do the same thing for trySplit and
      tryAssign.
      
      Now we always pass a "FixedRegisters" argument to canEvictInterference and
      tryEvict so it doesn't need to have a default value anymore.
      
      The need for this was found long ago in an out-of-tree target.
      Unfortunately I don't have a reproducer for an in-tree target.
      
      Reviewers: qcolombet, rudkx
      
      Reviewed By: qcolombet, rudkx
      
      Subscribers: rudkx, MatzeB, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D58376
      
      llvm-svn: 354439
      2d6bb134
    • Chen Zheng's avatar
      [NFC] add/modify wrapper function for findRegisterDefOperand(). · b934fce6
      Chen Zheng authored
      llvm-svn: 354438
      b934fce6
    • Chijun Sima's avatar
      [DTU] Refine the document of mutation APIs [NFC] (PR40528) · f3d41661
      Chijun Sima authored
      Summary:
      It was pointed out in [[ https://bugs.llvm.org/show_bug.cgi?id=40528 | Bug 40528 ]] that it is not clear whether insert/deleteEdge can be used to perform multiple updates and [[ https://reviews.llvm.org/D57316#1388344 | a comment in D57316 ]] reveals that the difference between several ways to update the DominatorTree is confusing.
      
      This patch tries to address issues above.
      
      Reviewers: mkazantsev, kuhar, asbirlea, chandlerc, brzycki
      
      Reviewed By: mkazantsev, kuhar, brzycki
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D57881
      
      llvm-svn: 354437
      f3d41661
    • Craig Topper's avatar
      [X86] Remove FeatureSlowIncDec from Sandy Bridge and later Intel Core CPUs · e4025c5e
      Craig Topper authored
      Summary:
      Inc and Dec were at one point slow on Intel CPUs due to their tendency to cause partial flag stalls on P6 derived CPU cores. This is because these instructions are defined to preserve the carry flag. This partial flag stall issue persisted until Sandy Bridge when flag merging was changed to be handled as a data dependency instead of as a stall until retirement. Sandy Bridge and later CPUs rename the C flag separately from OSPAZ so there is no flag merge needed on INC/DEC to preserve the C flag.
      
      Given these improvements I don't know why INC/DEC was ever considered slow on Sandy Bridge. If anything they should have been disabled on the earlier CPUs instead.
      
      Note after this patch, INC/DEC are still considered slow on Silvermont, Goldmont, Knights Landing and our generic "x86-64" CPU.
      
      Reviewers: spatel, RKSimon, chandlerc
      
      Reviewed By: chandlerc
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D58412
      
      llvm-svn: 354436
      e4025c5e
    • Leonard Chan's avatar
      Limit new PM tests to X86 registered targets. · a07f1b94
      Leonard Chan authored
      llvm-svn: 354435
      a07f1b94