collapse
0%
WDescription%
Build stability: All recent builds failed.0
Build History
x
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems

Changes

#307 (Feb 20, 2019 12:17:55 PM)

  1. Add support for pointer types in patterns

    Summary:
    This adds support for defining patterns for global isel using pointer
    types, for example:

    def : Pat<(load GPR32:$src),
              (p1 (LOAD GPR32:$src))>;

    DAGISelEmitter will ignore the pointer information and treat these
    types as integers with the same bit-width as the pointer type.

    Reviewers: dsanders, rtereshin, arsenm

    Reviewed By: arsenm

    Subscribers: Petar.Avramovic, wdng, rovka, kristof.beyls, jfb, volkan, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57065 — tstellar / ViewSVN
  2. [OPENMP] Use targetDiag for diagnostics of unsupported exceptions, NFC. — abataev / ViewSVN
  3. Fix testcase. — niravd / ViewSVN
  4. [clangd] Fix a crash in Selection

    Summary:
    The assertion checking that a range of a node is a token range does
    not hold in case of "split" tokens, e.g. between two closing template
    argument lists (`vector<vector<int>>`).

    Reviewers: kadircet, sammccall

    Reviewed By: kadircet

    Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58447 — ibiryukov / ViewSVN
  5. [clangd] Store index in '.clangd/index' instead of '.clangd-index'

    Summary: To take up the .clangd folder for other potential uses in the future.

    Reviewers: kadircet, sammccall

    Reviewed By: kadircet

    Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58440 — ibiryukov / ViewSVN
  6. Add test case. — niravd / ViewSVN
  7. Fix remaining semicolon pedantic errors for intel — martong / ViewSVN
  8. [Clang Driver] Add support for "-static-pie" argument to the Clang driver.

    Summary: This change mimics GCC's support for the "-static-pie" argument.

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58307 — sivachandra / ViewSVN
  9. [X86] Add test case to show missed opportunity to remove an explicit AND on the bit position from BT when it has known zeros. NFC

    If the bit position has known zeros in it, then the AND immediate will likely be optimized to remove bits.

    This can prevent GetDemandedBits from recognizing that the AND is unnecessary. — ctopper / ViewSVN
  10. Fix license headers — Vitaly Buka / ViewSVN
  11. Revert r354498 "[X86] Add test case to show missed opportunity to remove an explicit AND on the bit position from BT when it has known zeros."

    I accidentally committed more than just the test. — ctopper / ViewSVN
  12. [X86] Add test case to show missed opportunity to remove an explicit AND on the bit position from BT when it has known zeros.

    If the bit position has known zeros in it, then the AND immediate will likely be optimized to remove bits.

    This can prevent GetDemandedBits from recognizing that the AND is unnecessary. — ctopper / ViewSVN
  13. AArch64/test: Add check for function name to machine-outliner-bad-adrp.mir

    Summary:
    This test was failing in one of our setups because the generated ModuleID
    had the full path of the test file and that path contained the string
    BL.

    Reviewers: t.p.northover, jpaquette, paquette

    Reviewed By: paquette

    Subscribers: javed.absar, kristof.beyls, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58217 — tstellar / ViewSVN
  14. Fixing NDEBUG typo in include/llvm/Support/raw_ostream.h

    NDEBUG is misspelled as NDBEBUG in include/llvm/Support/raw_ostream.h. — zer0 / ViewSVN
  15. [MCA][Scheduler] Correctly initialize field NumDispatchedToThePendingSet.

    This should have been part of r354490. — adibiagio / ViewSVN
  16. Add partial implementation of std::to_address() as llvm::to_address()

    Summary:
    Following on from the review for D58088, this patch provides the
    prerequisite to_address() implementation that's needed to have
    pointer_iterator support unique_ptr.

    The late bound return should be removed once we move to C++14 to better
    align with the C++20 declaration. Also, this implementation can be removed
    once we move to C++20 where it's defined as std::to_addres()

    The std::pointer_traits<>::to_address(p) variations of these overloads has
    not been implemented.

    Reviewers: dblaikie, paquette

    Reviewed By: dblaikie

    Subscribers: dexonsmith, kristina, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58421 — dsanders / ViewSVN
  17. [MCA][Scheduler] Collect resource pressure and memory dependency bottlenecks.

    Every cycle, the Scheduler checks if instructions in the ReadySet can be issued
    to the underlying pipelines. If an instruction cannot be issued because one or
    more pipeline resources are unavailable, then field
    Instruction::CriticalResourceMask is updated with the resource identifier of the
    unavailable resources.

    If an instruction cannot be promoted from the PendingSet to the ReadySet because
    of a memory dependency, then field Instruction::CriticalMemDep is updated with
    the identifier of the dependending memory instruction.

    Bottleneck information is collected after every cycle for instructions that are
    waiting to execute. The idea is to help identify causes of bottlenecks; this
    information can be used in future to implement a bottleneck analysis. — adibiagio / ViewSVN
  18. [X86][SSE] combineX86ShufflesRecursively - begin generalizing the number of shuffle inputs. NFCI.

    We currently bail if the target shuffle decodes to more than 2 input vectors, this is some initial cleanup that still has the limit but generalizes the opindices to an array that will be necessary when we drop the limit. — rksimon / ViewSVN
  19. [OPENMP] Delay emission of the asm target-specific error messages.

    Summary:
    Added the ability to emit target-specific builtin assembler error
    messages only in case if the function is really is going to be emitted
    for the device.

    Reviewers: rjmccall

    Subscribers: guansong, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58243 — abataev / ViewSVN
  20. Update property prefix regex to allow numbers.

    Subscribers: jfb, cfe-commits

    Differential Revision: https://reviews.llvm.org/D56896 — wizard / ViewSVN
  21. [llvm-readelf]Test a couple of corner-cases for --section-mapping

    This patch adds two new tests for edge-case behaviour for --section-
    mapping, namely when there are no program headers, and when there are no
    section headers.

    Reviewed by: mattd

    Differential Revision: https://reviews.llvm.org/D58456 — jhenderson / ViewSVN
  22. Fix compile error with Intel's compiler (-Werror=pedantic)

    An extra semicolon at the end of macro invocations caused a build bot
    failure for Intel's compiler when pedantic is turned on. — martong / ViewSVN
  23. [CodeGen] Enable the complex-math test for arm

    This test wasn't running due to a missing : after the RUN statement.
    Enabling this test revealed that it's actually broken.

    Differential Revision: https://reviews.llvm.org/D58429 — phosek / ViewSVN
  24. GlobalISel: Fix fewerElementsVector for ctlz with different result type

    Also complete the set of related operations. — arsenm / ViewSVN
  25. [OPENMP][NVPTX]Use faster teams reduction algorithm.

    A faster way to reduce the values in teams reductions was found, the
    codegen is updated to use this faster algorithm and new runtime functions. — abataev / ViewSVN
  26. GlobalISel: Implement moreElementsVector for g_insert results — arsenm / ViewSVN
  27. Re-land the refactoring part of r354244 "[DAGCombiner] Eliminate dead stores to stack."

    This is an NFC. — courbet / ViewSVN
  28. [CGP][x86] add tests for usubo special-case; NFC

    This is another example from PR31754:
    https://bugs.llvm.org/show_bug.cgi?id=31754 — spatel / ViewSVN
  29. [obj2yaml][yaml2obj]Locate all .yaml and .test tests

    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 — jhenderson / ViewSVN
  30. [Hexagon] Split vector pairs for ISD::SIGN_EXTEND and ISD::ZERO_EXTEND — kparzysz / ViewSVN
  31. Speculative buildfix for Mac

    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> — hans / ViewSVN
  32. [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. — adibiagio / ViewSVN
  33. Fix the build with gcc/libstdc++ 4.8.2 after r354441 — hans / ViewSVN
  34. [InstSimplify] use any-zero matcher for fcmp folds

    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. — spatel / ViewSVN
  35. [yaml2elf] - Rename a variable. NFC.

    Was suggested during review of D58441. — grimar / ViewSVN
  36. [yaml2obj] - Simplify implementation. NFCI.

    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 — grimar / ViewSVN
  37. [MIPS MSA] Avoid some DAG combines for vector shifts

    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 — petar.avramovic / ViewSVN
  38. [clangd] Fix a typo. NFC

    The documentation for -index-file mentioned clang-index instead of
    clangd-indexer. — ibiryukov / ViewSVN
  39. [MIPS MSA] Add test for vector shift combines

    Add test for vector shift combines. — petar.avramovic / ViewSVN
  40. [SLPVectorizer][X86] Add add/sub/mul overflow tests

    Baseline tests - overflow intrinsics aren't flagged as vectorizable yet — rksimon / ViewSVN
  41. [clangd] Revert r354442 and r354444

    Looks like sysroot is only working on linux. — kadircet / ViewSVN
  42. [clang-format] Do not emit replacements if Java imports are OK

    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 — krasimir / ViewSVN
  43. [sanitizers] Restore internal_readlink for x32

    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 — hjl / ViewSVN
  44. [clangd] Try to fix windows build bots — kadircet / ViewSVN
  45. [Codegen] Remove dead flags on Physical Defs in machine cse

    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 — dmgreen / ViewSVN
  46. [clangd] Testcase for bug 39811

    Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58133 — kadircet / ViewSVN

#306 (Feb 20, 2019 1:37:07 AM)

  1. [llvm-exegesis] Opcode stabilization / reclusterization (PR40715)

    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 — lebedevri / ViewSVN
  2. [RegAllocGreedy] Take last chance recoloring into account in split and assign

    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 — uabelho / ViewSVN
  3. [NFC] add/modify wrapper function for findRegisterDefOperand(). — shchenz / ViewSVN
  4. [DTU] Refine the document of mutation APIs [NFC] (PR40528)

    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 — sima / ViewSVN
  5. [X86] Remove FeatureSlowIncDec from Sandy Bridge and later Intel Core CPUs

    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 — ctopper / ViewSVN
  6. Limit new PM tests to X86 registered targets. — leonardchan / ViewSVN
  7. Temporarily Revert "[X86][SLP] Enable SLP vectorization for 128-bit horizontal X86 instructions (add, sub)"

    As this has broken the lto bootstrap build for 3 days and is
    showing a significant regression on the Dither_benchmark results (from
    the LLVM benchmark suite) -- specifically, on the
    BENCHMARK_FLOYD_DITHER_128, BENCHMARK_FLOYD_DITHER_256, and
    BENCHMARK_FLOYD_DITHER_512; the others are unchanged.  These have
    regressed by about 28% on Skylake, 34% on Haswell, and over 40% on
    Sandybridge.

    This reverts commit r353923. — echristo / ViewSVN
  8. [Dominators] Simplify and optimize path compression used in link-eval forest.

    Summary:
    * NodeToInfo[*] have been allocated so the addresses are stable. We can store them instead of NodePtr to save NumToNode lookups.
    * Nodes are traversed twice. Using `Visited` to check the traversal number is expensive and obscure. Just split the two traversals into two loops explicitly.
    * The check `VInInfo.DFSNum < LastLinked` is redundant as it is implied by `VInInfo->Parent < LastLinked`
    * VLabelInfo PLabelInfo are used to save a NodeToInfo lookup in the second traversal.

    Also add some comments explaining eval().

    This shows a ~4.5% improvement (9.8444s -> 9.3996s) on

        perf stat -r 10 taskset -c 0 opt -passes=$(printf '%.0srequire<domtree>,invalidate<domtree>,' {1..1000})'require<domtree>' -disable-output sqlite-autoconf-3270100/sqlite3.bc

    Reviewers: kuhar, sanjoy, asbirlea

    Reviewed By: kuhar

    Subscribers: brzycki, NutshellySima, kristina, jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58327 — maskray / ViewSVN
  9. Remove test on incompatible mpis target. — leonardchan / ViewSVN
  10. [NewPM] Add other sanitizers at O0

    This allows for MSan and TSan to be used without optimizations required.

    Differential Revision: https://reviews.llvm.org/D58424 — leonardchan / ViewSVN
  11. [RISCV] Implement pseudo instructions for load/store from a symbol address.

    Summary:
    Those pseudo-instructions are making load/store instructions able to
    load/store from/to a symbol, and its always using PC-relative addressing
    to generating a symbol address.

    Reviewers: asb, apazos, rogfer01, jrtc27

    Differential Revision: https://reviews.llvm.org/D50496 — kito / ViewSVN
  12. [Dominators] Delete UpdateLevelsAfterInsertion in edge insertion of depth-based search for release builds

    Summary:
    After insertion of (From, To), v is affected iff
    depth(NCD)+1 < depth(v) && path P from To to v exists where every w on P s.t. depth(v) <= depth(w)

    All affected vertices change their idom to NCD.

    If a vertex u has changed its depth, it must be a descendant of an
    affected vertex v. Its depth must have been updated by UpdateLevel()
    called by setIDom() of the first affected ancestor.

    So UpdateLevelsAfterInsertion and its bookkeeping variable VisitedNotAffectedQueue are redundant.
    Run them only in debug builds as a sanity check.

    Reviewers: kuhar

    Reviewed By: kuhar

    Subscribers: kristina, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58369 — maskray / ViewSVN
  13. [PowerPC] exploit P9 instruction maddld.
    Differential Revision: https://reviews.llvm.org/D58364 — shchenz / ViewSVN
  14. [WebAssembly] Generalize section ordering constraints

    Summary:
    Changes from using a total ordering of known sections to using a
    dependency graph approach. This allows our tools to accept and process
    binaries that are compliant with the spec and tool conventions that
    would have been previously rejected. It also means our own tools can
    do less work to enforce an artificially imposed ordering. Using a
    general mechanism means fewer special cases and exceptions in the
    ordering logic.

    Reviewers: aheejin, dschuff

    Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58312 — tlively / ViewSVN
  15. [WebAssembly] Refactor atomic operation definitions (NFC)

    Summary:
    - Make `ATOMIC_I`, `ATOMIC_NRI`, `AtomicLoad`, `AtomicStore` classes and
      make other operations inherit from them
    - Factor the common opcode prefix '0xfe' out from the opcodes into the
      common class
    - Reorder instructions in the order of increasing opcodes

    Reviewers: tlively

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58338 — aheejin / ViewSVN
  16. [InstCombine] regenerate test checks; NFC — spatel / ViewSVN
  17. [WebAssembly] Fix load/store name detection for atomic instructions

    Summary:
    Fixed a bug in the routine in AsmParser that determines whether the
    current instruction is a load or a store. Atomic instructions' prefixes
    are not `atomic_` but `atomic.`, and all atomic instructions are also
    memory instructions. Also fixed the printing format of atomic
    instructions to match other memory instructions and added encoding tests
    for atomic instructions.

    Reviewers: aardappel, tlively

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58337 — aheejin / ViewSVN
  18. CMake: Fix stand-alone clang builds since r353268

    Summary:
    Handle the case where LLVM_MAIN_SRC_DIR is not set and also use
    LLVM_CMAKE_DIR for locating installed cmake files rather than
    LLVM_CMAKE_PATH.

    Reviewers: phosek, andrewrk, smeenai

    Reviewed By: phosek, andrewrk, smeenai

    Subscribers: mgorny, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D58204 — tstellar / ViewSVN
  19. [WebAssembly] Fixed disassembler not knowing about OPERAND_EVENT

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58414 — aardappel / ViewSVN

#305 (Feb 19, 2019 4:37:30 PM)

  1. gn build: Merge r354365 more — nico / ViewSVN
  2. [GVN] Small tweaks to comments, style, and missed vector handling

    Noticed these while doing a final sweep of the code to make sure I hadn't missed anything in my last couple of patches.  The (minor) missed optimization was noticed because of the stylistic fix to avoid an overly specific cast. — reames / ViewSVN
  3. gn build: Merge r354365 — nico / ViewSVN
  4. [lld-link] preserve @llvm.used symbols in LTO

    Summary:
    We translate @llvm.used to COFF by generating /include directives
    in the .drectve section. However, in LTO links, this happens after
    directives have already been processed, so the new directives do
    not take effect. This change marks @llvm.used symbols as GCRoots
    so that they are preserved as intended.

    Fixes PR40733.

    Reviewers: rnk, pcc, ruiu

    Reviewed By: ruiu

    Subscribers: mehdi_amini, steven_wu, dexonsmith, dang, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58255 — inglorion / ViewSVN
  5. [BPF] make test case reloc-btf.ll tolerable for old compilers

    The test case reloc-btf.ll is generated with an IR containing
    spFlags introduced by https://reviews.llvm.org/rL347806.
    In the case of BTF backporting, the old compiler may not
    have this patch, so this test will fail during
    validation.

    This patch removed spFlags from IR in the test case
    and used the old way for various flags.

    Acked-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Yonghong Song <yhs@fb.com> — yhs / ViewSVN
  6. Revert "[InstSimplify] use any-zero matcher for fcmp folds"

    This reverts commit 058bb8351351d56d2a4e8a772570231f9e5305e5.
    Forgot to update another test affected by this change. — spatel / ViewSVN
  7. [GVN] Fix last crasher w/non-integral pointers

    Same case as for memset and memcpy, but this time for clobbering stores and loads.  We still can't allow coercion to or from non-integrals, regardless of the transform.

    Now that I'm done the whole little sequence, it seems apparent that we'd entirely missed reasoning about clobbers in the original GVN support for non-integral pointers.

    My appologies, I thought we'd upstreamed all of this, but it turns out we were still carrying a downstream hack which hid all of these issues.  My chanks to Cherry Zhang for helping debug. — reames / ViewSVN
  8. [InstSimplify] use any-zero matcher for fcmp folds

    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 — spatel / ViewSVN
  9. [InstSimplify] add vector tests for fcmp+fabs; NFC — spatel / ViewSVN
  10. [GVN] Fix a crash bug w/non-integral pointers and memtransfers

    Problem is very similiar to the one fixed for memsets in r354399, we try to coerce a value to non-integral type, and then crash while try to do so.  Since we shouldn't be doing such coercions to start with, easy fix.  From inspection, I see two other cases which look to be similiar and will follow up with most test cases and fixes if confirmed. — reames / ViewSVN
  11. [msan] Fix name_to_handle_at test on overlayfs.

    Udev supports name_to_handle_at. Use /dev/null instead of /bin/cat. — eugenis / ViewSVN
  12. [GVN] Fix a non-integral pointer bug w/vector types

    GVN generally doesn't forward structs or array types, but it *will* forward vector types to non-vectors and vice versa.  As demonstrated in tests, we need to inhibit the same set of transforms for vector of non-integral pointers as for non-integral pointers themselves. — reames / ViewSVN
  13. [GVN] Fix a crash bug around non-integral pointers

    If we encountered a location where we tried to forward the value of a memset to a load of a non-integral pointer, we crashed.  Such a forward is not legal in general, but we can forward null pointers.  Test for both cases are included. — reames / ViewSVN
  14. [Test] Autogenerate existing tests before adding more — reames / ViewSVN
  15. [WebAssembly] Update MC for bulk memory

    Summary:
    Rename MemoryIndex to InitFlags and implement logic for determining
    data segment layout in ObjectYAML and MC. Also adds a "passive" flag
    for the .section assembler directive although this cannot be assembled
    yet because the assembler does not support data sections.

    Reviewers: sbc100, aardappel, aheejin, dschuff

    Subscribers: jgravelle-google, hiraditya, sunfish, rupprecht, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57938 — tlively / ViewSVN
  16. [X86] Mark FP32_TO_INT16_IN_MEM/FP32_TO_INT32_IN_MEM/FP32_TO_INT64_IN_MEM as clobbering EFLAGS to prevent mis-scheduling during conversion from SelectionDAG to MIR.

    After r354178, these instruction expand to a sequence that uses an OR instruction. That OR clobbers EFLAGS so we need to state that to avoid accidentally using the clobbered flags.

    Our tests show the bug, but I didn't notice because the SETcc instructions didn't move after r354178 since it used to be safe to do the fp->int conversion first.

    We should probably convert this whole sequence to SelectionDAG instead of a custom inserter to avoid mistakes like this.

    Fixes PR40779 — ctopper / ViewSVN
  17. [LangRef] add to description of alloca instruction

    As mentioned in D58359, we can explicitly state that the
    memory allocated is uninitialized and reading that memory
    produces undef. — spatel / ViewSVN
  18. [InstCombine] reduce even more unsigned saturated add with 'not' op

    We want to use the sum in the icmp to allow matching with
    m_UAddWithOverflow and eliminate the 'not'. This is discussed
    in D51929 and is another step towards solving PR14613:
    https://bugs.llvm.org/show_bug.cgi?id=14613

      Name: uaddsat, -1 fval
      %notx = xor i32 %x, -1
      %a = add i32 %x, %y
      %c = icmp ugt i32 %notx, %y
      %r = select i1 %c, i32 %a, i32 -1
      =>
      %a = add i32 %x, %y
      %c2 = icmp ugt i32 %y, %a
      %r = select i1 %c2, i32 -1, i32 %a

      Name: uaddsat, -1 fval + ult
      %notx = xor i32 %x, -1
      %a = add i32 %x, %y
      %c = icmp ult i32 %y, %notx
      %r = select i1 %c, i32 %a, i32 -1
      =>
      %a = add i32 %x, %y
      %c2 = icmp ugt i32 %y, %a
      %r = select i1 %c2, i32 -1, i32 %a

    https://rise4fun.com/Alive/nTp — spatel / ViewSVN
  19. [libFuzzer] docs: add a FAQ entry about dlclose — kcc / ViewSVN
  20. second test on git-llvm-push — rengolin / ViewSVN
  21. Fix builds with llvm/runtimes/compiler-rt after r354365

    Compiler-rt doesn't include config-ix which was providing CheckSymbolExists to
    the LLVM build. Add it to HandleLLVMOptions to fix this — dsanders / ViewSVN
  22. [ArgumentPromotion] Add a lit.local.cfg to disable X86 specific tests if the X86 target doesn't exist.

    Hopefully this fixes some buildbot failure after r354376 — ctopper / ViewSVN
  23. [InstCombine] rearrange saturated add folds; NFC

    This is no-functional-change-intended, but that was also
    true when it was part of rL354276, and I managed to lose
    2 predicates for the fold with constant...causing much bot
    distress. So this time I'm adding a couple of negative tests
    to avoid that. — spatel / ViewSVN
  24. Testing git-llvm-push script — rengolin / ViewSVN
  25. PowerPC: Fix typos in comments — jsji / ViewSVN
  26. [ConstantFold] Fix misfolding fcmp of a ConstantExpr NaN with itself.

    The code incorrectly inferred that the relationship of a constant expression
    to itself is FCMP_OEQ (ordered and equal), when it's actually FCMP_UEQ
    (unordered *or* equal). This change corrects that, and adds some more limited
    folds that can be done in this case.

    Differential revision: https://reviews.llvm.org/D51216 — andrewscheidecker / ViewSVN
  27. [ConstantFold] Fix misfolding of icmp with a bitcast FP second operand.

    In the process of trying to eliminate the bitcast, this was producing a
    malformed icmp with FP operands.

    Differential revision: https://reviews.llvm.org/D51215 — andrewscheidecker / ViewSVN
  28. [llvm-cov] Add support for gcov --hash-filenames option

    The patch adds support for --hash-filenames to llvm-cov. This option adds md5
    hash of the source path to the name of the generated .gcov file. The option is
    crucial for cases where you have multiple files with the same name but can't
    use --preserve-paths as resulting filenames exceed the limit.

    from gcov(1):

    ```
    -x
    --hash-filenames
        By default, gcov uses the full pathname of the source files to to
        create an output filename.  This can lead to long filenames that
        can overflow filesystem limits.  This option creates names of the
        form source-file##md5.gcov, where the source-file component is
        the final filename part and the md5 component is calculated from
        the full mangled name that would have been used otherwise.
    ```

    Patch by Igor Ignatev!

    Differential Revision: https://reviews.llvm.org/D58370 — Vedant Kumar / ViewSVN
  29. Testing commit access — andrewscheidecker / ViewSVN
  30. [msan] Remove cxa_atexit_race.cc

    Summary:
    The goal of the test to check that msan does not crash when code is racy on __cxa_atexit. Original crash was caused by race condition in the glibc. With
    the msan patch the msan does not crashes however the race is still there and the test triggers it.

    Because the test relies on triggering of undefined behavior results are not
    very predictable and it may occasionally crashes or hangs.

    I don't see how to reasonably improve the test, so I remove it.

    Reviewers: eugenis, peter.smith

    Subscribers: jfb, jdoerfert, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D58396 — Vitaly Buka / ViewSVN
  31. [X86] Don't consider functions ABI compatible for ArgumentPromotion pass if they view 512-bit vectors differently.

    The use of the -mprefer-vector-width=256 command line option mixed with functions
    using vector intrinsics can create situations where one function thinks 512 vectors
    are legal, but another fucntion does not.

    If a 512 bit vector is passed between them via a pointer, its possible ArgumentPromotion
    might try to pass by value instead. This will result in type legalization for the two
    functions handling the 512 bit vector differently leading to runtime failures.

    Had the 512 bit vector been passed by value from clang codegen, both functions would
    have been tagged with a min-legal-vector-width=512 function attribute. That would
    make them be legalized the same way.

    I observed this issue in 32-bit mode where a union containing a 512 bit vector was
    being passed by a function that used intrinsics to one that did not. The caller
    ended up passing in zmm0 and the callee tried to read it from ymm0 and ymm1.

    The fix implemented here is just to consider it a mismatch if two functions
    would handle 512 bit differently without looking at the types that are being
    considered. This is the easist and safest fix, but it can be improved in the future.

    Differential Revision: https://reviews.llvm.org/D58390 — ctopper / ViewSVN
  32. Revert "Revert "[llvm-objdump] Allow short options without arguments to be grouped""

      - Tests that use multiple short switches now test them grouped and ungrouped.

      - Ensure the output of ungrouped and grouped variants is identical

    Differential Revision: https://reviews.llvm.org/D57904 — ormris / ViewSVN
  33. Fix builds for older macOS deployment targets after r354365

    Surprisingly, check_symbol_exists is not sufficient. The macOS linker checks the
    called functions against a compatibility list for the given deployment target
    and check_symbol_exists doesn't trigger this check as it never calls the
    function.

    This fixes the GreenDragon bots where the deployment target is 10.9 — dsanders / ViewSVN
  34. [sanitizers] add a regression test for the bug fixed in r354366 — kcc / ViewSVN
  35. [sanitizer] fix a memory safety bug (!!!) in sanitizer suppressions code, discovered by Aaron Jacobs — kcc / ViewSVN
  36. Annotate timeline in Instruments with passes and other timed regions.

    Summary:
    Instruments is a useful tool for finding performance issues in LLVM but it can
    be difficult to identify regions of interest on the timeline that we can use
    to filter the profiler or allocations instrument. Xcode 10 and the latest
    macOS/iOS/etc. added support for the os_signpost() API which allows us to
    annotate the timeline with information that's meaningful to LLVM.

    This patch causes timer start and end events to emit signposts. When used with
    -time-passes, this causes the passes to be annotated on the Instruments timeline.
    In addition to visually showing the duration of passes on the timeline, it also
    allows us to filter the profile and allocations instrument down to an individual
    pass allowing us to find the issues within that pass without being drowned out
    by the noise from other parts of the compiler.

    Using this in conjunction with the Time Profiler (in high frequency mode) and
    the Allocations instrument is how I found the SparseBitVector that should have
    been a BitVector and the DenseMap that could be replaced by a sorted vector a
    couple months ago. I added NamedRegionTimers to TableGen and used the resulting
    annotations to identify the slow portions of the Register Info Emitter. Some of
    these were placed according to educated guesses while others were placed
    according to hot functions from a previous profile. From there I filtered the
    profile to a slow portion and the aforementioned issues stood out in the
    profile.

    To use this feature enable LLVM_SUPPORT_XCODE_SIGNPOSTS in CMake and run the
    compiler under Instruments with -time-passes like so:
      instruments -t 'Time Profiler' bin/llc -time-passes -o - input.ll'
    Then open the resulting trace in Instruments.

    There was a talk at WWDC 2018 that explained the feature which can be found at
    https://developer.apple.com/videos/play/wwdc2018/405/ if you'd like to know
    more about it.

    Reviewers: bogner

    Reviewed By: bogner

    Subscribers: jdoerfert, mgorny, kristina, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D52954 — dsanders / ViewSVN
  37. [libObject][NFC] Use sys::path::convert_to_slash.

    Summary: As suggested in rL353995

    Reviewers: compnerd

    Reviewed By: compnerd

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58298 — rupprecht / ViewSVN
  38. [X86][SSE] Generalize X86ISD::BLENDI support to more value types

    D42042 introduced the ability for the ExecutionDomainFixPass to more easily change between BLENDPD/BLENDPS/PBLENDW as the domains required.

    With this ability, we can avoid most bitcasts/scaling in the DAG that was occurring with X86ISD::BLENDI lowering/combining, blend with the vXi32/vXi64 vectors directly and use isel patterns to lower to the float vector equivalent vectors.

    This helps the shuffle combining and SimplifyDemandedVectorElts be more aggressive as we lose track of fewer UNDEF elements than when we go up/down through bitcasts.

    I've introduced a basic blend(bitcast(x),bitcast(y)) -> bitcast(blend(x,y)) fold, there are more generalizations I can do there (e.g. widening/scaling and handling the tricky v16i16 repeated mask case).

    The vector-reduce-smin/smax regressions will be fixed in a future improvement to SimplifyDemandedBits to peek through bitcasts and support X86ISD::BLENDV.

    Reapplied after reversion at rL353699 - AVX2 isel fix was applied at rL354358, additional test at rL354360/rL354361

    Differential Revision: https://reviews.llvm.org/D57888 — rksimon / ViewSVN
  39. [NFC] Remove unused headers in Optional.h — serge_sans_paille / ViewSVN
  40. Fix stupid assembly comment typo — rksimon / ViewSVN
  41. [X86][SSE] Add pblendw commuted load test case

    Reduced test case for the regression caused in D57888/rL353610 — rksimon / ViewSVN
  42. [SDAG] Use shift amount type in MULO promotion; NFC

    Directly use the correct shift amount type if it is possible, and
    future-proof the code against vectors. The added test makes sure that
    bitwidths that do not fit into the shift amount type do not assert.

    Split out from D57997. — nikic / ViewSVN
  43. [X86][AVX2] Hide VPBLENDD instructions behind AVX2 predicate

    This was the cause of the regression in D57888 - the commuted load pattern wasn't hidden by the predicate so once we enabled v4i32 blends on SSE41+ targets then isel was incorrectly matched against AVX2+ instructions. — rksimon / ViewSVN
  44. [X86] Bugfix for nullptr check by klocwork

    klocwork critical issues in CG files:

    Patch by Xiang Zhang (xiangzhangllvm)

    Differential Revision: https://reviews.llvm.org/D58363 — ctopper / ViewSVN
  45. X86AsmParser AVX-512: Return error instead of hitting assert

    When parsing a sequence of tokens beginning with {, it will hit an assert and crash if the token afterwards is not an identifier. Instead of this, return a more verbose error as seen elsewhere in the function.

    Patch by Brandon Jones (BrandonTJones)

    Differential Revision: https://reviews.llvm.org/D57375 — ctopper / ViewSVN
  46. [X86] Filter out tuning feature flags and a few ISA feature flags when checking for function inline compatibility.

    Tuning flags don't have any effect on the available instructions so aren't a good reason to prevent inlining.

    There are also some ISA flags that don't have any intrinsics our ABI requirements that we can exclude. I've put only the most basic ones like cmpxchg16b and lahfsahf. These are interesting because they aren't present in all 64-bit CPUs, but we have codegen workarounds when they aren't present.

    Loosening these checks can help with scenarios where a caller has a more specific CPU than a callee. The default tuning flags on our generic 'x86-64' CPU can currently make it inline compatible with other CPUs. I've also added an example test for 'nocona' and 'prescott' where 'nocona' is just a 64-bit capable version of 'prescott' but in 32-bit mode they should be completely compatible.

    I've based the implementation here of the similar code in AMDGPU.

    Differential Revision: https://reviews.llvm.org/D58371 — ctopper / ViewSVN
  47. GlobalISel: Implement moreElementsVector for select — arsenm / ViewSVN
  48. index.rst: Remove bb-chapuni from list of IRC bots — hans / ViewSVN
  49. index.rst: Remove Dragonegg link — hans / ViewSVN
  50. Remove extraneous space in MSVC-style diagnostic output

    There was an extra space between the file location and the diagnostic
    message:

      /tmp/a.c(1,12):  warning: unused parameter 'unused'

    the tests didn't catch this due to FileCheck not running in --strict-whitespace mode.

    Reported by Marco: http://lists.llvm.org/pipermail/cfe-dev/2019-February/061326.html

    Differential revision: https://reviews.llvm.org/D58377 — hans / ViewSVN
  51. [compiler-rt][CMake] Set project for the custom libc++

    This is another follow up to r354212 which is broken on Darwin when
    cross-compiling runtimes to Linux when it ignores the -fuse-ld=lld
    linker flag and attempts to use the host linker when performing the
    compiler identification. Upon investigation, I noticed that setting
    the project with appropriate list of languages makes the error go
    away and it shouldn't hurt either.

    Differential Revision: https://reviews.llvm.org/D58372 — phosek / ViewSVN
  52. [clangd] Add an option in the code to not display number of fixes

    Summary:
    Only to the APIs, which are used by our embedders.
    We do not plan to add a user-facing option for this.

    Reviewers: sammccall, ioeric

    Reviewed By: sammccall

    Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58387 — ibiryukov / ViewSVN
  53. GlobalISel: Implement moreElementsVector for G_EXTRACT source — arsenm / ViewSVN
  54. [OpenMP 5.0] Parsing/sema support for map clause with mapper modifier.

    This patch implements the parsing and sema support for OpenMP map
    clauses with potential user-defined mapper attached. User defined mapper
    is a new feature in OpenMP 5.0. A map clause can have an explicit or
    implicit associated mapper, which instructs the compiler to generate
    extra data mapping. An example is shown below:

        struct S { int len; int *d; };
        #pragma omp declare mapper(id: struct S s) map(s, s.d[0:s.len])
        struct S ss;
        #pragma omp target map(mapper(id) tofrom: ss) // use the mapper with name 'id' to map ss

    Contributed-by: Lingda Li <lildmh@gmail.com>

    Differential Revision: https://reviews.llvm.org/D58074 — meinersbur / ViewSVN
  55. [X86][AVX] Update VBROADCAST folds to always use v2i64 X86vzload

    The VBROADCAST combines and SimplifyDemandedVectorElts improvements mean that we now more consistently use shorter (128-bit) X86vzload input operands.

    Follow up to D58053 — rksimon / ViewSVN
  56. GlobalISel: Implement moreElementsVector for bit ops — arsenm / ViewSVN
  57. [yaml2obj][obj2yaml] Remove section type range markers from allowed mappings and support hex values

    yaml2obj/obj2yaml previously supported SHT_LOOS, SHT_HIOS, and
    SHT_LOPROC for section types. These are simply values that delineate a
    range and don't really make sense as valid values. For example if a
    section has type value 0x70000000, obj2yaml shouldn't print this value
    as SHT_LOPROC. Additionally, this was missing the three other range
    markers (SHT_HIPROC, SHT_LOUSER and SHT_HIUSER).

    This change removes these three range markers. It also adds support for
    specifying the type as an integer, to allow section types that LLVM
    doesn't know about.

    Reviewed by: grimar

    Differential Revision: https://reviews.llvm.org/D58383 — jhenderson / ViewSVN
  58. Cast from SDValue directly instead of superfluous getNode(). NFCI. — rksimon / ViewSVN
  59. GlobalISel: Verify g_insert — arsenm / ViewSVN
  60. [X86][AVX] EltsFromConsecutiveLoads - Add BROADCAST lowering support

    This patch adds scalar/subvector BROADCAST handling to EltsFromConsecutiveLoads.

    It mainly shows codegen changes to 32-bit code which failed to handle i64 loads, although 64-bit code is also using this new path to more efficiently combine to a broadcast load.

    Differential Revision: https://reviews.llvm.org/D58053 — rksimon / ViewSVN

#304 (Feb 19, 2019 7:40:13 AM)

  1. [yaml2obj][obj2yaml] - Support SHT_GNU_versym (.gnu.version) section.

    This patch adds support for parsing dumping the .gnu.version section.
    Description of the section is: https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symversion.html#SYMVERTBL

    Differential revision: https://reviews.llvm.org/D58280 — grimar / ViewSVN
  2. [OpenCL] Change type of block pointer for OpenCL

    Summary:

    For some reason OpenCL blocks in LLVM IR are represented as function pointers.
    These pointers do not point to any real function and never get called. Actually
    they point to some structure, which in turn contains pointer to the real block
    invoke function.
    This patch changes represntation of OpenCL blocks in LLVM IR from function
    pointers to pointers to `%struct.__block_literal_generic`.
    Such representation allows to avoid unnecessary bitcasts and simplifies
    further processing (e.g. translation to SPIR-V ) of the module for targets
    which do not support function pointers.

    Patch by: Alexey Sotkin.

    Reviewers: Anastasia, yaxunl, svenvh

    Reviewed By: Anastasia

    Subscribers: alexbatashev, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58277 — bader / ViewSVN
  3. Recommit r354328, r354329 "[obj2yaml][yaml2obj] - Add support of parsing/dumping of the .gnu.version_r section."

    Fix:
    Replace
    assert(!IO.getContext() && "The IO context is initialized already");
    with
    assert(IO.getContext() && "The IO context is not initialized");
    (this was introduced in r354329, where I tried to quickfix the darwin BB
    and seems copypasted the assert from the wrong place).

    Original commit message:

    The section is described here:
    https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverrqmts.html

    Patch just teaches obj2yaml/yaml2obj to dump and parse such sections.

    We did the finalization of string tables very late,
    and I had to move the logic to make it a bit earlier.
    That was needed in this patch since .gnu.version_r adds strings to .dynstr.
    This might also be useful for implementing other special sections.

    Everything else changed in this patch seems to be straightforward.

    Differential revision: https://reviews.llvm.org/D58119 — grimar / ViewSVN
  4. [RISCV][NFC] Move some std::string to StringRef — asb / ViewSVN
  5. Revert r354328, r354329 "[obj2yaml][yaml2obj] - Add support of parsing/dumping of the .gnu.version_r section."

    Something went wrong. Bots are unhappy:
    http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/44113/steps/test/logs/stdio — grimar / ViewSVN
  6. [clangd] Handle unresolved scope specifier when fixing includes.

    Summary:
    In the following examples, "clangd" is unresolved, and the fixer will try to fix
    include for `clang::clangd`; however, clang::clangd::X is usually intended. So
    when handling a qualifier that is unresolved, we change the unresolved name and
    scopes so that the fixer will fix "clang::clangd::X" in the following example.
    ```
      namespace clang {
      clangd::X
    ~~~~~~
      }
      // or
      clang::clangd::X
             ~~~~~~
    ```

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58185 — ioeric / ViewSVN
  7. Fix BB after r354328.

    Bot:
    http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/30188/steps/build_Lld/logs/stdio

    Error:
    /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:1013:15: error: unused variable 'Object' [-Werror,-Wunused-variable]
      const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
                  ^
    /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:1023:15: error: unused variable 'Object' [-Werror,-Wunused-variable]
      const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());

    Fix:
    change
      const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
      assert(Object && "The IO context is not initialized");
    to
      assert(!IO.getContext() && "The IO context is initialized already"); — grimar / ViewSVN
  8. [obj2yaml][yaml2obj] - Add support of parsing/dumping of the .gnu.version_r section.

    The section is described here:
    https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverrqmts.html

    Patch just teaches obj2yaml/yaml2obj to dump and parse such sections.

    We did the finalization of string tables very late,
    and I had to move the logic to make it a bit earlier.
    That was needed in this patch since .gnu.version_r adds strings to .dynstr.
    This might also be useful for implementing other special sections.

    Everything else changed in this patch seems to be straightforward.

    Differential revision: https://reviews.llvm.org/D58119 — grimar / ViewSVN
  9. [RISCV] Re-organise calling convention tests

    Re-organise calling convention tests to prepare for ilp32f and ilp32d hard
    float ABI tests. It's also clear that we need to introduce similar tests for
    lp64. — asb / ViewSVN
  10. Fix BB after r354319 "[yaml2obj] - Do not skip zeroes blocks if there are relocations against them."

    Fix: move the test to x86 folder.
    Seems it is needed, because llvm-objdump invocation used in test has -D (disasm) flag.

    BB: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/23016

    /local/buildbot/slaves/hexagon-build-02/clang-hexagon-elf/stage1/bin/llvm-objdump:
    error: '/local/buildbot/slaves/hexagon-build-02/clang-hexagon-elf/stage1/test/tools/llvm-objdump/Output/disasm-zeroes-relocations.test.tmp':
    can't find target: : error: unable to get target for 'x86_64--', see --version and --triple.
    . — grimar / ViewSVN
  11. [yaml2obj] - Do not skip zeroes blocks if there are relocations against them.

    This is for -D -reloc combination.

    With this patch, we do not skip the zero bytes that have a relocation against
    them when -reloc is used. If -reloc is not used, then the behavior will be the same.

    Differential revision: https://reviews.llvm.org/D58174 — grimar / ViewSVN
  12. [yaml2obj] - Do not ignore explicit addresses for .dynsym and .dynstr

    This fixes https://bugs.llvm.org/show_bug.cgi?id=40339

    Previously if the addresses were set in YAML they were ignored for
    .dynsym and .dynstr sections. The patch fixes that.

    Differential revision: https://reviews.llvm.org/D58168 — grimar / ViewSVN
  13. Fix obsolete comment. NFC

    Both files mentioned in the comment now include TargetOpcodes.def. Just
    mention that directly. — rovka / ViewSVN
  14. [NFC] API for signaling that the current loop is being deleted

    We are planning to be able to delete the current loop in LoopSimplifyCFG
    in the future. Add API to notify the loop pass manager that it happened. — mkazantsev / ViewSVN
  15. [NFC] Store loop header in a local to keep it available after the loop is deleted — mkazantsev / ViewSVN
  16. [ARM GlobalISel] Support G_PHI for Thumb2

    Same as arm mode. — rovka / ViewSVN

#303 (Feb 18, 2019 10:21:07 PM)

  1. [Dominators] Fix and optimize edge insertion of depth-based search

    Summary:
    After (x,y) is inserted, depth-based search finds all affected v that satisfies:

    depth(nca(x,y))+1 < depth(v) && there exists a path P from y to v where every w on P satisfies depth(v) <= depth(w)

    This reduces to a widest path problem (maximizing the depth of the
    minimum vertex in the path) which can be solved by a modified version of
    Dijkstra with a bucket queue (named depth-based search in the paper).

    The algorithm visits vertices in decreasing order of bucket number.
    However, the current code misused priority_queue to extract them in
    increasing order. I cannot think of a failing scenario but it surely may
    process vertices more than once due to the local usage of Processed.

    This patch fixes this bug and simplifies/optimizes the code a bit. Also
    add more comments.

    Reviewers: kuhar

    Reviewed By: kuhar

    Subscribers: kristina, jdoerfert, llvm-commits, NutshellySima, brzycki

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58349 — maskray / ViewSVN
  2. [X86] Remove command line strings from the ProcIntel* features.

    These should always follow the CPU string. There's no reason to control them independently. — ctopper / ViewSVN
  3. [GlobalISel][AArch64] Legalize + select some llvm.ctlz.* intrinsics

    Legalize/select llvm.ctlz.*

    Add select-ctlz to show that we actually select them. Update arm64-clrsb.ll and
    arm64-vclz.ll to show that we perform valid transformations in optimized builds,
    and document where GISel can improve.

    Differential Revision: https://reviews.llvm.org/D58155 — paquette / ViewSVN
  4. [CGP] form usub with overflow from sub+icmp

    The motivating x86 cases for forming the intrinsic are shown in PR31754 and PR40487:
    https://bugs.llvm.org/show_bug.cgi?id=31754
    https://bugs.llvm.org/show_bug.cgi?id=40487
    ..and those are shown in the IR test file and x86 codegen file.

    Matching the usubo pattern is harder than uaddo because we have 2 independent values rather than a def-use.

    This adds a TLI hook that should preserve the existing behavior for uaddo formation, but disables usubo
    formation by default. Only x86 overrides that setting for now although other targets will likely benefit
    by forming usbuo too.

    Differential Revision: https://reviews.llvm.org/D57789 — spatel / ViewSVN
  5. [clang][test] Fix FileManagerTest.getFileDontOpenRealPath for Windows — Jan Korous / ViewSVN
  6. AMDGPU: Use MachineInstr::mayAlias to replace areMemAccessesTriviallyDisjoint in LoadStoreOptimizer pass.

    Summary:
      This is to fix a memory dependence bug in LoadStoreOptimizer.

    Reviewers:
      arsenm, rampitec

    Differential Revision:
      https://reviews.llvm.org/D58295 — chfang / ViewSVN
  7. GlobalISel: Implement widenScalar for g_extract scalar results — arsenm / ViewSVN
  8. GlobalISel: Make buildExtract use DstOp/SrcOp — arsenm / ViewSVN
  9. Reland "[clang][FileManager] fillRealPathName even if we aren't opening the file"

    This reverts commit e2bb3121fd4ab5b01f9ec1d2e3e9877db9c6a54c.
    + fixed test for Windows — Jan Korous / ViewSVN
  10. [LSan][Darwin][NFC] Add comment explaining test failure — yln / ViewSVN
  11. [Sanitizer] On Darwin `__sanitizer_print_stack_trace` only prints topmost frame

    In compiler-rt we have the notion of a `fast` and a `slow` stack
    unwinder. Darwin currently only supports the fast unwinder.

    From reading the code, my understanding is that
    `BufferedStackTrace::Unwind` can be called with `bp=0, stack_top=0,
    stack_bottom=0, request_fast_unwind=false`. If
    `request_fast_unwind=true`, then we alos need to supply bp, stack_top,
    and stack_bottom.

    However, `BufferedStackTrace::Unwind` uses
    `StackTrace::WillUseFastUnwind` which will adapt `request_fast_unwind`
    if the requested unwinder is not supported. On Darwin, the result is
    that we don't pass actual values for bp, stack_top, and stack_bottom,
    but end up using the fast unwinder. The tests then fail because we only
    print the topmost stack frame.

    This patch adds a check to `WillUseFastUnwind` at the point of usage to
    avoid the mismatch between `request_fast_unwind` and what `Unwind`
    actually does. I am also interested in cleaning up the
    `request_fast_unwind` machinery so this patch just the simplest thing
    possible so I can enable the tests.

    Reviewers: vitalybuka, vsk

    Differential Revision: https://reviews.llvm.org/D58156 — yln / ViewSVN
  12. GlobalISel: Fix double count of offset for irregular vector breakdowns

    Fixes cases with odd vectors that break into multiple requested size
    pieces. — arsenm / ViewSVN
  13. [x86] split more v8f32/v8i32 shuffles in lowering

    Similar to D57867 - this is a small patch with lots of test diffs.
    With half-vector-width narrowing potential, using an extract + 128-bit vshufps
    is a win because it replaces a 256-bit shuffle with a 128-bit shufle.

    This seems like it should be a win even for targets with 'fast-variable-shuffle',
    but we are intentionally deferring that to an independent change to make sure
    that is true.

    Differential Revision: https://reviews.llvm.org/D58181 — spatel / ViewSVN
  14. Revert "[InstCombine] reduce even more unsigned saturated add with 'not' op"

    This reverts commit 079b610c29b4a428b3ae7b64dbac0378facf6632.
    Bots are failing after this change on a stage 2 compile of clang. — spatel / ViewSVN
  15. [InstCombine] reduce even more unsigned saturated add with 'not' op

    We want to use the sum in the icmp to allow matching with
    m_UAddWithOverflow and eliminate the 'not'. This is discussed
    in D51929 and is another step towards solving PR14613:
    https://bugs.llvm.org/show_bug.cgi?id=14613

      Name: uaddsat, -1 fval
      %notx = xor i32 %x, -1
      %a = add i32 %x, %y
      %c = icmp ugt i32 %notx, %y
      %r = select i1 %c, i32 %a, i32 -1
      =>
      %a = add i32 %x, %y
      %c2 = icmp ugt i32 %y, %a
      %r = select i1 %c2, i32 -1, i32 %a

      Name: uaddsat, -1 fval + ult
      %notx = xor i32 %x, -1
      %a = add i32 %x, %y
      %c = icmp ult i32 %y, %notx
      %r = select i1 %c, i32 %a, i32 -1
      =>
      %a = add i32 %x, %y
      %c2 = icmp ugt i32 %y, %a
      %r = select i1 %c2, i32 -1, i32 %a

    https://rise4fun.com/Alive/nTp — spatel / ViewSVN
  16. [clangd] Add tests for template specializations

    Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58190 — kadircet / ViewSVN
  17. [MCA] Correctly update register definitions in the PRF after move elimination.

    This patch fixes a bug where register writes performed by optimizable register
    moves were sometimes wrongly treated like partial register updates.  Before this
    patch, llvm-mca wrongly predicted a 1.50 IPC for test reg-move-elimination-6.s
    (added by this patch).  With this patch, llvm-mca correctly updates the register
    defintions in the PRF, and the IPC for that test is now correctly reported as 2. — adibiagio / ViewSVN
  18. [llvm-readobj] - Simplify .gnu.version_d dumping.

    This is similar to D58048.

    Instead of scanning the dynamic table to read the
    DT_VERDEFNUM, we could take it from the sh_info field.
    (https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-94076/index.html)

    The patch does this. — grimar / ViewSVN
  19. [clangd] Cache include fixes for diagnostics caused by the same unresolved name or incomplete type.

    Summary:
    Multiple diagnostics can be caused by the same unresolved name or incomplete type,
    especially if the code is copy-pasted without #includes. The cache can avoid making
    repetitive index requests, and thus reduce latency and allow more diagnostics to be
    fixed (we limit the number of index requests for each parse).

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58239 — ioeric / ViewSVN
  20. [ASTImporter] Find previous friend function template

    Reviewers: a_sidorin, shafik, a.sidorin

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57910 — martong / ViewSVN
  21. [clang-tidy] Fix links in docs. — alexfh / ViewSVN
  22. [ARM] Add pre-defined macros for ROPI and RWPI

    This adds ACLE-defined macros to test for code being compiled in the ROPI and
    RWPI position-independence modes.

    Differential revision: https://reviews.llvm.org/D23610 — olista01 / ViewSVN
  23. [NFC] Make Optional<T> trivially copyable when T is trivially copyable

    This is a follow-up to r354246 and a reimplementation of https://reviews.llvm.org/D57097?id=186600
    that should not trigger any UB thanks to the use of an union.

    This may still be subject to the problem solved by std::launder, but I'm unsure how it interacts whith union.
    /me plans to revert if this triggers any relevant bot failure. At least this validates in Release mode with
    clang 6.0.1 and gcc 4.8.5. — serge_sans_paille / ViewSVN
  24. [clang][Index] Fix usage of IndexImplicitInstantiation

    Summary:
    Indexing context was skipping explicit template instantiations as well.
    This patch makes sure it only skips implicit ones.

    Subscribers: arphaman, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58189 — kadircet / ViewSVN
  25. [MCA] Slightly refactor method writeStartEvent in WriteState and ReadState. NFCI

    This is another change in preparation for PR37494.
    No functional change intended. — adibiagio / ViewSVN
  26. [ASTImporter] Unify redecl chain tests as type parameterized tests

    Summary:
    This patch unifies all those tests which check the correctness of the
    redecl chains. Previously we had several structurally very similar test
    cases for each language construct (class, function, variable, function
    template, ...).

    We still use value-parameterized tests for the different AST
    compatibility switches (-fdelayed-template-parsing, -fms-compatibility).
    Gtest makes it possible to have either value-parameterized or
    type-parameterized fixtures. However, we cannot have both value- and
    type-parameterized test fixtures. So we use a value-parameterized test
    fixture in the gtest sense. We intend to mimic gtest's type-parameters
    via the type template parameter. We manually instantiate the different
    tests with the each types.

    After this patch I am planning to put the "generic redecl chain" related
    tests into their own separate test file (in another patch).

    Reviewers: a_sidorin, shafik, a.sidorin

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57236 — martong / ViewSVN

#301 (Feb 18, 2019 2:22:47 AM)

  1. [llvm-exegesis] [NFC] Fixing typo.

    Reviewers: courbet, gchatelet

    Reviewed By: courbet, gchatelet

    Subscribers: tschuett, llvm-commits

    Differential Revision: https://reviews.llvm.org/D54895 — gchatelet / ViewSVN
  2. Recommit [NFC] Better encapsulation of llvm::Optional Storage

    Second attempt, trying to navigate out of the UB zone using
    union for storage instead of raw bytes.

    I'm prepared to revert that commit as soon as validation breaks,
    which is likely to happen. — serge_sans_paille / ViewSVN
  3. Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."

    Breaks some bots. — courbet / ViewSVN
  4. [DAGCombiner] Eliminate dead stores to stack.

    Summary:
    A store to an object whose lifetime is about to end can be removed.

    See PR40550 for motivation.

    Reviewers: niravd

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D57541 — courbet / ViewSVN
  5. [MC] Make SubtargetFeatureKV only store one FeatureBitset and use an 'unsigned' to hold the value.

    This class is used for two difference tablegen generated tables. For one of the tables the Value FeatureBitset only has one bit set. For the other usage the Implies field was unused.

    This patch changes the Value field to just be an unsigned. For the usage that put a real vector in bitset, we now use the previously unused Implies field and leave the Value field unused instead.

    This is good for a 16K reduction in the size of llc on my local build with all targets enabled. — ctopper / ViewSVN
  6. gn build: Merge r354156 — nico / ViewSVN

#300 (Feb 17, 2019 5:23:36 PM)

  1. Revert [NFC] Better encapsulation of llvm::Optional Storage — serge_sans_paille / ViewSVN
  2. [NFC] Better encapsulation of llvm::Optional Storage, part II

    Fix for better Windows support. — serge_sans_paille / ViewSVN
  3. [NFC] Better encapsulation of llvm::Optional Storage

    Second attempt, trying to navigate out of the UB zone using
    union for storage instead of raw bytes.

    I'm prepared to revert that commit as soon as validation breaks,
    which is likely to happen. — serge_sans_paille / ViewSVN
  4. [LLVM-C] Add bindings to create enumerators

    Summary: The C API don't have the bindings to create enumerators, needed to create an enumeration.

    Reviewers: whitequark, CodaFi, harlanhaskins, deadalnix

    Reviewed By: whitequark, CodaFi, harlanhaskins

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58323 — codafi / ViewSVN
  5. [InstCombine] add even more tests for unsigned saturated add; NFC

    The pattern-matching from rL354221 / rL354224 doesn't cover
    these, so we're up to 8 different commuted possibilities.

    There may still be 1 more variant of this pattern. — spatel / ViewSVN
  6. [analyzer] Make valist.Uninitialized depend on ValistBase

    Accidentally left this dependency out, resulting in an assert failure if
    only valist.Uninitialized is enabled from the valist package. — szelethus / ViewSVN
  7. [X86] In FP_TO_INTHelper, when moving data from SSE register to X87 register file via the stack, use the same stack slot we use for the integer conversion.

    No need for a separate stack slot. The lifetimes don't overlap.

    Also fix the MachinePointerInfo for the final load after the integer conversion to indicate it came from the stack slot. — ctopper / ViewSVN
  8. [NFC] Add a llvm_unreachable to silence a warning in SubstObjCTypeArgsVisitor

    All cases in the switch are covered. NFC. — brunoricci / ViewSVN
  9. Recommit "[AST] Factor out the logic of the various Expr::Ignore*"

    (Originally commited in r354215 and reverted in r354216 because of a
    missed failing clang-tidy test (fix in r354228))

    Now that the implementation of all of the Expr::Ignore* is in Expr.cpp
    we can try to remove some duplication. Do this by separating the logic
    of the Expr::Ignore* from the iterative loop.

    This is NFC, except for one change: IgnoreParenImpCasts now skips,
    among other things, everything that IgnoreImpCasts skips. This means
    FullExpr are now skipped by IgnoreParenImpCasts. This was likely an
    oversight when FullExpr was added to the nodes skipped by IgnoreImpCasts.

    Differential Revision: https://reviews.llvm.org/D57267

    Reviewed By: aaron.ballman (with comments from void and rnk) — brunoricci / ViewSVN
  10. [compiler-rt] Fix broken sanitizer bots (hopefully)

    According to the logs and local debugging there were two issues:
    1) tsan tests listed libc++.a before the source file. That's usually
       ok for shared libraries, but the linker will not add symbols from
       a static library unless needed at that time. As a result the tests
       that rely upon symbols from the library (and not only include the
       headers) had undefined references.
       To solve this I'm adding a new substitution %link_libcxx_tsan which
       expands to libc++.a if available.
    2) The target Fuzzer-x86_64-Test linked in SANITIZER_TEST_CXX_LIBRARIES
       which defaults to -lstdc++. This resulted in error messages like
         hidden symbol '_ZdlPv' is not defined locally
         hidden symbol '_Znwm' is not defined locally
       when using GNU gold (ld.bfd and lld are fine). Removing the linkage
       is fine because we build a custom libc++ for that purpose. — hahnfeld / ViewSVN
  11. [TEST] Remove 2>&1 from tests

    Avoid confusing CHECKS with debug dumps of sets that can be printed differently. — mkazantsev / ViewSVN
  12. [clang-tidy][NFCI] DanglingHandleCheck: Remove a superflous IgnoreParenImpCasts

    ExprWithCleanups is currently not skipped by IgnoreParenImpCasts, but is skipped
    by IgnoreImpCasts. In view of fixing this inconsistency in D57267, remove the
    IgnoreParenImpCasts between the ReturnStmt and the ExprWithCleanups which
    is not needed since ExprWithCleanups is always created as a direct child of
    ReturnStmt (by inspection of each ReturnStmt::Create in Sema/SemaStmt.cpp).

    NFC intended. — brunoricci / ViewSVN
  13. [NFC] Teach getInnermostLoopFor walk up the loop trees

    This should be NFC in current use case of this method, but it will
    help to use it for solving more compex tasks in follow-up patches. — mkazantsev / ViewSVN
  14. [SelectionDAG] Extract [US]MULO expansion into TL method; NFC

    In preparation for supporting vector expansion.

    Add an isPostTypeLegalization flag to makeLibCall(), because this
    expansion relies on the legalized form using MERGE_VALUES. Drop
    the corresponding variant of ExpandLibCall, which is no longer used.

    Differential Revision: https://reviews.llvm.org/D58006 — nikic / ViewSVN
  15. [InstCombine] reduce more unsigned saturated add with 'not' op

    We want to use the sum in the icmp to allow matching with
    m_UAddWithOverflow and eliminate the 'not'. This is discussed
    in D51929 and is another step towards solving PR14613:
    https://bugs.llvm.org/show_bug.cgi?id=14613

      Name: not op
      %notx = xor i32 %x, -1
      %a = add i32 %x, %y
      %c = icmp ult i32 %notx, %y
      %r = select i1 %c, i32 -1, i32 %a
      =>
      %a = add i32 %x, %y
      %c2 = icmp ult i32 %a, %y
      %r = select i1 %c2, i32 -1, i32 %a

      Name: not op ugt
      %notx = xor i32 %x, -1
      %a = add i32 %x, %y
      %c = icmp ugt i32 %y, %notx
      %r = select i1 %c, i32 -1, i32 %a
      =>
      %a = add i32 %x, %y
      %c2 = icmp ult i32 %a, %y
      %r = select i1 %c2, i32 -1, i32 %a

    https://rise4fun.com/Alive/niom

    (The matching here is still incomplete.) — spatel / ViewSVN
  16. [InstCombine] add more tests for unsigned saturated add; NFC

    Extend the pattern-matching from rL354219 / rL354221. — spatel / ViewSVN
  17. [RISCV] Default enable RISCV linker relaxation

    Differential Revision: https://reviews.llvm.org/D47127 — shiva / ViewSVN
  18. [InstCombine] reduce unsigned saturated add with 'not' op

    We want to use the sum in the icmp to allow matching with
    m_UAddWithOverflow and eliminate the 'not'. This is discussed
    in D51929 and is another step towards solving PR14613:
    https://bugs.llvm.org/show_bug.cgi?id=14613

    (The matching here is incomplete. Trying to take minimal steps
    to make sure we don't induce infinite looping from existing
    canonicalizations of the 'select'.) — spatel / ViewSVN

#299 (Feb 17, 2019 7:27:09 AM)

  1. [NFC] Fix name and clarifying comment for factored-out function — mkazantsev / ViewSVN
  2. [InstCombine] add tests for unsigned saturated add; NFC

    We're missing IR canonicalizations for this op as shown in D51929. — spatel / ViewSVN
  3. [NFC] Factor out a function for future reuse — mkazantsev / ViewSVN
  4. Revert  [NFC] Better encapsulation of llvm::Optional Storage

    I'm getting the feealing that current Optional implementation is full of UB :-/ — serge_sans_paille / ViewSVN
  5. Revert "[AST] Factor out the logic of the various Expr::Ignore*"

    This breaks some clang-tidy checks. For some reason they were
    not included in check-clang ? — brunoricci / ViewSVN
  6. [AST] Factor out the logic of the various Expr::Ignore*

    Now that the implementation of all of the Expr::Ignore* is in Expr.cpp
    we can try to remove some duplication. Do this by separating the logic of
    the Expr::Ignore* from the iterative loop.

    This is NFC, except for one change: IgnoreParenImpCasts now skips, among
    other things, everything that IgnoreImpCasts skips. This means FullExpr
    are now skipped by IgnoreParenImpCasts. This was likely an oversight when
    FullExpr was added to the nodes skipped by IgnoreImpCasts.

    Differential Revision: https://reviews.llvm.org/D57267

    Reviewed By: aaron.ballman (with comments from void and rnk) — brunoricci / ViewSVN
  7. [NFC] Better encapsulation of llvm::Optional Storage — serge_sans_paille / ViewSVN
  8. [compiler-rt] Build custom libcxx with libcxxabi

    This changes add_custom_libcxx to also build libcxxabi and merges
    the two into a static and hermetic library.
    There are multiple advantages:
    1) The resulting libFuzzer doesn't expose C++ internals and looks
       like a plain C library.
    2) We don't have to manually link in libstdc++ to provide cxxabi.
    3) The sanitizer tests cannot interfere with an installed version
       of libc++.so in LD_LIBRARY_PATH.

    Differential Revision: https://reviews.llvm.org/D58013 — hahnfeld / ViewSVN

#298 (Feb 16, 2019 10:27:24 PM)

  1. [X86] Prevent clang clobber checking for asm flag constraints.

    Update getConstraintRegister as X86 Asm flag output constraints are no
    longer fully alphanumeric, — niravd / ViewSVN
  2. [Driver][Gnu] Support -nolibc flag

    This can be used to disable libc linking. This flag is supported by
    GCC since version 9 as well as some Clang target toolchains.

    Differential Revision: https://reviews.llvm.org/D58326 — phosek / ViewSVN
  3. [LLVMSupport]: Remove a severely outdated README.

    The LLVM Support library implementation has resided in
    //llvm/lib/Support for a significant amount of time now,
    with documentation having been updated with all references
    to the "System library" being replaced with "Support library".

    Since this file mirrors already existing documentation available
    for Support library, includes dead links to documentation and
    still refers to it as "System library", having it there is
    confusing and updating it has very little point as it duplicates
    information in documentation, except documentation is a lot more
    up to date while this file has not been maintained.

    Up to date documentation concerning this can be found here:
      http://llvm.org/docs/SupportLibrary.html — Kristina Brooks / ViewSVN
  4. [Driver][Fuchsia] Support -nolibc flag

    This can be used to disable libc linking. This flag is supported by
    GCC since version 9 as well as some Clang target toolchains. This
    change also includes tests for all -no* flags which previously weren't
    covered.

    Differential Revision: https://reviews.llvm.org/D58325 — phosek / ViewSVN
  5. [bindings/go] Fix building on 32-bit systems (ARM etc.)

    Summary:
    The patch in https://reviews.llvm.org/D53883 (by me) fails to build on 32-bit systems like ARM. Fix the array size to be less ridiculously large. 2<<20 should still be enough for all practical purposes.

    Bug: https://bugs.llvm.org/show_bug.cgi?id=40426

    Reviewers: whitequark, pcc

    Reviewed By: whitequark

    Subscribers: javed.absar, kristof.beyls, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58030 — whitequark / ViewSVN

#297 (Feb 16, 2019 12:58:25 PM)

  1. Fixed code snippet in Kaleidoscope tutorial to reflect final full code listing

    Patch by Frank He.

    Differential Revision: https://reviews.llvm.org/D52166 — wilfred / ViewSVN
  2. Fix typo in docs

    Patch by Alex Yursha.

    Differential Revision: https://reviews.llvm.org/D45903 — gribozavr / ViewSVN

#296 (Feb 16, 2019 3:47:15 AM)

  1. Move multiline raw string literal out of macro. NFC

    Certain combinations of gcc and ccache fail when the raw
    string literal is preprocessed. This just moves the string
    out as is done elsewhere in the same file. — dmgreen / ViewSVN
  2. Revert r354199: Make Optional<T> Trivially Copyable when T is trivially copyable — serge_sans_paille / ViewSVN
  3. Make Optional<T> Trivially Copyable when T is trivially copyable

    This is another attempt in the process, works nicely on my setup,
    let's check how it behaves on other targets. — serge_sans_paille / ViewSVN
  4. [compiler-rt] Cleanup usage of C++ ABI library

    Add missed value "libcxxabi" and introduce SANITIZER_TEST_CXX for linking
    unit tests. This needs to be a full C++ library and cannot be libcxxabi.

    Recommit r354132 which I reverted in r354153 because it broke a sanitizer
    bot. This was because of the "fixes" for pthread linking, so I've removed
    these changes.

    Differential Revision: https://reviews.llvm.org/D58012 — hahnfeld / ViewSVN
  5. [X86] When type legalizing the result of a i64 fp_to_uint on 32-bit targets. Generate all of the ops as i64 and let them be legalized.

    No need to manually split everything. We can let the type legalizer work for us.

    The test change seems to be caused by some DAG ordering issue that was previously circumventing a one use check in LowerSELECT where FP selects are turned into blends if the setcc has one use. But it was running after an integer select and the same setcc had been legalized to cmov and X86SISD::CMP. This dropped the use count of the setcc, but wasn't what was intended. — ctopper / ViewSVN
  6. llvm-nm: Observe -no-llvm-bc for archive members

    Summary:
    This change fixes the `-no-llvm-bc` flag to work with object files within
    archives. Currently the `-no-llvm-bc` flag works for regular object files, but
    not static libraries, where it continues to show bitcode symbol info.

    Original support was added in D4371.

    Reviewers: compnerd, smeenai, pcc

    Reviewed By: compnerd

    Subscribers: rupprecht, keith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D48798 — kastiglione / ViewSVN
  7. [clang-tidy] Delete obsolete objc-property-declaration options ✂️

    Summary:
    The Acronyms and IncludeDefaultAcronyms options were deprecated in
    https://reviews.llvm.org/D51832. These options can be removed.

    Tested by running the clang-tidy tests.

    This is an amended resubmission of https://reviews.llvm.org/D56945.

    Reviewers: Eugene.Zelenko, aaron.ballman

    Reviewed By: aaron.ballman

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57080 — stephanemoore / ViewSVN
  8. [CMake] Use variables rather than ":" delimiters

    This is a follow up to D37644, this block was missed in that change.

    Differential Revision: https://reviews.llvm.org/D58093 — phosek / ViewSVN
  9. [X86] Don't prevent load folding for cvtsi2ss/cvtsi2sd based on hasPartialRegUpdate.

    Preventing the load fold won't fix the partial register update since the
    input we can fold is a GPR. So it will do nothing to prevent a false dependency
    on an XMM register. — ctopper / ViewSVN

#295 (Feb 15, 2019 6:25:36 PM)

  1. Fix some tests I broke in r354190

    This was breaking on MSVC, since long double and double have the same
    semantics there. — epilk / ViewSVN
  2. [libFuzzer] make len_control less agressive: set the initial max len to the length of the largest seed. This was the original intent, but... Now, with a test, to ensure it stays this way — kcc / ViewSVN
  3. [Sema] Diagnose floating point conversions based on target semantics

    ...instead of just comparing rank. Also, fix a bad warning about
    _Float16, since its declared out of order in BuiltinTypes.def,
    meaning comparing rank using BuiltinType::getKind() is incorrect.

    Differential revision: https://reviews.llvm.org/D58254 — epilk / ViewSVN
  4. [ObjC generics] Fix applying `__kindof` to the type parameter.

    Fixes the warning about incompatible pointer types on assigning to a
    subclass of type argument an expression of type `__kindof TypeParam`.

    We already have a mechanism in `ASTContext::canAssignObjCInterfaces`
    that handles `ObjCObjectType` with `__kindof`. But it wasn't triggered
    because during type substitution `__kindof TypeParam` was represented as
    `AttributedType` with attribute `ObjCKindOf` and equivalent type
    `TypeArg`. For assignment type checking we use canonical types so
    attributed type was desugared and the attribute was ignored.

    The fix is in checking transformed `AttributedType` and pushing
    `__kindof` down into `ObjCObjectType` when necessary.

    rdar://problem/38514910

    Reviewers: ahatanak, erik.pilkington, doug.gregor

    Reviewed By: doug.gregor

    Subscribers: jkorous, dexonsmith, manmanren, jordan_rose, doug.gregor, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57076 — vsapsai / ViewSVN
  5. [lit] Remove LitTestCase

    From the docs: `class LitTestCase(unittest.TestCase)`
    LitTestCase is an adaptor for providing a 'unittest' compatible
    interface to 'lit' tests so that we can run lit tests with standard
    python test runners.

    It does not seem to be used anywhere.

    Differential Revision: https://reviews.llvm.org/D58264 — yln / ViewSVN
  6. [lit][NFC] Cleanup lit worker process handling

    Move code that is executed on worker process to separate file. This
    makes the use of the pickled arguments stored in global variables in the
    worker a bit clearer. (Still not pretty though.)

    Extract handling of parallelism groups to it's own function.

    Use BoundedSemaphore instead of Semaphore. BoundedSemaphore raises for
    unmatched release() calls.

    Cleanup imports.

    Differential Revision: https://reviews.llvm.org/D58196 — yln / ViewSVN
  7. [libFuzzer] fork mode: try harder to cleanup after itself — kcc / ViewSVN
  8. clang-format with UseTab: Always sometimes doesn't insert the right amount of tabs.

    Trailing comments are not always aligned properly when UseTab is set to Always.

    Consider:

    int a;        // x
    int bbbbbbbb; // x
    With .clang-format:

    ---
    Language:        Cpp
    BasedOnStyle: LLVM
    UseTab: Always
    ...
    The trailing comments of this code block should be aligned, but aren't

    To align the first trailing comment it needs to insert 8 spaces. This should be
    one tab plus six spaces. It skips the logic of the first partial tab in
    FirstTabWidth (=2) + Style.TabWidth (=8) <= Spaces (=8) and only inserts one
    tab. Proposed fix and test is attached.

    Patch by Hylke Kleve.

    Differential revision: https://reviews.llvm.org/D57655 — alexfh / ViewSVN
  9. [EarlyCSE & MSSA] Cap the clobbering calls in EarlyCSE.

    Summary:
    Unlimitted number of calls to getClobberingAccess can lead to high
    compile times in pathological cases.
    Limitting getClobberingAccess to a fairly high number. Can be adjusted
    based on users/need.
    Note: this is the only user of MemorySSA currently enabled by default.
    The same handling exists in LICM (disabled atm). As MemorySSA gains more
    users, this logic of capping will need to move inside MemorySSA.

    Reviewers: george.burgess.iv

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D58248 — asbirlea / ViewSVN
  10. [ObjC] For type substitution in generics use a regular recursive type visitor.

    Switch to the inheritance-based visitor from the lambda-based visitor to
    allow both preorder and postorder customizations during type
    transformation. NFC intended.

    Reviewers: ahatanak, erik.pilkington

    Reviewed By: erik.pilkington

    Subscribers: jkorous, dexonsmith, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57075 — vsapsai / ViewSVN
  11. [Sanitizer] iOS: Pull up parallelism_group handling into common.lit.config

    Serial execution on iOS devices is not specific to sanitizers. We want
    to throttle all on-device tests. Pull the setting of the
    parallelism_group up into the common lit configuration file.

    Rename `darwin-ios-device-sanitizer` to `ios-device`. This group is not
    specific to sanitizers and (theoretically) independent from the host OS.

    Note that we don't support running unit tests on-device (there are no
    configurations generated for that). If that ever changes, we also need
    this configuration in `unittests/lit.common.unit.cfg`.

    Reviewers: delcypher

    Differential Revision: https://reviews.llvm.org/D58209 — yln / ViewSVN
  12. [X86] Don't set exception mask bits when modifying FPCW to change rounding mode for fp->int conversion

    When we need to do an fp->int conversion using x87 instructions, we need to temporarily change the rounding mode to 0b11 and perform a store. To do this we save the old value of the fpcw to the stack, then set the fpcw to 0xc7f, do the store, then restore fpcw. But the 0xc7f value forces the exception mask bits 1. While this is what they would be in the default FP environment, as we move to support changing the FP environments, we shouldn't make this assumption.

    This patch changes the code to explicitly OR 0xc00 with the old value so that only the rounding mode is changed. Unfortunately, this requires two stack temporaries instead of one. One to hold the old value and one to hold the new value. Without two stack temporaries we would need an additional GPR. We already need one to do the OR operation in. This is similar to what gcc and icc do for this operation. Though they are both better at reusing the stack temporaries when there are multiple truncates in a function(or at least in a basic block)

    Differential Revision: https://reviews.llvm.org/D57788 — ctopper / ViewSVN
  13. Fix implementation of [temp.local]p4.

    When a template-name is looked up, we need to give injected-class-name
    declarations of class templates special treatment, as they denote a
    template rather than a type.

    Previously we achieved this by applying a filter to the lookup results
    after completing name lookup, but that is incorrect in various ways, not
    least of which is that it lost all information about access and how
    members were named, and the filtering caused us to generally lose
    all ambiguity errors between templates and non-templates.

    We now preserve the lookup results exactly, and the few places that need
    to map from a declaration found by name lookup into a declaration of a
    template do so explicitly. Deduplication of repeated lookup results of
    the same injected-class-name declaration is done by name lookup instead
    of after the fact.

    This reinstates r354091, which was previously reverted in r354097
    because it exposed bugs in lldb and compiler-rt. Those bugs were fixed
    in r354173 and r354174 respectively. — rsmith / ViewSVN
  14. [libFuzzer] form mode: add -ignore_crashes flag, honor the max_total_time flag, print the number of ooms/timeouts/crashes, fix a typo — kcc / ViewSVN
  15. Fix invalid code that Clang trunk will soon diagnose.

    There is an ambiguity between ::SizeClassMap (the typedef declared near
    the start of this file) and __sanitizer::SizeClassMap (found by the
    'using namespace __sanitizer;' near the start of this file).

    Historically a Clang bug has meant that the error was not diagnosed, but
    soon Clang will start diagnosing it. Explicitly qualify this use of
    SizeClassMap so that it finds __sanitizer::SizeClassMap rather than
    being ill-formed due to ambiguity. — rsmith / ViewSVN
  16. [InstCombine] Address a couple stylistic issues pointed out by reviewer [NFC]

    Better addressing comments from https://reviews.llvm.org/D58290. — reames / ViewSVN
  17. [InstCombine] Convert atomicrmws to xchg or store where legal

    Implement two more transforms of atomicrmw:
    1) We can convert an atomicrmw which produces a known value in memory into an xchg instead.
    2) We can convert an atomicrmw xchg w/o users into a store for some orderings.

    Differential Revision: https://reviews.llvm.org/D58290 — reames / ViewSVN
  18. Revert r354075 "[clang][FileManager] fillRealPathName even if we aren't opening the file"

    The new test doesn't pass on Windows. — rnk / ViewSVN
  19. [docs] Document LLVM_ENABLE_IDE

    Use some of the wording and the motivating example from r344555. The
    lack of documentation was pointed out by Roman Lebedev.

    Differential Revision: https://reviews.llvm.org/D58286 — smeenai / ViewSVN
  20. [Driver] Default all Android ARM targets to NEON.

    Summary:
    There are an insignificant number of ARM Android devices that don't
    support NEON. Default to using NEON since that will improve
    performance on the majority of devices. Users that need to target
    non-NEON devices can still explicitly disable NEON.

    Reviewers: srhines, pirama, kristof.beyls

    Reviewed By: pirama

    Subscribers: efriedma, javed.absar, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58153 — danalbert / ViewSVN
  21. Relax assertion to account for private framework modules, too.

    rdar://problem/48116069 — Adrian Prantl / ViewSVN
  22. [ObjC] Fix non-canonical types preventing type arguments substitution.

    `QualType::substObjCTypeArgs` doesn't go past non-canonical types and as
    the result misses some of the substitutions like `ObjCTypeParamType`.

    Update `SimpleTransformVisitor` to traverse past the type sugar.

    Reviewers: ahatanak, erik.pilkington

    Reviewed By: erik.pilkington

    Subscribers: jkorous, dexonsmith, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57270 — vsapsai / ViewSVN
  23. [X86] Fix LowerAsmOutputForConstraint.

    Summary:
    Update Flag when generating cc output.

    Fixes PR40737.

    Reviewers: rnk, nickdesaulniers, craig.topper, spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58283 — niravd / ViewSVN
  24. [MSVC] Recognize `static_assert` keyword in C and C++98

    Summary:
    The main effect is that clang now accepts the following conforming C11
    code with MSVC headers:
      #include <assert.h>
      static_assert(1, "true");

    This is a non-conforming extension (the keyword is outside the
    implementer's namespace), so it is placed under -fms-compatibility
    instead of -fms-extensions like most MSVC-specific keyword extensions.

    Normally, in C11, the compiler is supposed to provide the _Static_assert
    keyword, and assert.h should define static_assert to _Static_assert.
    However, that is not what MSVC does, and MSVC doesn't even provide
    _Static_assert.

    This also has the less important side effect of enabling static_assert
    in C++98 mode with -fms-compatibility. It's exceptionally difficult to
    use modern MSVC headers without C++14 even, so this is relatively
    unimportant.

    Fixes PR26672

    Patch by Andrey Bokhanko!

    Reviewers: rsmith, thakis

    Subscribers: cfe-commits, STL_MSFT

    Differential Revision: https://reviews.llvm.org/D17444 — rnk / ViewSVN
  25. [X86] Move all the SSE legality checks out of FP_TO_INTHelper and up to LowerFP_TO_INT. NFCI

    These checks aren't needed on the call to FP_TO_INTHelper from the type legalizer for splitting i64. We always want to use X87 FIST/FISTT to memory there.

    Moving up the SSE checks will allow this routine to focus on what it cares about and makes its return semantics cleaner. — ctopper / ViewSVN
  26. Recommit "[SystemZ] Do not emit VEXTEND or VROUND nodes without vector support."

    It seems there were some problem with using a .mir test. For some reason
    doing '-stop-before=codegenprepare' and then '-start-before=codegenprepare'
    on the output .mir file results in the NoVRegs Property after instruction
    selection.

    Recommitting the same test as an .ll file instead. — jonpa / ViewSVN
  27. [CodeExtractor] Do not lift lifetime.end markers for region inputs

    If a lifetime.end marker occurs along one path through the extraction
    region, but not another, then it's still incorrect to lift the marker,
    because there is some path through the extracted function which would
    ordinarily not reach the marker. If the call to the extracted function
    is in a loop, unrolling can cause inputs to the function to become
    optimized out as undef after the first iteration.

    To prevent incorrect stack slot merging in the calling function, it
    should be sufficient to lift lifetime.start markers for region inputs.
    I've tested this theory out by doing a stage2 check-all with randomized
    splitting enabled.

    This is a follow-up to r353973, and there's additional context for this
    change in https://reviews.llvm.org/D57834.

    rdar://47896986

    Differential Revision: https://reviews.llvm.org/D58253 — Vedant Kumar / ViewSVN
  28. [HotColdSplit] Schedule splitting late to fix perf regression

    With or without PGO data applied, splitting early in the pipeline
    (either before the inliner or shortly after it) regresses performance
    across SPEC variants. The cause appears to be that splitting hides
    context for subsequent optimizations.

    Schedule splitting late again, in effect reversing r352080, which
    scheduled the splitting pass early for code size benefits (documented in
    https://reviews.llvm.org/D57082).

    Differential Revision: https://reviews.llvm.org/D58258 — Vedant Kumar / ViewSVN
  29. Fix unsymbolized stack history printing.

    Summary:
    When symbols are unavailable, the current code prints
      sp: ... pc: ... (null) (null)
    instead of module name + offset.

    Change the output to include module name and offset, and also to match
    the regular sanitizer stack trace format so that it is recognized by
    symbolize.py out of the box.

    Reviewers: kcc, pcc

    Subscribers: kubamracek, jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58267 — eugenis / ViewSVN
  30. Runtime flags for malloc bisection.

    Reviewers: kcc, pcc

    Subscribers: kubamracek, mgorny, jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58162 — eugenis / ViewSVN
  31. Fix false positive when tag_in_malloc=0,tag_in_free=1.

    Summary:
    With tag_in_free=1, malloc() can not assume that the memory is untagged,
    and needs to retag is to 0.

    Reviewers: pcc, kcc

    Subscribers: kubamracek, jfb, jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58158 — eugenis / ViewSVN
  32. [MCA] Improved code comment. NFC — adibiagio / ViewSVN
  33. Revert "[compiler-rt] Cleanup usage of C++ ABI library"

    This reverts r354132 because it breaks sanitizer-x86_64-linux:
    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/19915 — hahnfeld / ViewSVN
  34. Fix 80-column limit in SimplifyDemandedBits/SimplifyDemandedVectorElts. NFCI. — rksimon / ViewSVN
  35. [Sema][NFC] SequenceChecker: Add tests for references/members, and prepare for the C++17 tests

    Add some tests for unsequenced operations with members and references.
    For now most of it is unhandled but it shows what work needs to be done.

    Also merge the tests for the C++17 sequencing rules in warn-unsequenced.cpp
    since we want to make sure that the appropriate warnings are still present
    in C++17 without duplicating the whole content of warn-unsequenced.cpp. — brunoricci / ViewSVN
  36. [MCA][LSUnit] Return the ID of the dependent memory operation from method
    isReady(). NFCI

    This is yet another change in preparation for a fix for PR37494. — adibiagio / ViewSVN
  37. Variable auto-init of blocks capturing self after init bugfix

    Summary:
    Blocks that capture themselves (and escape) after initialization currently codegen wrong because this:

      bool capturedByInit =
          Init && emission.IsEscapingByRef && isCapturedBy(D, Init);

      Address Loc =
          capturedByInit ? emission.Addr : emission.getObjectAddress(*this);

    Already adjusts Loc from thr alloca to a GEP. This code:

        if (emission.IsEscapingByRef)
          Loc = emitBlockByrefAddress(Loc, &D, /*follow=*/false);

    Was trying to do the same adjustment, and a GEP on a GEP (returning an int) triggers an assertion.

    <rdar://problem/47943027>

    Reviewers: ahatanak

    Subscribers: jkorous, dexonsmith, cfe-commits, rjmccall

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58218 — jfb / ViewSVN
  38. [Tests] Demonstrate more missing atomicrmw transforms — reames / ViewSVN
  39. [InstCombine] fix crash while trying to narrow a binop of shuffles (PR40734)

    https://bugs.llvm.org/show_bug.cgi?id=40734 — spatel / ViewSVN
  40. Revert r354137 - OptionalStorage implementation for trivial type, take III

    This still fails on some random platform, and I fail to reproduce the issue. — serge_sans_paille / ViewSVN

#294 (Feb 15, 2019 7:44:47 AM)

  1. [compiler-rt] Let CMake search for thread support

    This is an educated guess to fix sanitizer-x86_64-linux after r354132. — hahnfeld / ViewSVN
  2. [clang] Add build and install targets for clang libraries

    This is modeled after the existing llvm-libraries target. It's a
    convenient way to include all clang libraries in a distribution.

    This differs slightly from the llvm-libraries target in that it adds any
    library added via add_clang_library, whereas llvm-libraries only
    includes targets added via add_llvm_library that didn't use the MODULE
    or BUILDTREE_ONLY arguments. add_clang_library doesn't appear to have
    any equivalents of those arguments, so the conditions don't apply.

    Differential Revision: https://reviews.llvm.org/D58269 — smeenai / ViewSVN
  3. [clang] Create install targets for non-shared libraries

    I don't see a reason for these to not have install targets created,
    which in turn allows them to be bundled in distributions. This doesn't
    affect the "install" target, since that just runs all CMake install
    rules (and we were already creating install rules for these).

    Differential Revision: https://reviews.llvm.org/D58268 — smeenai / ViewSVN
  4. GlobalISel: Fix inadequate verification of g_build_vector

    Testing based on the total size of the elements failed to catch a few
    invalid scenarios, so explicitly check the number of elements/operands
    and types.

    This failed to catch situations like
    <4 x s16> = G_BUILD_VECTOR s32, s32 since the total size added
    up. This also would fail to catch an implicit conversion between
    pointers and scalars. — arsenm / ViewSVN
  5. Try to organize MachineVerifier tests

    The Verifier is separate from the MachineVerifier, so move it to a
    different directory. Some other verifier tests were scattered in
    target codegen tests as well (although I'm sure I missed some). Work
    towards using a more consistent naming scheme to make it clearer where
    the gaps still are for generic instructions. — arsenm / ViewSVN
  6. OptionalStorage implementation for trivial type, take III

    This is another attempt at implementating optional storage
    for trivially copyable type, using an union instead of a
    raw buffer to hold the actual storage. This make it possible
    to get rid of the reinterpret_cast, and hopefully to fix the UB
    of the previous attempts.

    This validates fine on my laptop for gcc 8.2 and gcc 4.8, I'll
    revert if it breaks the validation. — serge_sans_paille / ViewSVN
  7. Exteded test of . — ymandel / ViewSVN
  8. Remove unnecessary expectation. — ymandel / ViewSVN
  9. Added test for matcher On. — ymandel / ViewSVN
  10. Add tests for assorted `CXXMemberCallExpr` matchers.

    Summary: Add tests for matchers `on`, `onImplicitObjectArgument` and `hasObjectExpression`.

    Reviewers: alexfh, steveire, aaron.ballman

    Differential Revision: https://reviews.llvm.org/D56850 — ymandel / ViewSVN
  11. [compiler-rt] Cleanup usage of C++ ABI library

    Add missed value "libcxxabi" and introduce SANITIZER_TEST_CXX for linking
    unit tests. This needs to be a full C++ library and cannot be libcxxabi.

    Differential Revision: https://reviews.llvm.org/D58012 — hahnfeld / ViewSVN
  12. [MergeICmps] Make base ordering really deterministic.

    Summary:
    The idea is that we now manipulate bases through a `unsigned BaseID` based on
    order of appearance in the comparison chain rather than through the `Value*`.

    Fixes 40714.

    Reviewers: gchatelet

    Subscribers: mgrang, jfb, jdoerfert, llvm-commits, hans

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58274 — courbet / ViewSVN
  13. [MergeICmps][NFC] Improve doc. — courbet / ViewSVN
  14. [Analyzer] Fix for test file of bug 40625

    Test fixed and changed to true positive, FIXME about false positive removed. — baloghadamsoftware / ViewSVN
  15. Speculatively revert r354051 "Recommit Optional specialization for trivially copyable types"
    and
    r354055 "Optional specialization for trivially copyable types, part2"

    These are suspected to cause Clang to get miscompiled on Ubuntu 14.04
    (Trusty) which uses GCC 4.8.4. Reverting for an hour to see if this
    helps. See llvm-commits thread.

    > Recommit Optional specialization for trivially copyable types
    >
    > Unfortunately the original code gets misscompiled by GCC (at least 8.1),
    > this is a tentative workaround using std::memcpy instead of inplace new
    > for trivially copyable types. I'll revert if it breaks.
    >
    > Original revision: https://reviews.llvm.org/D57097 — hans / ViewSVN
  16. [NFCI] Factor out block removal from stack of nested loops — mkazantsev / ViewSVN
  17. Fix "field 'DFS' will be initialized after field 'DTU'" warning. NFCI. — rksimon / ViewSVN
  18. [OpenCL][PR40707] Allow OpenCL C types in C++ mode.

    Allow all OpenCL types to be parsed in C++ mode. — stulova / ViewSVN
  19. [ASTImporter] Import every Decl in lambda record

    Summary:
    Previously only the fields were imported. Now every Decl is imported.
    This way the destructor decl is not missing after import.

    Patch by balazske (Balázs Kéri)

    Reviewers: a.sidorin, shafik

    Reviewed By: shafik

    Subscribers: balazske, cfe-commits, Szelethus, martong, dkrupp

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57740 — martong / ViewSVN
  20. [BPI] Look through bitcasts in calcZeroHeuristic

    Constant hoisting may have hidden a constant behind a bitcast so that
    it isn't folded into its users. However, this prevents BPI from
    calculating some of its heuristics that are based upon constant
    values. So, I've added a simple helper function to look through these
    casts.

    Differential Revision: https://reviews.llvm.org/D58166 — sam_parker / ViewSVN
  21. [NFC] Promote DFS to field for further use — mkazantsev / ViewSVN
  22. [X86][AVX] lowerShuffleAsLanePermuteAndPermute - fully populate the lane shuffle mask (PR40730)

    As detailed on PR40730, we are not correctly filling in the lane shuffle mask (D53148/rL344446) - we fill in for the correct src lane but don't add it to the correct mask element, so any reference to the correct element is likely to see an UNDEF mask index.

    This allows constant folding to propagate UNDEFs prior to the lane mask being (correctly) lowered to vperm2f128.

    This patch fixes the issue by fully populating the lane shuffle mask - this is more than is necessary (if we only filled in the required mask elements we might be able to match other shuffle instructions - broadcasts etc.), but its the most cautious approach as this needs to be cherrypicked into the 8.0.0 release branch.

    Differential Revision: https://reviews.llvm.org/D58237 — rksimon / ViewSVN
  23. [clangd] Unlink VFS working dir from OS working dir. Reland of r351051 — sammccall / ViewSVN
  24. [ARM GlobalISel] Style fix. NFCI

    Add the opcode for ADDrr / t2ADDrr to the Opcode cache, as we did for
    all other opcodes where the handling is otherwise the same between arm
    mode and thumb2. — rovka / ViewSVN
  25. [ARM GlobalISel] Support branches for Thumb2

    Just like arm mode, but with different opcodes. — rovka / ViewSVN
  26. [RISCV] Add assembler support for LA pseudo-instruction

    This patch also introduces the emitAuipcInstPair helper, which is then used
    for both emitLoadAddress and emitLoadLocalAddress.

    Differential Revision: https://reviews.llvm.org/D55325
    Patch by James Clarke. — asb / ViewSVN
  27. [RISCV] Support assembling %got_pcrel_hi operator

    Differential Revision: https://reviews.llvm.org/D55279
    Patch by James Clarke. — asb / ViewSVN
  28. Revert "[Analysis] -Wunreachable-code shouldn't fire on the increment of a foreach loop"

    This reverts commit r354102. — sammccall / ViewSVN
  29. [ARM CGP] Fix ConvertTruncs

    ConvertTruncs is used to replace a trunc for an AND mask, however
    this function wasn't working as expected. By performing the change
    later, we can create a wide type integer mask instead of a narrow -1
    value, which could then be simply removed (incorrectly). Because we
    now perform this action later, it's necessary to cache the trunc type
    before we perform the promotion.

    Differential Revision: https://reviews.llvm.org/D57686 — sam_parker / ViewSVN
  30. [NFC] Tweak SplitBlockAndInsertIfThen to use existing ThenBlock — mkazantsev / ViewSVN
  31. [Analysis] -Wunreachable-code shouldn't fire on the increment of a foreach loop

    Summary:
    The idea is that the code here isn't written, so doesn't indicate a bug.
    Similar to code expanded from macros.

    This means the warning no longer fires on this code:
      for (auto C : collection) {
        process(C);
        return;
      }
      handleEmptyCollection();
    Unclear whether this is more often a bug or not in practice, I think it's a
    reasonable idiom in some cases.
    Either way, if we want to warn on "loop that doesn't loop", I think it should be
    a separate warning, and catch `while(1) break;`

    Reviewers: ilya-biryukov, ioeric

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58134 — sammccall / ViewSVN
  32. [TEST] Update test comments, refactor checks with update_test_checks.py

    This patch changes messages in guards-related tests to adequately reflect
    reality. — mkazantsev / ViewSVN

#293 (Feb 14, 2019 10:47:19 PM)

  1. X86: Replace isSafeToClobberEFLAGS implementation

    Also use modifiesRegister instead of looping over operands. — arsenm / ViewSVN
  2. Revert "Fix implementation of [temp.local]p4."

    This reverts commit 40bd10b770813bd1471d46f514545437516aa4ba.

    This seems to now emit an error when building the sanitizer tests:
    http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/53965/consoleFull. — thegameg / ViewSVN
  3. Revert "[SystemZ] Do not emit VEXTEND or VROUND nodes without vector support."

    This reverts commit aa0b77d3395dc6ab91647138139c1a15a3aa088d.

    This fails to pass the machine verifier:
    http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/13579/ — thegameg / ViewSVN
  4. [lit][NFC] Cleanup copy&paste naming mistake — yln / ViewSVN
  5. [llvm-cxxfilt] Fix a comment typo. NFC. — mattd / ViewSVN
  6. [GISel][NFC]: Add methods to speed up insertion into GISelWorklist

    https://reviews.llvm.org/D58073

    Speed up insertion during the initial populating phase into the
    GISelWorkList by deferring repeatedly resizing the DenseMap.
    This results in ~10% improvement in the combiner passes, and
    ~3% speedup in the Legalizer.

    reviewed by: aemerson. — aditya_nandakumar / ViewSVN
  7. [libFuzzer] print new functions as they are discovered in the fork mode — kcc / ViewSVN
  8. Fix implementation of [temp.local]p4.

    When a template-name is looked up, we need to give injected-class-name
    declarations of class templates special treatment, as they denote a
    template rather than a type.

    Previously we achieved this by applying a filter to the lookup results
    after completing name lookup, but that is incorrect in various ways, not
    least of which is that it lost all information about access and how
    members were named, and the filtering caused us to generally lose
    all ambiguity errors between templates and non-templates.

    We now preserve the lookup results exactly, and the few places that need
    to map from a declaration found by name lookup into a declaration of a
    template do so explicitly. Deduplication of repeated lookup results of
    the same injected-class-name declaration is done by name lookup instead
    of after the fact. — rsmith / ViewSVN
  9. PR40642: Fix determination of whether the final statement of a statement
    expression is a discarded-value expression.

    Summary:
    We used to get this wrong in three ways:

    1) During parsing, an expression-statement followed by the }) ending a
       statement expression was always treated as producing the value of the
       statement expression. That's wrong for ({ if (1) expr; })
    2) During template instantiation, various kinds of statement (most
       statements not appearing directly in a compound-statement) were not
       treated as discarded-value expressions, resulting in missing volatile
       loads (etc).
    3) In all contexts, an expression-statement with attributes was not
       treated as producing the value of the statement expression, eg
       ({ [[attr]] expr; }).

    Also fix incorrect enforcement of OpenMP rule that directives can "only
    be placed in the program at a position where ignoring or deleting the
    directive would result in a program with correct syntax". In particular,
    a label (be it goto, case, or default) should not affect whether
    directives are permitted.

    Reviewers: aaron.ballman, rjmccall

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57984 — rsmith / ViewSVN
  10. Fixed failure on Darwin due to r354064

    Summary:
    instrprof-darwin-exports.c test fails on Darwin due  to r354064.

    Updated clang list of exported symbols to fix the issue.

    Reviewers: vsk

    Reviewed By: vsk

    Subscribers: davidxl, efriedma

    Differential Revision: https://reviews.llvm.org/D58259 — apazos / ViewSVN
  11. [libFuzzer] fix the unit tests — kcc / ViewSVN
  12. [libFuzzer] when doing the merge, keep track of the coveraged edges, not just features — kcc / ViewSVN
  13. AMDGPU: Set ABI version to 1 for code object v3

    Differential Revision: https://reviews.llvm.org/D57811 — kzhuravl / ViewSVN
  14. [Driver][Darwin] Emit an error when using -pg on OS without support for it.

    Instead of letting a program fail at runtime, emit an error during
    compilation.

    rdar://problem/12206955

    Reviewers: dexonsmith, bob.wilson, steven_wu

    Reviewed By: steven_wu

    Subscribers: jkorous, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57991 — vsapsai / ViewSVN
  15. [symbolizer] Avoid collecting symbols belonging to invalid sections.

    Summary:
    llvm-symbolizer would originally report symbols that belonged to an invalid object file section.
    Specifically the case where: `*Symbol.getSection() == ObjFile.section_end()`
    This patch prevents the Symbolizer from collecting symbols that belong to invalid sections.

    The test  (from PR40591) introduces a case where two symbols have address 0,
    one symbol is defined, 'foo', and the other is not defined, 'bar'.  This patch will cause
    the Symbolizer to keep 'foo' and ignore 'bar'.

    As a side note, the logic for adding symbols to the Symbolizer's store
    (`SymbolizableObjectFile::addSymbol`) replaces symbols with the
    same <address, size> pair.  At some point that logic should be revisited as in the
    aforementioned case, 'bar' was overwriting 'foo' in the Symbolizer's store,
    and 'foo' was forgotten.

    This fixes PR40591

    Reviewers: jhenderson, rupprecht

    Reviewed By: rupprecht

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58146 — mattd / ViewSVN
  16. Revert "[INLINER] allow inlining of address taken blocks"

    This reverts commit 19e95fe61182945b7b68ad15348f144fb996633f. — nickdesaulniers / ViewSVN
  17. [INLINER] allow inlining of address taken blocks

    as long as their uses does not contain calls to functions that capture
    the argument (potentially allowing the blockaddress to "escape" the
    lifetime of the caller).

    TODO:
    - add more tests
    - fix crash in llvm::updateCGAndAnalysisManagerForFunctionPass when
      invoking Transforms/Inline/blockaddress.ll — nickdesaulniers / ViewSVN
  18. [x86] add tests for extractelement of FP; NFC — spatel / ViewSVN
  19. [libFuzzer] when doing the merge, keep track of the coveraged edges, not just features — kcc / ViewSVN
  20. [clang][FileManager] fillRealPathName even if we aren't opening the file

    The pathname wasn't previously filled when the getFile() method was called with openFile = false.
    We are caching FileEntry-s in ParsedAST::Includes in clangd and this caused the problem.

    This fixes an internal test failure in clangd - ClangdTests.GoToInclude.All

    rdar://47536127

    Differential Revision: https://reviews.llvm.org/D58213 — Jan Korous / ViewSVN
  21. [Sema] Fix-up a -Wfloat-conversion diagnostic

    We were warning on valid ObjC property reference exprs, and passing
    in the wrong arguments to DiagnoseFloatingImpCast (leading to a badly
    worded diagnostic).

    rdar://47644670

    Differential revision: https://reviews.llvm.org/D58145 — epilk / ViewSVN
  22. [lit] Remove --single-process option (use -j1 instead)

    Remove `--single-process` command line option. Use `-j1` instead.

    Also see commit: 96adb78b120b6aa9739eb714534dc8e819f7bc52 — yln / ViewSVN
  23. MC/ELF: Allow targets to set ABI version

    Tests are in the follow up change

    Differential Revision: https://reviews.llvm.org/D57810 — kzhuravl / ViewSVN
  24. GlobalISel: Add alignment to LegalityQuery MMOs

    This allows targets to specify the minimum alignment required for the
    load/store. — arsenm / ViewSVN
  25. Replace gcroot verifier tests

    These haven't been checking anything useful and have been testing the
    wrong failure reason for many years. Replace them with something which
    stresses what is actually implemented in the verifier now. — arsenm / ViewSVN
  26. [clang-tidy] Mention language version in test explicitly.

    "modernize-use-using" check is applicable only to C++11 and later. Spell it out
    to avoid relying on default language version.

    rdar://problem/47932196 — vsapsai / ViewSVN
  27. [lit] Set --single-process for single tests and --threads=1

    Summary:
    Automatically upgrade debugging experience (single process, no thread
    pool) when:
      1) we only run a single test
      2) user specifies `-j1`

    Details:
    Fix `--max-failures` in single process mode. Option did not have an
    effect in single process mode.

    Add display feedback for single process mode. Adapted test.

    Improve argument checking (require positive integers).

    `--single-process` is now essentially an alias for `-j1`. Should we
    remove it?

    Reviewers: rnk

    Differential Revision: https://reviews.llvm.org/D58249 — yln / ViewSVN
  28. AMDGPU/GlobalISel: Fix RegBankSelect for GEP.

    This is basically a pointer typed add, so shouldn't be any different.
    This was assuming everything was an SGPR, which is not true.

    Also cleanup legality for GEP. I don't seem to be seeing the problem
    the hack marking s64 as a legal pointer type the comment mentions. — arsenm / ViewSVN
  29. [AMDGPU] Ressociate 'add (add x, y), z' to use SALU

    Reassociate adds to collect scalar operands in a single
    instruction when possible. That will result in a scalar
    add followed by vector instead of two vector adds, thus
    better utilizing SALU.

    Differential Revision: https://reviews.llvm.org/D58220 — rampitec / ViewSVN
  30. AMDGPU/GlobalISel: Handle split for 64-bit VALU select — arsenm / ViewSVN

#292 (Feb 14, 2019 1:39:54 PM)

  1. Set hidden attribute on lprofMergeValueProfData

    Summary:
    The changes in https://reviews.llvm.org/D44847 cause load time failure
    due to lprofMergeValueProfData in Android libs enabled with profile generation:

    "dlopen failed: cannot locate symbol "lprofMergeValueProfData" referenced by..."

    Marking lprofMergeValueProfData as hidden so the correct in-module definition
    is picked by the linker.

    Reviewers: davidxl

    Reviewed By: davidxl

    Subscribers: efriedma, xur, davidxl, llvm-commits

    Differential Revision: https://reviews.llvm.org/D55893 — apazos / ViewSVN
  2. Further relax restriction in tests to include where "-E" and "-S" must appear.

    Also updated a few instances of "-emit-llvm-bc" and "-emit-obj" that were missed in the previous change. — dyung / ViewSVN
  3. [ThinLTO] Detect partially split modules during the thin link

    Summary:
    The changes to disable LTO unit splitting by default (r350949) and
    detect inconsistently split LTO units (r350948) are causing some crashes
    when the inconsistency is detected in multiple threads simultaneously.
    Fix that by having the code always look for the inconsistently split
    LTO units during the thin link, by checking for the presence of type
    tests recorded in the summaries.

    Modify test added in r350948 to remove single threading required to fix
    a bot failure due to this issue (and some debugging options added in the
    process of diagnosing it).

    Reviewers: pcc

    Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57561 — tejohnson / ViewSVN
  4. [libFuzzer] better stats for the fork mode — kcc / ViewSVN
  5. [CMake] Fix ability to use LLVM_ENABLE_PROJECTS with LLVM_EXTERNAL_PROJECTS

    LLVM r353148, changed the circumstances in which the project source directory variables are created to only create them for LLVM projects. This patch initializes the directory variables for projects specified in `LLVM_EXTERNAL_PROJECTS` as well. — cbieneman / ViewSVN
  6. [InstCombine] Add todos for possible atomicrmw transforms — reames / ViewSVN
  7. Canonicalize all integer "idempotent" atomicrmw ops

    For "idempotent" atomicrmw instructions which we can't simply turn into load, canonicalize the operation and constant. This reduces the matching needed elsewhere in the optimizer, but doesn't directly impact codegen.

    For any architecture where OR/Zero is not a good default choice, you can extend the AtomicExpand lowerIdempotentRMWIntoFencedLoad mechanism. I reviewed X86 to make sure this works well, haven't audited other backends.

    Differential Revision: https://reviews.llvm.org/D58244 — reames / ViewSVN
  8. Stop enabling clang-tools-extra automatically when clang is in LLVM_ENABLE_PROJECTS

    If you want to build clang-tools-extra with monorepo, just add it to
    LLVM_ENABLE_PROJECTS like with other projects.

    See also "Separating clang-tools-extra from clang in LLVM_ENABLE_PROJECTS"
    on cfe-dev.

    Differential Revision: https://reviews.llvm.org/D58157 — nico / ViewSVN
  9. [CodeGenObjC] Emit [[X alloc] init] as objc_alloc_init(X) when available

    This provides a code size win on the caller side, since the init
    message send is done in the runtime function.

    rdar://44987038

    Differential revision: https://reviews.llvm.org/D57936 — epilk / ViewSVN
  10. Optional specialization for trivially copyable types, part2 — serge_sans_paille / ViewSVN
  11. [X86] Add clang support for X86 flag output parameters.

    Summary:
    Add frontend support and expected flags for X86 inline assembly flag
    parameters.

    Reviewers: craig.topper, rnk, echristo

    Subscribers: eraman, nickdesaulniers, void, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57394 — niravd / ViewSVN
  12. Recommit Optional specialization for trivially copyable types

    Unfortunately the original code gets misscompiled by GCC (at least 8.1),
    this is a tentative workaround using std::memcpy instead of inplace new
    for trivially copyable types. I'll revert if it breaks.

    Original revision: https://reviews.llvm.org/D57097 — serge_sans_paille / ViewSVN
  13. Teach instcombine about remaining "idempotent" atomicrmw types

    Expand on Quentin's r353471 patch which converts some atomicrmws into loads. Handle remaining operation types, and fix a slight bug. Atomic loads are required to have alignment. Since this was within the InstCombine fixed point, somewhere else in InstCombine was adding alignment before the verifier saw it, but still, we should fix.

    Terminology wise, I'm using the "idempotent" naming that is used for the same operations in AtomicExpand and X86ISelLoweringInfo. Once this lands, I'll add similar tests for AtomicExpand, and move the pattern match function to a common location. In the review, there was seemingly consensus that "idempotent" was slightly incorrect for this context.  Once we setle on a better name, I'll update all uses at once.

    Differential Revision: https://reviews.llvm.org/D58242 — reames / ViewSVN
  14. Support: use internal `call_once` on PPC64le

    Always use the internal `call_once` for PPC64le.  This is needed to
    support the Swift toolchain on PPC64le.

    Patch by Sarvesh Tamba! — Saleem Abdulrasool / ViewSVN
  15. [llvm-ar] Implement the P modifier.

    Summary:
    GNU ar has a `P` modifier that changes filename comparisons to use full paths instead of the basename. As noted in the GNU docs, regular archives are not created with full path names, so P is used to deal with archives created by other archive programs (e.g. see the updated `absolute-paths.test` test case).

    Since thin archives use full path names -- paths are relative to the archive -- it seems very error prone to not imply P when dealing with thin archives, so P is implied in those cases. (I think this is a deviation from GNU ar that makes sense).

    This fixes PR37436 via https://github.com/ClangBuiltLinux/linux/issues/33.

    Reviewers: mstorsjo, pcc, ruiu, davide, david2050, rnk

    Subscribers: tpimh, llvm-commits, nickdesaulniers

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57927 — rupprecht / ViewSVN
  16. [X86] cleanup inline asm register generation. NFCI. — niravd / ViewSVN
  17. [SystemZ] Do not emit VEXTEND or VROUND nodes without vector support.

    Review: Ulrich Weigand
    https://reviews.llvm.org/D58240 — jonpa / ViewSVN
  18. [Tests] Add tests for all idemptotent atomicrmws

    Base for a followup patch to strengthen the InstCombine transform, and then integrate the ExpandAtomics logic. — reames / ViewSVN
  19. [Sema] Fix a regression introduced in "[AST][Sema] Remove CallExpr::setNumArgs"

    D54902 removed CallExpr::setNumArgs in preparation of tail-allocating the
    arguments of CallExpr. It did this by allocating storage for
    max(number of arguments, number of parameters in the prototype). The
    temporarily nulled arguments however causes issues in BuildResolvedCallExpr
    when typo correction is done just after the creation of the call expression.

    This was unfortunately missed by the tests /:

    To fix this, delay setting the number of arguments to
    max(number of arguments, number of parameters in the prototype) until we are
    ready for it. It would be nice to have this encapsulated in CallExpr but this
    is the best I can come up with under the constraint that we cannot add
    anything the CallExpr.

    Fixes PR40286.

    Differential Revision: https://reviews.llvm.org/D57948

    Reviewed By: aaron.ballman — brunoricci / ViewSVN
  20. [X86][AVX] Add PR40730 test case — rksimon / ViewSVN
  21. Refine ArgPromotion metadata handling

    Summary:
    In r353537 we now copy all metadata to the new function, with the old
    being removed when the old function is eliminated. In some cases the old
    function is dropped to a declaration (seems to only occur with the old
    PM). Go ahead and clear all metadata from the old function to handle that
    case, since verification will complain otherwise. This is consistent
    with what was being done for debug metadata before r353537.

    Reviewers: davidxl, uabelho

    Subscribers: jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58215 — tejohnson / ViewSVN
  22. [LoopUnrollPeel] Add case where we should forget the peeled loop from SCEV.

    The test case requires the peeled loop to be forgotten after peeling,
    even though it does not have a parent. When called via the unroller,
    SE->forgetTopmostLoop is also called, so the test case would also pass
    without any SCEV invalidation, but peelLoop is exposed as utility
    function. Also, in the test case, simplifyLoop will make changes,
    removing the loop from SCEV, but it is better to not rely on this
    behavior.

    Reviewers: sanjoy, mkazantsev

    Reviewed By: mkazantsev

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58192 — fhahn / ViewSVN
  23. [RISCV][NFC] Add RV64I CHECK lines to inline-asm.ll test — asb / ViewSVN
  24. [ASTImporter] Check visibility/linkage of functions and variables

    Summary:
    During import of a global variable with external visibility the lookup
    will find variables (with the same name) but with static visibility.
    Clearly, we cannot put them into the same redecl chain.  The same is
    true in case of functions.  In this fix we filter the lookup results and
    consider only those which have the same visibility as the decl we
    currently import.

    We consider two decls in two anonymous namsepaces to have the same
    visibility only if they are imported from the very same translation
    unit.

    Reviewers: a_sidorin, shafik, a.sidorin

    Reviewed By: shafik

    Subscribers: jdoerfert, balazske, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57232 — martong / ViewSVN
  25. Reapply [VFS] Allow multiple RealFileSystem instances with independent CWDs.

    This reverts commit r351091.
    The original mac breakages are addressed by ensuring the root directory
    we're working from is fully symlink-resolved before starting.

    Differential Revision: https://reviews.llvm.org/D58169 — sammccall / ViewSVN
  26. [MIPS GlobalISel] Select phi instruction for integers

    Select G_PHI for integers for MIPS32.

    Differential Revision: https://reviews.llvm.org/D58183 — petar.avramovic / ViewSVN

#291 (Feb 14, 2019 4:38:40 AM)

  1. [Instrumentation][NFC] Fix warning.

    lib/Transforms/Instrumentation/AddressSanitizer.cpp:1173:29: warning: extra ‘;’ [-Wpedantic] — courbet / ViewSVN
  2. [Builtins] Treat `bcmp` as a builtin.

    Summary:
    This makes it consistent with `memcmp` and `__builtin_bcmp`.

    Also see the discussion in https://reviews.llvm.org/D56593.

    Reviewers: jyknight

    Subscribers: kristina, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58120 — courbet / ViewSVN
  3. [MIPS GlobalISel] Select branch instructions

    Select G_BR and G_BRCOND for MIPS32.
    Unconditional branch G_BR does not have register operand,
    for that reason we only add tests.
    Since conditional branch G_BRCOND compares register to zero on MIPS32,
    explicit extension must be performed on i1 condition in order to set
    high bits to appropriate value.

    Differential Revision: https://reviews.llvm.org/D58182 — petar.avramovic / ViewSVN
  4. Make widenable condition transparent for MemoryWriteTracking

    Side effects of widenable condition intrinsic are modelled via
    InaccessibleMemOnly, and there is no way to say that it isn't
    really writing any memory. This patch teaches MemoryWriteTracking
    ignore this intrinsic. — mkazantsev / ViewSVN
  5. Teach isGuaranteedToTransferExecutionToSuccessor about widenable conditions

    Widenable condition intrinsic is guaranteed to return value, notify
    the isGuaranteedToTransferExecutionToSuccessor function about it. — mkazantsev / ViewSVN
  6. Fix an accidentally flipped pair of arguments, NFCI

    While rebasing a refactor in r353950 I accidentally swapped two function
    arguments; one is SelectionDAGBuilders "current" DebugLoc, the other is the one
    from the "current" debug intrinsic. They're probably always identical, but I
    haven't proved that yet. — jmorse / ViewSVN
  7. [ARM] Ensure we update the correct flags in the peephole optimiser

    The Arm peephole optimiser code keeps track of both an MI and a SubAdd that can
    be used to optimise away a CMP. In the rare case that both are found and not
    ruled-out as valid, we could end up setting the flags on the wrong one.

    Instead make sure we are using SubAdd if it exists, as it will be closer to the
    CMP.

    The testcase here is a little theoretical, with a dead def of cpsr. It should
    hopefully show the point.

    Differential Revision: https://reviews.llvm.org/D58176 — dmgreen / ViewSVN
  8. [Support] Fix TempFile::discard to not leave behind temporary files

    Moved the remove of the temporary file to after the close to avoid
    remove failures caused by ETXTBSY errors.

    This issue was seen when FileOutputBuffer falls back to an in memory
    buffer due to the inability to mmap the on disk file. This occurred when
    running LLD on an Ubuntu VM in VirtualBox on a Windows host attempting
    to write the output to a VirtualBox shared folder.

    Differential Revision: https://reviews.llvm.org/D57960 — anng / ViewSVN
  9. Revert "Temporarily disable calls to getgrnam/getgrnam_r in test due to it hitting unrelated issues in EGLIBC 2.19."

    This reverts commit r353594.

    We have updated our internal build bot to a newer version of LIBC which does not have this problem. — dyung / ViewSVN
  10. [NFC] Refactor LICM code for better readability — mkazantsev / ViewSVN
  11. [llvm-readobj][test] Add all GNU_PROPERTY_X86_FEATURE_2_{NEEDED,USED} bits

    And delete trailing whitespace — maskray / ViewSVN
  12. Print a note to the called macro when diagnosing err_embedded_directive

    Fixes PR40713, see there for the motivation for this.

    Differential Revision: https://reviews.llvm.org/D58161 — nico / ViewSVN
  13. [NewPM] Add explicit triple to test

    This prevents warnings like:

    > warning: overriding the module target triple with x86_64-apple-darwin

    on macOS. — thegameg / ViewSVN
  14. Relax test to check for a valid number instead of a specific number
    to be like every other check in this test. — dyung / ViewSVN

#290 (Feb 13, 2019 7:22:48 PM)

  1. [msan] Don't delete MSanAtExitRecord

    Summary:
    Pre 2.27 libc can run same atexit handler twice
    We will keep MSanAtExitRecord and reset fun to mark it as executed.

    Fix PR40162

    Reviewers: eugenis

    Subscribers: jfb, jdoerfert, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D58221 — Vitaly Buka / ViewSVN
  2. [CUDA][HIP] Use device side kernel and variable names when registering them

    __hipRegisterFunction and __hipRegisterVar need to accept device side kernel and variable names
    so that HIP runtime can associate kernel stub functions in host code with kernel symbols in fat binaries,
    and associate shadow variables in host code with device variables in fat binaries.

    Currently, clang assumes kernel functions and device variables have the same name as the kernel
    stub functions and shadow variables. However, when host is compiled in windows with MSVC C++
    ABI and device is compiled with Itanium C++ ABI (e.g. AMDGPU), kernels and device symbols in fat
    binary are mangled differently than host.

    This patch gets the device side kernel and variable name by mangling them in the mangle context
    of aux target.

    Differential Revision: https://reviews.llvm.org/D58163 — yaxunl / ViewSVN
  3. [X86] Make (f80 (sint_to_fp (i16))) use fistps/fisttps instead of fistpl/fisttpl when SSE is enabled.

    When SSE is enabled sint_to_fp with i16 is blindly promoted to i32, but that changes the behavior of f80 conversion.

    Move the promotion to i16 to LowerFP_TO_INT so we can limit it based on the floating point type. — ctopper / ViewSVN
  4. Revert "[llvm-objdump] Allow short options without arguments to be grouped"

    Reverted due to failures on the llvm-hexagon-elf.

    This reverts commit 77e1f27476c89f65eeb496d131065177e6417f23. — ormris / ViewSVN
  5. Relax restriction in tests to where "-emit-llvm-bc" and "-emit-obj" must appear.

    The CHECK lines as structured were requiring them to appear only in a certain
    position while all that is really needed is to check that they are present. — dyung / ViewSVN
  6. [libFuzzer] trying to fix the bot (can't reproduce the build failure locally) — kcc / ViewSVN
  7. Fix for asan bots — leonardchan / ViewSVN
  8. [llvm-objdump] Allow short options without arguments to be grouped

    Summary:

    https://bugs.llvm.org/show_bug.cgi?id=31679

    Reviewers: kristina, jhenderson, grimar, jakehehrlich, rupprecht

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57904 — ormris / ViewSVN
  9. [libFuzzer] add threads to the fork mode: now you can pass -fork=N to run N concurrent workers. Fork mode is still work-in-progress. — kcc / ViewSVN
  10. [globalisel][combine] Split existing rules into a match and apply step

    Summary:
    The declarative tablegen definitions split rules into match and apply steps.
    Prepare for that by doing the same in the C++ implementations. This aids
    some of the migration effort while the tablegen version is incomplete.

    Reviewers: bogner, volkan, aditya_nandakumar, paquette, aemerson

    Reviewed By: aditya_nandakumar

    Subscribers: rovka, kristof.beyls, Petar.Avramovic, jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58150 — dsanders / ViewSVN
  11. [llvm-ar][libObject] Fix relative paths when nesting thin archives.

    Summary:
    When adding one thin archive to another, we currently chop off the relative path to the flattened members. For instance, when adding `foo/child.a` (which contains `x.txt`) to `parent.a`, when flattening it we should add it as `foo/x.txt` (which exists) instead of `x.txt` (which does not exist).

    As a note, this also undoes the `IsNew` parameter of handling relative paths in r288280. The unit test there still passes.

    This was reported as part of testing the kernel build with llvm-ar: https://patchwork.kernel.org/patch/10767545/ (see the second point).

    Reviewers: mstorsjo, pcc, ruiu, davide, david2050, inglorion

    Reviewed By: ruiu

    Subscribers: void, jdoerfert, tpimh, mgorny, hans, nickdesaulniers, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57842 — rupprecht / ViewSVN
  12. [PowerPC][NFC] Added tests for prologue and epilogue code gen.

    Added four test files to check the existing behaviour of prologue
    and epilogue code generation. This patch was done as a setup for
    the upcoming patch listed on Phabricator that will change how the
    prologue and epilogue work.
    The upcoming patch is: https://reviews.llvm.org/D42590 — stefanp / ViewSVN
  13. [ConstProp] add IR tests to show miscompiles; NFC

    A fix for these is proposed in D51216. — spatel / ViewSVN
  14. [llvm-readobj] Dump GNU_PROPERTY_X86_ISA_1_{NEEDED,USED} notes in .note.gnu.property

    Reviewers: grimar, rupprecht

    Reviewed By: rupprecht

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58175 — maskray / ViewSVN
  15. [HWASAN] Updated HWASAN design document to better portray the chance of missing a bug.

    Summary: Provided rule of thumb percentage chances of miss for 4 and 8 bit tag sizes.

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58195 — hctim / ViewSVN
  16. [SelectionDAG] Inline a single use helper function, and remove last non-MMO interface [NFC]

    For D57601, we need to know whether the instruction is volatile.  We'd either have to pass yet another parameter, or just standardize on the MMO interface.  I chose the second. — reames / ViewSVN
  17. [RegAllocGreedy] Take last chance recoloring into account in evicting.

    Last chance recoloring inserts into FixedRegisters those virtual
    registers it is attempting to assign a physical register to.

    We must consider these when we consider candidates for eviction so that
    we do not end up evicting something while we are attempting to recolor
    to assign it.

    This is hitting in an out-of-tree target and no longer reproduces on
    trunk. That does not appear to be a result of it having been fixed, but
    rather, it appears that optimization changes and/or other changes to
    register allocation mask the problem.

    I haven't found a way to come up with a reasonable test case for this
    (i.e. one that I can actually commit to open source, is reasonable
    in size, and actually reproduces the issue).

    rdar://problem/45708741 — rudkx / ViewSVN
  18. [AVR] Fix a typo - 's/analisys/analysis' — dylanmckay / ViewSVN
  19. [WebAssembly] memory.fill

    Summary:
    memset lowering, fix argument types in memcpy lowering, and
    test encodings. Depends on D57736.

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57791 — tlively / ViewSVN
  20. [NewPM] Second attempt at porting ASan

    This is the second attempt to port ASan to new PM after D52739. This takes the
    initialization requried by ASan from the Module by moving it into a separate
    class with it's own analysis that the new PM ASan can use.

    Changes:
    - Split AddressSanitizer into 2 passes: 1 for the instrumentation on the
      function, and 1 for the pass itself which creates an instance of the first
      during it's run. The same is done for AddressSanitizerModule.
    - Add new PM AddressSanitizer and AddressSanitizerModule.
    - Add legacy and new PM analyses for reading data needed to initialize ASan with.
    - Removed DominatorTree dependency from ASan since it was unused.
    - Move GlobalsMetadata and ShadowMapping out of anonymous namespace since the
      new PM analysis holds these 2 classes and will need to expose them.

    Differential Revision: https://reviews.llvm.org/D56470 — leonardchan / ViewSVN
  21. Restore Check for Unreachable Exit Block in -Winfinite-recursion

    Summary:
    When this was rewritten in D43737, the logic changed to better explore infinite loops. The check for a reachable exit block was deleted which accidentally introduced false positives in case the exit node was unreachable.

    We were testing for cases like this, but @steven_wu provided an additional test case that I've included in the regression tests for this patch.

    Reviewers: steven_wu, rtrieu

    Reviewed By: steven_wu, rtrieu

    Subscribers: cfe-commits, steven_wu

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58122 — codafi / ViewSVN
  22. [WebAssembly] Bulk memory intrinsics and builtins

    Summary:
    implements llvm intrinsics and clang intrinsics for
    memory.init and data.drop.

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57736 — tlively / ViewSVN
  23. Revert r353962

    Specialization of Optional for trivially copyable types yields failure on the buildbots I fail to reproduce locally.
    Better safe than sorry, reverting. — serge_sans_paille / ViewSVN
  24. gn build: Merge r353957. — pcc / ViewSVN
  25. [SelectionDAG] Kill last uses of getAtomic w/o a MMO operand [NFC]

    The helper function was used by only two callers, and largely ended up providing distinct functionality based on optional arguments and opcode.  Inline and simply to make the functionality much more clear. — reames / ViewSVN
  26. [Sema] Delay checking whether objc_designated_initializer is being applied to an init method

    This fixes a regression that was caused by r335084, which reversed
    the order that attributes are applied. objc_method_family can change
    whether a method is an init method, so the order that these
    attributes are applied matters. The commit fixes this by delaying the
    init check until after all attributes have been applied.

    rdar://47829358

    Differential revision: https://reviews.llvm.org/D58152 — epilk / ViewSVN
  27. [PowerPC] Stop defining _ARCH_PWR6X on POWER7 and up

    Summary:
    The predefined macro `_ARCH_PWR6X` is associated with GCC's
    `-mcpu=power6x` option, which enables generation of P6 "raw mode"
    instructions such as `mftgpr`.

    Later POWER processors build upon the "architected mode", not the raw
    one. `_ARCH_PWR6X` should not be defined for these later processors.

    Fixes PR#40236.

    Reviewers: echristo, hfinkel, kbarton, nemanjai, wschmidt

    Reviewed By: hfinkel

    Subscribers: jsji, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58128 — hubert.reinterpretcast / ViewSVN
  28. [X86] Add 'mpx' to getHostCPUFeatures. — ctopper / ViewSVN
  29. [CodeExtractor] Only lift lifetime markers present in the extraction region

    When CodeExtractor finds liftime markers referencing inputs to the
    extraction region, it lifts these markers out of the region and inserts
    them around the call to the extracted function (see r350420, PR39671).

    However, it should *only* lift lifetime markers that are actually
    present in the extraction region. I.e., if a start marker is present in
    the extraction region but a corresponding end marker isn't (or vice
    versa), only the start marker (or end marker, resp.) should be lifted.

    Differential Revision: https://reviews.llvm.org/D57834 — Vedant Kumar / ViewSVN
  30. [Tests] More unordered atomic lowering tests

    This time, focused around narrowing and widening transformations.  Also, include a few simple memory optimization tests to highlight missed oppurtunities.  This is part of building up the test base for D57601. — reames / ViewSVN
  31. [clang] Make sure C99/C11 features in <float.h> are provided in C++11

    Summary:
    Previously, those #defines were only provided in C or when GNU extensions were
    enabled. We need those #defines in C++11 and above, too.

    Reviewers: jfb, eli.friedman

    Subscribers: jkorous, dexonsmith, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58149 — Louis Dionne / ViewSVN
  32. Re-enable the test disabled in r353836 and hopefully make it pass in gcc builds

    Argument evaluation order is different between gcc and clang, so pull out
    the Builder calls to make the generated IR independent of the host compiler's
    argument evaluation order.  Thanks to rnk for reminding me of this clang/gcc
    difference. — nico / ViewSVN
  33. [Tests] RMW folding tests w/unordered atomic operations

    We get a suprising number of these today actually, but some are missed. The main point of this is strengthen the test set for D57601. — reames / ViewSVN
  34. [Headers][mips] Add `__attribute__((__mode__(__unwind_word__)))` to the _Unwind_Word / _Unwind_SWord definitions

    The rationale of this change is to fix _Unwind_Word / _Unwind_SWord
    definitions for MIPS N32 ABI. This ABI uses 32-bit pointers,
    but _Unwind_Word and _Unwind_SWord types are eight bytes long.

    # The __attribute__((__mode__(__unwind_word__))) is added to the type
       definitions. It makes them equal to the corresponding definitions used
       by GCC and allows to override types using `getUnwindWordWidth` function.
    # The `getUnwindWordWidth` virtual function override in the `MipsTargetInfo`
       class and provides correct type size values.

    Differential revision: https://reviews.llvm.org/D58165 — atanasyan / ViewSVN
  35. [Tests] Add a bunch of tests for load folding w/unordered atomics — reames / ViewSVN
  36. [X86] Add 'fxsr' to the getHostCPUFeatures detection code.

    We implicitly mark this feature as enabled when the target is 64-bits, but our detection code for -march=native didn't support it so you can't detect it on 32-bit targets. — ctopper / ViewSVN
  37. Re-commit rL353927, patch included

    Make llvm::Optional<T> trivially copyable when T is trivially copyable

    This is an ever-recurring issue (see https://bugs.llvm.org/show_bug.cgi?id=39427 and https://bugs.llvm.org/show_bug.cgi?id=35978)
    but I believe that thanks to https://reviews.llvm.org/D54472 we can now ship a decent implementation of this.

    Basically the fact that llvm::is_trivially_copyable has a consistent behavior across compilers should prevent any ABI issue,
    and using in-place new instead of memcpy should keep compiler bugs away.

    This patch is slightly different from the original revision https://reviews.llvm.org/rL353927 but achieves the same goal. It just avoids
    going through std::conditional which may the code more explicit. — serge_sans_paille / ViewSVN
  38. [Driver] Pass +reserve-x25 to backend if -ffixed-x25 is specified

    This was accidentally omitted in r353957 breaking the Clang test. — phosek / ViewSVN
  39. [Tests] First batch of cornercase tests for unordered atomics

    Mixture of things we legally can't do, and things we're missing.  Once D57601 is in, the later will serve as a punch list. — reames / ViewSVN
  40. [Tests] Auto update a test — reames / ViewSVN
  41. [AArch64] Support reserving arbitrary general purpose registers

    This is a follow up to D48580 and D48581 which allows reserving
    arbitrary general purpose registers with the exception of registers
    with special purpose (X8, X16-X18, X29, X30) and registers used by LLVM
    (X0, X19). This change also generalizes some of the existing logic to
    rely entirely on values generated from tablegen.

    Differential Revision: https://reviews.llvm.org/D56305 — phosek / ViewSVN
  42. [Tests] Rename some test files for consistency

    Most are named "atomic-something" so rename the few which were "atomic_something".  I keep typing the wrong name due to the inconsistency.  :) — reames / ViewSVN
  43. [libcxx] Do not assume the number of elements in a moved-from associative container

    Reviewed as https://reviews.llvm.org/D57903.
    Thanks to Andrey Maksimov for the patch. — Louis Dionne / ViewSVN
  44. [DebugInfo][DAG] Either salvage dangling debug info or emit Undef DBG_VALUEs

    In this patch SelectionDAG tries to salvage any dbg.values that are going to be
    dropped, in case they can be recovered from Values in the current BB. It also
    strengthens SelectionDAGs handling of dangling debug data, so that dbg.values
    are *always* emitted (as Undef or otherwise) instead of dangling forever.

    The motivation behind this patch exists in the new test case: a memory address
    (here a bitcast and GEP) exist in one basic block, and a dbg.value referring to
    the address is left in the 'next' block. The base pointer is live across all
    basic blocks. In current llvm trunk the dbg.value cannot be encoded, and it
    isn't even emitted as an Undef DBG_VALUE.

    The change is simply: if we're definitely going to drop a dbg.value, repeatedly
    apply salvageDebugInfo to its operand until either we find something that can
    be encoded, or we can't salvage any further in which case we produce an Undef
    DBG_VALUE. To know when we're "definitely going to drop a dbg.value",
    SelectionDAG signals SelectionDAGBuilder when all IR instructions have been
    encoded to force salvaging. This ensures that any dbg.value that's dangling
    after DAG creation will have a corresponding DBG_VALUE encoded.

    Differential Revision: https://reviews.llvm.org/D57694 — jmorse / ViewSVN
  45. [X86][AVX] Add shuffle_v8i32_0dcd3f14 shuffle test case — rksimon / ViewSVN
  46. [HIP] Handle compile -m options and propagate into LLC

    Allow the compile options for -m such as -mxnack/-mno-xnack, -msram-ecc/-mno-sram-ecc, -mcode-object-v3/-mno-code-object-v3 to propagate into LLC args. Fix an issue where -mattr was pushed even when it was empty.

    Also add lit tests to verify features are properly passed.

    Differential Revision: https://reviews.llvm.org/D57977

    Reviewers: yaxunl, kzhuravl — aaronenyeshi / ViewSVN
  47. [llvm-readobj] Rename pr_data to PrData

    As requested by grimar in D58112. — maskray / ViewSVN
  48. [DebugInfo][DAG] Refactor dbg.value lowering into its own method

    This is a pure copy-and-paste job, moving the logic for lowering dbg.value
    intrinsics to SDDbgValues into its own function. This is ahead of adding some
    more users of this logic.

    Differential Revision: https://reviews.llvm.org/D57697 — jmorse / ViewSVN
  49. [MCA] Store a bitmask of used groups in the instruction descriptor.

    This is to speedup 'checkAvailability' queries in class ResourceManager.
    No functional change intended. — adibiagio / ViewSVN
  50. [DebugInfo][DAG] Limit special-casing of dbg.values for Arguments

    SelectionDAGBuilder has special handling for dbg.value intrinsics that are
    understood to define the location of function parameters on entry to the
    function. To enable this, we avoid recording a dbg.value as a virtual register
    reference if it might be such a parameter, so that it later hits
    EmitFuncArgumentDbgValue.

    This patch reduces the set of circumstances where we avoid recording a
    dbg.value as a virtual register reference, to allow more "normal" variables
    to be recorded that way. We now only bypass for potential parameters if:
    * The dbg.value operand is an Argument,
    * The Variable is a parameter, and
    * The Variable is not inlined.
    meaning it's very likely that the dbg.value is a function-entry parameter
    location.

    Differential Revision: https://reviews.llvm.org/D57584 — jmorse / ViewSVN
  51. tsan: add fiber support

    This patch adds functions for managing fibers:

    __tsan_get_current_fiber()
    __tsan_create_fiber()
    __tsan_destroy_fiber()
    __tsan_switch_to_fiber()
    __tsan_set_fiber_name()

    See the added tests for use examples.

    Author: yuri (Yuri Per)
    Reviewed in: https://reviews.llvm.org/D54889

    [The previous commit of this change was reverted,
    this is a resubmit with a squashed fix for check_analyze.sh
    and COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED] — dvyukov / ViewSVN
  52. [test] Tweak driver test from r353917 and r353922 to pass with a nondefault CLANG_DEFAULT_LINKER

    Force -fuse-ld=ld, as some other tests in the same file do.

    Loosen the regex matching the linker tool name as well, as this
    can end up being <triple>-ld in case such a named tool exists. — mstorsjo / ViewSVN
  53. [Analyzer] Crash fix for FindLastStoreBRVisitor

    FindLastStoreBRVisitor tries to find the first node in the exploded graph where
    the current value was assigned to a region. This node is called the "store
    site". It is identified by a pair of Pred and Succ nodes where Succ already has
    the binding for the value while Pred does not have it. However the visitor
    mistakenly identifies a node pair as the store site where the value is a
    `LazyCompoundVal` and `Pred` does not have a store yet but `Succ` has it. In
    this case the `LazyCompoundVal` is different in the `Pred` node because it also
    contains the store which is different in the two nodes. This error may lead to
    crashes (a declaration is cast to a parameter declaration without check) or
    misleading bug path notes.

    In this patch we fix this problem by checking for unequal `LazyCompoundVals`: if
    their region is equal, and their store is the same as the store of their nodes
    we consider them as equal when looking for the "store site". This is an
    approximation because we do not check for differences of the subvalues
    (structure members or array elements) in the stores.

    Differential Revision: https://reviews.llvm.org/D58067 — baloghadamsoftware / ViewSVN
  54. Revert "tsan: update check_analyze.sh"

    This reverts commit r353820, to go with the revert of r353817. — rovka / ViewSVN
  55. [NFC] Add const qualifiers where possible — mkazantsev / ViewSVN
  56. Revert r353927 — serge_sans_paille / ViewSVN
  57. Revert "tsan: add fiber support"

    This reverts commit r353817 because we think it broke AARch64 and
    PowerPC buildbots. — rovka / ViewSVN
  58. [ARM GlobalISel] Support G_SELECT for Thumb2

    Same as arm mode, but slightly different opcodes. — rovka / ViewSVN
  59. [MCA][Scheduler] Use latency information to further classify busy instructions.

    This patch introduces a new instruction stage named 'IS_PENDING'.
    An instruction transitions from the IS_DISPATCHED to the IS_PENDING stage if
    input registers are not available, but their latency is known.

    This patch also adds a new set of instructions named 'PendingSet' to class
    Scheduler. The idea is that the PendingSet will only contain instructions that
    have reached the IS_PENDING stage.
    By construction, an instruction in the PendingSet is only dependent on
    instructions that have already reached the execution stage. The plan is to use
    this knowledge to identify bottlenecks caused by data dependencies (see
    PR37494).

    Differential Revision: https://reviews.llvm.org/D58066 — adibiagio / ViewSVN
  60. [DebugInfo][InstCombine] Prefer to salvage debuginfo over sinking it

    When instcombine sinks an instruction between two basic blocks, it sinks any
    dbg.value users in the source block with it, to prevent debug use-before-free.
    However we can do better by attempting to salvage the debug users, which would
    avoid moving where the variable location changes. If we successfully salvage,
    still sink a (cloned) dbg.value with the sunk instruction, as the sunk
    instruction is more likely to be "live" later in the compilation process.

    If we can't salvage dbg.value users of a sunk instruction, mark the dbg.values
    in the original block as being undef. This terminates any earlier variable
    location range, and represents the fact that we've optimized out the variable
    location for a portion of the program.

    Differential Revision: https://reviews.llvm.org/D56788 — jmorse / ViewSVN
  61. Missing header — serge_sans_paille / ViewSVN
  62. [GuardWidening] Support widening of explicitly expressed guards

    This patch adds support of guards expressed in explicit form via
    `widenable_condition` in Guard Widening pass.

    Differential Revision: https://reviews.llvm.org/D56075
    Reviewed By: reames — mkazantsev / ViewSVN
  63. Look through typedefs in getFunctionTypeWithExceptionSpec

    Fixes https://bugs.llvm.org/show_bug.cgi?id=40658

    Differential Revision: https://reviews.llvm.org/D58056 — sberg / ViewSVN
  64. [DebugInfo] Stop changing labels for register-described parameter DBG_VALUEs

    Summary:
    This is a follow-up to D57510. This patch stops DebugHandlerBase from
    changing the starting label for the first non-overlapping,
    register-described parameter DBG_VALUEs to the beginning of the
    function. That code did not consider what defined the registers, which
    could result in the ranges for the debug values starting before their
    defining instructions. We currently do not emit debug values for
    constant values directly at the start of the function, so this code is
    still useful for such values, but my intention is to remove the code
    from DebugHandlerBase completely when we get there. One reason for
    removing it is that the code violates the history map's ranges, which I
    think can make it quite confusing when troubleshooting.

    In D57510, PrologEpilogInserter was amended so that parameter DBG_VALUEs
    now are kept at the start of the entry block, even after emission of
    prologue code. That was done to reduce the degradation of debug
    completeness from this patch. PR40638 is another example, where the
    lexical-scope trimming that LDV does, in combination with scheduling,
    results in instructions after the prologue being left without locations.
    There might be other cases where the DBG_VALUEs are pushed further down,
    for which the DebugHandlerBase code may be helpful, but as it now quite
    often result in incorrect locations, even after the prologue, it seems
    better to remove that code, and try to work our way up with accurate
    locations.

    In the long run we should maybe not aim to provide accurate locations
    inside the prologue. Some single location descriptions, at least those
    referring to stack values, generate inaccurate values inside the
    epilogue, so we maybe should not aim to achieve accuracy for location
    lists. However, it seems that we now emit line number programs that can
    result in GDB and LLDB stopping inside the prologue when doing line
    number stepping into functions. See PR40188 for more information.

    A summary of some of the changed test cases is available in PR40188#c2.

    Reviewers: aprantl, dblaikie, rnk, jmorse

    Reviewed By: aprantl

    Subscribers: jdoerfert, jholewinski, jvesely, javed.absar, llvm-commits

    Tags: #debug-info, #llvm

    Differential Revision: https://reviews.llvm.org/D57511 — dstenb / ViewSVN
  65. Make llvm::Optional<T> trivially copyable when T is trivially copyable

    This is an ever-recurring issue (see https://bugs.llvm.org/show_bug.cgi?id=39427 and https://bugs.llvm.org/show_bug.cgi?id=35978)
    but I believe that thanks to https://reviews.llvm.org/D54472 we can now ship a decent implementation of this.

    Basically the fact that llvm::is_trivially_copyable has a consistent behavior across compilers should prevent any ABI issue,
    and using in-place new instead of memcpy should keep compiler bugs away.

    Differential Revision: https://reviews.llvm.org/D57097 — serge_sans_paille / ViewSVN
  66. [clangd] Handle a few more diag kinds in include fixer.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58135 — ioeric / ViewSVN
  67. [llvm] [cmake] Provide split include paths in LLVMConfig

    Modify LLVMConfig to provide split variables for in-source and generated
    include paths.  Currently, it uses a single value for both
    LLVM_INCLUDE_DIRS and LLVM_INCLUDE_DIR which works for install tree but
    fails hard at build tree (where LLVM_INCLUDE_DIR incorrectly contains
    multiple values).

    Instead, put the generated directory in LLVM_INCLUDE_DIR, and the source
    tree in LLVM_MAIN_INCLUDE_DIR which is consistent with in-LLVM builds.
    For install tree, both variables will have the same value.

    Differential Revision: https://reviews.llvm.org/D58109 — mgorny / ViewSVN
  68. [X86][SLP] Enable SLP vectorization for 128-bit horizontal X86 instructions (add, sub)

    Try to use 64-bit SLP vectorization. In addition to horizontal instrs
    this change triggers optimizations for partial vector operations (for instance,
    using low halfs of 128-bit registers xmm0 and xmm1 to multiply <2 x float> by
    <2 x float>).

    Fixes llvm.org/PR32433 — anton-afanasyev / ViewSVN
  69. [test] Fix the test from SVN r353917 when running without lld available

    These tests still relies on the default linker not to be overridden
    via e.g. CLANG_DEFAULT_LINKER in cmake. — mstorsjo / ViewSVN
  70. [X86] Use default expansion for (i64 fp_to_uint f80) when avx512 is enabled on 64-bit targets to match what happens without avx512.

    In 64-bit mode prior to avx512 we use Expand, but with avx512 we need to make f32/f64 conversions Legal so we use Custom and then do our own expansion for f80. But this seems to produce codegen differences relative to avx2. This patch corrects this. — ctopper / ViewSVN
  71. [X86] Refactor the FP_TO_INTHelper interface. NFCI

    -Pull the final stack load creation from the two callers into the helper.
    -Return a single SDValue instead of a std::pair.
    -Remove the Replace flag which isn't really needed. — ctopper / ViewSVN
  72. [llvm-objcopy] Add --strip-unneeded-symbol(s)

    Differential revision: https://reviews.llvm.org/D58027 — evgeny777 / ViewSVN
  73. [profile] Provide lprofGetHostName for all windows environments

    This function doesn't use anything MSVC specific but works fine
    for any _WIN32 target.

    Differential Revision: https://reviews.llvm.org/D58106 — mstorsjo / ViewSVN
  74. [MinGW] Add the profiling library when necessary

    Profiling still doesn't seem to work properly, but this at least
    hooks up the library and eases completing whatever is missing.

    Differential Revision: https://reviews.llvm.org/D58107 — mstorsjo / ViewSVN
  75. [CMake] Avoid clang dependencies in the runtimes build

    Dependencies like clang aren't available in the runtimes build, this
    was accidentally omitted in D57992. — phosek / ViewSVN
  76. [LoopSimplifyCFG] Re-enable const branch folding by default

    Known underlying bugs have been fixed, intensive fuzz testing did not
    find any new problems. Re-enabling by default. Feel free to revert if
    it causes any functional failures. — mkazantsev / ViewSVN
  77. [libFuzzer] a bit of refactoring of the fork mode — kcc / ViewSVN
  78. [Sanitizer][NFC] Darwin: limit parallism for sanitizer_common tests

    Many sanitizer_common tests (ASan, TSan) run with a "sanitized process
    space" so we need to limit their parallism. — yln / ViewSVN
  79. [llvm-readobj] Dump GNU_PROPERTY_X86_FEATURE_2_{NEEDED,USED} notes in .note.gnu.property

    Summary: And change the output ("X86 features" -> "x86 feature") a bit.

    Reviewers: grimar, xiangzhangllvm, hjl.tools, rupprecht

    Reviewed By: rupprecht

    Subscribers: rupprecht, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58112 — maskray / ViewSVN
  80. [MC] Make symbol version errors non-fatal

    We stil don't have a source location, which is pretty lame, but at least
    we won't tell the user to file a clang bug report anymore.

    Fixes PR40712 — rnk / ViewSVN
  81. [xray][tests][RHDTS] Add -lstdc++ after LLVM libs, resolving link error with RHDTS

    Summary:
    A link error was encountered when using the Red Hat Developer Toolset.
    In the RHDTS, `libstdc++.so` is a linker script that may resolve symbols
    to a static library. This patch places `-lstdc++` later in the ordering.

    Reviewers: sfertile, nemanjai, tstellar, dberris

    Reviewed By: dberris

    Subscribers: dberris, mgorny, delcypher, jdoerfert, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D58144 — hubert.reinterpretcast / ViewSVN
  82. [dsymutil] Improve readability of cloneAllCompileUnits (NFC)

    Add some newlines and improve consistency between the two loops. — Jonas Devlieghere / ViewSVN
  83. [dsymutil] Don't clone empty CUs

    The DWARF standard says that an empty compile unit is not valid:

    > Each such contribution consists of a compilation unit header (see
    > Section 7.5.1.1 on page 200) followed by a single DW_TAG_compile_unit or
    > DW_TAG_partial_unit debugging information entry, together with its
    > children.

    Therefore we shouldn't clone them in dsymutil.

    Differential revision: https://reviews.llvm.org/D57979 — Jonas Devlieghere / ViewSVN
  84. [tsan] #undef one-letter macros

    buildgo.sh puts most of sanitizer_common together in a single source
    file. These single-letter macros end up affecting a lot of unrelated
    code; #undef them as early as possible. — eugenis / ViewSVN
  85. [MemorySSA & LoopPassManager] Add remaining book keeping [NFCI].

    Add plumbing to get MemorySSA in the remaining loop passes.
    Also update unit test to add the dependency.
    [EnableMSSALoopDependency remains disabled]. — asbirlea / ViewSVN
  86. AMDGPU: Try to use function specific ST

    Subtargets are a function level property, so ideally we would
    eliminate everywhere that needs to check the global one. Rename the
    function to try avoiding confusion. — arsenm / ViewSVN
  87. AMDGPU: Ignore CodeObjectV3 when inlining

    This was inhibiting inlining of library functions when clang was
    invoking the inliner directly. This is covering a bit of a mess with
    subtarget feature handling, and this shouldn't be a subtarget
    feature. The behavior is different depending on whether you are using
    a -mattr flag in clang, or llc, opt. — arsenm / ViewSVN
  88. [SystemZ]  Remember to cast value to void to disable warning.

    Hopefully fixes buildbot problems. — jonpa / ViewSVN
  89. [LICM] Cap the clobbering calls in LICM.

    Summary:
    Unlimitted number of calls to getClobberingAccess can lead to high
    compile times in pathological cases.
    Switching EnableLicmCap flag from bool to int, and enabling to default 100.
    (tested to be appropriate for current bechmarks)
    We can revisit this value when enabling MemorySSA.

    Reviewers: sanjoy, chandlerc, george.burgess.iv

    Subscribers: jlebar, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57968 — asbirlea / ViewSVN
  90. [Tests] A few more live-in deopt lowering tests

    Nothing super interesting, just making sure obvious cases work. — reames / ViewSVN
  91. Revert r353880 "[HIP] Handle compile -m options and propagate into LLC"

    This was still causing test failures in the clang test suite. — rnk / ViewSVN
  92. AMDGPU/NFC: Remove SubtargetFeatureISAVersion since it is not used anywhere — kzhuravl / ViewSVN
  93. [libFuzzer] move the implementation of the fork mode into a separate file — kcc / ViewSVN
  94. docs: Update the ShadowCallStack documentation.

    - Remove most of the discussion of the x86_64 implementation;
      link to an older version of the documentation for details of
      that implementation.
    - Add description of the compatibility and security issues discovered
      during the development of the aarch64 implementation for Android.

    Differential Revision: https://reviews.llvm.org/D58105 — pcc / ViewSVN
  95. AMDGPU: Remove duplicate processor (gfx900) — kzhuravl / ViewSVN
  96. [gn build] Separate debug and optimization settings

    This patch adds an `is_optimized` variable, orthogonal to `is_debug`, to allow for a gn analogue to `RelWithDebInfo` builds.

    As part of this we'll want to explicitly enable GC+ICF, for the sake of `is_debug && is_optimized` builds. The flags normally default to true except that if you pass `/DEBUG` they default to false.

    Differential Revision: https://reviews.llvm.org/D58075 — dmajor / ViewSVN
  97. [X86] Follow up to r353878, add MSVC compatibility command lines to other intrinsic tests that uses packed structs to control alignment.

    r353878 fixed a bug in _mm_loadu_ps and added a command line to catch it. Adding additional command lines to prevent breaking other intrinsics in the future. — ctopper / ViewSVN
  98. [SelectionDAG] Clean up comments in SelectionDAGBuilder.h. NFC

    Remove redundant function/variable names from doxygen
    comments (as suggested in https://reviews.llvm.org/D57697). — bjope / ViewSVN
  99. [HIP] Fix hip-toolchain-rdc tests

    Since we removed changed the way HIP Toolchain will propagate -m options into LLC, we need to remove from these older tests.

    This is related to rC353880.

    Differential Revision: https://reviews.llvm.org/D57977 — aaronenyeshi / ViewSVN
  100. Fix auto-upgrade for the new parameter to llvm.objectsize

    r352664 added a 'dynamic' parameter to objectsize, but the AutoUpgrade
    changes were incomplete. Also, fix an off-by-one error I made in the
    upgrade logic that is now no longer unreachable.

    Differential revision: https://reviews.llvm.org/D58071 — epilk / ViewSVN
  101. [ConstProp] add test for miscompile from bitcast transform; NFC

    This problem goes with the fix in D51215. — spatel / ViewSVN
  102. Make ModuleDependencyCollector's method virtual (NFC)

    For reproducers in LLDB we want to hook up into the existing clang
    infrastructure. To make that happen we need to be able to override the
    ModuleDependencyCollector's methods.

    The alternative was to inherit from the DependencyCollector directly,
    but that would mean re-implementing the ModuleDependencyListener and the
    ModuleDependencyPPCallbacks and ModuleDependencyMMCallbacks.

    Differential revision: https://reviews.llvm.org/D58072 — Jonas Devlieghere / ViewSVN
  103. [HIP] Handle compile -m options and propagate into LLC

    Allow the compile options for -m such as -mxnack/-mno-xnack, -msram-ecc/-mno-sram-ecc, -mcode-object-v3/-mno-code-object-v3 to propagate into LLC args.

    Also add lit tests to verify features are properly passed.

    Differential Revision: https://reviews.llvm.org/D57977

    Reviewers: yaxunl, kzhuravl — aaronenyeshi / ViewSVN
  104. [X86] Use __m128_u for _mm_loadu_ps after r353555

    Add secondary triple to existing SSE test for it.  I audited other uses
    of __attribute__((__packed__)) in the intrinsic headers, and this seemed
    to be the only missing one. — rnk / ViewSVN
  105. Disable PIC/PIE for MSP430 target

    Relocatable code generation is meaningless on MSP430, as the platform is too small to use shared libraries.

    Patch by Dmitry Mikushev!

    Differential Revision: https://reviews.llvm.org/D56927 — asl / ViewSVN
  106. [llvm-dwp] Use color-formatted error reporting — rupprecht / ViewSVN
  107. [NFC] typo — jfb / ViewSVN
  108. Fix undefined behaviour in PPCInstPrinter::printBranchOperand.

    Fix the undefined behaviour introduced by my previous patch r353865 (left
    shifting a potentially negative value), which was caught by the bots that run
    UBSan. — sfertile / ViewSVN
  109. [llvm-dwp] Avoid writing the output dwp file when there is an error

    Summary: Use ToolOutputFile to clean up the output file unless dwp actually finishes successfully.

    Reviewers: dblaikie

    Reviewed By: dblaikie

    Subscribers: jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58130 — rupprecht / ViewSVN
  110. [AArch64] Expand v8i8 cttz (PR39729)

    Fix for https://bugs.llvm.org/show_bug.cgi?id=39729.

    Rather than adding just a case for v8i8 I'm setting cttz to expand
    for all vector types.

    Differential Revision: https://reviews.llvm.org/D58008 — nikic / ViewSVN
  111. [InlineSpiller] Fix a crash due to lack of forward progress from remat (try 2)

    This is a recommit of r335091 Add more test cases for deopt-operands via regalloc, and r335077 [InlineSpiller] Fix a crash due to lack of forward progress from remat specifically for STATEPOINT.  They were reverted due to a crash.

    This change includes the text of both original changes, but also includes three aditional pieces:
    1) A bug fix for the observed crash.  I had failed to record the failed remat value as live which resulted in an instruction being deleted which still had uses.  With the machine verifier, this is caught quickly.  Without it, we fail in StackSlotColoring due to an empty live interval from LiveStack.
    2) A test case which demonstrates the fix for (1).  See @test11.
    3) A control flag which defaults to disabling this for the moment.  Once I've run more extensive validaton, I will switch the default and then remove this flag. — reames / ViewSVN
  112. [AMDGPU] Require at least protected visibility for certain symbols

    This allows the global visibility controls to be restrictive while still
    populating the dynamic symbol table where required.

    Differential Revision: https://reviews.llvm.org/D56871 — scott.linder / ViewSVN
  113. [SystemZ]  Use VGM whenever possible to load FP immediates.

    isFPImmLegal() has been extended to recognize certain FP immediates that can
    be built with VGM (Vector Generate Mask).

    These scalar FP immediates (that were previously loaded from the constant
    pool) are now selected as VGMF/VGMG in Select().

    Review: Ulrich Weigand
    https://reviews.llvm.org/D58003 — jonpa / ViewSVN
  114. [PowerPC] Fix printing of negative offsets in call instruction dissasembly. — sfertile / ViewSVN
  115. [GlobalISel][NFC] Gardening: Make translateSimpleUnaryIntrinsic general

    Instead of only having this code work for unary intrinsics, have it work for
    an arbitrary number of parameters.

    Factor out the cases that fall under this (fma, pow).

    This makes it a bit easier to add more intrinsics which don't require any
    special work.

    Differential Revision: https://reviews.llvm.org/D58079 — paquette / ViewSVN
  116. [tablegen] Add locations to many PrintFatalError() calls

    Summary:
    While working on the GISel Combiner, I noticed I was producing location-less
    error messages fairly often and set about fixing this. In the process, I
    noticed quite a few places elsewhere in TableGen that also neglected to include
    a relevant location.

    This patch adds locations to errors that relate to a specific record (or a
    field within it) and also have easy access to the relevant location. This is
    particularly useful when multiclasses are involved as many of these errors
    refer to the full name of a record and it's difficult to guess which substring
    is grep-able.

    Unfortunately, tablegen currently only supports Record granularity so it's not
    currently possible to point at a specific Init so these sometimes point at the
    record that caused the error rather than the precise origin of the error.

    Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, nhaehnle

    Reviewed By: nhaehnle

    Subscribers: jdoerfert, nhaehnle, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58077 — dsanders / ViewSVN
  117. [GlobalISel][AArch64] Select llvm.bswap* for non-vector types

    This teaches the IRTranslator to emit G_BSWAP when it runs into
    Intrinsic::bswap. This allows us to select G_BSWAP for non-vector types in
    AArch64.

    Add a select-bswap.mir test, and add global isel checks to a couple existing
    tests in test/CodeGen/AArch64.

    This doesn't handle every bswap case, since some of these rely on known bits
    stuff. This just lets us handle the naive case.

    Differential Revision: https://reviews.llvm.org/D58081 — paquette / ViewSVN
  118. [X86][AVX] Enable shuffle combining support for zero_extend

    A more limited version of rL352997 that had to be disabled in rL353198 - allow extension of any 128/256/512 bit vector that at least uses byte sized scalars. — rksimon / ViewSVN
  119. [DAGCombiner] convert logic-of-setcc into bit magic (PR40611)

    If we're comparing some value for equality against 2 constants
    and those constants have an absolute difference of just 1 bit,
    then we can offset and mask off that 1 bit and reduce to a single
    compare against zero:
             and/or (setcc X, C0, ne), (setcc X, C1, ne/eq) -->
             setcc ((add X, -C1), ~(C0 - C1)), 0, ne/eq

    https://rise4fun.com/Alive/XslKj

    This transform is disabled by default using a TLI hook
    ("convertSetCCLogicToBitwiseLogic()").

    That should be overridden for AArch64, MIPS, Sparc and possibly
    others based on the asm shown in:
    https://bugs.llvm.org/show_bug.cgi?id=40611 — spatel / ViewSVN
  120. [clangd] Fix a lit-test.

    Summary:
    Fixes https://bugs.llvm.org/show_bug.cgi?id=40593.
    Non-percent-encoded chars doesn't cause any problems on the input-side since we
    assume everything after authority section is data and don't interpret them as
    delimeters.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58126 — kadircet / ViewSVN
  121. [x86] add negative tests for setcc folds; NFC — spatel / ViewSVN
  122. [SelectionDAG] Fix return calling convention in expansion of ?MULO

    Summary:
    The SMULO/UMULO DAG nodes, when not directly supported by the target,
    expand to a multiplication twice as wide. In case that the resulting
    type is not legal, the legalizer cannot directly call the intrinsic
    with the wide arguments; instead, it "pre-lowers" them by splitting
    them in halves.

    rL283203 made sure that on big endian targets, the legalizer passes
    the argument halves in the correct order. It did not do the same
    for the return value halves because the existing code used a hack;
    it put an illegal type into DAG and hoped that nothing would break
    and it would be correctly lowered elsewhere.

    rL307207 fixed this, handling return value halves similar to how
    argument handles are handled, but did not take big-endian targets
    into account.

    This commit fixes the expansion on big-endian targets, such as
    the out-of-tree OR1K target.

    Reviewers: eli.friedman, vadimcn

    Subscribers: george-hopkins, efriedma, llvm-commits

    Differential Revision: https://reviews.llvm.org/D45355 — whitequark / ViewSVN
  123. [CMake][Fuchsia] Pass -ldl -lpthread LDFLAGS to second stage

    We're using static libc++ for the second stage which requires explicitly
    linking -ldl and -lpthread. — phosek / ViewSVN
  124. [MCA] Improved debug prints. NFC — adibiagio / ViewSVN
  125. [PowerPC] Regenerate test — rksimon / ViewSVN
  126. [libc++] Avoid UB in the no-exceptions mode in a few places

    Summary:
    A few places in the library seem to behave unexpectedly when the library
    is compiled or used with exceptions disabled. For example, not throwing
    an exception when a pointer is NULL can lead us to dereference the pointer
    later on, which is UB. This patch fixes such occurences.

    It's hard to tell whether there are other places where the no-exceptions
    mode misbehaves like this, because the replacement for throwing an
    exception does not always seem to be abort()ing, but at least this
    patch will improve the situation somewhat.

    See http://lists.llvm.org/pipermail/libcxx-dev/2019-January/000172.html

    Reviewers: mclow.lists, EricWF

    Subscribers: christof, jkorous, dexonsmith, libcxx-commits

    Differential Revision: https://reviews.llvm.org/D57761 — Louis Dionne / ViewSVN
  127. AMDGPU/GlobalISel: Add more insert/extract testcases — arsenm / ViewSVN
  128. [Codegen] Make sure kill flags are not incorrect from removed machine phi's

    We need to clear the kill flags on both SingleValReg and OldReg, to ensure they remain
    conservatively correct.

    Differential Revision: https://reviews.llvm.org/D58114 — dmgreen / ViewSVN
  129. [llvm-dwp] Abort when dwo_id is unset

    Summary:
    An empty dwo_id indicates a degenerate .dwo file that should not have been generated in the first place. Instead of discovering this error later when merging with another degenerate .dwo file, print an error immediately when noticing an unset dwo_id, including the filename of the offending file.

    Test case created by compiling a trivial file w/ `-fno-split-dwarf-inlining -gmlt -gsplit-dwarf -c` prior to r353771

    Reviewers: dblaikie

    Reviewed By: dblaikie

    Subscribers: jdoerfert, aprantl, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58085 — rupprecht / ViewSVN
  130. AMDGPU/GlobalISel: Only make f16 constants legal on f16 targets

    We could deal with it, but there's no real point. — arsenm / ViewSVN
  131. GlobalISel: Use default rounding mode when extending fconstant

    I don't think this matters since the values should all be exactly
    representable. — arsenm / ViewSVN
  132. GlobalISel: Move some more legalize cases into functions — arsenm / ViewSVN

#289 (Feb 12, 2019 6:49:06 AM)

  1. [LoopSimplifyCFG] Fix test broken in release mode in r353813 — sammccall / ViewSVN
  2. [Sema] Fix a crash in access checking for deduction guides

    Summary: See the added test for a repro.

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58111 — ibiryukov / ViewSVN
  3. Renaming yet another diagnostic to not conflict; NFC. — aaronballman / ViewSVN
  4. Renaming this diagnostic to not conflict with another; NFC.

    Amends r353837 which renamed the diagnostics to conflict. — aaronballman / ViewSVN
  5. Fixing a typo; NFC. — aaronballman / ViewSVN
  6. Disable test after r353718, r353725, r353729 while I investigate — nico / ViewSVN
  7. [NFC] Simplify code & reduce nest slightly — mkazantsev / ViewSVN
  8. [DebugInfo] Don't salvage load operations (PR40628).

    Salvaging a redundant load instruction into a debug expression hides a
    memory read from optimisation passes. Passes that alter memory behaviour
    (such as LICM promoting memory to a register) aren't aware of these debug
    memory reads and leave them unaltered, making the debug variable location
    point somewhere unsafe.

    Teaching passes to know about these debug memory reads would be challenging
    and probably incomplete. Finding dbg.value instructions that need to be fixed
    would likely be computationally expensive too, as more analysis would be
    required. It's better to not generate debug-memory-reads instead, alas.

    Changed tests:
    * DeadStoreElim: test for salvaging of intermediate operations contributing
       to the dead store, instead of salvaging of the redundant load,
    * GVN: remove debuginfo behaviour checks completely, this behaviour is still
       covered by other tests,
    * InstCombine: don't test for salvaged loads, we're removing that behaviour.

    Differential Revision: https://reviews.llvm.org/D57962 — jmorse / ViewSVN
  9. [DebugInfo] Keep parameter DBG_VALUEs before prologue code

    Summary:
    This is a preparatory change for removing the code from
    DebugHandlerBase::beginFunction() which changes the starting label for
    the first non-overlapping DBG_VALUEs of parameters to the beginning of
    the function. It does that to be able to show parameters when entering a
    function. However, that code does not consider what defines the values,
    which can result in the ranges for the debug values starting before
    their defining instructions. That code is removed in a follow-up patch.

    When prologue code is inserted, it leads to DBG_VALUEs that start
    directly in the entry block being moved down after the prologue
    instructions. This patch fixes that by stashing away DBG_VALUEs for
    parameters before emitting the prologue, and then reinserts them at the
    start of the block. This assumes that there is no target that somehow
    clobbers parameter registers in the frame setup; there is no such case
    in the lit tests at least.

    See PR40188 for more information.

    Reviewers: aprantl, dblaikie, rnk, jmorse

    Reviewed By: aprantl

    Subscribers: bjope, llvm-commits

    Tags: #debug-info

    Differential Revision: https://reviews.llvm.org/D57510 — dstenb / ViewSVN
  10. [clangd] Fix use-after-free in XRefs — sammccall / ViewSVN
  11. tsan: update check_analyze.sh

    Update numbers after 353817.
    This was extensively benchmarked in https://reviews.llvm.org/D54889 — dvyukov / ViewSVN
  12. tsan: add fiber support

    This patch adds functions for managing fibers:

    __tsan_get_current_fiber()
    __tsan_create_fiber()
    __tsan_destroy_fiber()
    __tsan_switch_to_fiber()
    __tsan_set_fiber_name()

    See the added tests for use examples.

    Author: yuri (Yuri Per)
    Reviewed in: https://reviews.llvm.org/D54889 — dvyukov / ViewSVN
  13. [IndVars] Fix corner case with unreachable Phi inputs. PR40454

    Logic in `getInsertPointForUses` doesn't account for a corner case when `Def`
    only comes to a Phi user from unreachable blocks. In this case, the incoming
    value may be arbitrary (and not even available in the input block) and break
    the loop-related invariants that are asserted below.

    In fact, if we encounter this situation, no IR modification is needed. This
    Phi will be simplified away with nearest cleanup.

    Differential Revision: https://reviews.llvm.org/D58045
    Reviewed By: spatel — mkazantsev / ViewSVN
  14. [llvm-readobj] Only allow 4-byte pr_data

    Summary: AMD64 psABI says: "The pr_data field of each property contains a 4-byte unsigned integer." Thus we don't need to handle 8-byte pr_data.

    Reviewers: mike.dvoretsky, grimar, craig.topper, xiangzhangllvm, hjl.tools

    Reviewed By: grimar

    Subscribers: rupprecht, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58103 — maskray / ViewSVN
  15. [llvm-readobj] - Simplify .gnu.version_r dumping a bit.

    Current implementation takes "Number of needed versions" from DT_VERNEEDNUM
    dynamic tag entry. Though it would be a bit simpler to take it from sh_info
    section header field directly:
    https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-94076/index.html

    Differential revision: https://reviews.llvm.org/D58048 — grimar / ViewSVN
  16. [LoopSimplifyCFG] Change logic of dead loops removal to avoid hitting asserts

    The function `LI.erase` has some invariants that need to be preserved when it
    tries to remove a loop which is not the top-level loop. In particular, it
    requires loop's preheader to be strictly in loop's parent. Our current logic
    of deletion of dead blocks may erase the information about preheader before we
    handle the loop, and therefore we may hit this assertion.

    This patch changes the logic of loop deletion: we make them top-level loops
    before we actually erase them. This allows us to trigger the simple branch of
    `erase` logic which just detatches blocks from the loop and does not try to do
    some complex stuff that need this invariant.

    Thanks to @uabelho for reporting this!

    Differential Revision: https://reviews.llvm.org/D57221
    Reviewed By: fedor.sergeev — mkazantsev / ViewSVN
  17. [yaml2obj/obj2yaml] - Move `Info` field out from `Section` class.

    ELFYAML.h contains a `Section` class which is a base for a few other
    sections classes that are used for mapping different section types.
    `Section` has a `StringRef Info` field used for storing sh_info.

    At the same time, sh_info has very different meanings for sections and
    cannot be processed in a similar way generally,
    for example ELFDumper does not handle it in `dumpCommonSection`
    but do that in `dumpGroup` and `dumpCommonRelocationSection` respectively.

    At this moment, we have and handle it as a string, because that was possible for
    the current use case. But also it can simply be a number:
    For SHT_GNU_verdef is "The number of version definitions within the section."

    The patch moves `Info` field out to be able to have it as a number.
    With that change, each class will be able to decide what type and purpose
    of the sh_info field it wants to use.

    I also had to edit 2 test cases. This is because patch fixes a bug. Previously we
    accepted yaml files with Info fields for all sections (for example, for SHT_DYNSYM too).
    But we do not handle it and the resulting objects had zero sh_info fields set for
    such sections. Now it is accepted only for sections that supports it.

    Differential revision: https://reviews.llvm.org/D58054 — grimar / ViewSVN
  18. LibFuzzer.rst: double backticks — hans / ViewSVN
  19. tsan: Introduce in_symbolizer() function for Thread sanitizer

    This change is preparation for fiber support.

    Author: yuri (Yuri Per)
    Reviewed in: https://reviews.llvm.org/D58104 — dvyukov / ViewSVN
  20. Delete blocks from DTU to avoid dangling pointers — mkazantsev / ViewSVN
  21. [LoopSimplifyCFG] Pay respect to LCSSA when removing dead blocks

    Utility function that we use for blocks deletion always unconditionally removes
    one-input Phis. In LoopSimplifyCFG, it can lead to breach of LCSSA form.
    This patch alters this function to keep them if needed.

    Differential Revision: https://reviews.llvm.org/D57231
    Reviewed By: fedor.sergeev — mkazantsev / ViewSVN
  22. [X86] Use the new unaligned vector typedefs for the loadu/storeu intrinsics pointer arguments.

    This matches what gcc does and what was suggested by rnk in PR20670. — ctopper / ViewSVN
  23. [NFC] Rename DontDeleteUselessPHIs --> KeepOneInputPHIs — mkazantsev / ViewSVN
  24. [Statepoint Lowering] Update misleading comments about chains — reames / ViewSVN
  25. [NFC] Add parameter for keeping one-input Phis in DeleteDeadBlock(s) — mkazantsev / ViewSVN
  26. [X86] Collapse FP_TO_INT16_IN_MEM/FP_TO_INT32_IN_MEM/FP_TO_INT64_IN_MEM into a single opcode using memory VT to distinquish. NFC — ctopper / ViewSVN
  27. [X86] Remove the value type operand from the floating point load/store MemIntrinsicSDNodes. Use the MemoryVT instead. NFCI

    We already have the memory VT, we can just match from that during isel. — ctopper / ViewSVN

#288 (Feb 11, 2019 9:30:14 PM)

  1. [CMake] Avoid internal dependencies in the runtimes build

    When performing runtimes build, dependencies like clang and
    clang-headers aren't available. This was accidentally omitted in D57992. — phosek / ViewSVN
  2. [libFuzzer] make the fork mode less verbose — kcc / ViewSVN
  3. [build] Remove a stray comment. NFC

    The CMake change associated with this comment was removed but the
    comment got left behind. Add a newline instead. — smeenai / ViewSVN
  4. [libFuzzer] teach the fork mode to ignore OOMs and timeouts — kcc / ViewSVN
  5. Fix VS2015 build problem introduced by r353370. — dyung / ViewSVN
  6. [CMake] Don't override required compiler flags in the runtimes build

    Ensure that HandleLLVMOptions adds all necessary required flags,
    including -Wno-error when building with LLVM_ENABLE_WERROR enabled.

    Differential Revision: https://reviews.llvm.org/D58092 — phosek / ViewSVN
  7. [x86] add tests for logic of setcc (PR40611); NFC — spatel / ViewSVN
  8. [PowerPC] add tests for logic of setcc (PR40611); NFC — spatel / ViewSVN
  9. [sanitizer] Don't compile GetPathAssumingFileIsRelativeToExec on Fuchsia

    This avoids the unused function warning during compilation.

    Differential Revision: https://reviews.llvm.org/D58082 — phosek / ViewSVN
  10. [CMake] Avoid passing -rtlib=compiler-rt when using compiler-rt

    We build libc++ and libc++abi with -nodefaultlibs, so -rtlib=compiler-rt
    has no effect and results in an 'argument unused during compilation'
    warning which breaks the build when using -Werror. We can therefore drop
    -rtlib=compiler-rt without any functional change; note that the actual
    compiler-rt linking is handled by HandleCompilerRT.

    Differential Revision: https://reviews.llvm.org/D58084 — phosek / ViewSVN
  11. Fix r353771 to target linux only (split-dwarf isn't supported on macho) — dblaikie / ViewSVN
  12. [CMake][XRay] Silence llvm-config error when checking library support

    Otherwise this propagates all the way to CMake and results in an error
    during configuration. We check and handle the result and report warning
    separately so this is not changing the behavior.

    Differential Revision: https://reviews.llvm.org/D58086 — phosek / ViewSVN
  13. [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand; second attempt after failed r352732, this time with a fix for cmake — kcc / ViewSVN
  14. [libFuzzer] simplify the code for print_coverage=1 so that it doesn't fail on broken debug info — kcc / ViewSVN
  15. [libFuzzer] Make coverage.test work on ARM64

    Summary:
    This test instruments the following code with coverage, runs the fuzzer
    once, and asserts that there are uncovered PCs. The ARM64 backend
    optimizes this code using the `csel` (Conditional select) instruction,
    which removes all branching from the resulting machine code. The test
    then fails because we do not have any uncovered PCs. The easiest
    solution for now is to turn off optimization for the DSOs used in this
    test.

    ```
    int DSO1(int a) {
      if (a < 123456)
        return 0;
      return 1;
    }
    ```

    rdar://47646400

    Reviewers: kcc

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D58087 — yln / ViewSVN
  16. [LoopReroll] Fix reroll root legality checking.

    The code checked that the first root was an appropriate distance from
    the base value, but skipped checking the other roots. This could lead to
    rerolling a loop that can't be legally rerolled (at least, not without
    rewriting the loop in a non-trivial way).

    Differential Revision: https://reviews.llvm.org/D56812 — efriedma / ViewSVN
  17. [libFuzzer] run the -fork=1 tests only on linux — kcc / ViewSVN
  18. [Test] Use autogenerated checks for more statepoint tests — reames / ViewSVN
  19. [libFuzzer] extend the -fork=1 functionality. Still not fully usable, but good enough for the first unit test — kcc / ViewSVN
  20. Don't declare fenv.h functions when they're a macro.

    libc still provides function declarations, and these declarations
    conflict with libc++'s — ericwf / ViewSVN
  21. [Tests] Fill out a few tests around gc relocation uniquing — reames / ViewSVN
  22. Make the sym_diff utilities more useful.

    In particular when working with static libraries and libstdc++. — ericwf / ViewSVN
  23. DebugInfo: Split DWARF + gmlt + no-split-dwarf-inlining shouldn't emit anything to the .dwo file

    This configuration (due to r349207) was intended not to emit any DWO CU,
    but a degenerate CU was still being emitted - containing a header and a
    DW_TAG_compile_unit with no attributes.

    Under that situation, emit nothing to the .dwo file. (since this is a
    dynamic property of the input the .dwo file is still emitted, just with
    nothing in it (so a valid, but empty, ELF file) - if some other CU
    didn't satisfy this criteria, its DWO CU would still go there, etc) — dblaikie / ViewSVN
  24. [Test] Autogenerate a statepoint test and actual show the reload — reames / ViewSVN
  25. Add fenv.h header

    Summary:
    Some implementations of fenv.h use macros to define the functions they provide. This can cause problems when `std::fegetround()` is spelled in source.

    This patch adds a `fenv.h` header to libc++ for the sole purpose of turning those macros into real functions.

    Reviewers: rsmith, mclow.lists, ldionne

    Reviewed By: rsmith

    Subscribers: mgorny, christof, libcxx-commits

    Differential Revision: https://reviews.llvm.org/D57729 — ericwf / ViewSVN
  26. Be conservative about unordered accesses for the moment

    Background: As described in https://reviews.llvm.org/D57601, I'm working towards separating volatile and atomic in the MMO uses for atomic instructions.

    In https://reviews.llvm.org/D57593, I fixed a bug where isUnordered was returning the wrong result, but didn't account for the fact I was getting slightly ahead of myself. While both uses of isUnordered are correct (as far as I can tell), we don't have tests to demonstrate this and being aggressive gets in the way of having the removal of volatile truly be non-functional. Once D57601 lands, I will return to these call sites, revert this patch, and add the appropriate tests to show the expected behaviour.

    Differential Revision: https://reviews.llvm.org/D57802 — reames / ViewSVN
  27. Add a new attribute, fortify_stdlib

    This attribute applies to declarations of C stdlib functions
    (sprintf, memcpy...) that have known fortified variants
    (__sprintf_chk, __memcpy_chk, ...). When applied, clang will emit
    calls to the fortified variant functions instead of calls to the
    defaults.

    In GCC, this is done by adding gnu_inline-style wrapper functions,
    but that doesn't work for us for variadic functions because we don't
    support __builtin_va_arg_pack (and have no intention to).

    This attribute takes two arguments, the first is 'type' argument
    passed through to __builtin_object_size, and the second is a flag
    argument that gets passed through to the variadic checking variants.

    rdar://47905754

    Differential revision: https://reviews.llvm.org/D57918 — epilk / ViewSVN
  28. [tblgen] Add a timer covering the time spent reading the Instruction defs

    This patch adds a -time-regions option to tablegen that can enable timers
    (currently only one) that assess the performance of tablegen itself. This
    can be useful for identifying scaling problems with tablegen backends.

    This particular timer has allowed me to ignore time that is not attributed
    the GISel combiner pass. It's useful by itself but it is particularly
    useful in combination with https://reviews.llvm.org/D52954 which causes
    this period of time to be annotated within Xcode Instruments which in turn
    allows profile samples and recorded allocations attributed to reading
    instructions to be filtered out. — dsanders / ViewSVN
  29. [Sema] Mark GNU compound literal array init as an rvalue.

    Basically the same issue as string init, except it didn't really have
    any visible consequences before I removed the implicit lvalue-to-rvalue
    conversion from CodeGen.

    While I'm here, a couple minor drive-by cleanups: IgnoreParens never
    returns a ConstantExpr, and there was a potential crash with string init
    involving a ChooseExpr.

    The analyzer test change maybe indicates we could simplify the analyzer
    code a little with this fix?  Apparently a hack was added to support
    lvalues in initializers in r315750, but I'm not really familiar with the
    relevant code.

    Fixes regression reported in the kernel build at
    https://bugs.llvm.org/show_bug.cgi?id=40430#c6 .

    Differential Revision: https://reviews.llvm.org/D58069 — efriedma / ViewSVN
  30. [WebAssembly] Make thread-related options consistent

    Summary:
    There have been three options related to threads and users had to set
    all three of them separately to get the correct compilation results.
    This makes sure the relationship between the options makes sense and
    sets necessary options for users if only part of the necessary options
    are specified. This does:

    - Remove `-matomics`; this option alone does not enable anything, so
      removed it to not confuse users.
    - `-mthread-model posix` sets `-target-feature +atomics`
    - `-pthread` sets both `-target-feature +atomics` and
      `-mthread-model posix`
    Also errors out when explicitly given options don't match, such as
    `-pthread` is given with `-mthread-model single`.

    Reviewers: dschuff, sbc100, tlively, sunfish

    Subscribers: jgravelle-google, jfb, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57874 — aheejin / ViewSVN
  31. [NFC][clangd] Remove unused lambda capture

    Avoid this warning:

    llvm/clang-tools-extra/clangd/ClangdServer.cpp:365:23: warning: lambda
    capture 'this' is not used [-Wunused-lambda-capture]

      auto Action = [Sel, this](decltype(CB) CB, std::string File,
                        ~~^~~~
    1 warning generated. — thegameg / ViewSVN
  32. GlobalISel: Verify G_EXTRACT — arsenm / ViewSVN
  33. [TargetLibraryInfo] Update run time support for Windows

    It seems that, since VC19, the `float` C99 math functions are supported for all
    targets, unlike the C89 ones.

    According to the discussion at https://reviews.llvm.org/D57625. — evandro / ViewSVN
  34. [LegalizeTypes] Expand FNEG to bitwise op for IEEE FP types

    Summary:
    Except for custom floating point types x86_fp80 and ppc_fp128,
    expand Y = FNEG(X) to Y = X ^ sign mask to avoid library call.
    Using bitwise operation can improve code size and performance.

    Reviewers: efriedma

    Reviewed By: efriedma

    Subscribers: efriedma, kpn, arsenm, eli.friedman, javed.absar, rbar, johnrusso, simoncook, sabuasal, niosHD, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, asb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57875 — apazos / ViewSVN
  35. [IRReader] Expose getLazyIRModule

    Currently there is no way to lazy-load an in-memory IR module without
    first writing it to disk. This patch just exposes the existing
    implementation of getLazyIRModule.

    This is effectively a revert of rL212364

    Differential Revision: https://reviews.llvm.org/D56203 — scott.linder / ViewSVN
  36. GlobalISel: Implement moreElementsVector for implicit_def — arsenm / ViewSVN
  37. GlobalISel: Fix not calling the observer when legalizing G_EXTRACT — arsenm / ViewSVN
  38. [globalisel] Correct string emitted by GISelChangeObserver::erasingInstr()

    The API indicates that the MI is about to be erased rather than it has been erased. — dsanders / ViewSVN
  39. [X86] Correct the memory operand for the FLD emitted in FP_TO_INTHelper for 32-bit SSE targets.

    We were using DstTy, but that represents the integer type we are converting to which is i64 in this
    case. The FLD is part of an intermediate step to get from the SSE registers to the x87 registers.
    If the floating point type is f32, the memory operand should reflect a 4 byte access not an 8 byte
    access. The store we used to get from SSE to the stack is using the corect size.

    While there, consistenly use TheVT in place of Op.getOperand(0).getValueType() throughout the function. — ctopper / ViewSVN
  40. Fix a few tests that were missing ':' on CHECK lines and weren't testing anything.

    Found by `git grep '\/\/ CHECK-[^: ]* ' clang/test/ | grep -v RUN:`.

    Also tweak CodeGenCXX/arm-swiftcall.cpp to still pass now that it checks more.

    Differential Revision: https://reviews.llvm.org/D58061 — nico / ViewSVN
  41. [llvm-cxxfilt] Split and demangle stdin input

    Summary:
    Originally, llvm-cxxfilt would treat a line as a single mangled item to be demangled.
    If a mangled name appears in the middle of that string, that name would not be demangled.

    GNU c++filt  splits and demangles every word  in a  string that is piped to it via stdin.
    Prior to this patch llvm-cxxfilt would never split strings  piped to it.
    This patch replicates the GNU behavior and splits strings that are piped to it via stdin.

    This fixes PR39990

    Reviewers: compnerd, jhenderson, davide

    Reviewed By: compnerd, jhenderson

    Subscribers: erik.pilkington, jhenderson, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57350 — mattd / ViewSVN
  42. [CodeGen] Set construction vtable visibility after creating initializer

    We must only set the construction vtable visibility after we create the
    vtable initializer, otherwise the global value will be treated as
    declaration rather than definition and the visibility won't be set.

    Differential Revision: https://reviews.llvm.org/D58010 — phosek / ViewSVN
  43. [globalisel] Restore comment explaining the nits of GISelChangeObserver::createdInstr() — dsanders / ViewSVN

#287 (Feb 11, 2019 11:56:24 AM)

  1. [COFF, ARM64] Remove definitions for _byteswap library functions

    _byteswap_* functions are are implemented in below file as normal function
    from libucrt.lib and declared in stdlib.h. Define them in intrin.h triggers
    lld error "conflicting comdat type" and "duplicate symbols" which was just
    added to LLD (https://reviews.llvm.org/D57324).

    C:\Program Files (x86)\Windows Kits\10\Source\10.0.17763.0\ucrt\stdlib\byteswap.cpp

    Differential Revision: https://reviews.llvm.org/D57915 — tomtan / ViewSVN
  2. [MemorySSA] Remove verifyClobberSanity.

    Summary:
    This verification may fail after certain transformations due to
    BasicAA's fragility. Added a small explanation and a testcase that
    triggers the assert in checkClobberSanity (before its removal).
    Addresses PR40509.

    Reviewers: george.burgess.iv

    Subscribers: sanjoy, jlebar, llvm-commits, Prazek

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57973 — asbirlea / ViewSVN
  3. Refactor setAlreadyUnrolled() and setAlreadyVectorized().

    Loop::setAlreadyUnrolled() and
    LoopVectorizeHints::setLoopAlreadyUnrolled() both add loop metadata that
    stops the same loop from being transformed multiple times. This patch
    merges both implementations.

    In doing so we fix 3 potential issues:

    * setLoopAlreadyUnrolled() kept the llvm.loop.vectorize/interleave.*
       metadata even though it will not be used anymore. This already caused
       problems such as http://llvm.org/PR40546. Change the behavior to the
       one of setAlreadyUnrolled which deletes this loop metadata.

    * setAlreadyUnrolled() used to create a new LoopID by calling
       MDNode::get with nullptr as the first operand, then replacing it by
       the returned references using replaceOperandWith. It is possible
       that MDNode::get would instead return an existing node (due to
       de-duplication) that then gets modified. To avoid, use a fresh
       TempMDNode that does not get uniqued with anything else before
       replacing it with replaceOperandWith.

    * LoopVectorizeHints::matchesHintMetadataName() only compares the
       suffix of the attribute to set the new value for. That is, when
       called with "enable", would erase attributes such as
       "llvm.loop.unroll.enable", "llvm.loop.vectorize.enable" and
       "llvm.loop.distribute.enable" instead of the one to replace.
       Fortunately, function was only called with "isvectorized".

    Differential Revision: https://reviews.llvm.org/D57566 — meinersbur / ViewSVN
  4. [NFC] Re-enable XFAILed fuzzer test on iOS — yln / ViewSVN
  5. [InstCombine] Fix matchRotate bug when one operand is a ConstantExpr shift

    This bug seems to be harmless in release builds, but will cause an error in UBSAN
    builds or an assertion failure in debug builds.

    When it gets to this opcode comparison, it assumes both of the operands are BinaryOperators,
    but the prior m_LogicalShift will also match a ConstantExpr. The cast<BinaryOperator> will
    assert in a debug build, or reading an invalid value for BinaryOp from memory with
    ((BinaryOperator*)constantExpr)->getOpcode() will cause an error in a UBSAN build.

    The test I added will fail without this change in debug/UBSAN builds, but not in release.

    Patch by: @AndrewScheidecker (Andrew Scheidecker)

    Differential Revision: https://reviews.llvm.org/D58049 — spatel / ViewSVN
  6. [SelectionDAGBuilder] Add restrictions to EmitFuncArgumentDbgValue

    Summary:
    This patch fixes PR40587.

    When a dbg.value instrinsic is emitted to the DAG
    by using EmitFuncArgumentDbgValue the resulting
    DBG_VALUE is hoisted to the beginning of the entry
    block. I think the idea is to be able to locate
    a formal argument already from the start of the
    function.
    However, EmitFuncArgumentDbgValue only checked that
    the value that was used to describe a variable was
    originating from a function parameter, not that the
    variable itself actually was an argument to the
    function. So when for example assigning a local
    variable "local" the value from an argument "a",
    the assocated DBG_VALUE instruction would be hoisted
    to the beginning of the function, even if the scope
    for "local" started somewhere else (or if "local"
    was mapped to other values earlier in the function).

    This patch adds some logic to EmitFuncArgumentDbgValue
    to check that the variable being described actually
    is an argument to the function. And that the dbg.value
    being lowered already is in the entry block. Otherwise
    we bail out, and the dbg.value will be handled as an
    ordinary dbg.value (not as a "FuncArgumentDbgValue").

    A tricky situation is when both the variable and
    the value is related to function arguments, but not
    neccessarily the same argument. We make sure that we
    do not describe the same argument more than once as
    a "FuncArgumentDbgValue". This solution works as long
    as opt has injected a "first" dbg.value that corresponds
    to the formal argument at the function entry.

    Reviewers: jmorse, aprantl

    Subscribers: jyknight, hiraditya, fedor.sergeev, dstenb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57702 — bjope / ViewSVN
  7. [LICM&MSSA] Limit store hoisting.

    Summary:
    If there is no clobbering access for a store inside the loop, that store
    can only be hoisted if there are no interfearing loads.
    A more general verification introduced here: there are no loads that are
    not optimized to an access outside the loop.
    Addresses PR40586.

    Reviewers: george.burgess.iv

    Subscribers: sanjoy, jlebar, Prazek, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57967 — asbirlea / ViewSVN
  8. [TargetLibraryInfo] Update run time support for Windows

    It seems that the run time for Windows has changed and supports more math
    functions than it used to, especially on AArch64, ARM, and AMD64.

    Fixes PR40541.

    Differential revision: https://reviews.llvm.org/D57625 — evandro / ViewSVN
  9. [AArch64][GlobalISel] Add isel support for a couple vector exts/truncs

    Add support for

    - v4s16 <-> v4s32
    - v2s64 <-> v2s32

    And update tests that use them to show that we generate the correct
    instructions.

    Differential Revision: https://reviews.llvm.org/D57832 — paquette / ViewSVN
  10. [GlobalISel][AArch64] NFC: Remove unnecessary IR from select-fp-casts.mir

    The IR section in this test doesn't do anything, so there's no point in it
    being there. Since it's redundant, just remove it. — paquette / ViewSVN
  11. [DebugInfo] Fix /usr/lib/debug llvm-symbolizer lookup with relative paths

    Summary:
    rL189250 added a realpath call, and rL352916 because realpath breaks assumptions with some build systems. However, the /usr/lib/debug case has been clarified, falling back to /usr/lib/debug is currently broken if the obj passed in is a relative path. Adding a call to use absolute paths when falling back to /usr/lib/debug fixes that while still not making any realpath assumptions.

    This also adds a --fallback-debug-path command line flag for testing (since we probably can't write to /usr/lib/debug from buildbot environments), but was also verified manually:

    ```
    $ rm -f path/to/dwarfdump-test.elf-x86-64
    $ strace llvm-symbolizer --obj=relative/path/to/dwarfdump-test.elf-x86-64.debuglink 0x40113f |& grep dwarfdump
    ```

    Lookups went to relative/path/to/dwarfdump-test.elf-x86-64, relative/path/to/.debug/dwarfdump-test.elf-x86-64, and then finally /usr/lib/debug/absolute/path/to/dwarfdump-test.elf-x86-64.

    Reviewers: dblaikie, samsonov

    Reviewed By: dblaikie

    Subscribers: krytarowski, aprantl, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57916 — rupprecht / ViewSVN
  12. Attempt to pacify bots more after r353718 and r353725 — nico / ViewSVN
  13. [MCA][Scheduler] Track resources that were found busy when issuing an instruction.

    This is a follow up of r353706. When the scheduler fails to issue a ready
    instruction to the underlying pipelines, it now updates a mask of 'busy resource
    units'. That information will be used in future to obtain the set of
    "problematic" resources in the case of bottlenecks caused by resource pressure.
    No functional change intended. — adibiagio / ViewSVN
  14. Attempt to pacify bots after r353718 — nico / ViewSVN
  15. [PowerPC] Avoid scalarization of vector truncate

    The PowerPC code generator currently scalarizes vector truncates that would fit in a vector register, resulting in vector extracts, scalar operations, and vector merges. This patch custom lowers a vector truncate that would fit in a register to a vector shuffle instead.

    Differential Revision: https://reviews.llvm.org/D56507 — froese / ViewSVN
  16. [GlobalISel][AArch64] Select G_FFLOOR

    This teaches the legalizer about G_FFLOOR, and lets us select G_FFLOOR in
    AArch64.

    It updates the existing floating point tests, and adds a select-floor.mir test.

    Differential Revision: https://reviews.llvm.org/D57486 — paquette / ViewSVN
  17. Recommit "[GlobalISel] Add IRTranslator support for G_FFLOOR"

    After the changes introduced in r353586, this instruction doesn't cause any
    issues for any backend.

    Original review: https://reviews.llvm.org/D57485 — paquette / ViewSVN
  18. GlobalISel: Add G_FCANONICALIZE instruction — arsenm / ViewSVN
  19. Make test actually test something (colons were missing) — nico / ViewSVN
  20. [AMDGPU] fix atomic_optimizations_buffer.ll test after DPP combiner was enabled by default.

    Related commits: rL353691, rL353703. — vpykhtin / ViewSVN
  21. [X86] Regenerate insertelement tests

    Add common X86/X64 prefixes (and use X86 instead of X32) — rksimon / ViewSVN
  22. Add recipes for migrating downstream branches of git mirrors

    Add some common recipes for downstream users developing on top of the
    existing git mirrors. These instructions show how to migrate local
    branches to the monorepo.

    Differential Revision: https://reviews.llvm.org/D56550 — greened / ViewSVN
  23. Revamp the "[clangd] Format tweak's replacements"

    Summary:
    This patch contains two parts:

    1) reverts commit r353306.
    2) move the format logic out from tweaks, keep tweaks API unchanged.

    Reviewers: sammccall, ilya-biryukov

    Reviewed By: ilya-biryukov

    Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58051 — hokein / ViewSVN
  24. Fixed header underline in docs.

    + Removed trailing whitespace. — alexfh / ViewSVN
  25. Move some classes into anonymous namespaces. NFC. — d0k / ViewSVN
  26. [clangd] Prefer location from codegen files when merging symbols.

    Summary:
    For example, if an index symbol has location in a .proto file and an AST symbol
    has location in a generated .proto.h file, then we prefer location in .proto
    which is more meaningful to users.

    Also use `mergeSymbols` to get the preferred location between AST location and index location in go-to-def.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58037 — ioeric / ViewSVN
  27. [tools] Fix python DeprecationWarning: invalid escape sequence

    The python documentation says "it’s highly recommended that you use raw strings for all but the simplest expressions." (https://docs.python.org/3/library/re.html)

    So do that with the attached patch generated by

        sed -i -e "s/re.search('/re.search(r'/g" $(git grep -l 're.search(')

    The warning can be seen in e.g. python3.7:

        $ python3.7 -Wd
        >>> import re; re.search('\s', '')
        <stdin>:1: DeprecationWarning: invalid escape sequence \s

    Commited on behalf of Marco Falke.
    Differential Revision: https://reviews.llvm.org/D57528 — serge_sans_paille / ViewSVN
  28. [MCA] Return a mask of busy resources from method ResourceManager::checkAvailability(). NFCI

    In case of bottlenecks caused by pipeline pressure, we want to be able to
    correctly report the set of problematic pipelines. This is a first step towards
    adding support for bottleneck hints in llvm-mca (see PR37494). No functional
    change intended. — adibiagio / ViewSVN
  29. Make some helper functions static. NFC. — d0k / ViewSVN
  30. [AMDGPU] Remove unused variable — d0k / ViewSVN
  31. [AMDGPU] Fix DPP sequence in atomic optimizer.

    This commit fixes the DPP sequence in the atomic optimizer (which was
    previously missing the row_shr:3 step), and works around a read_register
    exec bug by using a ballot instead.

    Differential Revision: https://reviews.llvm.org/D57737 — sheredom / ViewSVN
  32. Revert "[X86][SSE] Generalize X86ISD::BLENDI support to more value types"

    This reverts commit r353610.
    It causes a miscompile visible in macro expansion in a bootstrapped clang.

    http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190211/626590.html — sammccall / ViewSVN
  33. [analyzer] New checker for detecting usages of unsafe I/O functions

    There are certain unsafe or deprecated (since C11) buffer handling
    functions which should be avoided in safety critical code. They
    could cause buffer overflows. A new checker,
    'security.insecureAPI.DeprecatedOrUnsafeBufferHandling' warns for
    every occurrence of such functions (unsafe or deprecated printf,
    scanf family, and other buffer handling functions, which now have
    a secure variant).

    Patch by Dániel Kolozsvári!

    Differential Revision: https://reviews.llvm.org/D35068 — szelethus / ViewSVN
  34. Format isInSystemMacro after D55782 — maskray / ViewSVN
  35. [clangd] Index parameters in function decls

    Reviewers: hokein

    Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57950 — kadircet / ViewSVN
  36. [clang][Index] Add a knob to index function parameters in declarations

    Summary:
    Parameters in declarations are useful for clangd, so that we can
    provide symbol information for them as well. It also helps clangd to be
    consistent whether a function's definition is accessible or not.

    Reviewers: hokein, akyrtzi

    Subscribers: ilya-biryukov, ioeric, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57949 — kadircet / ViewSVN
  37. [clangd] Fix broken windows build bots. — kadircet / ViewSVN
  38. [TEST] Add missing opportunity test for PR39673 — mkazantsev / ViewSVN
  39. [ARM] Add v8m.base pattern for add negative imm

    The v8m.base ISA contains movw, which can operate on an unsigned
    16-bit value. Add the pattern that converts an add with a negative
    value, that could fit into 16-bits when negated, into a sub with that
    positive value.

    Differential Revision: https://reviews.llvm.org/D57942 — sam_parker / ViewSVN
  40. [AMDGPU] Enable DPP combiner pass by default.

    Related revisions: https://reviews.llvm.org/D55444, https://reviews.llvm.org/D55314 — vpykhtin / ViewSVN
  41. [libclang] Add attribute support for 'convergent'.

    This bumps CINDEX_VERSION_MINOR up (to 51).

    Patch by Hsin-Hsiao Lin.

    Differential Revision: https://reviews.llvm.org/D57946 — svenvh / ViewSVN
  42. [NFC][ARM] Simplify loop-indexing codegen test

    Remove unnecessary offset checks, CHECK-BASE checks and add some
    extra -NOT checks and TODO comments. — sam_parker / ViewSVN

#286 (Feb 11, 2019 2:52:35 AM)

  1. [TEST] Add failing test from PR40454 — mkazantsev / ViewSVN
  2. [clangd] Make system header mappings available for PreambleParsedCallback

    Summary:
    SystemHeaderMappings were added only after takeIncludes call, which
    resulted in getting mapping on main file ast updates but not on preamble ast
    updates.
    Fixes https://github.com/clangd/clangd/issues/8

    Reviewers: hokein

    Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D58029 — kadircet / ViewSVN
  3. test-release.sh: Add option to use ninja

    Allow the use of ninja instead of make. This is useful on some
    platforms where we'd like to be able to limit the number of link jobs
    without slowing down the other steps of the release.

    This patch adds a -use-ninja command line option, which sets the
    generator to Ninja both for LLVM and the test-suite. It also deals with
    some differences between make and ninja:
    * DESTDIR handling - ninja doesn't like this to be listed after the
      target, but both make and ninja can handle it before the command
    * Verbose mode - ninja uses -v, make uses VERBOSE=1
    * Keep going mode - make has a -k mode, which builds as much as possible
      even when failures are encountered; for ninja we need to set a hard
      limit (we use 100 since most people won't look at 100 failures anyway)

    I haven't tested with gmake. — rovka / ViewSVN
  4. [ASTImporter] Add test RedeclChainShouldBeCorrectAmongstNamespaces

    Summary:
    We add a new test to show that redecl chains are not handled properly
    amongst namespaces. We cannot pass this test now, so this is disabled.
    Subsequent patches will make this test pass.

    Reviewers: a_sidorin, shafik, a.sidorin

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57901 — martong / ViewSVN
  5. Attempt to fix buildbot after r353679 #2 — evgeny777 / ViewSVN
  6. [DWARF] LLVM ERROR: Broken function found, while removing Debug Intrinsics.

    Check that when SimplifyCFG is flattening a 'br', all their debug intrinsic instructions are removed, including any dbg.label referencing a label associated with the basic blocks being removed.

    As the test case involves a CFG transformation, move it to the correct location.

    Differential Revision: https://reviews.llvm.org/D57444 — carlos.alberto.enciso / ViewSVN
  7. Attempt to fix buildbot after r353679 — evgeny777 / ViewSVN
  8. Small refactoring of FileError. NFC.

    Differential revision: https://reviews.llvm.org/D57945 — evgeny777 / ViewSVN
  9. [ARM] LoadStoreOptimizer: reoder limit

    The whole design of generating LDMs/STMs is fragile and unreliable: it depends on
    rescheduling here in the LoadStoreOptimizer that isn't register pressure aware
    and regalloc that isn't aware of generating LDMs/STMs.
    This patch adds a (hidden) option to control the total number of instructions that
    can be re-ordered. I appreciate this looks only a tiny bit better than a hard-coded
    constant, but at least it allows more easy experimentation with different values
    for now. Ideally we calculate this reorder limit based on some heuristics, and take
    register pressure into account. I might be looking into that next.

    Differential Revision: https://reviews.llvm.org/D57954 — sjoerdmeijer / ViewSVN
  10. Move CFLGraph and the AA summary code over to the new `CallBase`
    instruction base class rather than the `CallSite` wrapper. — chandlerc / ViewSVN
  11. [llvm] [cmake] Use current directory in GenerateVersionFromVCS

    Find dependent scripts of GenerateVersionFromVCS in current directory
    rather than ../../cmake/modules.  I do not see any reason why the former
    would not work and The latter is incorrect when GenerateVersionFromVCS
    is used from install directory (i.e. in stand-alone builds).

    Differential Revision: https://reviews.llvm.org/D57996 — mgorny / ViewSVN
  12. Remove `CallSite` from the CodeMetrics analysis, moving it to the new
    `CallBase` and simpler APIs therein. — chandlerc / ViewSVN
  13. Remove a declaration that is dead, and not even implemented any longer. — chandlerc / ViewSVN
  14. [libcxx] Preserve order, avoid duplicates when merging static archives

    glob can return files in arbitrary order which breaks deterministic
    builds. Rather, use `ar t` to list the files in each archive and
    preserve the original order. Using `ar q` results in duplicate entries
    in the archive, instead use `ar r` to avoid duplicates.

    Differential Revision: https://reviews.llvm.org/D58024 — phosek / ViewSVN
  15. [ARM] LoadStoreOptimizer: just a clean-up. NFC.

    Differential Revision: https://reviews.llvm.org/D57955 — sjoerdmeijer / ViewSVN
  16. The new file header didn't get carried over when these files were
    "moved" somehow, update them to use it. — chandlerc / ViewSVN
  17. Update some newly added files that mistakenly used the old file header
    to the new one. — chandlerc / ViewSVN
  18. Update more files added with the old header to the new one. — chandlerc / ViewSVN
  19. Update new files added to llvm-objcopy to use the new file header. — chandlerc / ViewSVN
  20. Update files that were mistakenly added with the old file header to the
    new one. — chandlerc / ViewSVN
  21. Update files that were mistakenly added with the old file header. — chandlerc / ViewSVN
  22. [CallSite removal] Port InstSimplify over to use `CallBase` both in its
    interface and implementation.

    Port code with: `cast<CallBase>(CS.getInstruction())`. — chandlerc / ViewSVN
  23. [CallSite removal] Migrate ConstantFolding APIs and implementation to
    `CallBase`.

    Users have been updated. You can see how to update any out-of-tree
    usages: pass `cast<CallBase>(CS.getInstruction())`. — chandlerc / ViewSVN
  24. [CallSite removal] Migrate the statepoint GC infrastructure to use the
    `CallBase` class rather than `CallSite` wrappers.

    I pushed this change down through most of the statepoint infrastructure,
    completely removing the use of CallSite where I could reasonably do so.
    I ended up making a couple of cut-points: generic call handling
    (instcombine, TLI, SDAG). As soon as it hit truly generic handling with
    users outside the immediate code, I simply transitioned into or out of
    a `CallSite` to make this a reasonable sized chunk.

    Differential Revision: https://reviews.llvm.org/D56122 — chandlerc / ViewSVN
  25. [X86] Removed unused SDTypeProfile. NFC — ctopper / ViewSVN
  26. [CMake][Fuchsia] Drop libclang.so from distribution

    This is no longer needed now that all users have switched to clangd. — phosek / ViewSVN
  27. gn build: Fix clang-tidy dep on ClangSACheckers.

    Patch by Mirko Bonadei <mbonadei@webrtc.org>!

    Differential Revision: https://reviews.llvm.org/D57998 — nico / ViewSVN
  28. long double is double on OpenBSD/NetBSD/PPC.

    Patch by George Koehler. — brad / ViewSVN

#285 (Feb 10, 2019 5:58:13 PM)

  1. [X86] EltsFromConsecutiveLoads - replace SmallBitVector with APInt (NFC).

    Minor refactor to simplify some incoming patches to improve broadcast loads. — rksimon / ViewSVN
  2. Fix test to pass on LLP64 targets — rnk / ViewSVN
  3. Fix clang tests broken by r353547 that depend on InstrProf — rnk / ViewSVN
  4. [GlobalISel] Regex the opcodes in unit test to fix non-deterministic ordering

    Differential Revision: https://reviews.llvm.org/D57988 — mgrang / ViewSVN
  5. [CodeGen][X86] Don't scalarize vector saturating add/sub

    Now that we have vector support for [US](ADD|SUB)O we no longer
    need to scalarize when expanding [US](ADD|SUB)SAT.

    This matches what the cost model already does.

    Differential Revision: https://reviews.llvm.org/D57348 — nikic / ViewSVN
  6. fix -Wextra-semi warnings — ericwf / ViewSVN
  7. Make LIBCXX_STANDARD_VER configurable — ericwf / ViewSVN
  8. [AArch64] Regenerate bswap tests — rksimon / ViewSVN
  9. [X86] Add basic bitreverse/bswap combine tests

    Shows missing SimplifyDemandedBits support — rksimon / ViewSVN
  10. [DAG] Add optional AllowUndefs to isNullOrNullSplat

    No change in default behaviour (AllowUndefs = false) — rksimon / ViewSVN
  11. [DAGCombine] Simplify funnel shifts with undef/zero args to bitshifts

    Now that we have SimplifyDemandedBits support for funnel shifts (rL353539), we need to simplify funnel shifts back to bitshifts in cases where either argument has been folded to undef/zero.

    Differential Revision: https://reviews.llvm.org/D58009 — rksimon / ViewSVN

#284 (Feb 10, 2019 9:00:51 AM)

  1. [X86] Add masked variable tests for funnel undef/zero argument combines

    I've avoided 'modulo' masks as we'll SimplifyDemandedBits those in the future, and we just need to check that the shift variable is 'in range' — rksimon / ViewSVN
  2. [x86] narrow 256-bit horizontal ops via demanded elements

    256-bit horizontal math ops are an x86 monstrosity (and thankfully have
    not been extended to 512-bit AFAIK).

    The two 128-bit halves operate on separate halves of the inputs. So if we
    don't demand anything in the upper half of the result, we can extract the
    low halves of the inputs, do the math, and then insert that result into a
    256-bit output.

    All of the extract/insert is free (ymm<-->xmm), so we're left with a
    narrower (cheaper) version of the original op.

    In the affected tests based on:
    https://bugs.llvm.org/show_bug.cgi?id=33758
    https://bugs.llvm.org/show_bug.cgi?id=38971
    ...we see that the h-op narrowing can result in further narrowing of other
    math via existing generic transforms.

    I originally drafted this patch as an exact pattern match starting from
    extract_vector_elt, but I thought we might see diffs starting from
    extract_subvector too, so I changed it to a more general demanded elements
    solution. There are no extra existing regression test improvements from
    that switch though, so we could go back.

    Differential Revision: https://reviews.llvm.org/D57841 — spatel / ViewSVN
  3. [X86] Add additional tests for funnel undef/zero argument combines

    As suggested on D58009 — rksimon / ViewSVN
  4. [TargetLowering] refactor setcc folds to fix another miscompile (PR40657)

    SimplifySetCC still has much room for improvement, but this should
    fix the remaining problem examples from:
    https://bugs.llvm.org/show_bug.cgi?id=40657

    The initial fix for this problem was rL353615. — spatel / ViewSVN
  5. [X86][SSE] Add SimplifyDemandedBits test for BLENDVPD — rksimon / ViewSVN
  6. [Local] Delete a redundant check. NFC

    isInstructionTriviallyDead also performs the use_empty() check. — maskray / ViewSVN
  7. [yaml2obj] - Fix .dynamic section entries writing for 32bit targets.

    This was introduced by me in r353613.

    I tried to fix Big-endian bot and replaced
    uintX_t -> ELFT::Xword. But ELFT::Xword is a packed<uint64_t>,
    so it is always 8 bytes and that was obviously incorrect.

    My intention was to use something like packed<uint> actually, which
    size is target dependent.

    Patch fixes this bug and adds a test case, since no bots seems reported this. — grimar / ViewSVN

#283 (Feb 10, 2019 12:06:51 AM)

  1. Use llvm::is_contained. NFC — maskray / ViewSVN
  2. Format sym_extract.py output to minimize diff output.

    Different versions of python print dictionaries in different orders.
    This can mess up diffs when updating ABI lists. This patch uses
    pprint.pformat to print the dicts to get a consistent ordering. — ericwf / ViewSVN
  3. Add missing symbols to Apple v2 abi list.

    The itoa symbols were added and their addition is documented in the CHANGELOG.
    I'm not sure why the valarray symbols were missing previously, but they're
    present in the v1 ABI lists and should be here as well. — ericwf / ViewSVN
  4. Add ABI list directories for 8.0 — ericwf / ViewSVN
  5. [X86] Move some vector InstAliases out from under unnecessary 'let Predicates'. NFCI

    We don't have any assembler predicates for vector ISAs so this isn't necessary. It just adds extra lines and identation. — ctopper / ViewSVN
  6. [InstCombine] Fix an unused variable warning. — ctopper / ViewSVN

#282 (Feb 9, 2019 2:38:05 PM)

  1. [opaque pointer types] Cleanup CGBuilder's Create*GEP.

    The various EltSize, Offset, DataLayout, and StructLayout arguments
    are all computable from the Address's element type and the DataLayout
    which the CGBuilder already has access to.

    After having previously asserted that the computed values are the same
    as those passed in, now remove the redundant arguments from
    CGBuilder's Create*GEP functions.

    Differential Revision: https://reviews.llvm.org/D57767 — jyknight / ViewSVN
  2. [X86] Add tests for funnel undef argument combines

    If one of the shifted arguments is undef we should be folding to a regular shift. — rksimon / ViewSVN
  3. tsan: Implement pthread_exit() interceptor for Thread sanitizer

    This change is preparation for fiber support.

    Author: yuri (Yuri Per)
    Reviewed in: https://reviews.llvm.org/D57876
    Context: https://reviews.llvm.org/D54889

    llvm-svn: 353385 — Vitaly Buka / ViewSVN
  4. [X86] CombineOr - fold to generic funnel shifts

    As discussed on D57389, this is a first step towards moving the SHLD/SHRD matching code to DAGCombiner using FSHL/FSHR instead.

    There's a bit of work to do before I can do that, so this just folds to FSHL/FSHR in the existing code (handling the different SHRD/FSHR argument ordering), which fixes the issue we had with i16 shift amounts not being correctly masked. — rksimon / ViewSVN
  5. [x86] add another test for setcc miscompile (PR40657); NFC — spatel / ViewSVN
  6. [tsan] Remove debug logging and disable test on ppc64be — Vitaly Buka / ViewSVN
  7. [tsan] Remove debug logging and disable test on ppc64be — Vitaly Buka / ViewSVN
  8. Mark another test as flaky

    Reported on the NetBSD buildbot. — kamil / ViewSVN
  9. gn build: Merge r353590 — nico / ViewSVN
  10. llvm-lib: Implement /list flag

    Differential Revision: https://reviews.llvm.org/D57952 — nico / ViewSVN
  11. [TargetLowering] add tests to show effect of setcc sub->shift; NFC

    There's effectively no difference for the cases with variables.
    We just trade a sub for an add on those. But the case with a
    subtract from constant would require an extra move instruction
    on x86, so this looks like a reasonable generic combine. — spatel / ViewSVN
  12. [x86] add test for setcc sub->shift transform; NFC — spatel / ViewSVN
  13. [tsan] Debug failing test on PPC bot — Vitaly Buka / ViewSVN
  14. [X86] Regenerate test. — rksimon / ViewSVN
  15. [TargetLowering] avoid miscompile in setcc transform (PR40657) — spatel / ViewSVN
  16. [yaml2elf.cpp] - Fix compilation under linux.

    Fixes errors like:
    /home/ssglocal/clang-cmake-x86_64-sde-avx512-linux/clang-cmake-x86_64-sde-avx512-linux/llvm/tools/yaml2obj/yaml2elf.cpp:597:5: error: need ‘typename’ before ‘ELFT:: Xword’ because ‘ELFT’ is a dependent scope
         ELFT::Xword Tag = (ELFT::Xword)DE.Tag; — grimar / ViewSVN
  17. [yaml2elf] - An attemp to fix s390x BB after r353607.

    s390x is big-endian and seems r353607 had an issue with endianess,
    Bot was unhappy:
    http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/11168/steps/ninja%20check%201/logs/stdio

    This should fix it. — grimar / ViewSVN
  18. Revert "[SelectionDAG] Extract [US]MULO expansion into TL method; NFC"

    This reverts commit r353611.

    Triggers an assertion during the libcall expansion on ARM. — nikic / ViewSVN
  19. [SelectionDAG] Extract [US]MULO expansion into TL method; NFC

    In preparation for supporting vector expansion.

    Also drop a variant of ExpandLibCall, of which the MULO expansions
    were the only user. — nikic / ViewSVN
  20. [X86][SSE] Generalize X86ISD::BLENDI support to more value types

    D42042 introduced the ability for the ExecutionDomainFixPass to more easily change between BLENDPD/BLENDPS/PBLENDW as the domains required.

    With this ability, we can avoid most bitcasts/scaling in the DAG that was occurring with X86ISD::BLENDI lowering/combining, blend with the vXi32/vXi64 vectors directly and use isel patterns to lower to the float vector equivalent vectors.

    This helps the shuffle combining and SimplifyDemandedVectorElts be more aggressive as we lose track of fewer UNDEF elements than when we go up/down through bitcasts.

    I've introduced a basic blend(bitcast(x),bitcast(y)) -> bitcast(blend(x,y)) fold, there are more generalizations I can do there (e.g. widening/scaling and handling the tricky v16i16 repeated mask case).

    The vector-reduce-smin/smax regressions will be fixed in a future improvement to SimplifyDemandedBits to peek through bitcasts and support X86ISD::BLENDV.

    Differential Revision: https://reviews.llvm.org/D57888 — rksimon / ViewSVN

#281 (Feb 9, 2019 5:12:53 AM)

  1. [lib/ObjectYAML] - Fix BB after r353607 [2]. NFC.

    The second and the last place it seems.

    Error was:
    [  4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Error.cpp.o
    /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:993:15: error: unused variable 'Object' [-Werror,-Wunused-variable]
      const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext()); — grimar / ViewSVN
  2. [lib/ObjectYAML] - Fix BB after r353607. NFC.

    Error was:
    [  4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DAGDeltaAlgorithm.cpp.o
    /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:666:15: error: unused variable 'Object' [-Werror,-Wunused-variable]
      const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
    (http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/29920) — grimar / ViewSVN
  3. [yaml2obj][obj2yaml] - Add support for dumping/parsing .dynamic sections.

    This teaches the tools to parse and dump
    the .dynamic section and its dynamic tags.

    Differential revision: https://reviews.llvm.org/D57691 — grimar / ViewSVN
  4. [tsan] Remove pthread_exit interceptor

    Crashes PPC bot — Vitaly Buka / ViewSVN
  5. [GlobalOpt] Simplify __cxa_atexit elimination

    cxxDtorIsEmpty checks callers recursively to determine if the
    __cxa_atexit-registered function is empty, and eliminates the
    __cxa_atexit call accordingly.

    This recursive check is unnecessary as redundant instructions and
    function calls can be removed by early-cse and inliner. In addition,
    cxxDtorIsEmpty does not mark visited function and it may visit a
    function exponential times (multiplication principle). — maskray / ViewSVN

#280 (Feb 8, 2019 8:04:26 PM)

  1. [CMake] Don't set <PROJECT>_STANDALONE_BUILD

    We shouldn't be treating runtimes builds as standalone builds since
    we have enough of the context loaded into the runtimes environment.

    Differential Revision: https://reviews.llvm.org/D57992 — phosek / ViewSVN
  2. [libcxx] Support runtimes and monorepo locations for tests

    The test configuration support currently searches for libc++ sources
    in <ROOT>/projects/libcxx. This change also additionally searches
    <ROOT>/runtimes/libcxx (so called runtimes layout) and <ROOT>/libcxx
    (monorepo layout).

    This matches the logic we already use in CMake, for example:
    https://github.com/llvm/llvm-project/blob/6fd4e7f/libcxx/CMakeLists.txt#L148

    When the monorepo becomes the only supported layout in the future,
    we can simplify this logic again.

    Differential Revision: https://reviews.llvm.org/D57776 — phosek / ViewSVN
  3. [StaticAnalyzer] Add missing include to SMTAPI.h. [NFC]

    This include is needed for types within SMTAPI.h. (It's very possible that
    compilation would succeed without it, but that's only by chance.) — dlj / ViewSVN
  4. Fix buildbot failure from r353569.

    I assumed lvalue-to-rvalue conversions of array type would never
    happen, but apparently clang-tidy tries in some cases. — efriedma / ViewSVN
  5. [MC] Clean up unused inline function and non-anchor defaulted destructors; NFCI

    Summary:
    Take care of some missing clean-ups that belong with r249548 and some
    other copy/paste that had happened. In particular, the destructors are
    no longer vtable anchors after r249548; and `setSectionName` in
    `MCSectionWasm` is private and unused since r313058 culled its only
    caller. The destructors are now implicitly defined, and the unused
    function is removed.

    Reviewers: nemanjai, jasonliu, grosbach

    Reviewed By: nemanjai

    Subscribers: sbc100, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57182 — hubert.reinterpretcast / ViewSVN
  6. [Fuzzer] Fix function prototype in fuzzer::ExternalFunctions. [NFC]

    The __sanitizer_acquire_crash_state function has int return type, but the
    fuzzer's external function definitions give it bool.

    Places where __sanitizer_acquire_crash_state is declared:

      include/sanitizer_common/sanitizer_interface_defs.h
      lib/sanitizer_common/sanitizer_interface_internal.h
      lib/sanitizer_common/sanitizer_common.cc
      lib/fuzzer/FuzzerExtFunctions.def (this is the only bool) — dlj / ViewSVN
  7. Extra processing for BitCast + PHI in InstCombine

    For some specific cases with bitcast A->B->A with intervening PHI nodes InstCombiner::optimizeBitCastFromPhi transformation creates extra PHI nodes, which are actually a copy of already created PHI or in another words, they are redundant. These extra PHI nodes could lead to extra move instructions generated after DeSSA transformation. This happens when several conditions are met

    - SROA kicks in and creates new alloca;
    - there is a simple assignment L = R, which falls under 'canonicalize loads' done by combineLoadToOperationType (this transformation is by default). Exactly this transformation is the reason of bitcasts generated;
    - the alloca is then used in A->B->A + PHI chain;
    - there is a loop unrolling.

    As a result optimizeBitCastFromPhi creates as many of PHI nodes for each new SROA alloca as loop unrolling factor is. These new extra PHI nodes are redundant actually except of one and should not be created. Moreover the idea of optimizeBitCastFromPhi is to get rid of the cast (when possible) but that doesn't happen in these conditions.

    The proposed fix is to do the cast replacement for the whole calculated/accumulated PHI closure not for one cast only, which is an argument to the optimizeBitCastFromPhi. These will help to accomplish several things: 1) avoid extra PHI nodes generated as all casts which may trigger optimizeBitCastFromPhi transformation will be replaced, 3) bitcasts will be replaced, and 3) create more opportunities to remove dead code, which appears after the replacement.

    A new test case shows that it's possible to get rid of all bitcasts completely and get quite good code reduction.

    Author: Igor Tsimbalist <igor.v.tsimbalist@intel.com>

    Reviewed By: Carrot

    Differential Revision: https://reviews.llvm.org/D57053 — gbuella / ViewSVN
  8. Temporarily disable calls to getgrnam/getgrnam_r in test due to it hitting unrelated issues in EGLIBC 2.19. — dyung / ViewSVN
  9. [AMDGPU] Split idot4/8 signed and unsigned tests. NFC. — rampitec / ViewSVN
  10. [analyzer] Add a comment that FunctionCodeRegions may also need canonicalization — dergachev / ViewSVN
  11. This reverts commit 1440a848a635849b97f7a5cfa0ecc40d37451f5b.
    and commit a1853e834c65751f92521f7481b15cf0365e796b.

    They broke arm and aarch64 — mramalho / ViewSVN
  12. Recommit "[GlobalISel] Introduce a generic floating point floor opcode, G_FFLOOR""

    After r353586, we won't fail on the AMDGPU floor pattern that was killing the
    importer before. — paquette / ViewSVN
  13. [AMDGPU] Split dot-insts feature

    Differential Revision: https://reviews.llvm.org/D57972 — rampitec / ViewSVN
  14. [AMDGPU] Split dot-insts feature

    Differential Revision: https://reviews.llvm.org/D57971 — rampitec / ViewSVN
  15. [GlobalISel] Skip patterns that define complex suboperands twice instead of dying

    If we run into a pattern that looks like this:

    add
      (complex $x, $y)
      (complex $x, $z)

    We should skip the pattern instead of asserting/doing something unpredictable.

    This makes us return an Error in that case, and adds a testcase for skipped
    patterns.

    Differential Revision: https://reviews.llvm.org/D57980 — paquette / ViewSVN
  16. gn build: Merge r353566 — nico / ViewSVN
  17. [libFuzzer] more refactoring; change some of the exit codes (timeout, OOM, interrupt) so that the parent process can distinguish those — kcc / ViewSVN
  18. [analyzer] CStringSyntaxChecks: Fix an off-by-one error in the strlcat() check.

    oth strlcat and strlcpy cut off their safe bound for the argument value
    at sizeof(destination). There's no need to subtract 1 in only one
    of these cases.

    Differential Revision: https://reviews.llvm.org/D57981

    rdar://problem/47873212 — dergachev / ViewSVN
  19. [NFC] Avoid passing blocks vector to the OutlineRegionInfo constructor by value.

    Reviewers: vsk, fhahn, davidxl

    Reviewed By: vsk

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57957 — sdmitriev / ViewSVN
  20. [x86] add test for miscompiling setcc transform (PR40657); NFC — spatel / ViewSVN
  21. Re-apply r353553 "[GISel][NFC]: Add missing call to record CSE hits in the CSEMIRBuilder"

    With a fix after r353563 that adds some more opcodes. — thegameg / ViewSVN
  22. -gmodules: Don't emit incomplete breadcrumbs pointing to nonexistant PCM files.

    When a module name is specified as -fmodule-name, that module gets a
    clang::Module object, but it won't actually be built or imported; it
    will be textual. CGDebugInfo wouldn't detect this and them emit a
    DICompileUnit that had a hash but no name and that confused both
    dsymutil, LLDB, and myself.

    rdar://problem/47926508

    Differential Revision: https://reviews.llvm.org/D57976 — Adrian Prantl / ViewSVN
  23. [CodeGen][ObjC] Fix assert on calling `__builtin_constant_p` with ObjC objects.

    When we are calling `__builtin_constant_p` with ObjC objects of
    different classes, we hit the assertion

    > Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file include/llvm/Support/Casting.h, line 254.

    It happens because LLVM types for `ObjCInterfaceType` are opaque and
    have no name (see `CodeGenTypes::ConvertType`). As the result, for
    different ObjC classes we have different `is_constant` intrinsics with
    the same name `llvm.is.constant.p0s_s`. When we try to reuse an
    intrinsic with the same name, we fail because of type mismatch.

    Fix by bitcasting `ObjCObjectPointerType` to `id` prior to passing as an
    argument to `__builtin_constant_p`. This results in using intrinsic
    `llvm.is.constant.p0i8` and correct types.

    rdar://problem/47499250

    Reviewers: rjmccall, ahatanak, void

    Reviewed By: void, ahatanak

    Subscribers: ddunbar, jkorous, hans, dexonsmith, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57427 — vsapsai / ViewSVN
  24. [libFuzzer] refactor the merging code, NFC — kcc / ViewSVN
  25. Revert r353553 "[GISel][NFC]: Add missing call to record CSE hits in the CSEMIRBuilder"

    This reverts commit r353553.

    This breaks CodeGen/AArch64/GlobalISel/legalize-ext-csedebug-output.mir:

    http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/57963/console — thegameg / ViewSVN
  26. [libFuzzer] remove two unused experimental flags — kcc / ViewSVN
  27. [CodeGen][NFC] Update comments in CGExprConstant.cpp. — efriedma / ViewSVN
  28. [libFuzzer] introduce an experimental mode -fork=1, where fuzzing happens in a subprocess (still running multiple inputs per process), thus making the fuzzing more resilient to timeouts and OOMs. This is just a skeleton of the code, and some associated refactoring, not a fully working feature yet. — kcc / ViewSVN
  29. [Sema] Make string literal init an rvalue.

    This allows substantially simplifying the expression evaluation code,
    because we don't have to special-case lvalues which are actually string
    literal initialization.

    This currently throws away an optimization where we would avoid creating
    an array APValue for string literal initialization.  If we really want
    to optimize this case, we should fix APValue so it can store simple
    arrays more efficiently, like llvm::ConstantDataArray.  This shouldn't
    affect the memory usage for other string literals.  (Not sure if this is
    a blocker; I don't think string literal init is common enough for this
    to be a serious issue, but I could be wrong.)

    The change to test/CodeGenObjC/encode-test.m is a weird side-effect of
    these changes: we currently don't constant-evaluate arrays in C, so the
    strlen call shouldn't be folded, but lvalue string init managed to get
    around that check.  I this this is fine.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=40430 . — efriedma / ViewSVN
  30. Fix typo — Adrian Prantl / ViewSVN
  31. [Docs] Use code-block:: text for part of the callbr documentation to attempt to make the bot happy. — ctopper / ViewSVN
  32. [analyzer] Opt-in C Style Cast Checker for OSObject pointers

    Differential Revision: https://reviews.llvm.org/D57261 — George Karpenkov / ViewSVN
  33. [X86] Add FPCW as an implicit use on floating point load instructions.

    These instructions can generate a stack overflow exception so technically they read the stack overflow exception mask bit. — ctopper / ViewSVN
  34. Implementation of asm-goto support in LLVM

    This patch accompanies the RFC posted here:
    http://lists.llvm.org/pipermail/llvm-dev/2018-October/127239.html

    This patch adds a new CallBr IR instruction to support asm-goto
    inline assembly like gcc as used by the linux kernel. This
    instruction is both a call instruction and a terminator
    instruction with multiple successors. Only inline assembly
    usage is supported today.

    This also adds a new INLINEASM_BR opcode to SelectionDAG and
    MachineIR to represent an INLINEASM block that is also
    considered a terminator instruction.

    There will likely be more bug fixes and optimizations to follow
    this, but we felt it had reached a point where we would like to
    switch to an incremental development model.

    Patch by Craig Topper, Alexander Ivchenko, Mikhail Dvoretckii

    Differential Revision: https://reviews.llvm.org/D53765 — ctopper / ViewSVN
  35. [CodeExtractor] Restore outputs after creating exit stubs

    When CodeExtractor saves the result of InvokeInst at the first insertion
    point of the 'normal destination' basic block, this block can be omitted
    in the outlined region, so store is placed outside of the function. The
    suggested solution is to process saving outputs after creating exit
    stubs for new function, and stores will be placed in that blocks before
    return in this case.

    Patch by Sergei Kachkov!

    Fixes llvm.org/PR40455.

    Differential Revision: https://reviews.llvm.org/D57919 — Vedant Kumar / ViewSVN
  36. Fix Die() after pthread_exit call on macOS

    Summary:
    Scoped interceptor should not be used when calling real pthread_exit().
    On macOS C++ destructors are not called by pthread_exit(), and later check for empty thread ignore set fails.

    Patch by Yuri Per.

    Reviewers: dvyukov, vitalybuka

    Reviewed By: vitalybuka

    Subscribers: vitalybuka, thegameg, kubamracek, jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D57963 — Vitaly Buka / ViewSVN
  37. [InstrProf] Fix darwin errors after r353547

    The macros were changed but not updated in the Darwin version.

    Fail here: http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/53739/

    rdar://47925820 — thegameg / ViewSVN
  38. AMDGPU/GlobalISel: Fix broken tests — arsenm / ViewSVN
  39. AMDGPU: Eliminate GPU specific SubtargetFeatures

    Inline compatability is determined from the individual feature
    bits. These are just sets of the separate features, but will always be
    treated as incompatible unless they are specifically ignored.

    Defining the ISA version number here in tablegen would be nice, but it
    turns out this wasn't actually used. — arsenm / ViewSVN
  40. [DAGCombine] Optimize pow(X, 0.75) to sqrt(X) * sqrt(sqrt(X))

    The sqrt case is faster and we already do this for the case where
    the exponent is 0.25. This adds the 0.75 case which is also not
    sensitive to signed zeros.

    Patch by Whitney Tsang (Whitney)

    Differential revision: https://reviews.llvm.org/D57434 — nemanjai / ViewSVN
  41. Pass the base element type of an array type to the visit method instead
    of the array type itself.

    This fixes a bug found by inspection that was introduced in r353459. I
    don't have a test case for this since we don't yet have types that would
    make the containing C struct non-trivial to copy/move but wouldn't make
    it non-trivial to default-initialize or destruct. — ahatanak / ViewSVN
  42. [X86] Add explicit alignment to __m128/__m128i/__m128d/etc. to allow matching of MSVC behavior with #pragma pack.

    Summary:
    With MSVC, #pragma pack is ignored when there is explicit alignment. This differs from gcc. Clang emulates this difference when compiling for Windows.

    It appears that MSVC and its headers consider the __m128/__m128i/__m128d/etc. types to be explicitly aligned and ignores #pragma pack for them. Since we don't have explicit alignment on them in our headers, we don't match the MSVC behavior here.

    This patch adds explicit alignment to match this behavior. I'm hoping this won't cause any problems when we're not emulating MSVC. But if someone knows of something that would be different we can swith to conditionally adding the alignment based on _MSC_VER.

    I had to add explicitly unaligned types as well so we could use them in the loadu/storeu intrinsics which use __attribute__(__packed__). Using the now explicitly aligned types wouldn't produce align 1 accesses when targeting Windows.

    Reviewers: rnk, erichkeane, spatel, RKSimon

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57961 — ctopper / ViewSVN
  43. [clang-tidy] Don't use assignment for value-initialized enums

    Summary:
    The modernize-use-default-member-init check crashes when trying to
    create an assignment value for a value-initialized enum because it isn't a
    BuiltinType.
    An enum cannot be initialized by assigning 0 to it unless a cast is added.
    It could be initialized with an enumerator with the value 0, but there might not
    be one.
    Avoid these issues by ignoring the UseAssignment setting for value-initialized
    enums.

    Fixes PR35050.

    Reviewers: aaron.ballman, alexfh, JonasToth

    Reviewed By: JonasToth

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57852 — malcolm.parsons / ViewSVN
  44. [GISel][NFC]: Add missing call to record CSE hits in the CSEMIRBuilder

    https://reviews.llvm.org/D57932

    Add some logging + tests to make sure CSEInfo prints debug output.

    reviewed by: arsenm — aditya_nandakumar / ViewSVN
  45. [tsan] Remove SCOPED_TSAN_INTERCEPTOR to try to fix ppc bot — Vitaly Buka / ViewSVN
  46. Document libFuzzer on Windows.

    Summary:
    Document that libFuzzer supports Windows, how to get it,
    and its limitations.

    Reviewers: kcc, morehouse, rnk, metzman

    Reviewed By: kcc, rnk, metzman

    Subscribers: hans, rnk

    Differential Revision: https://reviews.llvm.org/D57597 — metzman / ViewSVN
  47. [Cmake] Add an option to build LLVM using the experimental new pass manager

    Add LLVM_USE_NEWPM to build LLVM using the experimental new pass manager.

    Differential Revision: http://reviews.llvm.org/D57068 — xur / ViewSVN
  48. AMDGPU: Remove GCN features and predicates

    These are no longer necessary since the R600 tablegen files are split
    out now. — arsenm / ViewSVN
  49. [InstrProf] Implement static profdata registration

    Summary:
    The motivating use case is eliminating duplicate profile data registered
    for the same inline function in two object files. Before this change,
    users would observe multiple symbol definition errors with VC link, but
    links with LLD would succeed.

    Users (Mozilla) have reported that PGO works well with clang-cl and LLD,
    but when using LLD without this static registration, we would get into a
    "relocation against a discarded section" situation. I'm not sure what
    happens in that situation, but I suspect that duplicate, unused profile
    information was retained. If so, this change will reduce the size of
    such binaries with LLD.

    Now, Windows uses static registration and is in line with all the other
    platforms.

    Reviewers: davidxl, wmi, inglorion, void, calixte

    Subscribers: mgorny, krytarowski, eraman, fedor.sergeev, hiraditya, #sanitizers, dmajor, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D57929 — rnk / ViewSVN
  50. [TargetLowering] Use ISD::FSHR in expandFixedPointMul

    Replace OR(SHL,SRL) pattern with ISD::FSHR (legalization expands this later if necessary) - this helps with the scale == 0 'undefined' drop-through case that was discussed on D55720. — rksimon / ViewSVN
  51. [test] Run the verifier for dsymutil module tests

    Dsymutil has an option "verify" that runs the dwarf verifier on the
    generated dSYM. This patch enables this for the module tests. — Jonas Devlieghere / ViewSVN

#279 (Feb 8, 2019 10:30:05 AM)

  1. [OPENMP]Delay emission of the error messages for the exceptions.

    Fixed diagnostic emission for the exceptions support in case of the
    compilation of OpenMP code for the devices. From now on, it uses delayed
    diagnostics mechanism, previously used for CUDA only. It allow to
    diagnose not allowed used of exceptions only in functions that are going
    to be codegen'ed. — abataev / ViewSVN
  2. Revert "[OPENMP]Initial support for the delayed diagnostics."

    This reverts commit r353540. Erroneously committed, need to fix the
    message and description. — abataev / ViewSVN
  3. [OPENMP]Initial support for the delayed diagnostics.

    It is important to delay the emission of the diagnostic messages for the
    functions unless it is proved that the function is going to be used on
    the device side. It is required to support compilation with some of the
    target-specific system headers. — abataev / ViewSVN
  4. [TargetLowering] Add SimplifyDemandedBits funnel shift support — rksimon / ViewSVN
  5. ArgumentPromotion should copy all metadata to new Function

    Summary:
    ArgumentPromotion had code to specifically move the dbg metadata over to
    the new function, but other metadata such as the function_entry_count
    !prof metadata was not. Replace code that moved dbg metadata with a call
    to copyMetadata. The old metadata is automatically removed when the old
    Function is removed.

    Reviewers: davidxl

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57846 — tejohnson / ViewSVN
  6. [X86] Remove isReMaterializable from X87 floating point constant loads and constant pool loads.

    Summary: These instructions update FPSW so they aren't generically safe to rematerialize into any location if FPSW is live for a comparison result. They also use FPCW for exception masking control. Though the only exception they can generate is stack overflow and we manage the stack ourselves so that's not really going to occur.

    Reviewers: RKSimon, spatel

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57934 — ctopper / ViewSVN
  7. [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals

    bugprone-argument-comment only supports identifying those comments which do not match the function parameter name

    This revision add 3 options to adding missing argument comments to literals (granularity on type is added to control verbosity of fixit)

    ```
    CheckOptions:
      - key:             bugprone-argument-comment.CommentBoolLiterals
        value:           '1'
      - key:             bugprone-argument-comment.CommentFloatLiterals
        value:           '1'
      - key:             bugprone-argument-comment.CommentIntegerLiterals
        value:           '1'
      - key:             bugprone-argument-comment.CommentStringLiterals
        value:           '1'
      - key:             bugprone-argument-comment.CommentCharacterLiterals
        value:           '1'
      - key:             bugprone-argument-comment.CommentUserDefinedLiterals
        value:           '1'
      - key:             bugprone-argument-comment.CommentNullPtrs
        value:           '1'
    ```

    After applying these options, literal arguments will be preceded with /*ParameterName=*/

    Reviewers: JonasToth, Eugene.Zelenko, alexfh, hokein, aaron.ballman

    Reviewed By: aaron.ballman, Eugene.Zelenko

    Differential Revision: https://reviews.llvm.org/D57674 — paulhoad / ViewSVN
  8. [X86] Add basic funnel shift demanded bits tests — rksimon / ViewSVN
  9. [x86] fix formatting; NFC

    (test commit #2 migrating to git) — spatel / ViewSVN
  10. [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

    Specifically:

    * fixes the comments on `hasObjectExpression`,
    * clarifies comments on `thisPointerType` and `on`,
    * adds comments to `onImplicitObjectArgument`.

    It also updates associated reference docs (using the doc tool).

    Reviewers: alexfh, steveire, aaron.ballman

    Differential Revision: https://reviews.llvm.org/D56849 — ymandel / ViewSVN
  11. [Format/ObjC] Fix [foo bar]->baz formatting as lambda arrow

    Summary:
    Currently, `UnwrappedLineParser` thinks an arrow token after
    an ObjC method expression is a C++ lambda arrow, so it formats:

    ```
    [foo bar]->baz
    ```

    as:

    ```
    [foo bar] -> baz
    ```

    Because `UnwrappedLineParser` runs before `TokenAnnotator`, it can't
    know if the arrow token is after an ObjC method expression or not.

    This diff makes `TokenAnnotator` remove the TT_LambdaArrow on
    the arrow token if it follows an ObjC method expression.

    Test Plan: New test added. Ran test with:
      % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests
      Confirmed test failed before diff and passed after diff.

    Reviewers: krasimir, djasper, sammccall

    Reviewed By: sammccall

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57923 — benhamilton / ViewSVN
  12. [AMDGPU] Fix CS scratch setup on pre-GCN3 ASICs

    Summary:
    Prior to GCN3 s_load_dword offsets are in dwords rather than bytes.
    Thus the scratch buffer descriptor offset must be adjusted for pre-GCN3 ASICs.

    Reviewers: nhaehnle, tpr

    Reviewed By: nhaehnle

    Subscribers: sheredom, arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, jfb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D56496 — critson / ViewSVN
  13. [opaque pointer types] Cleanup CGBuilder's Create*GEP.

    Some of these functions take some extraneous arguments, e.g. EltSize,
    Offset, which are computable from the Type and DataLayout.

    Add some asserts to ensure that the computed values are consistent
    with the passed-in values, in preparation for eliminating the
    extraneous arguments. This also asserts that the Type is an Array for
    the calls named "Array" and a Struct for the calls named "Struct".

    Then, correct a couple of errors:

    1. Using CreateStructGEP on an array type. (this causes the majority
       of the test differences, as struct GEPs are created with i32
       indices, while array GEPs are created with i64 indices)

    2. Passing the wrong Offset to CreateStructGEP in TargetInfo.cpp on
       x86-64 NACL (which uses 32-bit pointers).

    Differential Revision: https://reviews.llvm.org/D57766 — jyknight / ViewSVN
  14. [scudo][standalone] Correct cmake copy/paste error

    Summary:
    I mistakenly used a SCUDO variable instead of SCUDO_STANDALONE one. The net
    result was that there were more architecture supported than I intended.
    Correct that, I'll add more architectures once the bots are enabled and
    green for x86.

    Reviewers: eugenis, vitalybuka

    Reviewed By: vitalybuka

    Subscribers: mgorny, delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D57897 — cryptoad / ViewSVN
  15. Revert r353416 "[DAG] Cleanup unused nodes on failed store-to-load forward combine."

    This cleanup causes out-of-tree crashes. — niravd / ViewSVN
  16. AMDGPU/GlobalISel: Fix shift legalization for non-power-of-2

    clampScalar doesn't do anything for non-power-of-2 in range.
    There should probably be a combination rule to reduce the number
    of matching rules. — arsenm / ViewSVN
  17. [clang-tidy][NFC] Fix typo.

    Fix placement of comma from previous (test) commit. — ymandel / ViewSVN
  18. [AMDGPU][MC] Added support of lds_direct operand

    See bug 39293: https://bugs.llvm.org/show_bug.cgi?id=39293

    Reviewers: artem.tamazov, rampitec

    Differential Revision: https://reviews.llvm.org/D57889 — dpreobra / ViewSVN
  19. [clang-tidy][NFC] Test commit. Add missing comma. — ymandel / ViewSVN
  20. AMDGPU/GlobalISel: Fix non-power-of-2 implicit_def — arsenm / ViewSVN
  21. [llvm-objcopy] Add few file processing directives

    Differential revision: https://reviews.llvm.org/D57877 — evgeny777 / ViewSVN
  22. [MIPS GlobalISel] Select any extending load and truncating store

    Make behavior of G_LOAD in widenScalar same as for G_ZEXTLOAD and
    G_SEXTLOAD. That is perform widenScalarDst to size given by the target
    and avoid additional checks in common code. Targets can reorder or add
    additional rules in LegalizeRuleSet for the opcode to achieve desired
    behavior.

    Select extending load that does not have specified type of extension
    into zero extending load.

    Select truncating store that stores number of bytes indicated by size
    in MachineMemoperand.

    Differential Revision: https://reviews.llvm.org/D57454 — petar.avramovic / ViewSVN
  23. gn build: Merge r353471, r353373. — nico / ViewSVN
  24. AMDGPU/GlobalISel: Don't use a copy in addrspacecast lowering — arsenm / ViewSVN
  25. [AMDGPU][MC][CODEOBJECT] Added predefined symbols to access GPU minor and stepping numbers

    Added the following Code Object v3 symbols:
        .amdgcn.gfx_generation_minor
        .amdgcn.gfx_generation_stepping

    Reviewers: artem.tamazov, kzhuravl

    Differential Revision: https://reviews.llvm.org/D57826 — dpreobra / ViewSVN
  26. [clangd] Fix an assertion in TypoCorrection.

    Summary: https://github.com/clangd/clangd/issues/7

    Reviewers: sammccall, hokein

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57944 — ioeric / ViewSVN
  27. [AMDGPU] Fix DPP combiner

    Differential revision: https://reviews.llvm.org/D55444

    dpp move with uses and old reg initializer should be in the same BB.
    bound_ctrl:0 is only considered when bank_mask and row_mask are fully enabled (0xF). Otherwise the old register value is checked for identity.
    Added add, subrev, and, or instructions to the old folding function.
    Kill flag is cleared for the src0 (DPP register) as it may be copied into more than one user.

    The pass is still disabled by default. — vpykhtin / ViewSVN
  28. [DWARF] LLVM ERROR: Broken function found, while removing Debug Intrinsics.

    Check that when SimplifyCFG is flattening a 'br', all their debug intrinsic instructions are removed, including any dbg.label referencing a label associated with the basic blocks being removed.

    Differential Revision: https://reviews.llvm.org/D57444 — carlos.alberto.enciso / ViewSVN
  29. Attempt to fix build bot after r353509 — evgeny777 / ViewSVN
  30. [llvm-objcopy] Add --redefine-syms

    Differential revision: https://reviews.llvm.org/D57738 — evgeny777 / ViewSVN
  31. Revert r353424 "[llvm-ar][libObject] Fix relative paths when nesting thin archives."

    This broke the Chromium build on Windows, see https://crbug.com/930058

    > Summary:
    > When adding one thin archive to another, we currently chop off the relative path to the flattened members. For instance, when adding `foo/child.a` (which contains `x.txt`) to `parent.a`, whe
    > lattening it we should add it as `foo/x.txt` (which exists) instead of `x.txt` (which does not exist).
    >
    > As a note, this also undoes the `IsNew` parameter of handling relative paths in r288280. The unit test there still passes.
    >
    > This was reported as part of testing the kernel build with llvm-ar: https://patchwork.kernel.org/patch/10767545/ (see the second point).
    >
    > Reviewers: mstorsjo, pcc, ruiu, davide, david2050
    >
    > Subscribers: hiraditya, llvm-commits
    >
    > Tags: #llvm
    >
    > Differential Revision: https://reviews.llvm.org/D57842

    This reverts commit bf990ab5aab03aa0aac53c9ef47ef264307804ed. — hans / ViewSVN
  32. [MIPS GlobalISel] Select mul

    Legalize and select G_MUL for s32 and smaller types for MIPS32.

    Differential Revision: https://reviews.llvm.org/D57816 — petar.avramovic / ViewSVN

#278 (Feb 8, 2019 1:29:37 AM)

  1. [ASTImporter][ASTImporterSpecificLookup] Add test for different operators

    Summary:
    This is to check that operators are handled properly in
    `ASTImporterSpecificLookup`.  Note, this lookup table is not used in LLDB, only
    in CTU.

    Reviewers: a_sidorin, shafik, a.sidorin

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57905 — martong / ViewSVN
  2. [AST] Fix structural inequivalence of operators

    Summary: Operators kind was not checked, so we reported e.g. op- to be equal with op+

    Reviewers: shafik, a_sidorin, aaron.ballman

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57902 — martong / ViewSVN
  3. [LoopSimplifyCFG] Use DTU.applyUpdates instead of insert/deleteEdge

    `insert/deleteEdge` methods in DTU can make updates incorrectly in some cases
    (see https://bugs.llvm.org/show_bug.cgi?id=40528), and it is recommended to
    use `applyUpdates` methods instead when it is needed to make a mass update in CFG.

    Differential Revision: https://reviews.llvm.org/D57316
    Reviewed By: kuhar — mkazantsev / ViewSVN
  4. [ARM] Add OptMinSize to ARMSubtarget
       
    In many places in the backend, we like to know whether we're
    optimising for code size and this is performed by checking the
    current machine function attributes. A subtarget is created on a
    per-function basis, so it's possible to know when we're compiling for
    code size on construction so record this in the new object.

    Differential Revision: https://reviews.llvm.org/D57812 — sam_parker / ViewSVN
  5. [CodeExtractor] Update function's assumption cache after extracting blocks from it

    Summary: Assumption cache's self-updating mechanism does not correctly handle the case when blocks are extracted from the function by the CodeExtractor. As a result function's assumption cache may have stale references to the llvm.assume calls that were moved to the outlined function. This patch fixes this problem by removing extracted llvm.assume calls from the function’s assumption cache.

    Reviewers: hfinkel, vsk, fhahn, davidxl, sanjoy

    Reviewed By: hfinkel, vsk

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57215 — sdmitriev / ViewSVN
  6. [WebAssembly] Fix parseImmediate's memory alignment requirement

    This fixes the current failure in the x86-64 ubsan bot caused by
    r353496. — aheejin / ViewSVN
  7. [GISel]: While constructing the GISelWorklist make sure we reserve at least the required size to the underlying dense map.

    https://reviews.llvm.org/D57931

    This should save some unnecessary growing of the DenseMap. — aditya_nandakumar / ViewSVN
  8. AMDGPU/GlobalISel: Legalize addrspacecast

    Use a placeholder constant for now on targets
    that need the load from the queue ptr. — arsenm / ViewSVN
  9. [WebAssembly] Fixed Disassembler ignoring endian swap on big endian.

    Summary: This fixes: https://bugs.llvm.org/show_bug.cgi?id=40620

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57933 — aardappel / ViewSVN
  10. Variable auto-init: fix __block initialization

    Summary:
    Automatic initialization [1] of __block variables was trampling over the block's
    headers after they'd been initialized, which caused self-init usage to crash,
    such as here:

      typedef struct XYZ { void (^block)(); } *xyz_t;
      __attribute__((noinline))
      xyz_t create(void (^block)()) {
        xyz_t myself = malloc(sizeof(struct XYZ));
        myself->block = block;
        return myself;
      }
      int main() {
        __block xyz_t captured = create(^(){ (void)captured; });
      }

    This type of code shouldn't be broken by variable auto-init, even if it's
    sketchy.

    [1] With -ftrivial-auto-var-init=pattern

    <rdar://problem/47798396>

    Reviewers: rjmccall, pcc, kcc

    Subscribers: jkorous, dexonsmith, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57797 — jfb / ViewSVN
  11. [libFuzzer] refactor the way we choose the element to cross-over with, NFC (expected1); add a flag -seed_inputs= to pass extra seed inputs as file paths, not dirs — kcc / ViewSVN
  12. [COFF, ARM64] Fix types for _ReadStatusReg, _WriteStatusReg

    r344765 added those intrinsics, but used the wrong types.

    Patch by Mike Hommey

    Differential Revision: https://reviews.llvm.org/D57636 — efriedma / ViewSVN
  13. Fix the lowering issue of intrinsics llvm.localaddress on X86

    Patch by Yuanke Luo

    Reviewers: craig.topper, annita.zhang, smaslov, rnk, wxiao3

    Reviewed By: rnk

    Subscribers: efriedma, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57501 — ctopper / ViewSVN
  14. lvm-dwarfdump: Stop counting out-of-line subprogram in the "inlined functions" statistic.

    DW_TAG_subprogram DIEs should not be counted in the inlined function statistic. This also addresses the source variables count, as that uses the inlined function count in its calculations.

    Differential revision: https://reviews.llvm.org/D57849 — ctice / ViewSVN
  15. [NFC] Variable auto-init: use getAsVariableArrayType helper

    As suggested by @rjmccall in D57797. — jfb / ViewSVN
  16. [X86] Add FPCW as a register and start using it as an implicit use on floating point instructions.

    Summary:
    FPCW contains the rounding mode control which we manipulate to implement fp to integer conversion by changing the roudning mode, storing the value to the stack, and then changing the rounding mode back. Because we didn't model FPCW and its dependency chain, other instructions could be scheduled into the middle of the sequence.

    This patch introduces the register and adds it as an implciit def of FLDCW and implicit use of the FP binary arithmetic instructions and store instructions. There are more instructions that need to be updated, but this is a good start. I believe this fixes at least the reduced test case from PR40529.

    Reviewers: RKSimon, spatel, rnk, efriedma, andrew.w.kaylor

    Subscribers: dim, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57735 — ctopper / ViewSVN
  17. [libFuzzer] add a test for built-in CrossOver (there are unit tests for this, but it's worth having a full integration test like this) — kcc / ViewSVN

#277 (Feb 7, 2019 4:32:49 PM)

  1. [AArch64] Fix condition for "high-vector" DUP optimizations.

    AArch64 NEON has a bunch of instructions with a "2" suffix that extract
    the top half of the source vectors, instead of the bottom half.  We have
    some DAGCombines to try to take advantage of that.  However, they
    assumed that any EXTRACT_VECTOR was extracting the high half of the
    vector in question.

    This issue has apparently existed since the AArch64 backend was merged.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=40632 .

    Differential Revision: https://reviews.llvm.org/D57862 — efriedma / ViewSVN
  2. Silence -Wformat warnings about GetLastError returning ULONG — rnk / ViewSVN
  3. Commit macro intended to be included in r353483. — rnk / ViewSVN
  4. [compiler rt] Win64 GetInstructionSize additional register MOV + stack alignment AND

    Current interception code does not cover all of the required registers
    on Windows for a specific flavor of MOV, so this patch adds cases to
    identify the following 5-byte instructions on 64-bit Windows:

    mov QWORD PTR [rsp + XX], rdx  <- second integer argument
    mov QWORD PTR [rsp + XX], r9    <- third integer argument
    mov QWORD PTR [rsp + XX], r8    <- fourth integer argument

    The instruction for MOV [...] RCX is already covered in the previous
    version.

    Patch by Matthew McGovern!

    Reviewers: rnk

    Differential Revision: https://reviews.llvm.org/D57339 — rnk / ViewSVN
  5. [safestack] Explain why tinfo at the end of the buffer

    Reviewers: pcc, eugenis, vlad.tsyrklevich

    Reviewed By: vlad.tsyrklevich

    Subscribers: llvm-commits, jfb, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D57863 — Vitaly Buka / ViewSVN
  6. [safestack] Remove pageSize

    Summary:
    3rd party sysconf interceptor may crash if it's called before unsafe_stack_setup

    However pageSize is not useful here. mmap should round up on it's own, SFS_CHECK can be removed.

    Reviewers: eugenis, vlad.tsyrklevich

    Subscribers: #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D57924 — Vitaly Buka / ViewSVN
  7. [mips][micromips] Fix how values in .gcc_except_table are calculated

    When a landing pad is calculated in a program that is compiled for micromips
    with -fPIC flag, it will point to an even address.
    Such an error will cause a segmentation fault, as the instructions in
    micromips are aligned on odd addresses. This patch sets the last bit of the
    offset where a landing pad is, to 1, which will effectively be an odd
    address and point to the instruction exactly.

    r344591 fixed this issue for -static compilation.

    Patch by Aleksandar Beserminji.

    Differential Revision: https://reviews.llvm.org/D57677 — petarj / ViewSVN
  8. bpf: teach BPF driver about the new CPU "v3"

    This patch simply teach BPF driver about the new CPU "v3" introduced in
    LLVM backend.

    Acked-by: Yonghong Song <yhs@fb.com>
    Signed-off-by: Jiong Wang <jiong.wang@netronome.com> — jiwang / ViewSVN
  9. [x86] fix formatting; NFC — spatel / ViewSVN
  10. [WebAssembly] Update test output after rL353474. NFC. — djg / ViewSVN
  11. [safestack] Don't crash if stack size is not aligned as expected

    Summary:
    From runtime side looks it's OK to RoundUpTo to needed alignment as buffer is
    going to be RoundUpTo to page size anyway.

    Reviewers: eugenis, pcc

    Subscribers: #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D57866 — Vitaly Buka / ViewSVN
  12. [WebAssembly] Fix imported function symbol names that differ from their import names in the .o format

    Add a flag to allow symbols to have a wasm import name which differs from the
    linker symbol name, allowing the linker to link code using the import_module
    attribute.

    This is the MC/Object portion of the patch.

    Differential Revision: https://reviews.llvm.org/D57632 — djg / ViewSVN
  13. [InstCombine] Optimize `atomicrmw <op>, 0` into `load atomic` when possible

    This commit teaches InstCombine how to replace an atomicrmw operation
    into a simple load atomic.
    For a given `atomicrmw <op>`, this is possible when:
    1. The ordering of that operation is compatible with a load (i.e.,
       anything that doesn't have a release semantic).
    2. <op> does not modify the value being stored

    Differential Revision: https://reviews.llvm.org/D57854 — qcolombet / ViewSVN
  14. gn build: Make check-{clang,lld,llvm} pass on FreeBSD.

    Mostly achieved by assuming that anything that isn't Win or Mac is ELF,
    which seems reasonable enough for now.

    Differential Revision: https://reviews.llvm.org/D57870 — pcc / ViewSVN
  15. [LV] Remove unnecessary assignment to UserIC. — fhahn / ViewSVN
  16. [InstCombine] Fix crashing from (icmp (bitcast ([su]itofp X)), Y)

    This fixes a class of bugs introduced by D44367,
    which transforms various cases of icmp (bitcast ([su]itofp X)), Y to icmp X, Y.
    If the bitcast is between vector types with a different number of elements,
    the current code will produce bad IR along the lines of: icmp <N x i32> ..., <M x i32> <...>.

    This patch suppresses the transform if the bitcast changes the number of vector elements.

    Patch by: @AndrewScheidecker (Andrew Scheidecker)

    Differential Revision: https://reviews.llvm.org/D57871 — spatel / ViewSVN
  17. Move SMTSolver dump() methods out-of-line.

    This broke modularized non-local-submodule-visibility builds because
    the function bodies pulled in extra dependencies. — Adrian Prantl / ViewSVN
  18. [CodeGen] Handle vector UADDO, SADDO, USUBO, SSUBO

    This is part of https://bugs.llvm.org/show_bug.cgi?id=40442.

    Vector legalization is implemented for the add/sub overflow opcodes.
    UMULO/SMULO are also handled as far as legalization is concerned, but
    they don't support vector expansion yet (so no tests for them).

    The vector result widening implementation is suboptimal, because it
    could result in a legalization loop.

    Differential Revision: https://reviews.llvm.org/D57639 — nikic / ViewSVN
  19. [cmake] Pass LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN to NATIVE configure

    We should propagate this down to host builds so that e.g. people using
    an optimized tablegen can do the sub-configure successfully. — smeenai / ViewSVN
  20. [InstCombine] refactor folds for (icmp (bitcast X), Y); NFCI — spatel / ViewSVN
  21. [LV] Prevent interleaving if computeMaxVF returned None.

    As discussed in D57382, interleaving should be avoided if computeMaxVF
    returns None, same as we currently do for vectorization.

    Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6477

    Reviewers: Ayal, dcaballe, hsaito, mkuper, rengolin

    Reviewed By: Ayal

    Differential Revision: https://reviews.llvm.org/D57837 — fhahn / ViewSVN
  22. GlobalISel: Try to fix bot failures

    Don't rely on order of evaluation of function arguments. — arsenm / ViewSVN
  23. [Sema][ObjC] Disallow non-trivial C struct fields in unions.

    This patch fixes a bug where clang doesn’t reject union fields of
    non-trivial C struct types. For example:

    ```
    // This struct is non-trivial under ARC.
    struct S0 {
      id x;
    };

    union U0 {
      struct S0 s0; // clang should reject this.
      struct S0 s1; // clang should reject this.
    };

    void test(union U0 a) {
      // Previously, both 'a.s0.x' and 'a.s1.x' were released in this
      // function.
    }
    ```

    rdar://problem/46677858

    Differential Revision: https://reviews.llvm.org/D55659 — ahatanak / ViewSVN
  24. [DAGCombiner] (add (umax X, C), -C) --> (usubsat X, C) (PR40111)

    Move the (add (umax X, C), -C) --> (usubsat X, C) X86 combine into generic DAGCombiner

    First of a number of saturated arithmetic folds that can be moved out of X86-specific code for PR40111.

    Differential Revision: https://reviews.llvm.org/D57754 — rksimon / ViewSVN
  25. [SEMA]Generalize deferred diagnostic interface, NFC.

    Summary:
    Deferred diagnostic interface is going to be used for OpenMP device
    compilation. Generalized previously existed deferred diagnostic
    interface for CUDA to be used with OpenMP and, possibly, other models.

    Reviewers: rjmccall, tra

    Subscribers: caomhin, cfe-commits, kkwli0

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57908 — abataev / ViewSVN
  26. GlobalISel: Implement narrowScalar for shift main type

    This is pretty much directly ported from SelectionDAG. Doesn't include
    the shift by non-constant but known bits version, since there isn't a
    globalisel version of computeKnownBits yet.

    This shows a disadvantage of targets not specifically which type
    should be used for the shift amount. If type 0 is legalized before
    type 1, the operations on the shift amount type use the wider type
    (which are also less likely to legalize). This can be avoided by
    targets specifying legalization actions on type 1 earlier than for
    type 0. — arsenm / ViewSVN
  27. AMDGPU/GlobalISel: Restrict g_implicit_def legality — arsenm / ViewSVN
  28. Add static_asserts to tuple's comparison operators to enforce the requirement that the tuples be the same size. See PR39183 for an example where we give unexpected results for this bad input case. With this change, we will reject it at compile-time — marshall / ViewSVN
  29. GlobalISel: Fix artifact combiner constant legality checks for vectors

    Since G_CONSTANT is illegal for vectors, this needs to check
    what buildConstant will produce for a splat vector. — arsenm / ViewSVN
  30. Add UBSAN annotation to __hash_table::rehash; we don't do anything wrong, but UBSAN's checker flags it as suspicious. See PR38606. NFC — marshall / ViewSVN
  31. AMDGPU/GlobalISel: Don't use g_implicit_def in a few tests — arsenm / ViewSVN
  32. Revert "[DAG] Cleanup of unused node in SimplifySelectCC."

    Causes ASAN use-after-poison errors. — niravd / ViewSVN
  33. [InstrProf] Avoid reconstructing Triple, NFC — rnk / ViewSVN
  34. AMDGPU/GlobalISel: Legalize fsqrt — arsenm / ViewSVN
  35. AMDGPU/GlobalISel: Legalize some f16 operations — arsenm / ViewSVN
  36. [InstrProf] Port test suite to Windows

    Summary:
    Before this change, check-profile would run, but all tests would be
    marked unsupported on Windows. This is the new status of 'check-profile'
    after this change:

    Testing Time: 6.66s
      Expected Passes    : 29
      Expected Failures  : 5
      Unsupported Tests  : 39

    I moved many tests that exercise posix-y features like dlopen and DSOs
    into the Posix subdirectory, and ran the tests on Linux to validate my
    changes.

    These are the remaining tests that I handled on a case by case basis:
    - instrprof-path.c
      Passes, Fixed some path portability issues
    - instrprof-gcov-exceptions.test
      Passes, the FileCheck actually succeeds on Windows, so I RUNX'd it
    - instrprof-icall-promo.test
      XFAILed, probably due to C++ ABI differences in vtables
    - instrprof-merge-match.test
    - instrprof-merge.c
    - instrprof-merging.cpp
      XFAILed, These seem like real bugs that need fixing
    - instrprof-version-mismatch.c
      XFAILed, Overriding the weak version symbol doesn't work
    - instrprof-without-libc.c
      UNSUPPORTED, test needs an executable symbol table, Windows has none

    Reviewers: davidxl, wmi, void

    Subscribers: fedor.sergeev, #sanitizers, llvm-commits

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D57853 — rnk / ViewSVN
  37. [HotColdSplit] With PGO add profile entry metadata to split cold function

    Summary:
    When compiling with profile data, ensure the split cold function gets
    cold function_entry_count metadata (just use 0 since it should be cold).
    Otherwise with function sections it will not be placed in the unlikely
    text section with other cold code.

    Reviewers: vsk

    Subscribers: sebpop, hiraditya, davidxl, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57900 — tejohnson / ViewSVN
  38. [DAGCombiner] fold add/sub with bool operand based on target's boolean contents
     
    I noticed that we are missing this canonicalization in IR:
    rL352515
    ...and then realized that we don't get this right in SDAG either,
    so this has to be fixed first regardless of what we choose to do in IR.

    The existing fold was limited to scalars and using the wrong predicate
    to guard the transform. We have a boolean contents TLI query that can
    be used to decide which direction to fold.

    This may eventually lead back to the problems/question in:
    https://bugs.llvm.org/show_bug.cgi?id=40486
    ...but it makes no difference to that yet.

    Differential Revision: https://reviews.llvm.org/D57401 — spatel / ViewSVN
  39. GlobalISel: Implement fewerElementsVector for shifts

    Introduce a new function which handles instructions with multiple type
    indices, but have the same number of vector elements.

    Also legalize v2s16 shifts when applicable. — arsenm / ViewSVN
  40. [OpenCL][PR40603] In C++ preserve compatibility with OpenCL C v2.0

    Valid OpenCL C code should still compile in C++ mode.

    This change enables extensions and OpenCL types.

    Differential Revision: https://reviews.llvm.org/D57824 — stulova / ViewSVN
  41. GlobalISel: Try to make legalize rules more useful for vectors

    Mostly keep the existing functions on scalars, but add versions which
    also operate based on the vector element size. — arsenm / ViewSVN
  42. [DAG] Cleanup of unused node in SimplifySelectCC. — niravd / ViewSVN
  43. [x86] split more 256/512-bit shuffles in lowering
     
    This is intentionally a small step because it's hard to know exactly
    where we might introduce a conflicting transform with the code that
    tries to form wider shuffles. But I think this is safe - if we have
    a wide shuffle with 2 operands, then we should do better with an
    extract + narrow shuffle.

    Differential Revision: https://reviews.llvm.org/D57867 — spatel / ViewSVN
  44. [DAG] Cleanup unused node on failed SELECT Combine. — niravd / ViewSVN
  45. [ASTImporter] Refactor unittests to be able to parameterize them in a more flexible way

    Summary:
    Currently `TestImportBase` is derived from `ParameterizedTestsFixture`
    which explicitly states that the gtest parameter can be only an
    `ArgVector`. This is a limitation when we want to create tests which may
    have different parameters.
    E.g. we would like to create tests where we can combine different test
    parameters. So, for example we'd like gtest to be able to provide
    parameters of `<std::tuple<ArgVector, const char *>` instead of a simple
    `ArgVector`.

    Reviewers: a_sidorin, shafik, a.sidorin

    Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57322 — martong / ViewSVN
  46. [llvm-ar][libObject] Fix relative paths when nesting thin archives.

    Summary:
    When adding one thin archive to another, we currently chop off the relative path to the flattened members. For instance, when adding `foo/child.a` (which contains `x.txt`) to `parent.a`, when flattening it we should add it as `foo/x.txt` (which exists) instead of `x.txt` (which does not exist).

    As a note, this also undoes the `IsNew` parameter of handling relative paths in r288280. The unit test there still passes.

    This was reported as part of testing the kernel build with llvm-ar: https://patchwork.kernel.org/patch/10767545/ (see the second point).

    Reviewers: mstorsjo, pcc, ruiu, davide, david2050

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57842 — rupprecht / ViewSVN
  47. [clangd] Mention indexing in docs.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57392 — kadircet / ViewSVN
  48. [clangd] Reduce number of threads used by BackgroundIndex to number of physical cores.

    Summary:
    clangd is using as many threads as logical cores for BackgroundIndex
    by default. We observed that it increases latency of foreground tasks.

    This patch aims to change that default to number of physical cores to get rid of
    that extra latency.

    Reviewers: ilya-biryukov

    Reviewed By: ilya-biryukov

    Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57819 — kadircet / ViewSVN
  49. [clangd] Fix an assertion failure in Selection.

    Summary:
    The assertion is triggered when the Decl is null.

    Details for the assertion:

    F0207 09:55:09.069385   47308 logging.cc:84] assert.h assertion failed at llvm/include/llvm/Support/Casting.h:105 in static bool llvm::isa_impl_cl<clang::TranslationUnitDecl, const clang::      Decl *>::doit(const From *) [To = clang::TranslationUnitDecl, From = const clang::Decl *]: Val && "isa<> used on a null pointer"
    15 *** Check failure stack trace: ***
    19     @     0x55615c1f7e06  __assert_fail
    20     @     0x55615a6297d8  clang::clangd::(anonymous namespace)::SelectionVisitor::TraverseDecl()
    21     @     0x55615a62f48d  clang::RecursiveASTVisitor<>::TraverseTemplateTemplateParmDecl()
    22     @     0x55615a62b264  clang::RecursiveASTVisitor<>::TraverseDecl()
    23     @     0x55615a62979c  clang::clangd::(anonymous namespace)::SelectionVisitor::TraverseDecl()
    24     @     0x55615a63060c  clang::RecursiveASTVisitor<>::TraverseClassTemplatePartialSpecializationDecl()
    25     @     0x55615a62ae45  clang::RecursiveASTVisitor<>::TraverseDecl()

    Reviewers: sammccall

    Subscribers: javed.absar, kristof.beyls, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57879 — hokein / ViewSVN
  50. [scudo][standalone] Do not error out on spurious C(XX) flags

    Summary:
    The standalone Scudo version is being built with `-Werror` which can be
    tripped by extraneous command line arguments. We have little control over
    those as they can be passed down to us by `CMAKE_C(XX)_FLAGS`, the reported
    scenario involving `-stdlib=libc++` (see https://reviews.llvm.org/D57412#1384504).

    To work around this, disable `-Wunused-command-line-argument`.

    Reviewers: eugenis, vitalybuka, Eugene.Zelenko

    Reviewed By: eugenis

    Subscribers: mgorny, delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D57757 — cryptoad / ViewSVN
  51. [X86] Simplify casing. NFC. — niravd / ViewSVN
  52. [DAG] Cleanup unused nodes on failed store-to-load forward combine. — niravd / ViewSVN
  53. [ELF] Format lines inadvertently indented by rCTE353380 — maskray / ViewSVN
  54. [clangd] Use Dex for dynamic index by default.

    Summary:
    Memory usage for a sample TU:
      Without Dex: 17.9M
      With    Dex: 24.4M

    The memory increase is considerable but seems tolerable.

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57878 — ioeric / ViewSVN
  55. [CodeView] Fix cycles in debug info when merging Types with global hashes

    When type streams with forward references were merged using GHashes, cycles
    were introduced in the debug info. This was caused by
    GlobalTypeTableBuilder::insertRecordAs() not inserting the record on the second
    pass, thus yielding an empty ArrayRef at that record slot. Later on, upon PDB
    emission, TpiStreamBuilder::commit() would skip that empty record, thus
    offseting all indices that came after in the stream.

    This solution comes in two steps:

    1. Fix the hash calculation, by doing a multiple-step resolution, iff there are
    forward references in the input stream.
    2. Fix merge by resolving with multiple passes, therefore moving records with
    forward references at the end of the stream.

    This patch also adds support for llvm-readoj --codeview-ghash.
    Finally, fix dumpCodeViewMergedTypes() which previously could reference deleted
    memory.

    Fixes PR40221

    Differential Revision: https://reviews.llvm.org/D57790 — aganea / ViewSVN

#276 (Feb 7, 2019 7:16:17 AM)

  1. Fix r350643 to limit COFF emission to <= 32 BYTES instead of BITS.

    The patch in r350643 incorrectly sets the COFF emission based on bits
    instead of bytes. This patch converts the 32 via CharUnits to bits to
    compare the correct values.

    Change-Id: Icf38a16470ad5ae3531374969c033557ddb0d323 — erichkeane / ViewSVN
  2. Fix misspelled filenames in file headers — maskray / ViewSVN
  3. tsan: add more benchmarks

    func_entry_exit.cc is for __tsan_func_entry/exit (spends ~75% there),
    we don't yet have any.
    mop.cc is for memory access functions, as compared to mini_bench_local/shared.cc
    this benchmark passes through deduplication logic (ContainsSameAccess). — dvyukov / ViewSVN
  4. [LSR] Generate cross iteration indexes
       
    Modify GenerateConstantOffsetsImpl to create offsets that can be used
    by indexed addressing modes. If formulae can be generated which
    result in the constant offset being the same size as the recurrence,
    we can generate a pre-indexed access. This allows the pointer to be
    updated via the single pre-indexed access so that (hopefully) no
    add/subs are required to update it for the next iteration. For small
    cores, this can significantly improve performance DSP-like loops.

    Differential Revision: https://reviews.llvm.org/D55373 — sam_parker / ViewSVN
  5. [clang-cl] support /Oy- on aarch64

    MSVC supports /Oy- on aarch64, so clang-cl should too.

    Patch by Nathan Froyd!

    Differential Revision: https://reviews.llvm.org/D57838 — mstorsjo / ViewSVN
  6. tsan: Optimize performance of Thread sanitizer memory access functions

    - Manually unwind code in MemoryAccessImpl1() because clang do not optimize it
    - Check for .rodata section only in read operations
    - Place LIKELY/UNLIKELY on fast paths

    This speeds up synthetic memory access benchmarks by 10-20%.

    [dvyukov: fixed up consts in check_analyze.sh]

    Author: yuri (Yuri Per)
    Reviewed in: https://reviews.llvm.org/D57882
    Context: https://reviews.llvm.org/D54889 — dvyukov / ViewSVN
  7. Typo: s/follwing/following — hans / ViewSVN
  8. [ARM GlobalISel] Support G_ICMP for Thumb2

    Mark as legal and use the t2* equivalents of the arm mode instructions,
    e.g. t2CMPrr instead of plain CMPrr. — rovka / ViewSVN
  9. sanitizers: Introduce ThreadType enum

    Replace bool workerthread flag with ThreadType enum.
    This change is preparation for fiber support.

    [dvyukov: fixed build of sanitizer_thread_registry_test.cc]

    Author: yuri (Yuri Per)
    Reviewed in: https://reviews.llvm.org/D57839
    Context: https://reviews.llvm.org/D54889 — dvyukov / ViewSVN
  10. [clang-tidy] Fixed a std::bind() transformation

    There was an extra semicolon that was somehow working in some contexts.

    Patch by oleg.smolsky. — jonastoth / ViewSVN
  11. [ARM] Reformat isRedundantFlagInstr for D57833. NFC — dmgreen / ViewSVN
  12. tsan: Implement pthread_exit() interceptor for Thread sanitizer

    This change is preparation for fiber support.

    Author: yuri (Yuri Per)
    Reviewed in: https://reviews.llvm.org/D57876
    Context: https://reviews.llvm.org/D54889 — dvyukov / ViewSVN
  13. [BPF] add code-gen support for JMP32 instructions

    JMP32 instructions has been added to eBPF ISA. They are 32-bit variants of
    existing BPF conditional jump instructions, but the comparison happens on
    low 32-bit sub-register only, therefore some unnecessary extensions could
    be saved.

    JMP32 instructions will only be available for -mcpu=v3. Host probe hook has
    been updated accordingly.

    JMP32 instructions will only be enabled in code-gen when -mattr=+alu32
    enabled, meaning compiling the program using sub-register mode.

    For JMP32 encoding, it is a new instruction class, and is using the
    reserved eBPF class number 0x6.

    This patch has been tested by compiling and running kernel bpf selftests
    with JMP32 enabled.

    Acked-by: Yonghong Song <yhs@fb.com>
    Signed-off-by: Jiong Wang <jiong.wang@netronome.com> — jiwang / ViewSVN
  14. AArch64: implement copy for paired GPR registers.

    When doing 128-bit atomics using CASP we might need to copy a GPRPair to a
    different register, but that was unimplemented up to now. — Tim Northover / ViewSVN
  15. [clang-tidy] Expand and clarify the NOLINT documentation a bit. — alexfh / ViewSVN
  16. [clangd] Suggest adding missing includes for typos (like include-fixer).

    Summary:
    This adds include-fixer feature into clangd based on D56903. Clangd now captures
    diagnostics caused by typos and attach include insertion fixes to potentially
    fix the typo.

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: cfe-commits, kadircet, arphaman, mgrang, jkorous, MaskRay, javed.absar, ilya-biryukov, mgorny

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57021 — ioeric / ViewSVN
  17. [sanitizer] Fix Android tests

    On Android some fields can be null — Vitaly Buka / ViewSVN
  18. [CMake] Mark runtime library link libraries as private

    There's no need to expose these dependencies to consumers. This
    matches the change made to other runtimes in D57456.

    Differential Revision: https://reviews.llvm.org/D57873 — phosek / ViewSVN
  19. [BranchFolding] Remove dead code for handling EHPad blocks

    Summary: This code tries to handle the case where IBB is an EHPad, but there's an earlier check that uses PBB->hasEHPadSuccessor(). Where PBB is a predecessor of IBB. The hasEHPadSuccessor function would have visited IBB and seen that it was an EHPad and returned false. This would prevent us from reaching this code with IBB as an EHPad.

    Looks like this code was originally added in rL37427 (ancient) and made dead in rL143001.

    Reviewers: rnk, void, efriedma

    Reviewed By: rnk

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D57358 — ctopper / ViewSVN

#275 (Feb 6, 2019 10:06:47 PM)

  1. Bump minimum toolchain version

    Summary:
    The RFC on moving past C++11 got good traction:
      http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

    This patch therefore bumps the toolchain versions according to our policy:
      llvm.org/docs/DeveloperPolicy.html#toolchain

    Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

    Differential Revision: https://reviews.llvm.org/D57264 — jfb / ViewSVN
  2. Move the SMT API to LLVM

    Moved everything SMT-related to LLVM and updated the cmake scripts.

    Differential Revision: https://reviews.llvm.org/D54978 — mramalho / ViewSVN
  3. Moved the whole SMT API to a single file. NFC.

    There is no advantage in having them in separate files, I doubt some will ever use them separately.

    This also makes it easier to move the API to LLVM.

    Differential Revision: https://reviews.llvm.org/D54977 — mramalho / ViewSVN
  4. Got rid of the `Z3ConstraintManager` class

    Now, instead of passing the reference to a shared_ptr, we pass the shared_ptr instead.

    I've also removed the check if Z3 is present in CreateZ3ConstraintManager as this function already calls CreateZ3Solver that performs the exactly same check.

    Differential Revision: https://reviews.llvm.org/D54976 — mramalho / ViewSVN
  5. Generalised the SMT state constraints

    This patch moves the ConstraintSMT definition to the SMTConstraintManager header to make it easier to move the Z3 backend around.

    We achieve this by not using shared_ptr  anymore, as llvm::ImmutableSet doesn't seem to like it.

    The solver specific exprs and sorts are cached in the Z3Solver object now and we move pointers to those objects around.

    As a nice side-effect, SMTConstraintManager doesn't have to be a template anymore. Yay!

    Differential Revision: https://reviews.llvm.org/D54975 — mramalho / ViewSVN
  6. gn build: Merge the test part of r353237. — pcc / ViewSVN
  7. [WebAssembly] Update test output after rL353357. NFC. — sbc / ViewSVN
  8. Add OpenBSD support to be able to get the thread name — brad / ViewSVN
  9. [sanitizer] Re-enabled getpw_getgr.cc on Android

    Reviewers: eugenis

    Subscribers: srhines, kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D57785 — Vitaly Buka / ViewSVN
  10. [sanitizer] Remove unneeded pointer check

    Summary: unpoison_passwd and unpoison_group support nullptrs

    Reviewers: eugenis

    Subscribers: kubamracek, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D57784 — Vitaly Buka / ViewSVN
  11. [WebAssembly] Add symbol flag to the binary format llvm.used

    Summary:
    Rather than add a new attribute
    See https://github.com/WebAssembly/tool-conventions/issues/64

    Subscribers: dschuff, jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57864 — sbc / ViewSVN
  12. Fix a minor grammar thinko. — echristo / ViewSVN
  13. [WebAssembly] Expand symbol flags shown by llvm-objdump --symbols

    Differential Revision: https://reviews.llvm.org/D57861 — sbc / ViewSVN
  14. [opaque pointer types] Make EmitCall pass Function Types to
    CreateCall/Invoke.

    Also, remove the getFunctionType() function from CGCallee, since it
    accesses the pointee type of the value. The only use was in EmitCall,
    so just inline it into the debug assertion.

    This is the last of the changes for Call and Invoke in clang.

    Differential Revision: https://reviews.llvm.org/D57804 — jyknight / ViewSVN
  15. [opaque pointer types] Pass through function types for TLS
    initialization and global destructor calls.

    Differential Revision: https://reviews.llvm.org/D57801 — jyknight / ViewSVN
  16. [cmake] Drop clang-tools-extra from LLVM_ALL_PROJECTS

    We iterate over the list and only enable projects from that list that
    are present in LLVM_ENABLE_PROJECTS and disable all other projects. Most
    users will only specify clang in LLVM_ENABLE_PROJECTS and expect
    clang-tools-extra to be implicitly enabled, so remove clang-tools-extra
    from LLVM_ALL_PROJECTS so that it doesn't get disabled instead. — smeenai / ViewSVN
  17. [analyzer] Canonicalize declarations within variable regions.

    Memory region that correspond to a variable is identified by the variable's
    declaration and, in case of local variables, the stack frame it belongs to.

    The declaration needs to be canonical, otherwise we'd have two different
    memory regions that correspond to the same variable.

    Fix such bug for global variables with forward declarations and assert
    that no other problems of this kind happen.

    Differential Revision: https://reviews.llvm.org/D57619 — dergachev / ViewSVN
  18. Remove reference to non-existent function. NFC.

    This comment is old. The code in question was removed in rL203174

    Differential Revision: https://reviews.llvm.org/D57856 — sbc / ViewSVN
  19. [sanitizer] Don't unpoison buffer in getpw/getgr functions

    Summary:
    Buffer should be referenced by results so used parts will be unpoisoned with unpoison_group and unpoison_passwd.

    This fixes TSAN performance issue made us to disable this interceptors.

    Reviewers: eugenis, dvyukov

    Subscribers: srhines, kubamracek, krytarowski, #sanitizers

    Tags: #sanitizers

    Differential Revision: https://reviews.llvm.org/D57731 — Vitaly Buka / ViewSVN
  20. Revert "[analyzer] Remove the "postponed" hack, deal with derived symbols..."

    This reverts commit r341722.

    The "postponed" mechanism turns out to be necessary in order to handle
    situations when a symbolic region is only kept alive by implicit bindings
    in the Store. Otherwise the region is never scanned by the Store's worklist
    and the binding gets dropped despite being live, as demonstrated
    by the newly added tests.

    Differential Revision: https://reviews.llvm.org/D57554 — dergachev / ViewSVN
  21. [llvm-ar] Remove leading slash when printing thin archive members

    Reviewers: ruiu

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57845 — rupprecht / ViewSVN
  22. [cmake] Add all subprojects to LLVM_ALL_PROJECTS

    Make LLVM_ALL_PROJECTS reflect all top-level directories in the monorepo
    rather than an arbitrary subset. clang-tools-extra is technically
    unnecessary since it gets enabled by clang, but having it there for
    consistency shouldn't hurt either.

    Differential Revision: https://reviews.llvm.org/D57843 — smeenai / ViewSVN
  23. [PowerPC] Add vector truncate test to prep for D56507 NFC — froese / ViewSVN
  24. [cmake] Add openmp to LLVM_ALL_PROJECTS

    It'll get ignored in LLVM_ENABLE_PROJECTS after r353148 otherwise. — smeenai / ViewSVN

#274 (Feb 6, 2019 12:55:21 PM)

  1. [libObject][NFC] Include filename in error message — rupprecht / ViewSVN
  2. [LICM/MSSA] Add promotion to scalars by building an AliasSetTracker with MemorySSA.

    Summary:
    Experimentally we found that promotion to scalars carries less benefits
    than sinking and hoisting in LICM. When using MemorySSA, we build an
    AliasSetTracker on demand in order to reuse the current infrastructure.
    We only build it if less than AccessCapForMSSAPromotion exist in the
    loop, a cap that is by default set to 250. This value ensures there are
    no runtime regressions, and there are small compile time gains for
    pathological cases. A much lower value (20) was found to yield a single
    regression in the llvm-test-suite and much higher benefits for compile
    times. Conservatively we set the current cap to a high value, but we will
    explore lowering it when MemorySSA is enabled by default.

    Reviewers: sanjoy, chandlerc

    Subscribers: nemanjai, jlebar, Prazek, george.burgess.iv, jfb, jsji, llvm-commits

    Differential Revision: https://reviews.llvm.org/D56625 — asbirlea / ViewSVN
  3. [DAG] Immediately cleanup unused nodes from extend-based combines. — niravd / ViewSVN
  4. [COFF, ARM64] Add ARM64 support for MS intrinsic _fastfail

    The MSDN document was also updated to reflect this, but it probably will take a few days to show in below link.

    https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail

    Differential Revision: https://reviews.llvm.org/D57631 — tomtan / ViewSVN
  5. Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel

    Reviewers: aditya_nandakumar, volkan

    Reviewed By: aditya_nandakumar

    Subscribers: rovka, kristof.beyls, volkan, Petar.Avramovic

    Differential Revision: https://reviews.llvm.org/D57630 — mcberg2017 / ViewSVN
  6. [AliasSetTracker] Pass MustAlias to addPointer more often.

    Summary:
    Pass the alias info to addPointer when available. Will save an alias()
    call for must sets when adding a known Must or May alias.
    [Part of a series of cleanup patches]

    Reviewers: reames, mkazantsev

    Subscribers: sanjoy, jlebar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D56613 — asbirlea / ViewSVN
  7. [X86] Change the CPU on the test case for pr40529.ll to really show the bug. NFC — ctopper / ViewSVN
  8. [X86][DAG] Avoid creating dangling bitcast.

    combineExtractWithShuffle may leave a dangling bitcast which may
    prevent further optimization in later passes. Avoid constructing it
    unless it is used. — niravd / ViewSVN
  9. [x86] add tests for horizontal ops (PR38971, PR33758); NFC — spatel / ViewSVN
  10. [SystemZ]  Improved handling of the @llvm.ctlz intrinsic.

    Since SystemZ supports counting of leading zeros with the FLOGR instruction,
    isCheapToSpeculateCtlz() should return true, which it now does.

    ISD::CTLZ_ZERO_UNDEF i32 is now handled the same way as ISD::CTLZ is, which
    is needed since promotion to i64 is required and CTLZ_ZERO_UNDEF is only
    expanded to CTLZ if it is Legal or Custom.

    Review: Ulrich Weigand
    https://reviews.llvm.org/D57710 — jonpa / ViewSVN
  11. build: Remove the cmake check for malloc.h.

    As far as I can tell, malloc.h is only being used here to provide
    a definition of mallinfo (malloc itself is declared in stdlib.h via
    cstdlib). We already have a macro for whether mallinfo is available,
    so switch to using that instead.

    Differential Revision: https://reviews.llvm.org/D57807 — pcc / ViewSVN
  12. [clang-tidy] modernize-avoid-c-arrays: avoid main function (PR40604)

    Summary:
    The check should ignore the main function, the program entry point.
    It is not possible to use `std::array<>` for the `argv`.
    The alternative is to use `char** argv`.

    Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=40604 | PR40604 ]]

    Reviewers: JonasToth, aaron.ballman

    Reviewed By: aaron.ballman

    Subscribers: xazax.hun, hans, cfe-commits

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D57787 — lebedevri / ViewSVN
  13. [SystemZ]  Wait with VGBM selection until after DAGCombine2.

    Don't lower BUILD_VECTORs to BYTE_MASK, but instead expose the BUILD_VECTORs
    to the DAGCombiner and select them to VGBM in Select(). This allows the
    DAGCombiner to understand the constant vector values.

    For floating point, only all-zeros vectors are now generated with VGBM, as it
    turned out to be somewhat complicated to handle any arbitrary constants,
    while in practice this is very rare and hardly needed.

    The SystemZ ISD opcodes z_byte_mask, z_vzero and z_vones have been removed.

    Review: Ulrich Weigand
    https://reviews.llvm.org/D57152 — jonpa / ViewSVN
  14. [opt-viewer] Add --filter option to select remarks for displaying.

    This allows limiting the displayed remarks to the ones with names
    matching the filter (regular) expression.

    Generating html pages for a larger project with optimization remarks can
    result in a huge HTML documents and using --filter allows to focus on a
    set of interesting remarks.

    Reviewers: hfinkel, anemet, thegameg, serge-sans-paille

    Reviewed By: anemet

    Differential Revision: https://reviews.llvm.org/D57827 — fhahn / ViewSVN
  15. Revert "[libc++] Only add dylib-related features when using the system's libc++"

    This reverts r353319, which broke our internal CI. — Louis Dionne / ViewSVN
  16. Test commit. NFC — plyster / ViewSVN
  17. [libc++] Only add dylib-related features when using the system's libc++

    Otherwise, when testing trunk libc++ on an older system, lit will think
    that the dylib features are disabled. Ideally, we'd have a notion of
    running the tests with/without a deployment target (or, equivalently,
    a deployment target representing trunk where everything is as recent
    as can be). Since we always have a deployment target right now (which
    defaults to the current system), we only enable those features when
    we're going to also be testing with the system libc++. — Louis Dionne / ViewSVN
  18. Switch to cantFail(), since it does the same assertion.

    Reviewers: cfe-commits, lhames

    Reviewed By: lhames

    Subscribers: hintonda, klimek, pirama

    Differential Revision: https://reviews.llvm.org/D36806 — srhines / ViewSVN
  19. [SelectionDAG] Cleanup some code comments. NFC

    Don't repeat the function name in some doxygen
    comments.

    (Just a minor cleanup, while testing to push
    from the git monorepo setup.) — bjope / ViewSVN
  20. [GlobalISel][NFC] Gardening: Factor out code for simple unary intrinsics

    There was a lot of repeated code wrt unary math intrinsics in
    translateKnownIntrinsic. This factors out the repeated MIRBuilder code into
    two functions: translateSimpleUnaryIntrinsic and getSimpleUnaryIntrinsicOpcode.

    This simplifies adding simple unary intrinsics, since after this, all you have
    to do is add the mapping to SimpleUnaryIntrinsicOpcodes.

    Differential Revision: https://reviews.llvm.org/D57774 — paquette / ViewSVN
  21. [yaml2obj]Allow number for ELF symbol type

    yaml2obj previously only recognised standard STT_* names, and didn't
    allow arbitrary numbers. This change allows the user to specify a number
    for the type instead. It also adds a test to verify the existing
    behaviour for obj2yaml for unkown symbol types.

    Reviewed by: grimar

    Differential Revision: https://reviews.llvm.org/D57822 — jhenderson / ViewSVN
  22. [InstCombine] X | C == C --> (X & ~C) == 0

    We should canonicalize to one of these forms,
    and compare-with-zero could be more conducive
    to follow-on transforms. This also leads to
    generally better codegen as shown in PR40611:
    https://bugs.llvm.org/show_bug.cgi?id=40611 — spatel / ViewSVN
  23. [InstCombine] add tests for PR40611 and regenerate checks; NFC

    Lots of unrelated diffs here from the newer version of the script. — spatel / ViewSVN
  24. Add a specialization for '__unwrap_iter' to handle const interators. This enables the 'memmove' optimization for std::copy, etc. — marshall / ViewSVN
  25. [clangd] Add type boost to fuzzy find in Dex.

    Summary:
    No noticeable impact on code completions overall except some improvement on
    cross-namespace completion.

    Reviewers: sammccall, ilya-biryukov

    Reviewed By: sammccall

    Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57815 — ioeric / ViewSVN
  26. [clangd] Bump vscode-clangd v0.0.11

    CHANGELOG:
    - activate the extension on ObjC files. — hokein / ViewSVN
  27. AArch64: enforce even/odd register pairs for CASP instructions.

    ARMv8.1a CASP instructions need the first of the pair to be an even register
    (otherwise the encoding is unallocated). We enforced this during assembly, but
    not CodeGen before. — Tim Northover / ViewSVN
  28. [InlineAsm][X86] Add backend support for X86 flag output parameters.

    Allow custom handling of inline assembly output parameters and add X86
    flag parameter support. — niravd / ViewSVN
  29. [clangd] Format tweak's replacements. — hokein / ViewSVN
  30. [SelectionDAGBuilder] Refactor Inline Asm output check. NFCI. — niravd / ViewSVN
  31. [SystemZ] Do not return INT_MIN from strcmp/memcmp

    The IPM sequence currently generated to compute the strcmp/memcmp
    result will return INT_MIN for the "less than zero" case.  While
    this is in compliance with the standard, strictly speaking, it
    turns out that common applications cannot handle this, e.g. because
    they negate a comparison result in order to implement reverse
    compares.

    This patch changes code to use a different sequence that will result
    in -2 for the "less than zero" case (same as GCC).  However, this
    requires that the two source operands of the compare instructions
    are inverted, which breaks the optimization in removeIPMBasedCompare.
    Therefore, I've removed this (and all of optimizeCompareInstr), and
    replaced it with a mostly equivalent optimization in combineCCMask
    at the DAGcombine level. — uweigand / ViewSVN
  32. AArch64: annotate atomics with dropped acquire semantics when printing.

    A quirk of the v8.1a spec is that when the writeback regiser for an atomic
    read-modify-write instruction is wzr/xzr, the instruction no longer enforces
    acquire ordering. However, it's still written with the misleading 'a' mnemonic.

    So this adds an annotation when disassembling such instructions, mentioning the
    change. — Tim Northover / ViewSVN
  33. [x86] vectorize cast ops in lowering to avoid register file transfers

    The proposal in D56796 may cross the line because we're trying to avoid vectorization
    transforms in generic DAG combining. So this is an alternate, later, x86-specific
    translation of that patch.

    There are several potential follow-ups to enhance this:
    1. Allow extraction from non-zero element index.
    2. Peek through extends of smaller width integers.
    3. Support x86-specific conversion opcodes like X86ISD::CVTSI2P

    Differential Revision: https://reviews.llvm.org/D56864 — spatel / ViewSVN
  34. [MCA] Speedup ResourceManager queries. NFCI

    When a resource unit R is released, the ResourceManager notifies groups that
    contain R. Before this patch, the logic in method ResourceManager::release()
    implemented a potentially slow iterative search of dependent groups on the
    entire set of processor resources.
    This patch replaces that logic with a simpler (and often faster) lookup on array
    `Resource2Groups`.  This patch gives an average speedup of ~3-4% (observed on a
    release build when testing for target btver2).
    No functional change intended. — adibiagio / ViewSVN
  35. gn build: Merge r353265, r353237 — nico / ViewSVN
  36. [clangd] Update dev dependencies of clangd-vscode

    Summary:
    The version bumps are a result of running `npm audit`, which found
    3 security issues in previous versions of our dependencies.

    Also add 'package-lock.json' to the repo, it's a common practice to
    check in those files into the repository to get consistent versions of
    dependencies when running on different machines.

    Reviewers: hokein

    Reviewed By: hokein

    Subscribers: dschuff, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57814 — ibiryukov / ViewSVN
  37. [clangd] Enable clangd on Objective-C in VSCode

    Summary: Thanks to Andreas Ostermeyer for raising this on the mailing list.

    Reviewers: hokein

    Reviewed By: hokein

    Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57813 — ibiryukov / ViewSVN
  38. Attempt to fix buildbot after r353289 — evgeny777 / ViewSVN
  39. [DAGCombine][NFC] GatherAllAliases should take a LSBaseSDNode.

    GatherAllAliases only makes sense for LSBaseSDNode. Enforce it with
    static typing instead of runtime cast. — courbet / ViewSVN

#273 (Feb 6, 2019 3:39:28 AM)

  1. [NFC] Simplify check in guard widening — mkazantsev / ViewSVN
  2. [llvm-objcopy] Allow regular expressions in name comparison

    Differential revision: https://reviews.llvm.org/D57517 — evgeny777 / ViewSVN
  3. [DebugInfo]Print correct value for special opcode address increment

    The wrong variable was being used when printing the address increment in
    verbose output of .debug_line. This patch fixes this.

    Reviewed by: JDevlieghere

    Differential Revision: https://reviews.llvm.org/D57693 — jhenderson / ViewSVN
  4. [DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing

    This patch adds half a dozen new tests that test various edge cases in
    the behaviour of the symbolizer and DWARF data parsing. All of them test
    the current behaviour.

    Reviewed by: JDevlieghere, aprantl

    Differential Revision: https://reviews.llvm.org/D57741 — jhenderson / ViewSVN
  5. [clangd] Add CLI flag "-clang-tidy" to enable/disable running clang-tidy checks.

    Reviewers: sammccall

    Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57746 — hokein / ViewSVN
  6. [clangd] Some minor fixes.

    Reviewers: ilya-biryukov

    Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57755 — hokein / ViewSVN
  7. [yaml::BinaryRef] Slight perf tuning (for llvm-exegesis analysis mode)

    Summary:
    llvm-exegesis uses this functionality to read it's benchmark dumps.
    This reading of `.yaml`s takes ~60% of runtime for 14656 benchmark points (i.e. one sweep over all x86 instructions),
    but only 30% of time for 3x as much benchmark points.

    In particular, this `BinaryRef` appears to be an obvious pain point.
    Without patch:
    ```
    $ perf stat -r 25 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file="" -analysis-inconsistencies-output-file=/tmp/clusters-orig.html
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-orig.html'
    ...
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-orig.html'

    Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file= -analysis-inconsistencies-output-file=/tmp/clusters-orig.html' (25 runs):

                972.86 msec task-clock                #    0.994 CPUs utilized            ( +-  0.25% )
                    30      context-switches          #   30.774 M/sec                    ( +- 21.74% )
                     0      cpu-migrations            #    0.370 M/sec                    ( +- 67.81% )
                 11873      page-faults               # 12211.512 M/sec                   ( +-  0.00% )
            3898373408      cycles                    # 4009682.186 GHz                   ( +-  0.25% )  (83.12%)
             360399748      stalled-cycles-frontend   #    9.24% frontend cycles idle     ( +-  0.54% )  (83.24%)
            1099450483      stalled-cycles-backend    #   28.20% backend cycles idle      ( +-  0.59% )  (33.63%)
            4910528820      instructions              #    1.26  insn per cycle
                                                      #    0.22  stalled cycles per insn  ( +-  0.13% )  (50.21%)
            1111976775      branches                  # 1143726625.854 M/sec              ( +-  0.10% )  (66.77%)
              23248474      branch-misses             #    2.09% of all branches          ( +-  0.19% )  (83.29%)

               0.97850 +- 0.00647 seconds time elapsed  ( +-  0.66% )
    ```
    With the patch:
    ```
    $ perf stat -r 25 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file="" -analysis-inconsistencies-output-file=/tmp/clusters-new.html
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-new.html'
    ...
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-new.html'

    Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file= -analysis-inconsistencies-output-file=/tmp/clusters-new.html' (25 runs):

                905.29 msec task-clock                #    0.999 CPUs utilized            ( +-  0.11% )
                    15      context-switches          #   16.533 M/sec                    ( +- 32.27% )
                     0      cpu-migrations            #    0.000 K/sec
                 11873      page-faults               # 13121.789 M/sec                   ( +-  0.00% )
            3627759720      cycles                    # 4009283.100 GHz                   ( +-  0.11% )  (83.19%)
             370401480      stalled-cycles-frontend   #   10.21% frontend cycles idle     ( +-  0.22% )  (83.19%)
            1007114438      stalled-cycles-backend    #   27.76% backend cycles idle      ( +-  0.34% )  (33.62%)
            4414014304      instructions              #    1.22  insn per cycle
                                                      #    0.23  stalled cycles per insn  ( +-  0.08% )  (50.36%)
            1003751700      branches                  # 1109314021.971 M/sec              ( +-  0.07% )  (66.97%)
              24611010      branch-misses             #    2.45% of all branches          ( +-  0.10% )  (83.41%)

               0.90593 +- 0.00105 seconds time elapsed  ( +-  0.12% )
    ```
    So this decreases the overall run time of llvm-exegesis analysis mode (on one sweep) by roughly -7%.

    To be noted, `BinaryRef::writeAsBinary()` change is the reason for the perf changes,
    usage of `llvm::isHexDigit()` instead of `isxdigit()` does not appear to have any perf impact,
    i have only changed it "for symmetry".

    `writeAsBinary()` change is correct, it produces identical de-hex-ified buffer, and the final output is thus identical:
    ```
    $ sha512sum /tmp/clusters-*
    db4bbd904fe8840853b589b032c5041bc060b91bcd9c27b914b56581fbc473550eea74b852238c79963b5adf2419f379e9f5db76784048b48e3937f9f3e732bf  /tmp/clusters-new.html
    db4bbd904fe8840853b589b032c5041bc060b91bcd9c27b914b56581fbc473550eea74b852238c79963b5adf2419f379e9f5db76784048b48e3937f9f3e732bf  /tmp/clusters-orig.html
    ```

    Reviewers: silvas, espindola, sbc100, zturner, courbet, gchatelet

    Reviewed By: gchatelet

    Subscribers: tschuett, RKSimon, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57699 — lebedevri / ViewSVN
  8. Fix misspelled filenames in file headers of llvm/{MC,Object,CodeGen}/*.h — maskray / ViewSVN
  9. [NFC] Factor out detatchment of dead blocks from their erasing — mkazantsev / ViewSVN
  10. [LoopSimplifyCFG] Do not count dead exit blocks twice, make CFG simpler — mkazantsev / ViewSVN
  11. [NFC] Revert rL353274 — mkazantsev / ViewSVN
  12. [NFC] Extend API of DeleteDeadBlock(s) to collect updates without DTU — mkazantsev / ViewSVN
  13. [NFC] Replace readonly SmallVectorImpl with ArrayRef — mkazantsev / ViewSVN
  14. [HotColdSplit] Move splitting after instrumented PGO use

    Summary:
    Follow up to D57082 which moved splitting earlier in the pipeline, in
    order to perform it before inlining. However, it was moved too early,
    before the IR is annotated with instrumented PGO data. This caused the
    splitting to incorrectly determine cold functions.

    Move it to just after PGO annotation (still before inlining), in both
    pass managers.

    Reviewers: vsk, hiraditya, sebpop

    Subscribers: mehdi_amini, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57805 — tejohnson / ViewSVN
  15. [CMake] Unify scripts for generating VCS headers

    Previously, there were two different scripts for generating VCS headers:
    one used by LLVM and one used by Clang and lldb. They were both similar,
    but different. They were both broken in their own ways, for example the
    one used by Clang didn't properly handle monorepo resulting in an
    incorrect version information reported by Clang.

    This change unifies two the scripts by introducing a new script that's
    used from both LLVM, Clang and lldb, ensures that the new script
    supports both monorepo and standalone SVN and Git setups, and removes
    the old scripts.

    Differential Revision: https://reviews.llvm.org/D57063 — phosek / ViewSVN
  16. [AliasSetTracker] Minor style tweak to avoid a variable w/two distinct live ranges [NFC] — reames / ViewSVN
  17. [Test] Add codegen tests for unordered and monotonic integer operations — reames / ViewSVN
  18. Move DomTreeUpdater from IR to Analysis

    DomTreeUpdater depends on headers from Analysis, but is in IR.  This is a
    layering violation since Analysis depends on IR.  Relocate this code from IR
    to Analysis to fix the layering violation. — rtrieu / ViewSVN

#272 (Feb 5, 2019 6:28:05 PM)

  1. [sanitizer] Fix fuchsia and windows build. — eugenis / ViewSVN
  2. [WebAssembly] Add atomics target option

    Reviewers: tlively

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57798 — aheejin / ViewSVN
  3. [sanitizer] Decorate /proc/self/maps better.

    Summary:
    Refactor the way /proc/self/maps entries are annotated to support most
    (all?) posix platforms, with a special implementation for Android.
    Extend the set of decorated Mmap* calls.

    Replace shm_open with internal_open("/dev/shm/%s"). Shm_open is
    problematic because it calls libc open() which may be intercepted.

    Generic implementation has limits (max number of files under /dev/shm is
    64K on my machine), which can be conceivably reached when sanitizing
    multiple programs at once. Android implemenation is essentially free, and
    enabled by default.

    The test in sanitizer_common is copied to hwasan and not reused directly
    because hwasan fails way too many common tests at the moment.

    Reviewers: pcc, vitalybuka

    Subscribers: srhines, kubamracek, jfb, llvm-commits, kcc

    Differential Revision: https://reviews.llvm.org/D57720 — eugenis / ViewSVN
  4. [x86] add tests for extract+sitofp; NFC — spatel / ViewSVN
  5. [WebAssembly] Tidy up `let` statements in .td files (NFC)

    Summary:
    - Delete {} for one-line `let` statements
    - Don't indent within `let` blocks
    - Add comments after `let` block's closing braces

    Reviewers: tlively

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57730 — aheejin / ViewSVN
  6. Fix MSVC constructor call extension after b92d290e48e9 (r353181).

    The assert added to EmitCall there was triggering in Windows Chromium
    builds, due to a mismatch of the return type.

    The MSVC constructor call extension (`this->Foo::Foo()`) was emitting
    the constructor call from 'EmitCXXMemberOrOperatorMemberCallExpr' via
    calling 'EmitCXXMemberOrOperatorCall', instead of
    'EmitCXXConstructorCall'. On targets where HasThisReturn is true, that
    was failing to set the proper return type in the call info.

    Switching to calling EmitCXXConstructorCall also allowed removing some
    code e.g. the trivial copy/move support, which is already handled in
    EmitCXXConstructorCall.

    Ref: https://bugs.chromium.org/p/chromium/issues/detail?id=928861
    Differential Revision: https://reviews.llvm.org/D57794 — jyknight / ViewSVN
  7. [BasicAA] Cache nonEscapingLocalObjects for alias() calls.

    Summary:
    Use a small cache for Values tested by nonEscapingLocalObject().
    Since the calls to PointerMayBeCaptured are fairly expensive, this saves
    a good amount of compile time for anything relying heavily on
    BasicAA.alias() calls.

    This uses the same approach as the AliasCache, i.e. the cache is reset
    after each alias() call. The cache is not used or updated by modRefInfo
    calls since it's harder to know when to reset the cache.

    Testcases that show improvements with this patch are too large to
    include. Example compile time improvement: 7s to 6s.

    Reviewers: chandlerc, sunfish

    Subscribers: sanjoy, jlebar, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57627 — asbirlea / ViewSVN
  8. gn build: Fix clang-tidy build

    Not depending on //clang/lib/StaticAnalyzer/Core and
    //clang/lib/StaticAnalyzer/Frontend causes a linker error even if
    ClangSACheckers are not supported.

    Undefined symbols for architecture x86_64:
      "clang::ento::CreateAnalysisConsumer(clang::CompilerInstance&)", referenced from:
          clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer(
                  clang::CompilerInstance&, llvm::StringRef)
              in libclangTidy.a(libclangTidy.ClangTidy.o)

    Patch from Mirko Bonadei <mbonadei@webrtc.org>!

    Differential Revision: https://reviews.llvm.org/D57777 — nico / ViewSVN
  9. [HotColdSplit] Do not split out `resume` instructions

    Resumes that are not reachable from a cleanup landing pad are considered
    to be unreachable. It’s not safe to split them out.

    rdar://47808235 — Vedant Kumar / ViewSVN
  10. Orc: Simplify RPC naming system by using function-local statics

    The existing scheme of class template static members for Name and
    NameMutex is a bit verbose, involves global ctors (even if they're cheap
    for string and mutex, still not entirely free), and (importantly/my
    immediate motivation here) trips over a bug in LLVM's modules
    implementation that's a bit involved (hmm, sounds like Mr. Smith has a
    fix for the modules thing - but I'm still inclined to commit this patch
    as general goodness). — dblaikie / ViewSVN
  11. [modules] Fix handling of initializers for templated global variables.

    For global variables with unordered initialization that are instantiated
    within a module, we previously did not emit the global (or its
    initializer) at all unless it was used in the importing translation unit
    (and sometimes not even then!), leading to misbehavior and link errors.

    We now emit the initializer for an instantiated global variable with
    unordered initialization with side-effects in a module into every
    translation unit that imports the module. This is unfortunate, but
    mostly matches the behavior of a non-modular compilation and seems to be
    the best that we can reasonably do. — rsmith / ViewSVN
  12. Fixup test on Windows with a case-insensitive filesystem due to path printing changes from r352704. — dyung / ViewSVN
  13. [ADT] Add a fallible_iterator wrapper.

    A fallible iterator is one whose increment or decrement operations may fail.
    This would usually be supported by replacing the ++ and -- operators with
    methods that return error:

        class MyFallibleIterator {
        public:
          // ...
          Error inc();
          Errro dec();
          // ...
        };

    The downside of this style is that it no longer conforms to the C++ iterator
    concept, and can not make use of standard algorithms and features such as
    range-based for loops.

    The fallible_iterator wrapper takes an iterator written in the style above
    and adapts it to (mostly) conform with the C++ iterator concept. It does this
    by providing standard ++ and -- operator implementations, returning any errors
    generated via a side channel (an Error reference passed into the wrapper at
    construction time), and immediately jumping the iterator to a known 'end'
    value upon error. It also marks the Error as checked any time an iterator is
    compared with a known end value and found to be inequal, allowing early exit
    from loops without redundant error checking*.

    Usage looks like:

        MyFallibleIterator I = ..., E = ...;

        Error Err = Error::success();
        for (auto &Elem : make_fallible_range(I, E, Err)) {
          // Loop body is only entered when safe.

          // Early exits from loop body permitted without checking Err.
          if (SomeCondition)
            return;

        }
        if (Err)
          // Handle error.

    * Since failure causes a fallible iterator to jump to end, testing that a
      fallible iterator is not an end value implicitly verifies that the error is a
      success value, and so is equivalent to an error check.

    Reviewers: dblaikie, rupprecht

    Subscribers: mgorny, dexonsmith, kristina, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57618 — Lang Hames / ViewSVN
  14. [WebAssembly] Add a comment about why v128.const test was disabled (NFC) — aheejin / ViewSVN
  15. [InstCombine] limit extracting shuffle transform based on uses

    As discussed in D53037, this can lead to worse codegen, and we
    don't generally expect the backend to be able to optimize
    arbitrary shuffles. If there's only one use of the 1st shuffle,
    that means it's getting removed, so that should always be
    safe. — spatel / ViewSVN
  16. [WebAssembly] Disable a v128.const test line temporarily

    r353131 caused failures in v128.const test for clang-ppc64be-linux-lnt
    and clang-s390x-linux bots. This temporarily disables that line until
    it is fixed. — aheejin / ViewSVN
  17. [InstCombine] split shuffle test to show extra use constraint; NFC

    As discussed in D53037, this transform can cause codegen problems
    if the 1st shuffle has multiple uses. — spatel / ViewSVN
  18. Basic CUDA-10 support.

    Differential Revision: https://reviews.llvm.org/D57771 — tra / ViewSVN
  19. [Preprocessor] Add a note with framework location for "file not found" error.

    When a framework with the same name is available at multiple framework
    search paths, we use the first matching location. If a framework at this
    location doesn't have all the headers, it can be confusing for
    developers because they see only an error `'Foo/Foo.h' file not found`,
    can find the complete framework with required header, and don't know the
    incomplete framework was used instead.

    Add a note explaining a framework without required header was found.
    Also mention framework directory path to make it easier to find the
    incomplete framework.

    rdar://problem/39246514

    Reviewers: arphaman, erik.pilkington, jkorous

    Reviewed By: jkorous

    Subscribers: jkorous, dexonsmith, cfe-commits

    Differential Revision: https://reviews.llvm.org/D56561 — vsapsai / ViewSVN
  20. [PGO] Use a function for creating variable for profile file name. NFC.

    Factored out the code for creating variable for profile file name to
    a function. — xur / ViewSVN
  21. [analyzer] Document RetainCountChecker behavior and annotations

    Differential Revision: https://reviews.llvm.org/D57721 — George Karpenkov / ViewSVN
  22. [analyzer] [testing] Inside CmpRuns.py output also print the filename of the first item in the path

    Differential Revision: https://reviews.llvm.org/D57783 — George Karpenkov / ViewSVN
  23. [analyzer] [RetainCountChecker] Bugfix: in non-OSObject-mode, do not track CXX method calls

    Differential Revision: https://reviews.llvm.org/D57782 — George Karpenkov / ViewSVN
  24. [elfabi] Fix the type of the variable formated for error output

    Change the format type of Dyn.SONameOffset to PRIx64 since it is a uint64_t.
    The problem was detected on mips builds, where it was printing junk values
    and causing test failure.

    Patch by Milos Stojanovic.

    Differential Revision: https://reviews.llvm.org/D57676 — petarj / ViewSVN
  25. Update the ioctl(2) list in sanitizers with NetBSD 8.99.34 — kamil / ViewSVN
  26. [NFC][GlobalISel]: Add a convenience method to MachineInstrBuilder to simplify getOperand(i).getReg()

    https://reviews.llvm.org/D57608

    It's a common pattern in GISel to have a MachineInstrBuilder from which we get various regs
    (commonly MIB->getOperand(0).getReg()). This adds a helper method and the above can be
    replaced with MIB.getReg(0). — aditya_nandakumar / ViewSVN
  27. [X86] Regenerate tests missed in r353061. NFC

    We now print the implicit %st register on these instruction, but since they occur at the end of the line, FileCheck didn't see they were missing. — ctopper / ViewSVN
  28. [InstrProf] Merge COFF .lprof* and .lcovmap sections into .data/.rdata

    There is no reason for these sections to remain separate in the final
    DLL or EXE.

    I have not yet added a InstrProfilingPlatformWindows.c for these, since
    avoiding dynamic profile data registration is a larger project for
    later. — rnk / ViewSVN
  29. Fix a missing word in comment — Adrian Prantl / ViewSVN
  30. [MC] Don't error on numberless .file directives on MachO

    Summary:
    Before r349976, MC ignored such directives when producing an object file
    and asserted when re-producing textual assembly output. I turned this
    assertion into a hard error in both cases in r349976, but this makes it
    unnecessarily difficult to write a single assembly file that supports
    both MachO and other object formats that support .file. A user reported
    this as PR40578, and we decided to go back to ignoring the directive.

    Fixes PR40578

    Reviewers: mstorsjo

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57772 — rnk / ViewSVN
  31. [llvm-readobj] Display sections that do not belong to a segment in the section-mapping

    Summary:
    The following patch adds the "None" line to the section to segment mapping dump.
    That line lists the sections that do not belong to any segment.
    I realize that this change differs from GNU readelf which does not display the latter information.

    I'd rather not add this "feature" under a command line option.  I think that might introduce confusion, since users would have to
    make an additional decision as to if they want to see all of the section-to-segment map or just a subset of it.

    Another option is to only print the "None" line if the `--section-mapping` option is passed; however,
    that might also introduce some confusion, because the section-to-segment map would be different between`--program-headers`
    and the `--section-mapping` output.  While the difference is just the "None" line, it seems that if we choose to display
    the segment-to-section mapping, then we should always display the whole map including the sections
    that do not belong to segments.

    ```
    Section to Segment mapping:
      Segment Sections...
       00
       01     .interp
       02     .interp .note.ABI-tag .gnu.hash
       03     .init_array .fini_array .dynamic
       04     .dynamic
       05     .note.ABI-tag
       06     .eh_frame_hdr
       07
       08     .init_array .fini_array .dynamic .got
       None   .comment .symtab .strtab .shstrtab <--- THIS LINE
    ```

    Reviewers: grimar, rupprecht, jhenderson, espindola

    Reviewed By: rupprecht

    Subscribers: khemant, emaste, arichardson, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57700 — mattd / ViewSVN
  32. [WebAssembly] Lower memmove to memory.copy

    Summary: The lowering is identical to the memcpy lowering.

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57727 — tlively / ViewSVN
  33. [libc++] Fix XFAILs when exceptions are disabled

    It turns out that I un-XFAILed too many tests in r353210: some tests
    actually fail whether exceptions are enabled or not because they use
    types that are marked as unavailable even when exceptions are disabled. — Louis Dionne / ViewSVN
  34. [DOCS]Support for emission of the debug info for the Cuda devices, NFC. — abataev / ViewSVN
  35. [TargetLibraryInfo] Regroup run time functions for Windows (NFC)

    Regroup supported and unsupported functions by precision and C standard. — evandro / ViewSVN
  36. Do not use frame pointer by default for MSP430

    This is suggested by 3.3.9 of MSP430 EABI document.
    We do allow user to manually enable frame pointer. GCC toolchain uses the same behavior.

    Patch by Dmitry Mikushev!

    Differential Revision: https://reviews.llvm.org/D56925 — asl / ViewSVN
  37. Move some llvm-mc tests where they belong — arsenm / ViewSVN
  38. [libc++] Fix XFAILs on macOS when exceptions are disabled

    Some tests are marked as failing on platforms where the dylib does not
    provide the required exception classes. However, when testing with
    exceptions disabled, those tests shouldn't be marked as failing. — Louis Dionne / ViewSVN
  39. GlobalISel: Verify G_GEP — arsenm / ViewSVN
  40. [CMake] Support compiler-rt builtins library in tests

    We're building tests with -nostdlib which means that we need to
    explicitly include the builtins library. When using libgcc (default)
    we can simply include -lgcc_s on the link line, but when using
    compiler-rt builtins we need a complete path to the builtins library.

    This path is already available in CMake as <PROJECT>_BUILTINS_LIBRARY,
    so we just need to pass that path to lit and if config.compiler_rt is
    true, link it to the test.

    Prior to this patch, running tests when compiler-rt is being used as
    the builtins library was broken as all tests would fail to link, but
    with this change running tests when compiler-rt bultins library is
    being used should be supported.

    Differential Revision: https://reviews.llvm.org/D56701 — phosek / ViewSVN
  41. [AMDGPU] Consider XOR in waterfall loop as a terminator

    Ensure the XOR in the waterfall loop for indirect addressing is considered a terminator.

    Differential Revision: https://reviews.llvm.org/D57703 — scott.linder / ViewSVN
  42. [libc++] Use UNSUPPORTED instead of TEST_STD_VER #ifdef

    When the whole test only works starting at some version of the Standard,
    use UNSUPPORTED lit markup instead of #ifdef TEST_STD_VER. This provides
    more visibility into the test suite.

    Reviewed as https://reviews.llvm.org/D57704.
    Thanks to Andrey Maksimov for the patch. — Louis Dionne / ViewSVN
  43. [sanitizer] Fix unused function 'unpoison_passwd' — Vitaly Buka / ViewSVN
  44. [DEBUG_INFO][NVPTX] Generate correct data about variable address class.

    Summary:
    Added ability to generate correct debug info data about the variable
    address class. Currently, for all the locals and globals the default
    values are used, ADDR_local_space(6) for locals and ADDR_global_space(5)
    for globals. The values are taken from the table in
      https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf.
      We need to emit correct data for address classes of, at least, shared
      and constant globals. Currently, all these variables are treated by
      the cuda-gdb debugger as the variables in the global address space
      and, thus, it require manual data type casting.

    Reviewers: echristo, probinson

    Subscribers: jholewinski, aprantl, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57162 — abataev / ViewSVN
  45. [DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger.

    Summary:
    According to
    https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf,
    the compiler should emit the DW_AT_address_class attribute for all
    variable and parameter. It means, that DW_AT_address_class attribute
    should be used in the non-standard way to support compatibility with the
    cuda-gdb debugger.
    Clang is able to generate the information about the variable address
    class. This information is emitted as the expression sequence
    `DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef`. The patch
    tries to find all such expressions and transform them into
    `DW_AT_address_class <DWARF Address Space>` if target is NVPTX and the debugger is gdb.
    If the expression is not found, then default values are used. For the
    local variables <DWARF Address Space> is set to ADDR_local_space(6), for
    the globals <DWARF Address Space> is set to ADDR_global_space(5). The
    values are taken from the table in the same section 5.2. CUDA-Specific
    DWARF Definitions.

    Reviewers: echristo, probinson

    Subscribers: jholewinski, aprantl, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57157 — abataev / ViewSVN
  46. AMDGPU: Fix assert on trunc from bitcast of build_vector

    The v2i64 argument is lowered to a bitcast of v4i32 build_vector.
    This would then attempt to use the i32-element as the source of the
    vector truncate. This really would need to collect 2 elements from the
    build_vector to produce the intended truncate. — arsenm / ViewSVN
  47. [libcxx] Start defining lit features for tests depending on availability

    This patch removes some vendor-specific availability XFAILs from the
    test suite. In the future, when a new feature is introduced in the
    dylib, an availability macro should be created and a matching lit
    feature should be created. That way, the test suite can XFAIL whenever
    the implementation lacks the necessary feature instead of being
    cluttered by vendor-specific annotations.

    Right now, those vendor-specific annotations are still somewhat cluttering
    the test suite by being in `config.py`, but at least they are localized.
    In the future, we could design a way to define those less intrusively or
    even automatically based on the availability macros that already exist
    in <__config>. — Louis Dionne / ViewSVN
  48. [opaque pointer types] More trivial changes to pass FunctionType to CallInst.

    Change various functions to use FunctionCallee or Function*.

    Pass function type through __builtin_dump_struct's dumpRecord helper. — jyknight / ViewSVN
  49. [X86][SSE] Disable ZERO_EXTEND shuffle combining

    rL352997 enabled ZERO_EXTEND from non-shuffle-able value types. I've disabled it for now to fix a regression identified by @asbirlea until I can fix this properly. — rksimon / ViewSVN
  50. Minor cleanup: remove CGBuild::CreateConst*ByteGEP overloads taking a Value*. — jyknight / ViewSVN
  51. [PGO] Fix the type of the formated variable

    Change the format type of Value to PRIu64 since it is a uint64_t.
    The problem was detected on mips boards building 32-bit binaries,
    where it was printing junk values and causing test failure.

    Patch by Milos Stojanovic.

    Differential Revision: https://reviews.llvm.org/D57583 — petarj / ViewSVN
  52. [LLVM-C] Add Bindings to GlobalIFunc

    Summary:
    Adds the standard gauntlet of accessors for global indirect functions and updates the echo test.

    Now it would be nice to have a target abstraction so one could know if they have access to a suitable ELF linker and runtime.

    Reviewers: whitequark, deadalnix

    Reviewed By: whitequark

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D56177 — codafi / ViewSVN
  53. Enable integrated assembler on MSP430 by default.

    Patch by Kristina Bessonova!

    Differential Revision: https://reviews.llvm.org/D56787 — asl / ViewSVN
  54. [AArch64][Outliner] Don't outline BTI instructions

    We can't outline BTI instructions, because they need to be the very first
    instruction executed after an indirect call or branch. If we outline them, then
    an indirect call might go to the branch to the outlined function, which will
    fault.

    Differential revision: https://reviews.llvm.org/D57753 — olista01 / ViewSVN
  55. [X86][AVX] Attempt to combine shuffles to subvector broadcast load — rksimon / ViewSVN
  56. AArch64/GlobalISel: Don't clamp from 2 to 2

    This is equivalent to clampMaxNumElements, but saves a check. — arsenm / ViewSVN
  57. [OPENMP] issue error messages for multiple teams contructs in a target construct

    The fix is to issue error messages if there are more than one
    teams construct inside a target constructs.

    #pragma omp target
    {
      #pragma omp teams
      {  ...  }

      #pragma omp teams
      { ... }
    } — kli / ViewSVN
  58. [libc++] Control whether exceptions are enabled in the macOS trunk testing script — Louis Dionne / ViewSVN
  59. [opaque pointer types] Pass function types for runtime function calls.

    Emit{Nounwind,}RuntimeCall{,OrInvoke} have been modified to take a
    FunctionCallee as an argument, and CreateRuntimeFunction has been
    modified to return a FunctionCallee. All callers have been updated.

    Additionally, CreateBuiltinFunction is removed, as it was redundant
    with CreateRuntimeFunction after some previous changes.

    Differential Revision: https://reviews.llvm.org/D57668 — jyknight / ViewSVN
  60. [WebAssembly] Object: Remove redundant method. NFC.

    Differential Revision: https://reviews.llvm.org/D57719 — sbc / ViewSVN
  61. [X86][AVX] Add PR34041 subvector broadcast test cases — rksimon / ViewSVN
  62. [opaque pointer types] Fix the CallInfo passed to EmitCall in some
    edge cases.

    Currently, EmitCall emits a call instruction with a function type
    derived from the pointee-type of the callee. This *should* be the same
    as the type created from the CallInfo parameter, but in some cases an
    incorrect CallInfo was being passed.

    All of these fixes were discovered by the addition of the assert in
    EmitCall which verifies that the passed-in CallInfo matches the
    Callee's function type.

    As far as I know, these issues caused no bugs at the moment, as the
    correct types were ultimately being emitted. But, some would become
    problematic when pointee types are removed.

    List of fixes:

    * arrangeCXXConstructorCall was passing an incorrect value for the
      number of Required args, when calling an inheriting constructor
      where the inherited constructor is variadic. (The inheriting
      constructor doesn't actually get passed any of the user's args, but
      the code was calculating it as if it did).

    * arrangeFreeFunctionLikeCall was not including the count of the
      pass_object_size arguments in the count of required args.

    * OpenCL uses other address spaces for the "this" pointer. However,
      commonEmitCXXMemberOrOperatorCall was not annotating the address
      space on the "this" argument of the call.

    * Destructor calls were being created with EmitCXXMemberOrOperatorCall
      instead of EmitCXXDestructorCall in a few places. This was a problem
      because the calling convention sometimes has destructors returning
      "this" rather than void, and the latter function knows about that,
      and sets up the types properly (through calling
      arrangeCXXStructorDeclaration), while the former does not.

    * generateObjCGetterBody: the 'objc_getProperty' function returns type
      'id', but was being called as if it returned the particular
      property's type. (That is of course the *dynamic* return type, and
      there's a downcast immediately after.)

    * OpenMP user-defined reduction functions (#pragma omp declare
      reduction) can be called with a subclass of the declared type. In
      such case, the call was being setup as if the function had been
      actually declared to take the subtype, rather than the base type.

    Differential Revision: https://reviews.llvm.org/D57664 — jyknight / ViewSVN
  63. [NFC][libc++] Reindent function — Louis Dionne / ViewSVN
  64. [CGP] add test for unsigned subtract of 1 with overflow; NFC — spatel / ViewSVN
  65. [AArch64][x86] add tests for unsigned subtract with overflow; NFC — spatel / ViewSVN
  66. gn build: BUILD.gn files for clang-tidy and clang-apply-replacements

    Patch from Mirko Bonadei <mbonadei@webrtc.org>!

    Differential Revision: https://reviews.llvm.org/D57329 — nico / ViewSVN
  67. Fix typo in comment, NFCI — krasimir / ViewSVN
  68. gn build: Merge r353072 — nico / ViewSVN
  69. Recommit: Detect incorrect FileCheck variable CLI definition

    Summary:
    While the backend code of FileCheck relies on definition of variable
    from the command-line to have an equal sign '=' and a variable name
    before that, the frontend does not actually enforce it. This leads to
    FileCheck crashing when invoked with invalid syntax for the -D option.

    This patch adds the missing validation in the frontend. It also makes
    the -D option an AlwaysPrefix option to be able to detect -D=FOO as
    being a define without variable and -D as missing its value.

    Copyright:
    - Linaro (changes in version 2 of revision D55940)
    - GraphCore (changes in later versions)

    Reviewers: jdenny

    Subscribers: JonChesterfield, hiraditya, kristina, probinson,
    llvm-commits

    Differential Revision: https://reviews.llvm.org/D55940 — thopre / ViewSVN
  70. Recommit: Add support for prefix-only CLI options

    Summary:
    Add support for options that always prefix their value, giving an error
    if the value is in the next argument or if the option is given a value
    assignment (ie. opt=val). This is the desired behavior for the -D option
    of FileCheck for instance.

    Copyright:
    - Linaro (changes in version 2 of revision D55940)
    - GraphCore (changes in later versions and introduced when creating
      D56549)

    Reviewers: jdenny

    Subscribers: llvm-commits, probinson, kristina, hiraditya,
    JonChesterfield

    Differential Revision: https://reviews.llvm.org/D56549 — thopre / ViewSVN
  71. [X86][SSE] Rename SimplifyDemandedVectorElts BLENDV tests

    I'm going to be adding SimplifyDemandedBits tests shortly. — rksimon / ViewSVN
  72. [MCA] Moved the logic that updates register dependencies from DispatchStage to RegisterFile. NFC

    DispatchStage should always delegate to an object of class RegisterFile the task
    of updating data dependencies.  ReadState and WriteState objects should not be
    modified directly by DispatchStage.
    This patch also renames stage IS_AVAILABLE to IS_DISPATCHED. — adibiagio / ViewSVN
  73. gn build: Fix Python 3 write_vcsrevision script compatibility

    Trivial fix: decode was not called for all subprocess.check_output calls.

    Commited on behalf of Andrew Boyarshin

    Differential Revision: https://reviews.llvm.org/D57505 — serge_sans_paille / ViewSVN
  74. [X86][SSE] Add SimplifyDemandedVectorElts support for X86ISD::BLENDV — rksimon / ViewSVN
  75. [X86][SSE] Add tests showing missing SimplifyDemandedVectorElts support for X86ISD::BLENDV — rksimon / ViewSVN
  76. [NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default

    When Clang/LLVM is built with the CLANG_DEFAULT_STD_CXX CMake macro that sets
    the default standard to something other than C++14, there are a number of lit
    tests that fail as they rely on the C++14 default.
    This patch just adds the language standard option explicitly to such test cases.

    Differential revision: https://reviews.llvm.org/D57581 — nemanjai / ViewSVN
  77. [MCA] Simplify the logic in method WriteState::addUser. NFCI

    In some cases, it is faster to just grow the set of 'Users' rather than
    performing a llvm::find_if every time a new user is added to
    the set. No functional change intended. — adibiagio / ViewSVN
  78. Fix ICE on reference binding with mismatching addr spaces.

    When we attempt to add an addr space qual to a type already
    qualified by an addr space ICE is triggered. Before creating
    a type with new address space, remove the old addr space.

    Fixing PR38614!

    Differential Revision: https://reviews.llvm.org/D57524 — stulova / ViewSVN
  79. [DebugInfo][NFCI] Split salvageDebugInfo into helper functions

    Some use cases are appearing where salvaging is needed that does not
    correspond to an instruction being deleted -- for example an instruction
    being sunk, or a Value not being available in a block being isel'd.

    Enable more fine grained control over how salavging occurs by splitting
    the logic into helper functions, separating things that are specific to
    working on DbgVariableIntrinsics from those specific to interpreting IR
    and building DIExpressions.

    Differential Revision: https://reviews.llvm.org/D57696 — jmorse / ViewSVN
  80. Fix format string in bindings/go/llvm/ir_test.go (PR40561)

    The test started failing for me recently. I don't see any changes around
    this code, so maybe it's my local go version that changed or something.

    The error seems real to me: we're trying to print an Attribute with %d.
    The test talks about "attribute masks" I'm not sure what that refers to,
    but I suppose we could print the raw pointer value, since that's
    what the test seems to be comparing.

    Differential revision: https://reviews.llvm.org/D57672 — hans / ViewSVN
  81. [X86][AVX] Attempt to share broadcasts of different widths (PR39454)

    If we have broadcasts of different vector widths, keep the longest vector width and extract subvectors for the shorter vectors (which should be free).

    Differential Revision: https://reviews.llvm.org/D57663 — rksimon / ViewSVN
  82. [CostModel][X86] Add UMUL fixed point cost tests — rksimon / ViewSVN
  83. [CGP] Add support for sinking operands to their users, if they are free.

    This patch improves code generation for some AArch64 ACLE intrinsics. It adds
    support to CGP to duplicate and sink operands to their user, if they can be
    folded into a target instruction, like zexts and sub into usubl. It adds a
    TargetLowering hook shouldSinkOperands, which looks at the operands of
    instructions to see if sinking is profitable.

    I decided to add a new target hook, as for the sinking to be profitable,
    at least on AArch64, we have to look at multiple operands of an
    instruction, instead of looking at the users of a zext for example.

    The sinking is done in CGP, because it works around an instruction
    selection limitation. If instruction selection is not limited to a
    single basic block, this patch should not be needed any longer.

    Alternatively this could be done in the LoopSink pass, which tries to
    undo LICM for instructions in blocks that are not executed frequently.

    Note that we do not force the operands to sink to have a single user,
    because we duplicate them before sinking. Therefore this is only
    desirable if they really can be done for free. Additionally we could
    consider the impact on live ranges later on.

    This should fix https://bugs.llvm.org/show_bug.cgi?id=40025.

    As for performance, we have internal code that uses intrinsics and can
    be speed up by 10% by this change.

    Reviewers: SjoerdMeijer, t.p.northover, samparker, efriedma, RKSimon, spatel

    Reviewed By: samparker

    Differential Revision: https://reviews.llvm.org/D57377 — fhahn / ViewSVN
  84. [ARM GlobalISel] Support G_GEP for Thumb2

    Same as ARM, but use a different opcode in the instruction selection. — rovka / ViewSVN
  85. Fix the sphinx buildbot after D54429 — szelethus / ViewSVN
  86. Previously if the user configured their build but then changed
    LLVM_ENABLED_PROJECT and reconfigured it had no effect on what
    projects were actually built. This was very confusing behaviour. The
    reason for this is that the value of the `LLVM_TOOL_<PROJECT>_BUILD`
    variables are already set.

    The problem here is that we have two sources of truth:

    * The projects listed in LLVM_ENABLE_PROJECTS.
    * The projects enabled/disabled with LLVM_TOOL_<PROJECT>_BUILD.

    At configure time we have no real way of knowing which source of truth
    the user wants so we apply the following heuristic:

    If the user ever sets `LLVM_ENABLE_PROJECTS` in the CMakeCache then that
    is used as the single source of truth and we force the
    `LLVM_TOOL_<PROJECT>_BUILD` CMake cache variables to have the
    appropriate values that match the contents of the
    `LLVM_ENABLE_PROJECTS`. If the user never sets `LLVM_ENABLE_PROJECTS`
    then they can continue to use and set the `LLVM_TOOL_<PROJECT>_BUILD`
    variables as the "source of truth".

    The problem with this approach is that if the user ever tries to use
    both `LLVM_ENABLE_PROJECTS` and `LLVM_TOOL_<PROJECT>_BUILD` for the same
    build directory then any user set value for `LLVM_TOOL_<PROJECT>_BUILD`
    variables will get overwriten, likely without the user noticing.

    Hopefully the above shouldn't matter in practice because the
    LLVM_TOOL_<PROJECT>_BUILD variables are not documented, but
    LLVM_ENABLE_PROJECTS is.

    We should probably deprecate the `LLVM_TOOL_<PROJECT>_BUILD`
    variables at some point by turning them into to regular CMake
    variables that don't live in the CMake cache.

    Differential Revision: https://reviews.llvm.org/D57535 — delcypher / ViewSVN
  87. [NFC] fix trivial typos in comments — inouehrs / ViewSVN
  88. [DAG][NFC] Add unit tests.

    In preparation for D57541. — courbet / ViewSVN
  89. [DAG] BaseIndexOffset: FrameIndexSDNodes with the same FrameIndex compare equal.

    Reviewers: niravd

    Subscribers: arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57692 — courbet / ViewSVN

#271 (Feb 4, 2019 11:35:40 PM)

  1. [X86] Change MS inline asm clobber list filter to check for 'fpsr' instead of 'fpsw' after D57641.

    Summary: The backend used to print the x87 FPSW register as 'fpsw', but gcc inline asm uses 'fpsr'. After D57641, the backend now uses 'fpsr' to match.

    Reviewers: rnk

    Reviewed By: rnk

    Subscribers: eraman, cfe-commits, llvm-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57642 — ctopper / ViewSVN
  2. [X86] Connect the default fpsr and dirflag clobbers in inline assembly to the registers we have defined for them.

    Summary:
    We don't currently map these constraints to physical register numbers so they don't make it to the MachineIR representation of inline assembly.

    This could have problems for proper dependency tracking in the machine schedulers though I don't have a test case that shows that.

    Reviewers: rnk

    Reviewed By: rnk

    Subscribers: eraman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57641 — ctopper / ViewSVN
  3. Fix double curlies

    Pointed out by Arthur in D57624. — jfb / ViewSVN
  4. gn build: Upgrade to NDK r19.

    NDK r19 includes a sysroot that can be used directly by the compiler
    without creating a standalone toolchain, so we just need a handful
    of flags to point Clang there.

    Differential Revision: https://reviews.llvm.org/D57733 — pcc / ViewSVN
  5. [X86] Add test case from PR40529. NFC — ctopper / ViewSVN
  6. [CMake] Update lit test configuration

    There are several changes:
    - Don't stringify Pythonized bools (that's why we're Pythonizing them)
    - Support specifying target and sysroot via CMake variables
    - Use consistent spelling for --target, --sysroot, --gcc-toolchain — phosek / ViewSVN
  7. [LSR] Check SCEV on isZero() after extend. PR40514

    When LSR first adds SCEVs to BaseRegs, it only does it if `isZero()` has
    returned false. In the end, in invocation of `InsertFormula`, it asserts that
    all values there are still not zero constants. However between these two
    points, it makes some transformations, in particular extends them to wider
    type.

    SCEV does not give us guarantee that if `S` is not a constant zero, then
    `sext(S)` is also not a constant zero. It might have missed some optimizing
    transforms when it was calculating `S` and then made them when it took `sext`.
    For example, it may happen if previously optimizing transforms were limited
    by depth or somehow else.

    This patch adds a bailout when we may end up with a zero SCEV after extension.

    Differential Revision: https://reviews.llvm.org/D57565
    Reviewed By: samparker — mkazantsev / ViewSVN
  8. [SamplePGO] More pipeline changes when flattened profile used in ThinLTO postlink

    Summary:
    Follow on to D54819/r351476.

    We also don't need to perform extra InstCombine pass when we aren't
    loading the sample profile in the ThinLTO backend because we have a
    flattened sample profile.

    Additionally, for consistency and clarity, when we aren't reloading the
    sample profile, perform ICP in the same location as non-sample PGO
    backends. To this end I have moved the ICP invocation for non-SamplePGO
    ThinLTO down into buildModuleSimplificationPipeline (partly addresses
    the FIXME where we were previously setting this up).

    Reviewers: wmi

    Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57705 — tejohnson / ViewSVN
  9. Fix narrowing issue from r353129 — rtrieu / ViewSVN
  10. [WebAssembly] Fix indentation after adding IsCanonical property (NFC) — aheejin / ViewSVN
  11. [WebAssembly] Make disassembler always emit most canonical name.

    Summary:
    There are a few instructions that all map to the same opcode, so
    when disassembling, we have to pick one. That was just the first one
    before (the except_ref variant in the case of "call"), now it is the
    one marked as IsCanonical in tablegen, or failing that, the shortest
    name (which is typically the "canonical" one).

    Also introduced a canonical "end" instruction for this purpose.

    Reviewers: dschuff, tlively

    Subscribers: sbc100, jgravelle-google, aheejin, llvm-commits, sunfish

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57713 — aardappel / ViewSVN
  12. [SamplePGO][NFC] Minor improvement to replace a temporary vector with a
    brace-enclosed init list.

    Differential Revision: https://reviews.llvm.org/D57726 — wmi / ViewSVN
  13. GlobalISel: Fix verifier crashing on non-register operands

    Also correct the wording of error on subregisters. — arsenm / ViewSVN
  14. [WebAssembly] memory.copy

    Summary: Depends on D57495.

    Reviewers: aheejin, dschuff

    Subscribers: sbc100, jgravelle-google, hiraditya, sunfish

    Differential Revision: https://reviews.llvm.org/D57498 — tlively / ViewSVN
  15. [analyzer] Creating standard Sphinx documentation

    The lack of documentation has been a long standing issue in the Static Analyzer,
    and one of the leading reasons behind this was a lack of good documentation
    infrastucture.

    This lead serious drawbacks, such as
    * Not having proper release notes for years
    * Not being able to have a sensible auto-generated checker documentations (which
    lead to most of them not having any)
    * The HTML website that has to updated manually is a chore, and has been
    outdated for a long while
    * Many design discussions are now hidden in phabricator revisions

    This patch implements a new documentation infrastucture using Sphinx, like most
    of the other subprojects in LLVM. It transformed some pages as a proof-of-
    concept, with many others to follow in later patches. The eventual goal is to
    preserve the original website's (https://clang-analyzer.llvm.org/) frontpage,
    but move everything else to the new format.

    Some other ideas, like creating a unipage for each checker (similar to how
    clang-tidy works now), are also being discussed.

    Patch by Dániel Krupp!

    Differential Revision: https://reviews.llvm.org/D54429 — szelethus / ViewSVN
  16. GlobalISel: Consolidate load/store legalization

    The fewerElementsVectors implementation for load/stores
    handles the scalar reduction case just as well, so drop
    the redundant code in narrowScalar. This also introduces
    support for narrowing irregular size breakdowns for
    scalars. — arsenm / ViewSVN
  17. [DAGCombiner] Discard pointer info when combining extract_vector_elt of a vector load when the index isn't constant

    Summary:
    If the index isn't constant, this transform inserts a multiply and an add on the index to calculating the base pointer for a scalar load. But we still create a memory operand with an offset of 0 and the size of the scalar access. But the access is really to an unknown offset within the original access size.

    This can cause the machine scheduler to incorrectly calculate dependencies between this load and other accesses. In the case we saw, there was a 32 byte vector store that was split into two 16 byte stores, one with offset 0 and one with offset 16. The size of the memory operand for both was 16. The scheduler correctly detected the alias with the offset 0 store, but not the offset 16 store.

    This patch discards the pointer info so we don't incorrectly detect aliasing. I wasn't sure if we could keep using the original offset and size without risking some other transform on the load changing the size.

    I tried to reduce a test case, but there's still a lot of memory operations needed to get the scheduler to do the bad reordering. So it looked pretty fragile to maintain.

    Reviewers: efriedma

    Reviewed By: efriedma

    Subscribers: arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57616 — ctopper / ViewSVN
  18. [SamplePGO] Minor efficiency improvement in samplePGO ICP

    Summary:
    When attaching prof metadata to promoted direct calls in SamplePGO
    mode, no need to construct and use a SmallVector to pass a single count
    to the ArrayRef parameter, we can simply use a brace-enclosed init list.

    This made a small but consistent improvement for a ThinLTO backend
    compile I was measuring.

    Reviewers: wmi

    Subscribers: mehdi_amini, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57706 — tejohnson / ViewSVN
  19. GlobalISel: Implement narrowScalar for select

    Don't handle vector conditions.

    I think this can be merged in the future with
    fewerElementsVectorSelect, although this becomes slightly tricky with
    a vector condition. — arsenm / ViewSVN
  20. GlobalISel: Combine g_extract with g_merge_values

    Try to use the underlying source registers.

    This enables legalization in more cases where some irregular
    operations are widened and others narrowed.

    This seems to make the test_combines_2 AArch64 test worse, since the
    MERGE_VALUES has multiple uses. Since this should be required for
    legalization, a hasOneUse check is probably inappropriate (or maybe
    should only be used if the merge is legal?). — arsenm / ViewSVN
  21. [Sanitizers] UBSan unreachable incompatible with Kernel ASan

    Summary:
    This is a follow up for https://reviews.llvm.org/D57278. The previous
    revision should have also included Kernel ASan.

    rdar://problem/40723397

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57711 — yln / ViewSVN
  22. [llvm-readobj] Fix readobj test expectation broken in rL353109. NFC. — sbc / ViewSVN
  23. Revert "[PATCH] [TargetLibraryInfo] Update run time support for Windows"

    This reverts accidental commit ff5527718d5d3b9966f6e8948866c0dc15ffcf3c. — evandro / ViewSVN
  24. [ADT] Refactor the Windows query functions (NFC)

    Increase reuse in the query functions for Windows. — evandro / ViewSVN
  25. [OBJC] Add attribute to mark Objective C class as non-lazy

    A non-lazy class will be initialized eagerly when the Objective-C runtime is
    loaded. This is required for certain system classes which have instances allocated in
    non-standard ways, such as the classes for blocks and constant strings.
    Adding this attribute is essentially equivalent to providing a trivial
    +load method but avoids the (fairly small) load-time overheads associated
    with defining and calling such a method.

    Differential Revision: https://reviews.llvm.org/D56555 — joseph_daniels / ViewSVN
  26. [SemaObjC] Don't infer the availabilty of +new from -init if the receiver has Class type

    rdar://47713266

    Differential revision: https://reviews.llvm.org/D57712 — epilk / ViewSVN
  27. [PATCH] [TargetLibraryInfo] Update run time support for Windows

    It seems that the run time for Windows has changed and supports more math
    functions than before.  Since LLVM requires at least VS2015, I assume that
    this is the run time that would be redistributed with programs built with
    Clang.  Thus, I based this update on the header file `math.h` that
    accompanies it.

    This patch addresses the PR40541.  Unfortunately, I have no access to a
    Windows development environment to validate it. — evandro / ViewSVN
  28. GlobalISel: Enforce operand types for constants

    A number of of tests were using imm operands, not cimm. Since CSE
    relies on the exact ConstantInt* pointer used, and implicit
    conversions are generally evil, also enforce the bitsize of the types. — arsenm / ViewSVN
  29. GlobalISel: Verify g_select

    Factor the common vector element consistency check many instructions
    need out, although this makes the error messages worse. — arsenm / ViewSVN
  30. MachineVerifier: Move verification of G_* instructions to function — arsenm / ViewSVN
  31. [tsan] Disable fgetpwent_r to work around performance issues

    This was missed from D54041 when SANITIZER_INTERCEPT_FGETPWENT_R was branched from SANITIZER_INTERCEPT_GETPWENT_R — Vitaly Buka / ViewSVN
  32. [WebAssembly] MC: Mark more function aliases as functions

    Aliases of functions are now marked as function symbols even if
    they are bitcast to some other other non-function type.
    This is important for WebAssembly where object and function
    symbols can't alias each other.

    Fixes PR38866

    Differential Revision: https://reviews.llvm.org/D57538 — sbc / ViewSVN
  33. [libFuzzer][Windows] Clean up RawPrint

    Summary:
    Use `_write` instead of the deprecated alias `write` on Windows.
    Also, remove comment saying RawPrint is untested on Windows.

    Reviewers: vitalybuka

    Reviewed By: vitalybuka

    Subscribers: vitalybuka

    Differential Revision: https://reviews.llvm.org/D57589 — metzman / ViewSVN
  34. MIR: Validate LLT types when parsing — arsenm / ViewSVN
  35. [CGP] fix bogus test names/comments; NFC

    Inverted operand 0 and operand 1. — spatel / ViewSVN
  36. [llvm-readobj] Report more WebAssembly symbol info

    Differential Revision: https://reviews.llvm.org/D57695 — sbc / ViewSVN
  37. [CGP] add tests for usubo; NFC — spatel / ViewSVN
  38. GlobalISel: Fix not calling observer when legalizing bitcount ops

    This was hiding bugs from never legalizing the source type. — arsenm / ViewSVN
  39. AMDGPU: Don't rematerialize mov with implicit operands

    This was pulling the mov used for register indexing on gfx9 out of the
    loop. — arsenm / ViewSVN
  40. [SanitizerCoverage] Clang crashes if user declares `__sancov_lowest_stack` variable

    Summary:
    If the user declares or defines `__sancov_lowest_stack` with an
    unexpected type, then `getOrInsertGlobal` inserts a bitcast and the
    following cast fails:
    ```
    Constant *SanCovLowestStackConstant =
           M.getOrInsertGlobal(SanCovLowestStackName, IntptrTy);
    SanCovLowestStack = cast<GlobalVariable>(SanCovLowestStackConstant);
    ```

    This variable is a SanitizerCoverage implementation detail and the user
    should generally never have a need to access it, so we emit an error
    now.

    rdar://problem/44143130

    Reviewers: morehouse

    Differential Revision: https://reviews.llvm.org/D57633 — yln / ViewSVN

#270 (Feb 4, 2019 1:53:48 PM)

  1. gn build: Windows: use a more standard format for PDB filenames

    The current build was producing names like llvm-undname.exe.pdb, which looks unusual to me at least. This switches them to the more common llvm-undname.pdb style.

    Differential Revision: https://reviews.llvm.org/D57613 — dmajor / ViewSVN
  2. gn build: Revert r353094 (bad merge) — dmajor / ViewSVN
  3. [InstCombine] Cleanup the TFE/LWE check in AMDGPU SimplifyDemanded

    Summary:
    The fix added in r352904 is not quite correct, or rather misleading:

    1. When the texfailctrl (TFC) argument was non-constant, the fix assumed
       non-TFE/LWE, which is incorrect.

    2. Regardless, this code path cannot even be hit for correct
       TFE/LWE-enabled calls, because those return a struct. Added
       a test case for those for completeness.

    Change-Id: I92d314dbc67a2670f6d7adaab765ef45f56a49cf

    Reviewers: hliao, dstuttard, arsenm

    Subscribers: kzhuravl, jvesely, wdng, yaxunl, tpr, t-tye, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57681 — nha / ViewSVN
  4. [X86] Add test case for report_fatal_error added in r352699.

    r352699 replaced an llvm_unreachable with a report_fatal_error. This patch adds a test case for it. — ctopper / ViewSVN
  5. [CodeGen][ARC][SystemZ][WebAssembly] Use MachineInstr::isInlineAsm in more places instead of just comparing opcode. NFCI

    I'm looking at adding a second INLINEASM opcode for better modeling asm-goto
    as a terminator. Using the existing predicate will reduce teh number of
    places that will need to use the new opcode. — ctopper / ViewSVN
  6. gn build: Windows: use a more standard format for PDB filenames

    The current build was producing names like llvm-undname.exe.pdb, which looks unusual to me at least. This switches them to the more common llvm-undname.pdb style.

    Differential Revision: https://reviews.llvm.org/D57613 — dmajor / ViewSVN
  7. gn build: Windows: write PDBs when is_debug

    Without /DEBUG, the /Zi doesn't on its own create PDB files.

    And since ninja runs multiple compilations in parallel, we need /FS to prevent contention on PDBs.

    Differential Revision: https://reviews.llvm.org/D57612 — dmajor / ViewSVN
  8. [clang-tidy] Handle unions with existing default-member-init

    Summary:
    clang-tidy's modernize-use-default-member-init was crashing for unions
    with an existing default member initializer.

    Fixes PR40492

    Reviewers: aaron.ballman, alexfh, JonasToth

    Reviewed By: JonasToth

    Subscribers: JonasToth, riccibruno, xazax.hun, cfe-commits

    Tags: #clang, #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D57665 — malcolm.parsons / ViewSVN
  9. [Tablegen][DAG]: Fix build breakage when LLVM_ENABLE_DAGISEL_COV=1

    LLVM_ENABLE_DAGISEL_COV can be used to instrument DAGISel tablegen
    selection code to show which patterns along with Complex patterns were
    used when selecting instructions. Unfortunately this is turned off by
    default and was broken but never tested.
    This required a simple fix (missing new line) to get it to build again. — aditya_nandakumar / ViewSVN
  10. [NewPM][MSan] Add Options Handling

    Summary: This patch enables passing options to msan via the passes pipeline, e.e., -passes=msan<recover;kernel;track-origins=4>.

    Reviewers: chandlerc, fedor.sergeev, leonardchan

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57640 — pfaffe / ViewSVN
  11. [DEBUGINFO] Reposting r352642: Handle restore instructions in LiveDebugValues

    The LiveDebugValues pass recognizes spills but not restores, which can
    cause large gaps in location information for some variables, depending
    on control flow. This patch make LiveDebugValues recognize restores and
    generate appropriate DBG_VALUE instructions.

    This patch was posted previously with r352642 and reverted in r352666 due
    to buildbot errors. A missing return statement was the cause for the
    failures.

    Reviewers: aprantl, NicolaPrica

    Differential Revision: https://reviews.llvm.org/D57271 — wolfgangp / ViewSVN
  12. Generalize pthread callback test case

    Changes suggested by Eli Friedman <efriedma@quicinc.com> — jdoerfert / ViewSVN
  13. Support tests in freestanding

    Summary:
    Freestanding is *weird*. The standard allows it to differ in a bunch of odd
    manners from regular C++, and the committee would like to improve that
    situation. I'd like to make libc++ behave better with what freestanding should
    be, so that it can be a tool we use in improving the standard. To do that we
    need to try stuff out, both with "freestanding the language mode" and
    "freestanding the library subset".

    Let's start with the super basic: run the libc++ tests in freestanding, using
    clang as the compiler, and see what works. The easiest hack to do this:

    In utils/libcxx/test/config.py add:

      self.cxx.compile_flags += ['-ffreestanding']

    Run the tests and they all fail.

    Why? Because in freestanding `main` isn't special. This "not special" property
    has two effects: main doesn't get mangled, and main isn't allowed to omit its
    `return` statement. The first means main gets mangled and the linker can't
    create a valid executable for us to test. The second means we spew out warnings
    (ew) and the compiler doesn't insert the `return` we omitted, and main just
    falls of the end and does whatever undefined behavior (if you're luck, ud2
    leading to non-zero return code).

    Let's start my work with the basics. This patch changes all libc++ tests to
    declare `main` as `int main(int, char**` so it mangles consistently (enabling us
    to declare another `extern "C"` main for freestanding which calls the mangled
    one), and adds `return 0;` to all places where it was missing. This touches 6124
    files, and I apologize.

    The former was done with The Magic Of Sed.

    The later was done with a (not quite correct but decent) clang tool:

      https://gist.github.com/jfbastien/793819ff360baa845483dde81170feed

    This works for most tests, though I did have to adjust a few places when e.g.
    the test runs with `-x c`, macros are used for main (such as for the filesystem
    tests), etc.

    Once this is in we can create a freestanding bot which will prevent further
    regressions. After that, we can start the real work of supporting C++
    freestanding fairly well in libc++.

    <rdar://problem/47754795>

    Reviewers: ldionne, mclow.lists, EricWF

    Subscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commits

    Differential Revision: https://reviews.llvm.org/D57624 — jfb / ViewSVN
  14. [CMake] Support CMake variables for setting target, sysroot and toolchain

    CMake has a standard way of setting target triple, sysroot and external
    toolchain through CMAKE_<LANG>_COMPILER_TARGET, CMAKE_SYSROOT and
    CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN. These are turned into
    corresponding --target=, --sysroot= and --gcc-toolchain= variables add
    included appended to CMAKE_<LANG>_FLAGS.

    libunwind, libc++abi, libc++ provides their own mechanism through
    <PROJECT>_TARGET_TRIPLE, <PROJECT>_SYSROOT and <PROJECT>_GCC_TOOLCHAIN
    variables. These are also passed to lit via lit.site.cfg, and lit config
    uses these to set the corresponding compiler flags when building tessts.

    This means that there are two different ways of setting target, sysroot
    and toolchain, but only one is properly supported in lit. This change
    extends CMake build for libunwind, libc++abi and libc++ to also support
    the CMake variables in addition to project specific ones in lit.

    Differential Revision: https://reviews.llvm.org/D57670 — phosek / ViewSVN
  15. [AMDGPU] Support emitting GOT relocations for function calls

    Differential Revision: https://reviews.llvm.org/D57416 — scott.linder / ViewSVN
  16. [WarnMissedTransforms] Do not warn about already vectorized loops.

    LoopVectorize adds llvm.loop.isvectorized, but leaves
    llvm.loop.vectorize.enable. Do not consider such a loop for user-forced
    vectorization since vectorization already happened -- by prioritizing
    llvm.loop.isvectorized except for TM_SuppressedByUser.

    Fixes http://llvm.org/PR40546

    Differential Revision: https://reviews.llvm.org/D57542 — meinersbur / ViewSVN
  17. GlobalISel: Fix CheckMachineFunction passing if ReadCheckFile files

    This could be tested, but the FileCheck library spams the error
    message to the console. — arsenm / ViewSVN
  18. GlobalISel: Allow constructing SrcOp/DstOp from MachineOperand — arsenm / ViewSVN
  19. [clang-tidy] Add the abseil-duration-unnecessary-conversion check

    Differential Revision: https://reviews.llvm.org/D57353 — hwright / ViewSVN
  20. GlobalISel: Fix parameter name in documentation — arsenm / ViewSVN
  21. GlobalISel: Fix CSE handling of buildConstant

    This fixes two problems with CSE done in buildConstant. First, this
    would hit an assert when used with a vector result type. Solve this by
    allowing CSE on the vector elements, but not on the result vector for
    now.

    Second, this was also performing the CSE based on the input
    ConstantInt pointer. The underlying buildConstant could potentially
    convert the constant depending on the result type, giving in a
    different ConstantInt*. Stop allowing the APInt and ConstantInt forms
    from automatically casting to the result type to avoid any similar
    problems in the future. — arsenm / ViewSVN
  22. [WebAssembly] clang-tidy (NFC)

    Summary:
    This patch fixes clang-tidy warnings on wasm-only files.
    The list of checks used is:
    `-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,modernize-*`
    (LLVM's default .clang-tidy list is the same except it does not have
    `modernize-*`. But I've seen in multiple CLs in LLVM the modernize style
    was recommended and code was fixed based on the style, so I added it as
    well.)

    The common fixes are:
    - Variable names start with an uppercase letter
    - Function names start with a lowercase letter
    - Use `auto` when you use casts so the type is evident
    - Use inline initialization for class member variables
    - Use `= default` for empty constructors / destructors
    - Use `using` in place of `typedef`

    Reviewers: sbc100, tlively, aardappel

    Subscribers: dschuff, sunfish, jgravelle-google, yurydelendik, kripken, MatzeB, mgorny, rupprecht, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57500 — aheejin / ViewSVN
  23. [llvm-objcopy][NFC] simplify an error return — rupprecht / ViewSVN
  24. [X86] X86DAGToDAGISel::matchBitExtract(): prepare 'control' in 32 bits

    Summary:
    Noticed while looking at D56052.
    ```
      // The 'control' of BEXTR has the pattern of:
      // [15...8 bit][ 7...0 bit] location
      // [ bit count][     shift] name
      // I.e. 0b000000011'00000001 means  (x >> 0b1) & 0b11
    ```
    I.e. we do not care about any of the bits aside from the low 16 bits.
    So there is no point in doing the `slh`,`or` in 64 bits,
    let's just do everything in 32 bits, and anyext if needed.

    We could do that in 16 even, but we intentionally don't
    zext to i16 (longer encoding IIRC),
    so i'm guessing the same applies here.

    Reviewers: craig.topper, andreadb, RKSimon

    Reviewed By: craig.topper

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D56715 — lebedevri / ViewSVN
  25. GlobalISel: Improve gtest usage

    Don't unnecessarily use ASSERT_*, and print the MachineFunction
    on failure. — arsenm / ViewSVN
  26. Adjust cardinality of internal inliner thresholds

    Summary:
    While compiling openJDK11 (also other workloads), some make files would pass both  CFLAGS  and LDFLAGS at link step ; resulting in duplicate options on the command line when one is using LTO and trying to influence the inliner. Most of the internal flags are ZeroOrMore, this diff changes the remaining ones.

    Reviewers: david2050, twoh, modocache

    Reviewed By: twoh

    Subscribers: mehdi_amini, dexonsmith, eraman, haicheng, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57537

    Patch by: Abdoul-Kader Keita — david2050 / ViewSVN
  27. [X86] Add ST0 as an implicit def/use of x87 load/store instructions during FP stackifying.

    These instructions implicitly operate on ST0, but we don't currently add that information to the MachineInstr. We also don't add it the tablegen definitions either.

    For the most part this doesn't cause any problems because the stackifying occurs after register allocation. All the instructions are marked as having side effects so the postRA scheduler won't reorder them amongst themselves.

    But nothing stops inline assembly using X87 instructions from being reordered around other x87 instructions if that inline assembly wasn't marked volatile.

    The two test cases I've identified so far in PR40539 involve loads and stores used to set up the inline assembly or capture the results of the inline assembly ending up in the wrong order.

    This patch adds implicit ST0 uses/defs to the load/store instructions to prevent this from happening.

    I plan to fix all of the FP instructions, but the binops are bit trickier to get right. So I've chosen fixing the known test cases as a good first step.

    I think we also need to update the tablegen descriptions so MS inline assembly infers the right clobbers, but I haven't checked that yet.

    Differential Revision: https://reviews.llvm.org/D57644 — ctopper / ViewSVN
  28. GlobalISel: Fix moreElementsToNextPow2

    This was completely broken. The condition was inverted, and changed
    the element type for vectors of pointers.

    Fixes bug 40592. — arsenm / ViewSVN
  29. [llvm-objcopy][NFC] Use StringSaver for --keep-global-symbols

    Summary: Use StringSaver/BumpPtrAlloc when parsing lines from --keep-global-symbols files. This allows us to consistently use StringRef for driver options, which avoids copying the full strings for each object copied, as well as simplifies part of D57517.

    Reviewers: jhenderson, evgeny777, alexshap

    Subscribers: jakehehrlich

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57617 — rupprecht / ViewSVN
  30. [WebAssembly] Make segment/size/type directives optional in asm

    Summary:
    These were "boilerplate" that repeated information already present
    in .functype and end_function, that needed to be repeated to Please
    the particular way our object writing works, and missing them would
    generate errors.

    Instead, we generate the information for these automatically so the
    user can concern itself with writing more canonical wasm functions
    that always work as expected.

    Reviewers: dschuff, sbc100

    Subscribers: jgravelle-google, aheejin, sunfish, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57546 — aardappel / ViewSVN
  31. Revert "[GlobalISel] Introduce a generic floating point floor opcode, G_FFLOOR"

    This reverts commit b05ecba6d687fcb3078509220c67458bf1d77a2e.

    Apparently adding floor breaks AMDGPU somehow, so I have to back this out
    while I look into it. — paquette / ViewSVN
  32. Revert "[GlobalISel] Add IRTranslator support for G_FFLOOR"

    This reverts commit 8bbd570fd5205a04d88d2e5513a6e4adbd028039.

    Apparently adding ffloor breaks AMDGPU somehow, so I need to back this out
    while I look into it. — paquette / ViewSVN
  33. gn build: Merge r352944 — nico / ViewSVN
  34. [WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_

    See https://github.com/WebAssembly/tool-conventions/pull/95.

    This is less typing and IMHO more readable, and it also fits with
    our naming around the binary format which tends to use the short name.
    e.g.

    include/llvm/BinaryFormat/Wasm.h
    tools/llvm-objdump/WasmDump.cpp
    etc..

    Differential Revision: https://reviews.llvm.org/D57611 — sbc / ViewSVN
  35. [X86] Print all register forms of x87 fadd/fsub/fdiv/fmul as having two arguments where on is %st.

    All of these instructions consume one encoded register and the other register is %st. They either write the result to %st or the encoded register. Previously we printed both arguments when the encoded register was written. And we printed one argument when the result was written to %st. For the stack popping forms the encoded register is always the destination and we didn't print both operands. This was inconsistent with gcc and objdump and just makes the output assembly code harder to read.

    This patch changes things to always print both operands making us consistent with gcc and objdump. The parser should still be able to handle the single register forms just as it did before. This also matches the GNU assembler behavior. — ctopper / ViewSVN
  36. [WebAssembly] Remove redundant namespaces qualifiers. NFC.

    Differential Revision: https://reviews.llvm.org/D57610 — sbc / ViewSVN
  37. [Intrinsic] Unsigned Fixed Point Multiplication Intrinsic

    Add an intrinsic that takes 2 unsigned integers with the scale of them
    provided as the third argument and performs fixed point multiplication on
    them.

    This is a part of implementing fixed point arithmetic in clang where some of
    the more complex operations will be implemented as intrinsics.

    Differential Revision: https://reviews.llvm.org/D55625 — leonardchan / ViewSVN
  38. [GlobalISel] Add IRTranslator support for G_FFLOOR

    Follow-up to https://reviews.llvm.org/D57484

    Adds G_FFLOOR to translateKnownIntrinsic and update arm64-irtranslator.ll.

    Differential Revision: https://reviews.llvm.org/D57485 — paquette / ViewSVN
  39. [GlobalISel] Introduce a generic floating point floor opcode, G_FFLOOR

    This introduces a generic opcode for floating point floor, working towards
    selecting @llvm.floor.

    Differential Revision: https://reviews.llvm.org/D57484 — paquette / ViewSVN
  40. [CGP] use IRBuilder to simplify code

    This is no-functional-change-intended although there could
    be intermediate variations caused by a difference in the
    debug info produced by setting that from the builder's
    insertion point.

    I'm updating the IR test file associated with this code just
    to show that the naming differences from using the builder
    are visible.

    The motivation for adding a helper function is that we are
    likely to extend this code to deal with other overflow ops. — spatel / ViewSVN
  41. [scudo] Initial standalone skeleton check-in

    Summary:
    This is the initial check-in for the Standalone version of Scudo.

    The project is initially going to live in scudo/standalone then will
    replace scudo. See http://lists.llvm.org/pipermail/llvm-dev/2019-January/129113.html
    for details.

    This initial CL is meant to lay out the project structure, of both
    code & tests, providing a minimal amount of functionalities, namely
    various definitions, some atomic helpers and an intrusive list.
    (empty.cc is just here to have a compilation unit, but will go away
    in the upcoming CLs).

    Initial support is restricted to Linux i386 & x86_64 in make files
    and will be extended once things land & work.

    We will grow organically from here, adding functionalities in limited
    amounts.

    Reviewers: morehouse, eugenis, vitalybuka, kcc, mcgrathr, flowerhack

    Reviewed By: morehouse, vitalybuka

    Subscribers: srhines, mgorny, krytarowski, delcypher, jfb, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D57412 — cryptoad / ViewSVN
  42. [clangd] Enable include insertion for static index

    Summary:
    This enables include insertion by adding canonical includes into
    preambledata.

    Reviewers: ioeric, ilya-biryukov

    Subscribers: javed.absar, MaskRay, jkorous, arphaman, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57508 — kadircet / ViewSVN
  43. [CommandLine] Don't print empty sentinel values from EnumValN lists in help text

    In order to make an option value truly optional, both the ValueOptional
    attribute and an empty-named value are required. Prior to this change,
    this empty-named value appears in the command-line help text:

    -some-option - some help text
      =v1        - description 1
      =v2        - description 2
      =          -

    This change improves the help text for these sort of options in a number
    of ways:

    1) ValueOptional options with an empty-named value now print their help
       text twice: both without and then with '=<value>' after the name. The
       latter version then lists the allowed values after it.
    2) Empty-named values with no help text in ValueOptional options are not
       listed in the permitted values.

    -some-option         - some help text
    -some-option=<value> - some help text
      =v1                - description 1
      =v2                - description 2

    3) Otherwise empty-named options are printed as =<empty> rather than
       simply '='.
    4) Option values without help text do not have the '-' separator
       printed.

    -some-option=<value> - some help text
      =v1                - description 1
      =v2
      =<empty>           - description

    It also tweaks the llvm-symbolizer -functions help text to not print a
    trailing ':' as that looks bad combined with 1) above.

    This is mostly a reland of r353048 which in turn was a reland of
    r352750.

    Reviewed by: ruiu, thopre, mstorsjo

    Differential Revision: https://reviews.llvm.org/D57030 — jhenderson / ViewSVN
  44. [X86][SSE] SimplifyDemandedBitsForTargetNode - PCMPGT(0,X) sign mask

    For PCMPGT(0, X) patterns where we only demand the sign bit (e.g. BLENDV or MOVMSK) then we can use X directly.

    Differential Revision: https://reviews.llvm.org/D57667 — rksimon / ViewSVN
  45. Revert r353048.

    It was causing unexpected unit test failures on build bots. — jhenderson / ViewSVN
  46. [CommandLine] Don't print empty sentinel values from EnumValN lists in help text

    In order to make an option value truly optional, both the ValueOptional
    attribute and an empty-named value are required. Prior to this change,
    this empty-named value appears in the command-line help text:

    -some-option - some help text
      =v1        - description 1
      =v2        - description 2
      =          -

    This change improves the help text for these sort of options in a number
    of ways:

    1) ValueOptional options with an empty-named value now print their help
       text twice: both without and then with '=<value>' after the name. The
       latter version then lists the allowed values after it.
    2) Empty-named values with no help text in ValueOptional options are not
       listed in the permitted values.

    -some-option         - some help text
    -some-option=<value> - some help text
      =v1                - description 1
      =v2                - description 2

    3) Otherwise empty-named options are printed as =<empty> rather than
       simply '='.
    4) Option values without help text do not have the '-' separator
       printed.

    -some-option=<value> - some help text
      =v1                - description 1
      =v2
      =<empty>           - description

    It also tweaks the llvm-symbolizer -functions help text to not print a
    trailing ':' as that looks bad combined with 1) above.

    This is mostly a reland of r352750.

    Reviewed by: ruiu, thopre, mstorsjo

    Differential Revision: https://reviews.llvm.org/D57030 — jhenderson / ViewSVN
  47. GlobalISel: Fix formatting of debug output

    There was a missing space before the instruction name, and the newline
    is redundant since MI::print by default adds one. — arsenm / ViewSVN
  48. AMDGPU/GlobalISel: Legalize select for v4s16

    Also add some more select tests to help show future legalization
    changes. — arsenm / ViewSVN
  49. [DAGCombine] Add ADD(SUB,SUB) combines

    Noticed while investigating PR40483, and fixes the basic test case from the bug - but not a more general case.

    We're pretty weak at dealing with ADD/SUB combines compared to the SimplifyAssociativeOrCommutative/SimplifyUsingDistributiveLaws abilities that InstCombine can manage. — rksimon / ViewSVN
  50. [AsmPrinter] Remove hidden flag -print-schedule.

    This patch removes hidden codegen flag -print-schedule effectively reverting the
    logic originally committed as r300311
    (https://llvm.org/viewvc/llvm-project?view=revision&revision=300311).

    Flag -print-schedule was originally introduced by r300311 to address PR32216
    (https://bugs.llvm.org/show_bug.cgi?id=32216). That bug was about adding "Better
    testing of schedule model instruction latencies/throughputs".

    These days, we can use llvm-mca to test scheduling models. So there is no longer
    a need for flag -print-schedule in LLVM. The main use case for PR32216 is
    now addressed by llvm-mca.
    Flag -print-schedule is mainly used for debugging purposes, and it is only
    actually used by x86 specific tests. We already have extensive (latency and
    throughput) tests under "test/tools/llvm-mca" for X86 processor models. That
    means, most (if not all) existing -print-schedule tests for X86 are redundant.

    When flag -print-schedule was first added to LLVM, several files had to be
    modified; a few APIs gained new arguments (see for example method
    MCAsmStreamer::EmitInstruction), and MCSubtargetInfo/TargetSubtargetInfo gained
    a couple of getSchedInfoStr() methods.

    Method getSchedInfoStr() had to originally work for both MCInst and
    MachineInstr. The original implmentation of getSchedInfoStr() introduced a
    subtle layering violation (reported as PR37160 and then fixed/worked-around by
    r330615).
    In retrospect, that new API could have been designed more optimally. We can
    always query MCSchedModel to get the latency and throughput. More importantly,
    the "sched-info" string should not have been generated by the subtarget.
    Note, r317782 fixed an issue where "print-schedule" didn't work very well in the
    presence of inline assembly. That commit is also reverted by this change.

    Differential Revision: https://reviews.llvm.org/D57244 — adibiagio / ViewSVN

#269 (Feb 4, 2019 4:42:57 AM)

  1. [X86] Add a couple of missed ADD combine tests

    Noticed while investigating PR40483 — rksimon / ViewSVN
  2. Use auto for dyn_cast case to save a line. NFCI. — rksimon / ViewSVN
  3. [ARM] Mark 255 and 65535 as cheap for Thumb1 "And"

    This prevents Constant Hoisting from pulling the constant out of the block,
    allowing us to still produce LDRH/UXTH nodes. LDRB/UXTB (255) is already cheap
    by the default getIntImmCost, but I've added it for clarity.

    Differential Revision: https://reviews.llvm.org/D57671 — dmgreen / ViewSVN
  4. [ARM] Add testcases for D57671. NFC — dmgreen / ViewSVN
  5. [NFC] Make a check in GuardWidening more obvious — mkazantsev / ViewSVN
  6. Commit tests for changes in revision D41608 — quolyk / ViewSVN
  7. [NFC] Rename variables to reflect the actual status of GuardWidening — mkazantsev / ViewSVN
  8. [llvm-objcopy][NFC] Fix trailing semicolon warning. — courbet / ViewSVN
  9. [NFC] Remove redundant parameters for better readability — mkazantsev / ViewSVN
  10. [clang-format] Fix breaking of qualified operator

    Summary:
    From https://bugs.llvm.org/show_bug.cgi?id=40516
    ```
    $ cat a.cpp
    const NamespaceName::VeryLongClassName &NamespaceName::VeryLongClassName::myFunction() {
      // do stuff
    }

    const NamespaceName::VeryLongClassName &NamespaceName::VeryLongClassName::operator++() {
      // do stuff
    }
    $ ~/ll/build/opt/bin/clang-format -style=LLVM a.cpp
    const NamespaceName::VeryLongClassName &
    NamespaceName::VeryLongClassName::myFunction() {
      // do stuff
    }

    const NamespaceName::VeryLongClassName &NamespaceName::VeryLongClassName::
    operator++() {
      // do stuff
    }
    ```
    What was happening is that the split penalty before `operator` was being set to
    a smaller value by a prior if block. Moved checks around to fix this and added a
    regression test.

    Reviewers: djasper

    Reviewed By: djasper

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57604 — krasimir / ViewSVN
  11. [NFC] Replace equivalent condition for better readability — mkazantsev / ViewSVN
  12. [clang] Add getCommentHandler to PreambleCallbacks

    Summary:
    Enables users to add comment handlers to preprocessor when building
    preambles.

    Reviewers: ilya-biryukov, ioeric

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D57507 — kadircet / ViewSVN
  13. [SelectionDAG] Add a BaseIndexOffset::print() method for debugging. — courbet / ViewSVN
  14. [clangd] Bump vscode-clangd v0.0.10

    CHANGELOG:
    - cleanup filestatus caches when clangd crashes
    - extension workwith LSP v3.14.0, support go-to-declaration feature — hokein / ViewSVN
  15. [clangd] Update vscode dependencies

    This allows us to use latest LSP v3.14.0 (for go-to-declaration feature). — hokein / ViewSVN
  16. [llvm-exegesis] Cut run time of analysis mode by another -35% (*sic*) (YamlContext::getRegNo())

    Summary:

    Together with the previous patch, it's an -90% improvement,
    or roughly -96% improvement if you look starting with rL347204

    ```
    $ perf stat -r 9 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file="" -analysis-inconsistencies-output-file=/tmp/clusters-bew.html
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-bew.html'
    ...
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-bew.html'

    Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file= -analysis-inconsistencies-output-file=/tmp/clusters-bew.html' (9 runs):

               1483.18 msec task-clock                #    0.999 CPUs utilized            ( +-  0.10% )
                    68      context-switches          #   46.085 M/sec                    ( +- 22.62% )
                     0      cpu-migrations            #    0.000 K/sec
                 11641      page-faults               # 7850.880 M/sec                    ( +-  0.62% )
            5943246799      cycles                    # 4008184.428 GHz                   ( +-  0.10% )  (83.28%)
             442869514      stalled-cycles-frontend   #    7.45% frontend cycles idle     ( +-  0.41% )  (83.29%)
            1443375663      stalled-cycles-backend    #   24.29% backend cycles idle      ( +-  0.47% )  (33.43%)
            7714006752      instructions              #    1.30  insn per cycle
                                                      #    0.19  stalled cycles per insn  ( +-  0.07% )  (50.17%)
            1977242936      branches                  # 1333472193.855 M/sec              ( +-  0.07% )  (66.79%)
              32624220      branch-misses             #    1.65% of all branches          ( +-  0.18% )  (83.34%)

               1.48438 +- 0.00143 seconds time elapsed  ( +-  0.10% )
    ```
    ```
    $ perf stat -r 9 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file="" -analysis-inconsistencies-output-file=/tmp/clusters-newer.html
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-newer.html'
    ...
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-newer.html'

    Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file= -analysis-inconsistencies-output-file=/tmp/clusters-newer.html' (9 runs):

                963.28 msec task-clock                #    0.999 CPUs utilized            ( +-  0.37% )
                    12      context-switches          #   12.695 M/sec                    ( +- 52.79% )
                     0      cpu-migrations            #    0.000 K/sec
                 11599      page-faults               # 12046.971 M/sec                   ( +-  0.59% )
            3860122322      cycles                    # 4009359.596 GHz                   ( +-  0.37% )  (83.19%)
             380300669      stalled-cycles-frontend   #    9.85% frontend cycles idle     ( +-  0.34% )  (83.30%)
            1071910340      stalled-cycles-backend    #   27.77% backend cycles idle      ( +-  1.30% )  (33.51%)
            4773418224      instructions              #    1.24  insn per cycle
                                                      #    0.22  stalled cycles per insn  ( +-  0.15% )  (50.17%)
            1106990316      branches                  # 1149787979.919 M/sec              ( +-  0.11% )  (66.80%)
              23632231      branch-misses             #    2.13% of all branches          ( +-  0.18% )  (83.33%)

               0.96389 +- 0.00356 seconds time elapsed  ( +-  0.37% )
    ```
    ```
    $ sha512sum /tmp/clusters-*
    db4bbd904fe8840853b589b032c5041bc060b91bcd9c27b914b56581fbc473550eea74b852238c79963b5adf2419f379e9f5db76784048b48e3937f9f3e732bf  /tmp/clusters-bew.html
    db4bbd904fe8840853b589b032c5041bc060b91bcd9c27b914b56581fbc473550eea74b852238c79963b5adf2419f379e9f5db76784048b48e3937f9f3e732bf  /tmp/clusters-newer.html
    db4bbd904fe8840853b589b032c5041bc060b91bcd9c27b914b56581fbc473550eea74b852238c79963b5adf2419f379e9f5db76784048b48e3937f9f3e732bf  /tmp/clusters-old.html
    ```

    Reviewers: courbet, gchatelet

    Reviewed By: courbet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57658 — lebedevri / ViewSVN
  17. [llvm-exegesis] Cut run time of analysis mode by -84% (*sic*) (YamlContext::getInstrOpcode())

    Summary:
    ```
    $ perf stat -r 9 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file="" -analysis-inconsistencies-output-file=/tmp/clusters-old.html
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 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 14656 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=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file= -analysis-inconsistencies-output-file=/tmp/clusters-old.html' (9 runs):

               9465.46 msec task-clock                #    1.000 CPUs utilized            ( +-  0.05% )
                    60      context-switches          #    6.363 M/sec                    ( +- 79.45% )
                     0      cpu-migrations            #    0.000 K/sec
                 11364      page-faults               # 1200.697 M/sec                    ( +-  0.60% )
           37935623543      cycles                    # 4008083.912 GHz                   ( +-  0.05% )  (83.32%)
            2371625356      stalled-cycles-frontend   #    6.25% frontend cycles idle     ( +-  0.37% )  (83.32%)
            8476077875      stalled-cycles-backend    #   22.34% backend cycles idle      ( +-  0.18% )  (33.36%)
           41822439158      instructions              #    1.10  insn per cycle
                                                      #    0.20  stalled cycles per insn  ( +-  0.02% )  (50.03%)
           11607658944      branches                  # 1226405861.486 M/sec              ( +-  0.01% )  (66.69%)
             210864633      branch-misses             #    1.82% of all branches          ( +-  0.06% )  (83.34%)

               9.46636 +- 0.00441 seconds time elapsed  ( +-  0.05% )
    ```
    ```
    $ perf stat -r 9 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file="" -analysis-inconsistencies-output-file=/tmp/clusters-bew.html
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-bew.html'
    ...
    no exegesis target for x86_64-unknown-linux-gnu, using default
    Parsed 14656 benchmark points
    Printing sched class consistency analysis results to file '/tmp/clusters-bew.html'

    Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file= -analysis-inconsistencies-output-file=/tmp/clusters-bew.html' (9 runs):

               1480.66 msec task-clock                #    1.000 CPUs utilized            ( +-  0.19% )
                    13      context-switches          #    8.483 M/sec                    ( +- 83.10% )
                     0      cpu-migrations            #    0.075 M/sec                    ( +-100.00% )
                 11596      page-faults               # 7834.247 M/sec                    ( +-  0.59% )
            5933732194      cycles                    # 4008977.535 GHz                   ( +-  0.19% )  (83.22%)
             438111928      stalled-cycles-frontend   #    7.38% frontend cycles idle     ( +-  0.37% )  (83.25%)
            1454969705      stalled-cycles-backend    #   24.52% backend cycles idle      ( +-  0.94% )  (33.53%)
            7724218604      instructions              #    1.30  insn per cycle
                                                      #    0.19  stalled cycles per insn  ( +-  0.07% )  (50.14%)
            1979796413      branches                  # 1337599858.945 M/sec              ( +-  0.06% )  (66.74%)
              32641638      branch-misses             #    1.65% of all branches          ( +-  0.18% )  (83.31%)

               1.48128 +- 0.00284 seconds time elapsed  ( +-  0.19% )

    $ sha512sum /tmp/clusters-*
    db4bbd904fe8840853b589b032c5041bc060b91bcd9c27b914b56581fbc473550eea74b852238c79963b5adf2419f379e9f5db76784048b48e3937f9f3e732bf  /tmp/clusters-bew.html
    db4bbd904fe8840853b589b032c5041bc060b91bcd9c27b914b56581fbc473550eea74b852238c79963b5adf2419f379e9f5db76784048b48e3937f9f3e732bf  /tmp/clusters-old.html
    ```

    Reviewers: courbet, gchatelet

    Reviewed By: courbet

    Subscribers: tschuett, llvm-commits, RKSimon

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57657 — lebedevri / ViewSVN
  18. [llvm-exegesis] Throughput support in analysis mode

    Summary:
    D57000 / [[ https://bugs.llvm.org/show_bug.cgi?id=37698 | PR37698 ]] added support for measuring of the inverse throughput.
    But the support for the analysis was not added.
    This attempts to fix that. (analysis done o bdver2 / piledriver)

    First, small-scale experiment:
    ```
    $ ./bin/llvm-exegesis -num-repetitions=10000 -mode=inverse_throughput -opcode-name=BSF64rr
    Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-d0acdd.o
    ---
    mode:            inverse_throughput
    key:
      instructions:
        - 'BSF64rr RAX RDX'
      config:          ''
      register_initial_values:
        - 'RDX=0x0'
    cpu_name:        bdver2
    llvm_triple:     x86_64-unknown-linux-gnu
    num_repetitions: 10000
    measurements:
      - { key: inverse_throughput, value: 3.0278, per_snippet_value: 3.0278 }
    error:           ''
    info:            instruction has no tied variables picking Uses different from defs
    assembled_snippet: 48BA0000000000000000480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2480FBCC2C3
    ...
    ```
    If we plug `bsfq %r12, %r10` into llvm-mca:
    https://godbolt.org/z/ZtOyhJ
    ```
    Dispatch Width:    4
    uOps Per Cycle:    3.00
    IPC:               0.50
    Block RThroughput: 2.0
    ```
    So RThroughput mismatch exists.

    Now, let's upscale and analyse:
    {F8207148}
    `$ ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput.yaml -analysis-inconsistencies-output-file=/tmp/clusters.html`:
    {F8207172}
    {F8207197}
    And if we now look at https://www.agner.org/optimize/instruction_tables.pdf,
    `Reciprocal throughput` for `BSF r,r` is listed as `3`.
    Yay?

    Reviewers: courbet, gchatelet

    Reviewed By: courbet

    Subscribers: tschuett, RKSimon, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57647 — lebedevri / ViewSVN
  19. [llvm-exegesis] deserializeMCInst(): bump SmallVector small size up to 16

    Summary:
    ... from 8.
    `VALIGNDZ128rmbik XMM0 XMM0 K1 XMM3 RDI i_0x1  i_0x0  i_0x1` instruction already has 9 components.
    It does not matter much in terms of performance, but avoiding allocation seems to come with low cost here..

    Reviewers: courbet, gchatelet

    Reviewed By: courbet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57654 — lebedevri / ViewSVN
  20. [llvm-exegesis] Don't default to running&dumping all analyses to '-'

    Summary:
    Up until the point i have looked in the source, i didn't even understood that
    i can disable 'cluster' output. I have always silenced it via ` &> /dev/null`.
    (And hoped it wasn't contributing much of the run time.)

    While i expect that it has it's use-cases i never once needed it so far.
    If i forget to silence it, console is completely flooded with that output.

    How about not expecting users to opt-out of analyses,
    but to explicitly specify the analyses that should be performed?

    Reviewers: courbet, gchatelet

    Reviewed By: courbet

    Subscribers: tschuett, RKSimon, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57648 — lebedevri / ViewSVN
  21. [OpenMP] Adding support to the mutexinoutset dep-type

    Summary: this commit adds support to a new dependence type introduced in OpenMP
    5.0. The LLVM OpenMP RTL already supports this feature, so we  only need to
    modify CLANG to take advantage of them.


    Differential Revision: https://reviews.llvm.org/D57576 — smateo / ViewSVN
  22. [SCEV] Do not bother creating separate SCEVUnknown for unreachable nodes

    Currently, SCEV creates SCEVUnknown for every node of unreachable code. If we
    have a huge amounts of such code, we will be littering SE with these nodes. We could
    just state that they all are undef and save some memory.

    Differential Revision: https://reviews.llvm.org/D57567
    Reviewed By: sanjoy — mkazantsev / ViewSVN
  23. Recommit r352660 "[X86] Mark EMMS and FEMMS as clobbering MM0-7 and ST0-7."

    We now print ST0 as 'st' when generating the clobber list for MS inline assembly in clang. This matches what the gcc reg name list expects.

    Original commit message:

    This fixes the test case in PR35982 by preventing MMX instructions that read MM0-7 from being moved below EMMS/FEMMS by the post RA scheduler.

    Though as discussed in bugzilla, this is not a complete fix. There is still the possibility of reordering in IR or by the pre-RA scheduler.

    Differential Revision: https://reviews.llvm.org/D57298 — ctopper / ViewSVN
  24. [X86] Print %st(0) as %st when its implicit to the instruction. Continue printing it as %st(0) when its encoded in the instruction.

    This is a step back from the change I made in r352985. This appears to be more consistent with gcc and objdump behavior. — ctopper / ViewSVN
  25. [X86] Regenerate test to drop 'End function' comments some other other regex updates. — ctopper / ViewSVN
  26. Revert r352985 "[X86] Print %st(0) as %st to match what gcc inline asm uses as the clobber name to make MS inline asm work correctly"

    Looking into gcc and objdump behavior more this was overly aggressive. If the register is encoded in the instruction we should print %st(0), if its implicit we should print %st.

    I'll be making a more directed change in a future patch. — ctopper / ViewSVN

#268 (Feb 3, 2019 7:32:56 PM)

  1. tests: loosen restriction

    The MachO tests can run on any target, but require that the x86 backend
    is available.  Broaden the coverage of the test. — Saleem Abdulrasool / ViewSVN
  2. Compute the correct symbol size in llvm-nm even without --print-size

    In llvm-nm, the symbol size was being computed only with --print-size option,
    even though it was being printed in other cases, such as with --format=posix.

    This patch simply removes the guard, so that the size is computed
    independently of the later decision to print it or not.

    Fixes PR39997.

    Differential Revision: https://reviews.llvm.org/D57599 — ssrivastava / ViewSVN
  3. [opaque pointer types] Trivial changes towards CallInst requiring
    explicit function types. — jyknight / ViewSVN
  4. [docs] Recommend assertions when testing.

    Pointed out by Shoaib Meenai. — davide / ViewSVN
  5. [LoopIdiomRecognize] @llvm.dbg values shouldn't affect the transformation.

    Summary: PR40564

    Reviewers: aprantl, rnk

    Subscribers: llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57629 — davide / ViewSVN
  6. [AST] Update the comments of the various Expr::Ignore* + Related cleanups

    The description of what the various Expr::Ignore* do has drifted from the
    actual implementation.

    Inspection reveals that IgnoreParenImpCasts() is not equivalent to doing
    IgnoreParens() + IgnoreImpCasts() until reaching a fixed point, but
    IgnoreParenCasts() is equivalent to doing IgnoreParens() + IgnoreCasts()
    until reaching a fixed point. There is also a fair amount of duplication
    in the various Expr::Ignore* functions which increase the chance of further
    future inconsistencies. In preparation for the next patch which will factor
    out the implementation of the various Expr::Ignore*, do the following cleanups:

    Remove Stmt::IgnoreImplicit, in favor of Expr::IgnoreImplicit. IgnoreImplicit
    is the only function among all of the Expr::Ignore* which is available in Stmt.
    There are only a few users of Stmt::IgnoreImplicit. They can just use instead
    Expr::IgnoreImplicit like they have to do for the other Ignore*.

    Move Expr::IgnoreImpCasts() from Expr.h to Expr.cpp. This made no difference
    in the run-time with my usual benchmark (-fsyntax-only on all of Boost).

    While we are at it, make IgnoreParenNoopCasts take a const reference to the
    ASTContext for const correctness.

    Update the comments to match what the Expr::Ignore* are actually doing.
    I am not sure that listing exactly what each Expr::Ignore* do is optimal,
    but it certainly looks better than the current state which is in my opinion
    between misleading and just plain wrong.

    The whole patch is NFC (if you count removing Stmt::IgnoreImplicit as NFC).

    Differential Revision: https://reviews.llvm.org/D57266

    Reviewed By: aaron.ballman — brunoricci / ViewSVN
  7. [NFC] Make vector types legal in UREM test

    As discussed in D50222, this changes the vector types in tests required for that revision to ones legal for X86.

    Patch by @hermord (Dmytro Shynkevych)

    Differential Revision: https://reviews.llvm.org/D56372 — rksimon / ViewSVN
  8. [ASTDump] Add a flag indicating whether a CXXThisExpr is implicit

    There is currently no way to distinguish implicit from explicit
    CXXThisExpr in the AST dump output.

    Differential Revision: https://reviews.llvm.org/D57649

    Reviewed By: steveire — brunoricci / ViewSVN
  9. [PowerPC] adjust test for uaddo change in rL353001

    We don't need a mtctr/bctr for this test now; a regular
    conditional branch is fine. — spatel / ViewSVN
  10. [CGP] adjust target constraints for forming uaddo

    There are 2 changes visible here:
    1. There's no reason to limit this transform based on number
       of condition registers. That diff allows PPC to produce
       slightly better (dot-instructions should be generally good)
       code.
       Note: someone that cares about PPC codegen might want to
       look closer at that output because it seems like we could
       still improve this.

    2. We (probably?) should not bother trying to form uaddo (or
       other overflow ops) when there's no target support for such
       an op. This goes beyond checking whether the op is expanded
       because both PPC and AArch64 show better codegen for standard
       types regardless of whether the op is legal/custom. — spatel / ViewSVN
  11. [libFuzzer][Windows] Reenable passing tests

    Summary:
    Enable tests that were previously disabled because they didn't work on
    Windows.

    Reviewers: morehouse

    Reviewed By: morehouse

    Subscribers: morehouse

    Differential Revision: https://reviews.llvm.org/D57563 — metzman / ViewSVN
  12. [X86][AVX] Support shuffle combining for VBROADCAST with smaller vector sources

    getTargetShuffleMask can only do this safely if we're extracting the lowest subvector from a vector of the same result type. — rksimon / ViewSVN
  13. [PatternMatch] add special-case uaddo matching for increment-by-one (2nd try)

    This is the most important uaddo problem mentioned in PR31754:
    https://bugs.llvm.org/show_bug.cgi?id=31754
    ...but that was overcome in x86 codegen with D57637.

    That patch also corrects the inc vs. add regressions seen with the  previous attempt at this.

    Still, we want to make this matcher complete, so we can potentially canonicalize the pattern
    even if it's an 'add 1' operation.
    Pattern matching, however, shouldn't assume that we have canonicalized IR, so we match 4
    commuted variants of uaddo.

    There's also a test with a crazy type to show that the existing CGP transform based on this
    matcher is not limited by target legality checks.

    I'm not sure if the Hexagon diff means the test is no longer testing what it intended to
    test, but that should be solvable in a follow-up.

    Differential Revision: https://reviews.llvm.org/D57516 — spatel / ViewSVN
  14. [X86][AVX] Support shuffle combining for VPMOVZX with smaller vector sources — rksimon / ViewSVN
  15. Hot fix two test regressions (%T vs %t)

    Different Unix "errno" values are returned for the following scenarios:

    $ echo test > /tmp/existingFile/impossibleDir/impossibleFile
    "Not a directory"
    $ echo test > /tmp/nonexistentDir/impossibleFile
    "No such file or directory"

    This fixes the regression introduced by r352971 / D57592. — davezarzycki / ViewSVN
  16. [objc-gnustep] Fix encoding of ivar size for _Bool. — theraven / ViewSVN
  17. [X86][AVX] More aggressively simplify BROADCAST source operand

    Aim to use scalar source or lowest 128-bit vector directly.

    We're still missing some VZMOVL_LOAD combines. — rksimon / ViewSVN
  18. [x86] add CGP uaddo test with weird type; NFC

    There's probably no reason to try this transform
    for an obviously unsupported op. — spatel / ViewSVN
  19. [CGP] move test file to prevent bot failures

    The test specifiies the triple, so it needs to be in the
    x86 directory in case a bot has been configured without
    the x86 target. — spatel / ViewSVN
  20. Remove trailing semicolon. NFCI. — rksimon / ViewSVN
  21. Remove trailing semicolon. NFCI. — rksimon / ViewSVN
  22. [AST] Extract ASTNodeTraverser class from ASTDumper

    Summary:
    This new traverser class allows clients to re-use the traversal logic
    which was previously part of ASTDumper.  This means that alternative
    visit logic may be implemented, such as

    * Dump to alternative data formats such as JSON
    * Implement AST Matcher parent/child visitation matching AST dumps

    Reviewers: aaron.ballman

    Subscribers: jfb, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57472 — steveire / ViewSVN
  23. [CGP] refactor optimizeCmpExpression (NFCI)

    This is not truly NFC because we are bailing out without
    a TLI now. That should not be a real concern though because
    there should be a TLI in any real-world scenario.

    That seems better than passing around a pointer and then
    checking it for null-ness all over the place.

    The motivation is to fix what appears to be an unintended
    restriction on the uaddo transform -
    hasMultipleConditionRegisters() shouldn't be reason to limit
    the transform. — spatel / ViewSVN
  24. [PowerPC] add tests for saturating add; NFC

    This is copied from the existing test files for x86/AArch. — spatel / ViewSVN
  25. [DA][NewPM] Handle transitive dependencies in the new-pm version of DA

    Summary:
    The analysis result of DA caches pointers to AA, SCEV, and LI, but it
    never checks for their invalidation. Fix that.

    Reviewers: chandlerc, dmgreen, bogner

    Reviewed By: dmgreen

    Subscribers: hiraditya, bollu, javed.absar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D56381 — pfaffe / ViewSVN

#267 (Feb 3, 2019 1:01:33 AM)

  1. [X86] Print %st(0) as %st to match what gcc inline asm uses as the clobber name to make MS inline asm work correctly

    Summary:
    When calculating clobbers for MS style inline assembly we fail if the asm clobbers stack top because we print st(0) and try to pass it through the gcc register name check. This was found with when I attempted to make a emms/femms clobber all ST registers. If you use emms/femms in MS inline asm we would try to use st(0) as the clobber name but clang would think that wasn't a valid clobber name.

    This also matches what objdump disassembly prints. It's also what is printed by gcc -S.

    Reviewers: RKSimon, rnk, efriedma, spatel, andreadb, lebedev.ri

    Reviewed By: rnk

    Subscribers: eraman, gbedwell, lebedev.ri, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57621 — ctopper / ViewSVN
  2. [X86] Lower ISD::UADDO to use the Z flag instead of C flag when the RHS is a constant 1 to encourage INC formation.

    Summary:
    Add an additional combine to combineCarryThroughADD to reverse it back to the C flag to avoid regressions.

    I believe this catches the cases that D57547 got.

    Reviewers: RKSimon, spatel

    Reviewed By: spatel

    Subscribers: javed.absar, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57637 — ctopper / ViewSVN
  3. Correct test my *really really* overaligning a type. — ericwf / ViewSVN
  4. [AMDGPU] Fix -Wunused-variable after rL352978 — maskray / ViewSVN
  5. [InstSimplify] Missed optimization in math expression: log10(pow(10.0,x)) == x, log2(pow(2.0,x)) == x

    Summary: This patch enables folding following instructions under -ffast-math flag: log10(pow(10.0,x)) -> x, log2(pow(2.0,x)) -> x

    Reviewers: hfinkel, spatel, efriedma, craig.topper, zvi, majnemer, lebedev.ri

    Reviewed By: spatel, lebedev.ri

    Subscribers: lebedev.ri, llvm-commits

    Differential Revision: https://reviews.llvm.org/D41940 — quolyk / ViewSVN
  6. Fix handling of usual deallocation functions in various configuratios.

    Clang allows users to enable or disable various types of allocation
    and deallocation regardless of the C++ dialect. When extended new/delete
    overloads are enabled in older dialects, we need to treat them as if
    they're usual.

    Also, disabling one usual deallocation form shouldn't
    disable any others. For example, disabling aligned allocation in C++2a
    should have no effect on destroying delete. — ericwf / ViewSVN
  7. GlobalISel: Implement widenScalar for G_UNMERGE_VALUES

    For the scalar case only.

    Also move the similar G_MERGE_VALUES handling to a separate function
    and cleanup to make them look more similar. — arsenm / ViewSVN
  8. GlobalISel: Implement widenScalar for G_EXTRACT vector sources

    Handle the basic element extract case. — arsenm / ViewSVN
  9. AMDGPU/GlobalISel: Avoid reporting illegal extloads as legal

    This avoids breaking a test in a future commit. — arsenm / ViewSVN
  10. AMDGPU/GlobalISel: Legalize icmp for pointer types — arsenm / ViewSVN
  11. AMDGPU/GlobalISel: Legalize constant for pointer types — arsenm / ViewSVN
  12. AMDGPU/GlobalISel: Legalize select for pointer types — arsenm / ViewSVN
  13. GlobalISel: Legalization for inttoptr/ptrtoint — arsenm / ViewSVN
  14. [NewPM] Add support for new-PM plugins to clang

    Summary:
    This adds support for new-PM plugin loading to clang. The option
    `-fpass-plugin=` may be used to specify a dynamic shared object file
    that adheres to the PassPlugin API.

    Tested: created simple plugin that registers an EP callback; with optimization level > 0, the pass is run as expected.

    Committed on behalf of Marco Elver

    Differential Revision: https://reviews.llvm.org/D56935 — pfaffe / ViewSVN
  15. Replace uses of %T with %t in from previous frontend test differential

    After committing a change I had made to a few frontend tests, it was pointed
    out to me that %T is being deprecated in LLVM in favor of %t. This change
    simply converts usages of %T to %t while maintaining the integrity of the test.

    Previous revision where this discussion took place:
    https://reviews.llvm.org/D50563

    Differential Revision: https://reviews.llvm.org/D57592

    Patch from Justice Adams <justice.adams@sony.com>! — nico / ViewSVN
  16. Move the feature test macros script to the utils directory.

    It doesn't make a lot of sense to keep it with the tests,
    deep into the test suite directonies. — ericwf / ViewSVN
  17. Revert rCTE352968 due to compilation failures 💥 — stephanemoore / ViewSVN
  18. [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈

    Summary:
    Implicit functions are outside the control of source authors and should
    be exempt from style restrictions.

    Tested via running clang tools tests.

    Reviewers: aaron.ballman

    Reviewed By: aaron.ballman

    Subscribers: xazax.hun, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57207 — stephanemoore / ViewSVN
  19. [X86] Add another test case for PR40539. NFC — ctopper / ViewSVN
  20. [clang-tidy] Rename time lookup functions; NFC — hwright / ViewSVN
  21. [X86][AVX] Enable INSERT_SUBVECTOR(SRC0, SHUFFLE(SRC1)) shuffle combining

    Push the insert_subvector up through the shuffle operands to help find more cross-lane shuffles.

    The is exposes a couple of minor issues that will be fixed shortly:
    Missed broadcast folds - we have a mixture of vzext_load lengths that need cleaning up
    combine-sdiv.ll - AVX1 SimplifyDemandedVectorElts failure (hits max depth due to a couple of extra bitcasts). — rksimon / ViewSVN
  22. [SDAG] Add SDNode/SDValue getConstantOperandAPInt helper. NFCI.

    We already have the getConstantOperandVal helper which returns a uint64_t, but along comes the fuzzer and inserts a i128 -1 constant or something and the whole thing asserts.......

    I've updated a few obvious cases, and tried to make use of the const reference where possible, but there's more to do. A number of existing oss-fuzz tickets should be fixed if we start using APInt and perform value clamping where necessary. — rksimon / ViewSVN
  23. [LCSSA] Handle case with single new PHI faster.

    If there is only a single available value, all uses must be dominated by
    the single value and there is no need to search for a reaching
    definition.

    This drastically speeds up LCSSA in some cases. For the test case
    from PR37202, it speeds up LCSSA construction by 4 times.

    Time-passes without this patch for test case from PR37202:

        Total Execution Time: 29.9285 seconds (29.9276 wall clock)

        ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
        5.2786 ( 17.7%)   0.0021 (  1.2%)   5.2806 ( 17.6%)   5.2808 ( 17.6%)  Unswitch loops
        4.3739 ( 14.7%)   0.0303 ( 18.1%)   4.4042 ( 14.7%)   4.4042 ( 14.7%)  Loop-Closed SSA Form Pass
        4.2658 ( 14.3%)   0.0192 ( 11.5%)   4.2850 ( 14.3%)   4.2851 ( 14.3%)  Loop-Closed SSA Form Pass #2
        2.2307 (  7.5%)   0.0013 (  0.8%)   2.2320 (  7.5%)   2.2318 (  7.5%)  Loop Invariant Code Motion
        2.0888 (  7.0%)   0.0012 (  0.7%)   2.0900 (  7.0%)   2.0897 (  7.0%)  Unroll loops
        1.6761 (  5.6%)   0.0013 (  0.8%)   1.6774 (  5.6%)   1.6774 (  5.6%)  Value Propagation
        1.3686 (  4.6%)   0.0029 (  1.8%)   1.3716 (  4.6%)   1.3714 (  4.6%)  Induction Variable Simplification
        1.1457 (  3.8%)   0.0010 (  0.6%)   1.1468 (  3.8%)   1.1468 (  3.8%)  Loop-Closed SSA Form Pass #4
        1.1384 (  3.8%)   0.0005 (  0.3%)   1.1389 (  3.8%)   1.1389 (  3.8%)  Loop-Closed SSA Form Pass #6
        1.1360 (  3.8%)   0.0027 (  1.6%)   1.1387 (  3.8%)   1.1387 (  3.8%)  Loop-Closed SSA Form Pass #5
        1.1331 (  3.8%)   0.0010 (  0.6%)   1.1341 (  3.8%)   1.1340 (  3.8%)  Loop-Closed SSA Form Pass #3

    Time passes with this patch

      Total Execution Time: 19.2802 seconds (19.2813 wall clock)

       ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
       4.4234 ( 23.2%)   0.0038 (  2.0%)   4.4272 ( 23.0%)   4.4273 ( 23.0%)  Unswitch loops
       2.3828 ( 12.5%)   0.0020 (  1.1%)   2.3848 ( 12.4%)   2.3847 ( 12.4%)  Unroll loops
       1.8714 (  9.8%)   0.0020 (  1.1%)   1.8734 (  9.7%)   1.8735 (  9.7%)  Loop Invariant Code Motion
       1.7973 (  9.4%)   0.0022 (  1.2%)   1.7995 (  9.3%)   1.8003 (  9.3%)  Value Propagation
       1.4010 (  7.3%)   0.0033 (  1.8%)   1.4043 (  7.3%)   1.4044 (  7.3%)  Induction Variable Simplification
       0.9978 (  5.2%)   0.0244 ( 13.1%)   1.0222 (  5.3%)   1.0224 (  5.3%)  Loop-Closed SSA Form Pass #2
       0.9611 (  5.0%)   0.0257 ( 13.8%)   0.9868 (  5.1%)   0.9868 (  5.1%)  Loop-Closed SSA Form Pass
       0.5856 (  3.1%)   0.0015 (  0.8%)   0.5871 (  3.0%)   0.5869 (  3.0%)  Unroll loops #2
       0.4132 (  2.2%)   0.0012 (  0.7%)   0.4145 (  2.1%)   0.4143 (  2.1%)  Loop Invariant Code Motion #3

    Reviewers: efriedma, davide, mzolotukhin

    Reviewed By: efriedma

    Differential Revision: https://reviews.llvm.org/D57033 — fhahn / ViewSVN
  24. [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields

    This patch is an implementation of the ideas discussed on the mailing list[1].

    The idea is to somewhat heuristically guess whether the field that was confirmed
    to be uninitialized is actually guarded with ifs, asserts, switch/cases and so
    on. Since this is a syntactic check, it is very much prone to drastically
    reduce the amount of reports the checker emits. The reports however that do not
    get filtered out though have greater likelihood of them manifesting into actual
    runtime errors.

    [1] http://lists.llvm.org/pipermail/cfe-dev/2018-September/059255.html

    Differential Revision: https://reviews.llvm.org/D51866 — szelethus / ViewSVN
  25. [LCSSA] Add expensive verification of LCSSA form for sub-loops.

    This assertion makes sure all sub-loops are in LCSSA form before
    bringing their parent in LCSSA form. This precondition was added to
    formLCSSA in D56848.

    Reviewers: davide, efriedma, mzolotukhin

    Reviewed By: davide

    Differential Revision: https://reviews.llvm.org/D56921 — fhahn / ViewSVN

#266 (Feb 2, 2019 5:35:39 AM)

  1. [clangd] Fix heap-use-after-free after r352868 — ioeric / ViewSVN
  2. [ASTImporter] Fix up test that only works on X86.

    The test will fail if the default target triple is not X86,
    even if the host platform is. So move the check into the
    test at runtime. — dmgreen / ViewSVN
  3. [X86][SSE]: Adding full coverage of MC encoding tests for the SSE isa sets.<NFC>

    Summary:
    NFC.
    Adding MC regressions tests to cover all the SSE ISA sets as follows:
    SSE, SSE2, SSE3, SSE4, SSE42, SSEMXCSR, SSE_PREFETCH, SSSE3

    This patch is part of a larger task to cover MC encoding of all X86 ISA Sets.
    See revision: https://reviews.llvm.org/D39952

    Patch by Gadi Haber and Wang Tianqing

    Reviewers: RKSimon, zvi, craig.topper, AndreiGrischenko, gadi.haber, LuoYuanke

    Reviewed By: craig.topper

    Subscribers: jfb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D40387 — ctopper / ViewSVN
  4. Revert "Bump minimum toolchain version"

    Reverting D57264 again, it looks like we're down to two bots that need fixing:

    polly-amd64-linux
    polly-arm-linux

    They both have old versions of libstdc++ and recent clang. — jfb / ViewSVN
  5. [Clangd] textDocument/definition and textDocument/declaration "bounce" between definition and declaration location when they are distinct.

    Summary:
    This helps minimize the disruption of not returning declarations as part of
    a find-definition response (r352864).

    Reviewers: hokein

    Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, ilya-biryukov

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57580 — sammccall / ViewSVN
  6. [BPF] [BTF] Process FileName with absolute path correctly

    In IR, sometimes the following attributes for DIFile may be
    generated:
      filename: /home/yhs/test.c
      directory: /tmp
    The /tmp may represent the working directory of the compilation
    process.

    In such cases, since filename is with absolute path,
    the directory should be ignored by BTF. The filename alone is
    enough to get the source.

    Acked-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Yonghong Song <yhs@fb.com> — yhs / ViewSVN
  7. Bump minimum toolchain version

    Summary:
    The RFC on moving past C++11 got good traction:
      http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

    This patch therefore bumps the toolchain versions according to our policy:
      llvm.org/docs/DeveloperPolicy.html#toolchain

    Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

    Differential Revision: https://reviews.llvm.org/D57264 — jfb / ViewSVN
  8. [llvm-objcopy] Temporarily limit one test to darwin

    Some triples in llvm-mc appear to be unavailable on some buildbots.
    To please those buildbots we temporarily limit the test to darwin
    (where the required triple is guranteed to be available)
    until we find the right solution. — alexshap / ViewSVN

#265 (Feb 1, 2019 8:23:00 PM)

  1. [Sema][ObjC] Allow declaring ObjC pointer members with non-trivial
    ownership qualifications in C++ unions under ARC.

    An ObjC pointer member with non-trivial ownership qualifications causes
    all of the defaulted special functions of the enclosing union to be
    defined as deleted, except when the member has an in-class initializer,
    the default constructor isn't defined as deleted.

    rdar://problem/34213306

    Differential Revision: https://reviews.llvm.org/D57438 — ahatanak / ViewSVN
  2. [ASan] Do not instrument other runtime functions with `__asan_handle_no_return`

    Summary:
    Currently, ASan inserts a call to `__asan_handle_no_return` before every
    `noreturn` function call/invoke. This is unnecessary for calls to other
    runtime funtions. This patch changes ASan to skip instrumentation for
    functions calls marked with `!nosanitize` metadata.

    Reviewers: TODO

    Differential Revision: https://reviews.llvm.org/D57489 — yln / ViewSVN
  3. [llvm-objcopy] Fix triples in macho tests.

    Update triples used by the macho tests to fix some buildbots. — alexshap / ViewSVN
  4. Remove redundant FunctionDecl argument from a couple functions.

    This argument was added in r254554 in order to support the
    pass_object_size attribute. However, in r296076, the attribute's
    presence is now also represented in FunctionProtoType's
    ExtParameterInfo, and thus it's unnecessary to pass along a separate
    FunctionDecl.

    The functions modified are:
    RequiredArgs::forPrototype{,Plus}, and
    CodeGenTypes::ConvertFunctionType.

    After this, it's also (again) unnecessary to have a separate
    ConvertFunctionType function ConvertType, so convert callers back to
    the latter, leaving the former as an internal helper function. — jyknight / ViewSVN
  5. [AutoUpgrade] Fix AutoUpgrade for x86.seh.recoverfp

    Summary: This fixes the bug in https://reviews.llvm.org/D56747#inline-502711.

    Reviewers: efriedma

    Reviewed By: efriedma

    Subscribers: javed.absar, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57614 — mgrang / ViewSVN
  6. [llvm-objcopy] Add ability to copy MachO object files

    This diff implements first bits for copying (without modification) MachO object files.

    Test plan: make check-all

    Differential revision: https://reviews.llvm.org/D54674 — alexshap / ViewSVN
  7. Handle cases where the dirent::d_type macros aren't defined — ericwf / ViewSVN
  8. Revert "[BPF] [BTF] Process FileName with absolute path correctly"

    This reverts commit r352939.

    Some tests failed. Revert to unblock others. — yhs / ViewSVN
  9. [AArch64] Fix unused variable [NFC] — mgrang / ViewSVN
  10. [BPF] [BTF] Process FileName with absolute path correctly

    In IR, sometimes the following attributes for DIFile may be
    generated:
      filename: /home/yhs/test.c
      directory: /tmp
    The /tmp may represent the working directory of the compilation
    process.

    In such cases, since filename is with absolute path,
    the directory should be ignored by BTF. The filename alone is
    enough to get the source.

    Acked-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Yonghong Song <yhs@fb.com> — yhs / ViewSVN
  11. [analyzer] Hotfix for RetainCountChecker: assert was too strong.

    Bridged casts can happen to non-CF objects as well. — George Karpenkov / ViewSVN
  12. [CodeGen] Be as conservative about atomic accesses as for volatile

    Background: At the moment, we record the AtomicOrdering of an access in the MMO, but also mark any atomic access as volatile in SelectionDAG. I'm working towards separating that. See https://reviews.llvm.org/D57601 for context.

    Update all usages of isVolatile in lib/CodeGen to preserve behaviour once atomic MMOs stop being also volatile. This is NFC in it's current form, but is essential for correctness once we make that final change.

    It useful to keep in mind that AtomicSDNode is not a parent of LoadSDNode, StoreSDNode, or LSBaseSDNode. As a result, any call to isVolatile on one of those static types doesn't need a companion isAtomic check.  We should probably adjust that class hierarchy long term, but for now, that seperation is useful.

    I'm deliberately being conservative about handling. I want the change to stop adding volatile to be NFC itself, and then will work through places where we can be less conservative for atomics one by one in separate changes w/tests.

    Differential Revision: https://reviews.llvm.org/D57596 — reames / ViewSVN
  13. [WebAssembly] Fix ImportName's position in this test.

    This is a follow-up to r352930. — djg / ViewSVN
  14. [InstCombine] Refactor test checks (NFC) — evandro / ViewSVN
  15. Revert "[AST][OpenMP] OpenMP Sections / Section constructs contain Structured blocks"

    Further reviews (D57594, D57615) have revealed that this was not reviewed,
    and that the differential's description was not read during the review,
    thus rendering this commit invalid.

    This reverts commit r352882. — lebedevri / ViewSVN
  16. [Test] Update file w/update_test_checks.py to make a follow on change obvious — reames / ViewSVN
  17. [WebAssembly] Add codegen support for the import_field attribute

    This adds the LLVM side of https://reviews.llvm.org/D57602 -- the
    import_field attribute. See that patch for details.

    Differential Revision: https://reviews.llvm.org/D57603 — djg / ViewSVN
  18. [WebAssembly] Add an import_field function attribute

    This is similar to import_module, but sets the import field name
    instead.

    By default, the import field name is the same as the C/asm/.o symbol
    name. However, there are situations where it's useful to have it be
    different. For example, suppose I have a wasm API with a module named
    "pwsix" and a field named "read". There's no risk of namespace
    collisions with user code at the wasm level because the generic name
    "read" is qualified by the module name "pwsix". However in the C/asm/.o
    namespaces, the module name is not used, so if I have a global function
    named "read", it is intruding on the user's namespace.

    With the import_field module, I can declare my function (in libc) to be
    "__read", and then set the wasm import module to be "pwsix" and the wasm
    import field to be "read". So at the C/asm/.o levels, my symbol is
    outside the user namespace.

    Differential Revision: https://reviews.llvm.org/D57602 — djg / ViewSVN
  19. Improve diagnostic to tell you a type is incomplete.

    I recently ran into this code:
    ```
    \#include <iostream>
    void foo(const std::string &s, const std::string& = "");
    \#include <string>
    void test() { foo(""); }
    ```

    The diagnostic produced said it can't bind char[1] to std::string
    const&. It didn't mention std::string is incomplete. The user had to
    infer that.

    This patch causes the diagnostic to now say "incomplete type". — ericwf / ViewSVN
  20. add a test and a couple minor bug fixes for the implicit-signed-integer-truncation sanitizer. This is PR#40566 — marshall / ViewSVN
  21. Factor out duplication between ExprIterator and ConstExprIterator.

    This also exposes a more general iterator cast mechanism suitable for
    use in http://reviews.llvm.org/D56571. — rsmith / ViewSVN
  22. [COFF, ARM64] Fix localaddress to handle stack realignment and variable size objects

    Summary: This fixes using the correct stack registers for SEH when stack realignment is needed or when variable size objects are present.

    Reviewers: rnk, efriedma, ssijaric, TomTan

    Reviewed By: rnk, efriedma

    Subscribers: javed.absar, kristof.beyls, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57183 — mgrang / ViewSVN
  23. [X86][AVX] Add VMOVDDUP-VPBROADCASTQ execution domain mapping

    Noticed in D57514.

    Differential Revision: https://reviews.llvm.org/D57519 — rksimon / ViewSVN
  24. [ubsan] Make suppressions.cpp test pass for me on Windows

    The test seems to be failing because the module suppression file
    contains a colon. I found that it was sufficient to just use the
    basename of the suppression file.

    While I was here, I noticed that we don't implement IsAbsolutePath for
    Windows, so I added it. — rnk / ViewSVN
  25. [AMDGPU] Mark test functions with hidden visibility

    Prepare for future patch which affects codegen for calls to preemptible
    functions.

    Differential Revision: https://reviews.llvm.org/D57605 — scott.linder / ViewSVN
  26. Don't use ASTContext in DeclOpenMP.h because it's still incomplete. — ericwf / ViewSVN
  27. [DebugInfo] Fix mkdir use in test — rupprecht / ViewSVN
  28. [InstCombine] Expand Windows test (NFC)

    Run checks for Win32 as well. — evandro / ViewSVN
  29. [DebugInfo] Don't use realpath when looking up debug binary locations.

    Summary:
    Using realpath makes assumptions about build systems that do not always hold true. The debug binary referred to from the .gnu_debuglink should exist in the same directory (or in a .debug directory, etc.), but the files may only exist as symlinks to a differently named files elsewhere, and using realpath causes that lookup to fail.

    This was added in r189250, and this is basically a revert + regression test case.

    Reviewers: dblaikie, samsonov, jhenderson

    Reviewed By: dblaikie

    Subscribers: llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57609 — rupprecht / ViewSVN
  30. [opaque pointer types] Pass function type for CallBase::setCalledFunction.

    Differential Revision: https://reviews.llvm.org/D57174 — jyknight / ViewSVN
  31. [opaque pointer types] Pass value type to GetElementPtr creation.

    This cleans up all GetElementPtr creation in LLVM to explicitly pass a
    value type rather than deriving it from the pointer's element-type.

    Differential Revision: https://reviews.llvm.org/D57173 — jyknight / ViewSVN
  32. [opaque pointer types] Pass value type to LoadInst creation.

    This cleans up all LoadInst creation in LLVM to explicitly pass the
    value type rather than deriving it from the pointer's element-type.

    Differential Revision: https://reviews.llvm.org/D57172 — jyknight / ViewSVN
  33. [opaque pointer types] Pass function types to InvokeInst creation.

    This cleans up all InvokeInst creation in LLVM to explicitly pass a
    function type rather than deriving it from the pointer's element-type.

    Differential Revision: https://reviews.llvm.org/D57171 — jyknight / ViewSVN
  34. [opaque pointer types] Pass function types to CallInst creation.

    This cleans up all CallInst creation in LLVM to explicitly pass a
    function type rather than deriving it from the pointer's element-type.

    Differential Revision: https://reviews.llvm.org/D57170 — jyknight / ViewSVN
  35. [InstCombine] Expand Windows test (NFC)

    Run checks for Win64 as well. — evandro / ViewSVN
  36. gn build: Create regular archives for the sanitizer runtimes.

    We'll need to do this eventually if we create an installable package.
    For now, this lets me use the archives to build Android, whose build
    system wants to copy the archives to another location.

    Differential Revision: https://reviews.llvm.org/D57607 — pcc / ViewSVN
  37. [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive.

    This patch implements parsing and sema for "omp declare mapper"
    directive. User defined mapper, i.e., declare mapper directive, is a new
    feature in OpenMP 5.0. It is introduced to extend existing map clauses
    for the purpose of simplifying the copy of complex data structures
    between host and device (i.e., deep copy). An example is shown below:

        struct S {  int len;  int *d; };
        #pragma omp declare mapper(struct S s) map(s, s.d[0:s.len]) // Memory region that d points to is also mapped using this mapper.

    Contributed-by: Lingda Li <lildmh@gmail.com>

    Differential Revision: https://reviews.llvm.org/D56326 — meinersbur / ViewSVN
  38. [libc++] Disentangle the 3 implementations of type_info

    Summary:
    We currently have effectively 3 implementations of type_info: one for
    the Microsoft ABI, one that does not assume that there's a unique copy
    of each RTTI in a progran, and one that assumes a unique copy.

    Those 3 implementations are entangled into the same class with nested
    ifdefs, which makes it very difficult to understand. Furthermore, the
    benefit of doing this is rather small since the code that is duplicated
    across implementations is just a couple of trivial lines.

    This patch stamps out the 3 versions of type_info explicitly to increase
    readability. It also explains what's going on with short comments, because
    it's far from obvious.

    Reviewers: EricWF, mclow.lists

    Subscribers: christof, jkorous, dexonsmith

    Differential Revision: https://reviews.llvm.org/D57606 — Louis Dionne / ViewSVN
  39. [InstCombine] Extra null-checking on TFE/LWE support

    - If that operand is not ConstantInt, skip enabling TFE/LWE.

    Differential Revision: https://reviews.llvm.org/D57539 — hliao / ViewSVN
  40. Hopefully fix a couple more sphinx doc errors.

    These seem to only appear on the buildbot runner, and it looks like we
    tried to suppress them, but it's not working. Not sure why. — jyknight / ViewSVN
  41. [llvm-objdump] - llvm-objdump can skip bytes at the end of a section.

    Differential Revision: https://reviews.llvm.org/D57549 — sidneym / ViewSVN

#264 (Feb 1, 2019 11:10:01 AM)

  1. Fix a bug in the definition of isUnordered on MachineMemOperand

    Background: At the moment, we record the AtomicOrdering of an access in the MMO, but also mark any atomic access as volatile in SelectionDAG. GlobalISEL keeps the two separate, but currently doesn't know how to lower an atomic G_LOAD at all. See https://reviews.llvm.org/D57601 for context.

    The definition used for unordered was only checking volatility, not atomicity. As noted above, all atomic MMOs are currently also volatile, so this is a latent bug only. Copy the definition used in IR, after auditing the two (2) uses of the function to be sure the desired semantics are the same.

    Differential Revision: https://reviews.llvm.org/D57593 — reames / ViewSVN
  2. test commit (add blank line) NFC — froese / ViewSVN
  3. [llvm-readobj] Add a flag to dump just the section-to-segment mapping.

    Summary:
    The following patch introduces a new function `printSectionMapping` which is responsible for dumping just the section-to-segment mapping.
    This patch also introduces a n option `-section-mapping` that outputs that mapping without the program headers.

    Previously, this functionality was controlled by `printProgramHeaders`, and the output from `-program-headers` has not been changed.  I am happy to change the option name, I copied  the name that was displayed when outputting the mapping table.

    Reviewers: khemant, jhenderson, grimar, rupprecht

    Reviewed By: jhenderson, grimar, rupprecht

    Subscribers: rupprecht, jhenderson, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57365 — mattd / ViewSVN
  4. [InstCombine] Refactor test checks (NFC) — evandro / ViewSVN
  5. gn build: Add a missing dependency from llvm/test to llvm-lit

    check-llvm already listed llvm-lit as script which counts as a dep, so running
    check-llvm worked fine, but `ninja -C out/gn llvm/test` didn't build llvm-lit
    before if it wasn't already there. — nico / ViewSVN
  6. [InstCombine] Expand Windows test (NFC)

    Add checks for Win64 to existing cases. — evandro / ViewSVN
  7. [llvm-nm] Report '.comment' ELF sections as 'n' instead of '?'

    Summary:
    The previous implementation reported `.comment` sections as '?'
    GNU uses 'n' which means  "The symbol is a debugging symbol."  `.note`  sections are represented as 'n' too.

    The test related to this change was updated to CHECK-NEXT to ensure
    order and that we did not miss any symbols in the dump.

    Reviewers: jhenderson

    Reviewed By: jhenderson

    Subscribers: rupprecht, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57544 — mattd / ViewSVN
  8. Update SanitizerCoverage doc regarding the issue with pc-table and gc-sections.

    Summary:
    There is a bug for this: https://bugs.llvm.org/show_bug.cgi?id=34636
    But it would be also helpful to leave a note in the docs to prevent users from
    running into issues, e.g. https://crbug.com/926588.

    Reviewers: morehouse

    Reviewed By: morehouse

    Subscribers: cfe-commits, llvm-commits, kcc

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57474 — dor1s / ViewSVN
  9. [DWARF v5] Fix DWARF emitter and consumer to produce/expect a uleb for a location description's length.

    Reviewer: davide, JDevliegere

    Differential Revision: https://reviews.llvm.org/D57550 — wolfgangp / ViewSVN
  10. [llvm-objcopy][NFC] More error propagation (executeObjcopyOnArchive)

    Summary:
    Replace some reportError() calls with error propagation that was missed from rL352625.

    Note this also adds an error check during Archive iteration that was being hidden by a different error check before:

    ```
      for (const Archive::Child &Child : Ar.children(Err)) {
        Expected<std::unique_ptr<Binary>> ChildOrErr = Child.getAsBinary();
        if (!ChildOrErr)
          // This aborts, so Err is never checked
          reportError(Ar.getFileName(), ChildOrErr.takeError());
    ```

    Err is being checked after the loop, so during happy runs, everything is fine. But when reportError is changed to return the error instead of aborting, the fact that Err is never checked is now noticed in tests that trigger an error during the loop.

    Reviewers: jhenderson, dblaikie, alexshap

    Reviewed By: dblaikie

    Subscribers: llvm-commits, lhames, jakehehrlich

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57462 — rupprecht / ViewSVN
  11. Fix some sphinx doc errors. — jyknight / ViewSVN
  12. [InstCombine] Refactor test checks (NFC) — evandro / ViewSVN
  13. [AMDGPU] Fix for vector element insertion

    Summary:
    Incorrect code was generated when lowering insertelement operations
    for vectors with 8 or 16 bit elements.  The value being inserted was
    not adjusted for the position of the element within the 32 bit word
    and so only the low element within each 32 bit word could receive
    the intended value.

    Fixed by simply replicating the value to each element of a
    congruent vector before the mask and or operation used to
    update the intended element.

    A number of affected LIT tests have been updated appropriately.

    before the mask & or into the intended

    Reviewers: arsenm, nhaehnle

    Reviewed By: arsenm

    Subscribers: llvm-commits, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57588 — timcorringham / ViewSVN
  14. [SDAG] improve variable names; NFC

    The version of FoldConstantArithmetic() that takes arbitrary nodes
    was confusingly naming those nodes as constants when they might
    not be; also "Cst" reads like "Cast". — spatel / ViewSVN
  15. [X86][SSE] Use PSLLDQ/PSRLDQ to mask out zeroable ends of a shuffle

    As suggested on PR40318, this patch uses PSLLDQ/PSRLDQ to lower shuffles to zero out the ends of a vector, leaving a sequential inner section.

    For pre-SSSE3 we do this for shuffles with zeros at either end (requiring up to 3 shifts), but once PSHUFB is available I've limited this to shuffles with a single zeroable end (2 shifts).

    Differential Revision: https://reviews.llvm.org/D56784 — rksimon / ViewSVN
  16. [AST][OpenMP] OpenMP Sections / Section constructs contain Structured blocks

    Summary:
    I'm working on a clang-tidy check, much like existing [[ http://clang.llvm.org/extra/clang-tidy/checks/bugprone-exception-escape.html | bugprone-exception-escape ]],
    to detect when an exception might escape out of an OpenMP construct it isn't supposed to escape from.
    For that i will be using the `nothrow` bit of `CapturedDecl`s.

    While that bit is already correctly set for some constructs, e.g. `#pragma omp parallel`: https://godbolt.org/z/2La7pv
    it isn't set for the `#pragma omp sections`, or `#pragma omp section`: https://godbolt.org/z/qZ-EbP

    If i'm reading [[ https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf | `OpenMP Application Programming Interface Version 5.0 November 2018` ]] correctly,
    they should be, as per `2.8.1 sections Construct`, starting with page 86:
    * The sections construct is a non-iterative worksharing construct that contains a set of **structured blocks**
      that are to be distributed among and executed by the threads in a team. Each **structured block** is executed
      once by one of the threads in the team in the context of its implicit task.
    * The syntax of the sections construct is as follows:
      #pragma omp sections [clause[ [,] clause] ... ] new-line
        {
          [#pragma omp section new-line]
            **structured-block**
       ...
    * Description
      Each **structured block** in the sections construct is preceded by a section directive except
      possibly **the first block**, for which a preceding section directive is optional.

    * Restrictions
      • The code enclosed in a sections construct must be a **structured block**.
      * A throw executed inside a sections region must cause execution to resume within the same
        section of the sections region, and the same thread that threw the exception must catch it.

    Reviewers: ABataev, #openmp

    Reviewed By: ABataev

    Subscribers: guansong, openmp-commits, cfe-commits

    Tags: #clang, #openmp

    Differential Revision: https://reviews.llvm.org/D57585 — lebedevri / ViewSVN
  17. [CMake] External compiler-rt-configure requires LLVMTestingSupport when including tests

    Summary:
    Apparently `LLVMTestingSupport` must be built before `llvm-config` can be asked for it. Symptom with `LLVM_INCLUDE_TESTS=ON` is:
    ```
    $ ./path/to/llvm-build/bin/llvm-config --ldflags --libs testingsupport
    -L/path/to/llvm-build/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names
    llvm-config: error: component libraries and shared library

    llvm-config: error: missing: /path/to/llvm-build/lib/libLLVMTestingSupport.a
    ```

    With `LLVMTestingSupport` as dependency of `compiler-rt-configure` we get the expected behavior:
    ```
    $ ./path/to/llvm-build/bin/llvm-config --ldflags --libs testingsupport
    -L/path/to/llvm-build/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names
    -lLLVMTestingSupport -lLLVMSupport -lLLVMDemangle
    ```

    Reviewers: ab, beanz

    Subscribers: dberris, mgorny, erik.pilkington, llvm-commits, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57521 — stefan.graenitz / ViewSVN
  18. [TargetLowering] try harder to determine undef elements of vector binops

    This might be the start of tracking all vector element constants generally if we take it to its
    logical conclusion, but let's stop here and make sure this is correct/beneficial so far.

    The affected tests require a convoluted path before they get simplified currently because we
    don't call SimplifyDemandedVectorElts() from binops directly and don't modify the binop operands
    directly in SimplifyDemandedVectorElts().

    That's why the tests all have a trailing shuffle to induce a chain reaction of transforms. So
    something like this is happening:

    1. Improve the knowledge of undefs in the binop via a SimplifyDemandedVectorElts() call that
       originates from a shuffle.
    2. Transfer that undef knowledge back to the shuffle mask user as more undef lanes.
    3. Combine the modified shuffle by calling SimplifyDemandedVectorElts() again.
    4. Translate the improved shuffle mask as undemanded lanes of build vector constants causing
       those to become full undef constants.
    5. Simplify the binop now that it has a full undef operand.

    As we can see from the unchanged 'and' and 'or' tests, tracking undefs alone isn't a full solution.
    We would need to track zero and all-ones constants to improve those opcodes. We'd probably need to
    track NaN for FP ops too (assuming we don't have fast-math-flags set).

    Differential Revision: https://reviews.llvm.org/D57066 — spatel / ViewSVN
  19. [X86][AVX] Combine INSERT_SUBVECTOR(SRC0, BITCAST(SHUFFLE(EXTRACT_SUBVECTOR(SRC1)))

    Enable peeking through one use bitcasts to the subvector shuffle.

    This still depends on the subvector being the same scalar-size but D57514 has already helped with the more tricky patterns — rksimon / ViewSVN
  20. [llvm-strip] Implement --keep-file-symbols

    Differential revision: https://reviews.llvm.org/D57582 — evgeny777 / ViewSVN
  21. [llvm-objcopy][NFC] Propagate errors in removeSymbols/removeSectionReferences

    Reviewers: jhenderson, alexshap, jakehehrlich, espindola

    Reviewed By: jhenderson

    Subscribers: emaste, arichardson, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57543 — rupprecht / ViewSVN
  22. [clangd] Expose SelectionTree to code tweaks, and use it for swap if branches.

    Summary:
    This reduces the per-check implementation burden and redundant work.
    It also makes checks range-aware by default (treating the commonAncestor
    as if it were a point selection should be good baseline behavior).

    Reviewers: ilya-biryukov

    Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57570 — sammccall / ViewSVN
  23. [clangd] Lib to compute and represent selection under cursor.

    Summary:
    The primary problem this solves is to expose the codeAction selection to
    AST-based refactorings in a way that makes it easy and efficient for them to
    bind to the right parts of the AST.

    It should also allow us to make XRefs based features (textDocument/definition)
    more robust, more easily implement textDocument/typeDefinition etc.
    As an example, template parameter references can be identified without special
    handling.
    There should be slight speedup too: we can prune most of the AST traversal
    in most cases.

    Elephant in the room: this is similar-but-different to Tooling/Refactoring/ASTSelection.
    That captures a smaller set of AST nodes, has a slightly different way of
    representing selections, and generally has mare features and does more work.
    The overall shape is pretty similar, and yet I can't quite get to behave as I
    expect.

    Reviewers: ilya-biryukov, kadircet

    Subscribers: mgorny, ioeric, MaskRay, jkorous, mgrang, arphaman

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57562 — sammccall / ViewSVN
  24. [clangd] Lib to compute and represent selection under cursor.

    Summary:
    The primary problem this solves is to expose the codeAction selection to
    AST-based refactorings in a way that makes it easy and efficient for them to
    bind to the right parts of the AST.

    It should also allow us to make XRefs based features (textDocument/definition)
    more robust, more easily implement textDocument/typeDefinition etc.
    As an example, template parameter references can be identified without special
    handling.
    There should be slight speedup too: we can prune most of the AST traversal
    in most cases.

    Elephant in the room: this is similar-but-different to Tooling/Refactoring/ASTSelection.
    That captures a smaller set of AST nodes, has a slightly different way of
    representing selections, and generally has mare features and does more work.
    The overall shape is pretty similar, and yet I can't quite get to behave as I
    expect.

    Reviewers: ilya-biryukov, kadircet

    Subscribers: mgorny, ioeric, MaskRay, jkorous, mgrang, arphaman

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57562 — sammccall / ViewSVN
  25. [InstCombine] reduce duplicate code; NFC

    An unused variable problem was introduced with rL352870
    and stubbed out with rL352871, but we can make a better
    fix by actually using the local variable in code rather
    than just the assert. — spatel / ViewSVN
  26. [libclang] Fix -DBUILD_SHARED_LIBS=on build after rC352803 — maskray / ViewSVN
  27. [InstCombine] Fix -Wunused-variable when -DLLVM_ENABLE_ASSERTIONS=off — maskray / ViewSVN
  28. [InstCombine] try to reduce x86 addcarry to generic uaddo intrinsic

    If we can reduce the x86-specific intrinsic to the generic op, it allows existing
    simplifications and value tracking folds. AFAICT, this always results in identical
    x86 codegen in the non-reduced case...which should be true because we semi-generically
    (too aggressively IMO) convert to llvm.uadd.with.overflow in CGP, so the DAG/isel must
    already combine/lower this intrinsic as expected.

    This isn't quite what was requested in:
    https://bugs.llvm.org/show_bug.cgi?id=40486
    ...but we want to have these kinds of folds early for efficiency and to enable greater
    simplifications. For the case in the bug report where we have:
    _addcarry_u64(0, ahi, 0, &ahi)
    ...this gets completely simplified away in IR.

    Differential Revision: https://reviews.llvm.org/D57453 — spatel / ViewSVN
  29. [CMake] Add install targets for utilities to LLVM exports if LLVM_INSTALL_UTILS=ON

    Summary: D56606 was only appending target names to the `LLVM_EXPORTS`/`LLVM_EXPORTS_BUILDTREE_ONLY` properties. Targets showed up correctly in the build-tree `LLVMExports.cmake`, but they were missing in the installed one (as we found in https://bugs.llvm.org/show_bug.cgi?id=40443), because install did not register them explicitly.

    Reviewers: mgorny, smeenai, beanz, gottesmm, dschuff, tstellar, serge-sans-paille

    Reviewed By: smeenai

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D57383 — stefan.graenitz / ViewSVN
  30. [clangd] Penalize file-scope symbols in the ranking for non-completion queries

    Patch by Nathan Ridge!

    Differential Revision: https://reviews.llvm.org/D56653 — sammccall / ViewSVN
  31. [AArch64] Optimize floating point materialization

    This patch changes isFPImmLegal to return if the value can be enconded
    as the immediate operand of a logical instruction besides checking if
    for immediate field for fmov.

    This optimizes some floating point materization, inclusive values
    used on isinf lowering.

    Reviewed By: rengolin, efriedma, evandro

    Differential Revision: https://reviews.llvm.org/D57044 — azanella / ViewSVN
  32. [CUDA] Relax lit test condition after r352798.

    Clang executable doesn't match clang.* in all test environment. — ioeric / ViewSVN
  33. [clangd] Implement textDocument/declaration from LSP 3.14

    Summary:
    LSP now reflects the declaration/definition distinction.

    Language server changes:
    - textDocument/definition now returns a definition if one is found, otherwise
       the declaration. It no longer returns declaration + definition if they are
       distinct.
    - textDocument/declaration returns the best declaration we can find.
    - For macros, the active macro definition is returned for both methods.
    - For include directive, the top of the target file is returned for both.
    There doesn't appear to be a discovery mechanism (we can't return everything to
    clients that only know about definition), so this changes existing behavior.
    In practice, it should greatly reduce the fraction of the time we need to show
    the user a menu of options.

    C++ API changes:
    - findDefinitions is replaced by locateSymbolAt, which returns a
       vector<LocatedSymbol> - one for each symbol under the cursor.
    - this contains the preferred declaration, the definition (if found), and
       the symbol name
    This API enables some potentially-neat extensions, like swapping between decl
    and def, and exposing the symbol name to the UI in the case of multiple symbols.

    Reviewers: hokein

    Subscribers: ilya-biryukov, javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57388 — sammccall / ViewSVN
  34. [clangd] Use delimited style to make life easier for the fuzzer — sammccall / ViewSVN
  35. Disable tidy checks with too many hits

    Summary:
    Some tidy checks have too many hits in the codebase, making it hard to spot
    other results from clang-tidy, therefore rendering the tool less useful.

    Two checks were disabled:
      - misc-non-private-member-variable-in-classes in the whole LLVM monorepo,
        it is very common to have those in LLVM and the style guide does not forbid
        them.
      - readability-identifier-naming in the clang subtree. There are thousands of
        violations in 'Sema.h' alone.

    Before the change, 'Sema.h' had >1000 tidy warnings, after the change the number
    dropped to 3 warnings (unterminated namespace comments).

    Reviewers: alexfh, hokein

    Reviewed By: hokein

    Subscribers: llvm-commits, cfe-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D57573 — ibiryukov / ViewSVN
  36. [X86][BdVer2] Transfer delays from the integer to the floating point unit.

    Summary:
    I'm unable to find this number in the "AMD SOG for family 15h".
    llvm-exegesis measures the latencies of these instructions as `2`,
    which matches the latencies specified in "AMD SOG for family 15h".

    However if we look at Agner, Microarchitecture, "AMD Bulldozer, Piledriver,
    Steamroller and Excavator pipeline", "Data delay between different execution
    domains", the int->ivec transfer is listed as `8`..`10`cy of additional latency.

    Also, Agner's "Instruction tables", for Piledriver, lists their latencies as `12`,
    which is consistent with `2cy` from exegesis / AMD SOG + `10cy` transfer delay.

    Additional data point comes from the fact that Agner's "Instruction tables",
    for Jaguar, lists their latencies as `8`; and "AMD SOG for family 16h" does
    state the `+6cy` int->ivec delay, which is consistent with instr latency of `1` or `2`.

    Reviewers: andreadb, RKSimon, craig.topper

    Reviewed By: andreadb

    Subscribers: gbedwell, courbet, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D57300 — lebedevri / ViewSVN
  37. [clangd] Unbreak fuzzer target — sammccall / ViewSVN
  38. Provide reason messages for unviable inlining

    InlineCost's isInlineViable() is changed to return InlineResult
    instead of bool. This provides messages for failure reasons and
    allows to get more specific messages for cases where callsites
    are not viable for inlining.

    Reviewed By: xbolva00, anemet

    Differential Revision: https://reviews.llvm.org/D57089 — yrouban / ViewSVN
  39. Revert r352750.

    This was causing a build bot failure:
    http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/15346/ — jhenderson / ViewSVN
  40. [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer

    Prior to this change, there are a few tests called llvm-symbolizer* in
    the DebugInfo test area. These really were testing either the DebugInfo
    or Symbolizer library, rather than the llvm-symbolizer tool itself, so
    this patch renames them to be clearer that they aren't explicitly tests
    for llvm-symbolizer (such tests belong in test/tools/llvm-symbolizer).

    This patch also reinstates the copying of a DWO file, removed previously
    in r352752. The test needs this so that it could possibly fail.

    Finally, some of the tests have been simplified slightly by removing
    unnecessary switches and/or unused check-prefixes.

    Reviewed by: dblaikie

    Differential Revision: https://reviews.llvm.org/D57518 — jhenderson / ViewSVN

#263 (Feb 1, 2019 2:09:32 AM)

  1. [doc]Update String Error documentation in Programmer Manual

    A while back, createStringError was added to provide easier construction
    of StringError instances, especially with formatting options. Prior to
    this patch, that the documentation only mentions the standard method of
    using it. Since createStringError is slightly shorter to type, and also
    provides the formatting options, this patch updates the Programmer's
    Manual to use the new function in its examples, and to mention the
    printf formatting options. It also fixes a small typo in one of the
    examples and removes the unnecessary make_error_code call. — jhenderson / ViewSVN
  2. [CodeGen] Don't scavenge non-saved regs in exception throwing functions

    Previously, LiveRegUnits was assuming that if a block has no successors
    and does not return, then no registers are live at the end of it
    (because the end of the block is unreachable). This was causing the
    register scavenger to use callee-saved registers to materialise stack
    frame addresses without saving them in the prologue. This would normally
    be fine, because the end of the block is unreachable, but this is not
    legal if the block ends by throwing a C++ exception. If this happens,
    the scratch register will be modified, but its previous value won't be
    preserved, so it doesn't get restored by the exception unwinder.

    Differential revision: https://reviews.llvm.org/D57381 — olista01 / ViewSVN
  3. [clangd] clangDaemonTweaks - fix -DBUILD_SHARED_LIBS=ON build

    Followup for rL352841. — lebedevri / ViewSVN
  4. Test commit: fix typo — smateo / ViewSVN
  5. [clangd] Fix -DBUILD_SHARED_LIBS=ON build - SwapIfBranches needs clangAST.

    Else, fails with:

    [1/2] Linking CXX executable bin/clangd
    FAILED: bin/clangd
    : && /usr/bin/g++  -pipe -O2 -g0 -UNDEBUG -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -pipe -O2 -g0 -UNDEBUG  -fuse-ld=lld -Wl,--color-diagnostics -Wl,-allow-shlib-undefined     -Wl,-O3 -Wl,--gc-sections tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapIfBranches.cpp.o tools/clang/tools/extra/clangd/tool/CMakeFiles/clangd.dir/ClangdMain.cpp.o  -o bin/clangd  -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMSupport.so.9svn -lpthread lib/libclangBasic.so.9svn lib/libclangTidy.so.9svn lib/libclangDaemon.so.9svn lib/libclangFormat.so.9svn lib/libclangFrontend.so.9svn lib/libclangSema.so.9svn lib/libclangTooling.so.9svn lib/libclangToolingCore.so.9svn && :
    ld.lld: error: undefined symbol: clang::FunctionDecl::getBody(clang::FunctionDecl const*&) const
    >>> referenced by SwapIfBranches.cpp
    >>>               tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/SwapIfBranches.cpp.o:(clang::FunctionDecl::getBody() const)

    and so on. — lebedevri / ViewSVN
  6. [obj2yaml] - Merge dumpRelSection and dumpRelaSection. NFC.

    These methods are very similar, patch merge them into one.

    Differential revision: https://reviews.llvm.org/D57461 — grimar / ViewSVN
  7. [SLPVectorizer] Get rid of IndexQueue array from vectorizeStores. NFCI.

    Indices are checked as they are generated. No need to fill the whole array of indices.

    Differential Revision: https://reviews.llvm.org/D57144 — yrouban / ViewSVN
  8. Fix isInSystemMacro to handle pasted macros

    Token pasted by the preprocessor (through ##) have a Spelling pointing to scratch buffer.
    As a result they are not recognized at system macro, even though the pasting happened in
    a system macro. Fix that by looking into the parent macro if the original lookup finds a
    scratch buffer.

    Differential Revision: https://reviews.llvm.org/D55782

    This effectively fixes https://bugs.llvm.org/show_bug.cgi?id=35268, — serge_sans_paille / ViewSVN
  9. [clangd] Fix crash in applyTweak, remove TweakID alias.

    Strings are complicated, giving them opaque names makes us forget
    they're complicated. — sammccall / ViewSVN
  10. Revert "Bump minimum toolchain version"

    Looks like we still have a few bots that are sad. Let try to get them fixed! — jfb / ViewSVN
  11. Bump minimum toolchain version

    Summary:
    The RFC on moving past C++11 got good traction:
      http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

    This patch therefore bumps the toolchain versions according to our policy:
      llvm.org/docs/DeveloperPolicy.html#toolchain

    Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

    Differential Revision: https://reviews.llvm.org/D57264 — jfb / ViewSVN
  12. [RISCV] Implement RV64D codegen

    This patch:
    * Adds necessary RV64D codegen patterns
    * Modifies CC_RISCV so it will properly handle f64 types (with soft float ABI)

    Note that in general there is no reason to try to select fcvt.w[u].d rather than fcvt.l[u].d for i32 conversions because fptosi/fptoui produce poison if the input won't fit into the target type.

    Differential Revision: https://reviews.llvm.org/D53237 — asb / ViewSVN
  13. [SelectionDAG] Support promotion of the FPOWI integer operand

    For targets where i32 is not a legal type (e.g. 64-bit RISC-V),
    LegalizeIntegerTypes must promote the integer operand of ISD::FPOWI. As this
    is a signed value, this should be sign-extended.

    This patch enables all tests in test/CodeGen/RISCVfloat-intrinsics.ll for
    RV64, as prior to this patch that file couldn't be compiled for RV64 due to an
    assertion when performing codegen for fpowi.

    Differential Revision: https://reviews.llvm.org/D54574 — asb / ViewSVN
  14. [SemaCXX] Param diagnostic matches overload logic

    Summary:
    Given the following test program:

    ```
    class C {
    public:
      int A(int a, int& b);
    };

    int C::A(const int a, int b) {
      return a * b;
    }
    ```

    Clang would produce an error message that correctly diagnosed the
    redeclaration of `C::A` to not match the original declaration (the
    parameters to the two declarations do not match -- the original takes an
    `int &` as its 2nd parameter, but the redeclaration takes an `int`). However,
    it also produced a note diagnostic that inaccurately pointed to the
    first parameter, claiming that `const int` in the redeclaration did not
    match the unqualified `int` in the original. The diagnostic is
    misleading because it has nothing to do with why the program does not
    compile.

    The logic for checking for a function overload, in
    `Sema::FunctionParamTypesAreEqual`, discards cv-qualifiers before
    checking whether the types are equal. Do the same when producing the
    overload diagnostic.

    Reviewers: rsmith

    Reviewed By: rsmith

    Subscribers: cpplearner, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D57032 — modocache / ViewSVN
  15. Fix compilation of examples after 13680223b9d8 / r352827

    Who knew...they're not built by default or as part of the tests. — jyknight / ViewSVN
  16. [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls

    Summary:
    UBSan wants to detect when unreachable code is actually reached, so it
    adds instrumentation before every unreachable instruction. However, the
    optimizer will remove code after calls to functions marked with
    noreturn. To avoid this UBSan removes noreturn from both the call
    instruction as well as from the function itself. Unfortunately, ASan
    relies on this annotation to unpoison the stack by inserting calls to
    _asan_handle_no_return before noreturn functions. This is important for
    functions that do not return but access the the stack memory, e.g.,
    unwinder functions *like* longjmp (longjmp itself is actually
    "double-proofed" via its interceptor). The result is that when ASan and
    UBSan are combined, the noreturn attributes are missing and ASan cannot
    unpoison the stack, so it has false positives when stack unwinding is
    used.

    Changes:
    Clang-CodeGen now directly insert calls to `__asan_handle_no_return`
    when a call to a noreturn function is encountered and both
    UBsan-unreachable and ASan are enabled. This allows UBSan to continue
    removing the noreturn attribute from functions without any changes to
    the ASan pass.

    Previously generated code:
    ```
      call void @longjmp
      call void @__asan_handle_no_return
      call void @__ubsan_handle_builtin_unreachable
    ```

    Generated code (for now):
    ```
      call void @__asan_handle_no_return
      call void @longjmp
      call void @__asan_handle_no_return
      call void @__ubsan_handle_builtin_unreachable
    ```

    rdar://problem/40723397

    Reviewers: delcypher, eugenis, vsk

    Differential Revision: https://reviews.llvm.org/D57278

    llvm-svn: 352690 — yln / ViewSVN
  17. [opaque pointer types] Add a FunctionCallee wrapper type, and use it.

    Recommit r352791 after tweaking DerivedTypes.h slightly, so that gcc
    doesn't choke on it, hopefully.

    Original Message:
    The FunctionCallee type is effectively a {FunctionType*,Value*} pair,
    and is a useful convenience to enable code to continue passing the
    result of getOrInsertFunction() through to EmitCall, even once pointer
    types lose their pointee-type.

    Then:
    - update the CallInst/InvokeInst instruction creation functions to
      take a Callee,
    - modify getOrInsertFunction to return FunctionCallee, and
    - update all callers appropriately.

    One area of particular note is the change to the sanitizer
    code. Previously, they had been casting the result of
    `getOrInsertFunction` to a `Function*` via
    `checkSanitizerInterfaceFunction`, and storing that. That would report
    an error if someone had already inserted a function declaraction with
    a mismatching signature.

    However, in general, LLVM allows for such mismatches, as
    `getOrInsertFunction` will automatically insert a bitcast if
    needed. As part of this cleanup, cause the sanitizer code to do the
    same. (It will call its functions using the expected signature,
    however they may have been declared.)

    Finally, in a small number of locations, callers of
    `getOrInsertFunction` actually were expecting/requiring that a brand
    new function was being created. In such cases, I've switched them to
    Function::Create instead.

    Differential Revision: https://reviews.llvm.org/D57315 — jyknight / ViewSVN
  18. [analyzer] [RetainCountChecker] Fix object type for CF/Obj-C bridged casts

    Having an incorrect type for a cast causes the checker to incorrectly
    dismiss the operation under ARC, leading to a false positive
    use-after-release on the test.

    rdar://47709885

    Differential Revision: https://reviews.llvm.org/D57557 — George Karpenkov / ViewSVN

#262 (Jan 31, 2019 5:10:13 PM)

  1. Mark __rela_iplt_{start,end} as weak.

    Should fix non-lld links. — pcc / ViewSVN
  2. Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed"

    This reverts commit r350920 as it is not clear whether we should force a
    class to be returned in registers when copy and move constructors are
    both deleted.

    For more background, see the following discussion:
    http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190128/259907.html — ahatanak / ViewSVN
  3. [x86] adjust test to show both add/inc options; NFC

    If we're optimizing for size, that overrides the subtarget
    feature, so we would always produce 'inc' if we matched
    this pattern. — spatel / ViewSVN
  4. [x86] add test for missed opportunity to use 'inc'; NFC

    Another pattern exposed in D57516. — spatel / ViewSVN
  5. [libFuzzer] make a test for exploding dfsan labels more agressive — kcc / ViewSVN
  6. [sanitizer-coverage] prune trace-cmp instrumentation for CMP isntructions that feed into the backedge branch. Instrumenting these CMP instructions is almost always useless (and harmful) for fuzzing — kcc / ViewSVN
  7. GlobalISel: Fix MMO creation with non-power-of-2 mem size

    It should probably just be mandatory for getTgtMemIntrinsic to return
    the alignment. — arsenm / ViewSVN
  8. hwasan: Add __hwasan_init_static() function.

    This function initializes enough of the runtime to be able to run
    instrumented code in a statically linked executable. It replaces
    __hwasan_shadow_init() which wasn't doing enough initialization for
    instrumented code that uses either TLS or IFUNC to work.

    Differential Revision: https://reviews.llvm.org/D57490 — pcc / ViewSVN
  9. [libFuzzer][Windows] Temporarily disable value-profile-cmp2.test on Win

    Summary:
    Temporarily disable value-profile-cmp2.test on Win.
    https://reviews.llvm.org/D57465 causes the test to fail on Win.
    However, it seems that the behavior of libFuzzer on Win was broken
    before that patch. It crashes in the exit handler when not used with
    ASAN. Prior to the patch, the crash handler would run, tricking the
    test into thinking libFuzzer on Win had exited properly.

    Reviewers: morehouse, vitalybuka

    Reviewed By: morehouse

    Subscribers: yln

    Differential Revision: https://reviews.llvm.org/D57551 — metzman / ViewSVN
  10. Revert "Bump minimum toolchain version"

    A handful of bots are still breaking, either because I missed them in my audit,
    they were offline, or something else. I'm contacting their authors, but I'll
    revert for now and re-commit later. — jfb / ViewSVN
  11. [WebAssembly] Fix a regression selecting negative build_vector lanes

    Summary:
    The custom lowering introduced in rL352592 creates build_vector nodes
    with negative i32 operands, but these operands did not meet the value
    range constraints necessary to match build_vector nodes. This CL fixes
    the issue by removing the unnecessary constraints.

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish

    Differential Revision: https://reviews.llvm.org/D57481 — tlively / ViewSVN
  12. DeveloperPolicy: update toolchain with sample RFC / patch

    As was suggested when the policy originally went in. — jfb / ViewSVN
  13. Bump minimum toolchain version

    Summary:
    The RFC on moving past C++11 got good traction:
      http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html

    This patch therefore bumps the toolchain versions according to our policy:
      llvm.org/docs/DeveloperPolicy.html#toolchain

    Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane

    Differential Revision: https://reviews.llvm.org/D57264 — jfb / ViewSVN
  14. Fixed hasLinkerPrivateGlobalPrefix treating StringRef as C String.

    Reviewers: jgravelle-google, sbc100

    Subscribers: aheejin, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57545 — aardappel / ViewSVN
  15. Re-disable pch-from-libclang.c after 352803, some buildbots are still unhappy — nico / ViewSVN
  16. [RISCV] Add RV64F codegen support

    This requires a little extra work due tothe fact i32 is not a legal type. When
    call lowering happens post-legalisation (e.g. when an intrinsic was inserted
    during legalisation). A bitcast from f32 to i32 can't be introduced. This is
    similar to the challenges with RV32D. To handle this, we introduce
    target-specific DAG nodes that perform bitcast+anyext for f32->i64 and
    trunc+bitcast for i64->f32.

    Differential Revision: https://reviews.llvm.org/D53235 — asb / ViewSVN
  17. [WebAssembly] MC: Fix for outputing wasm object to /dev/null

    Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57479 — sbc / ViewSVN
  18. [x86] add test for missed opportunity to use 'inc'; NFC — spatel / ViewSVN
  19. [ASTDump] Make template specialization tests more exact

    Reviewers: aaron.ballman

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D57502 — steveire / ViewSVN
  20. Make clang/test/Index/pch-from-libclang.c pass in more places

    - fixes the test on macOS with LLVM_ENABLE_PIC=OFF
    - together with D57343, gets the test to pass on Windows
    - makes it run everywhere (it seems to just pass on Linux)

    The main change is to pull out the resource directory computation into a
    function shared by all 3 places that do it. In CIndexer.cpp, this now works no
    matter if libclang is in lib/ or bin/ or statically linked to a binary in bin/.


    Differential Revision: https://reviews.llvm.org/D57345 — nico / ViewSVN
  21. [Hexagon] Rename textually included file from .h to .inc — rtrieu / ViewSVN
  22. Do not copy long double and 128-bit fp format from aux target for AMDGPU

    rC352620 caused regressions because it copied floating point format from
    aux target.

    floating point format decides whether extended long double is supported.
    It is x86_fp80 on x86 but IEEE double on amdgcn.

    Document usage of long doubel type in HIP programming guide
    https://github.com/ROCm-Developer-Tools/HIP/pull/890

    Differential Revision: https://reviews.llvm.org/D57527 — yaxunl / ViewSVN
  23. Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."

    This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791).

    Seems to run into compilation failures with GCC (but not clang, where
    I tested it). Reverting while I investigate. — jyknight / ViewSVN
  24. [CUDA] add support for the new kernel launch API in CUDA-9.2+.

    Instead of calling CUDA runtime to arrange function arguments,
    the new API constructs arguments in a local array and the kernels
    are launched with __cudaLaunchKernel().

    The old API has been deprecated and is expected to go away
    in the next CUDA release.

    Differential Revision: https://reviews.llvm.org/D57488 — tra / ViewSVN
  25. [CUDA] Propagate detected version of CUDA to cc1

    ..and use it to control that parts of CUDA compilation
    that depend on the specific version of CUDA SDK.

    This patch has a placeholder for a 'new launch API' support
    which is in a separate patch. The list will be further
    extended in the upcoming patch to support CUDA-10.1.

    Differential Revision: https://reviews.llvm.org/D57487 — tra / ViewSVN
  26. [clangd] A code action to swap branches of an if statement

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: llvm-commits, mgorny, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D56611 — ibiryukov / ViewSVN
  27. Fix compilation error with GCC after r352791. — jyknight / ViewSVN
  28. [EarlyCSE & MSSA] Cleanup special handling for removing MemoryAccesses.

    Summary: Moving special handling to MemorySSAUpdater in D57199.

    Reviewers: gberry, george.burgess.iv

    Subscribers: sanjoy, jlebar, Prazek, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57200 — asbirlea / ViewSVN
  29. [WebAssembly] Add bulk memory target feature

    Summary: Also clean up some preexisting target feature code.

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, jfb

    Differential Revision: https://reviews.llvm.org/D57495 — tlively / ViewSVN
  30. [DAGCombine] Avoid CombineZExtLogicopShiftLoad if there is free ZEXT

    This patch fixes pr39098.

    For the attached test case, CombineZExtLogicopShiftLoad can optimize it to

    t25: i64 = Constant<1099511627775>
    t35: i64 = Constant<0>
      t0: ch = EntryToken
    t57: i64,ch = load<(load 4 from `i40* undef`, align 8), zext from i32> t0, undef:i64, undef:i64
        t58: i64 = srl t57, Constant:i8<1>
      t60: i64 = and t58, Constant:i64<524287>
    t29: ch = store<(store 5 into `i40* undef`, align 8), trunc to i40> t57:1, t60, undef:i64, undef:i64

    But later visitANDLike transforms it to

    t25: i64 = Constant<1099511627775>
    t35: i64 = Constant<0>
      t0: ch = EntryToken
    t57: i64,ch = load<(load 4 from `i40* undef`, align 8), zext from i32> t0, undef:i64, undef:i64
          t61: i32 = truncate t57
        t63: i32 = srl t61, Constant:i8<1>
      t64: i32 = and t63, Constant:i32<524287>
    t65: i64 = zero_extend t64
        t58: i64 = srl t57, Constant:i8<1>
      t60: i64 = and t58, Constant:i64<524287>
    t29: ch = store<(store 5 into `i40* undef`, align 8), trunc to i40> t57:1, t60, undef:i64, undef:i64

    And it triggers CombineZExtLogicopShiftLoad again, causes a dead loop.

    Both forms should generate same instructions, CombineZExtLogicopShiftLoad generated IR looks cleaner. But it looks more difficult to prevent visitANDLike to do the transform, so I prevent CombineZExtLogicopShiftLoad to do the transform if the ZExt is free.

    Differential Revision: https://reviews.llvm.org/D57491 — carrot / ViewSVN
  31. [opaque pointer types] Add a FunctionCallee wrapper type, and use it.

    The FunctionCallee type is effectively a {FunctionType*,Value*} pair,
    and is a useful convenience to enable code to continue passing the
    result of getOrInsertFunction() through to EmitCall, even once pointer
    types lose their pointee-type.

    Then:
    - update the CallInst/InvokeInst instruction creation functions to
      take a Callee,
    - modify getOrInsertFunction to return FunctionCallee, and
    - update all callers appropriately.

    One area of particular note is the change to the sanitizer
    code. Previously, they had been casting the result of
    `getOrInsertFunction` to a `Function*` via
    `checkSanitizerInterfaceFunction`, and storing that. That would report
    an error if someone had already inserted a function declaraction with
    a mismatching signature.

    However, in general, LLVM allows for such mismatches, as
    `getOrInsertFunction` will automatically insert a bitcast if
    needed. As part of this cleanup, cause the sanitizer code to do the
    same. (It will call its functions using the expected signature,
    however they may have been declared.)

    Finally, in a small number of locations, callers of
    `getOrInsertFunction` actually were expecting/requiring that a brand
    new function was being created. In such cases, I've switched them to
    Function::Create instead.

    Differential Revision: https://reviews.llvm.org/D57315 — jyknight / ViewSVN
  32. [cmake] Note future cleanup in comment. NFC

    CMake 3.6 introduced CMAKE_TRY_COMPILE_PLATFORM_VARIABLES, which solves
    precisely the problem that necessitated init_user_prop, so we can switch
    over whenever we bump our minimum CMake requirement. — smeenai / ViewSVN
  33. [fuzzer] Use RawPrint instead of Printf for instrumentation warning

    Summary:
    Use RawPrint instead of Printf for instrumentation warning because
    Printf doesn't work on Win when instrumentation is being
    initialized (since OutputFile is not yet initialized).

    Reviewers: kcc

    Reviewed By: kcc

    Differential Revision: https://reviews.llvm.org/D57531 — metzman / ViewSVN
  34. [CodeComplete] Propagate preferred types through parser in more cases

    Preferred types are used by code completion for ranking. This commit
    considerably increases the number of points in code where those types
    are propagated.

    In order to avoid complicating signatures of Parser's methods, a
    preferred type is kept as a member variable in the parser and updated
    during parsing.

    Differential revision: https://reviews.llvm.org/D56723 — ibiryukov / ViewSVN
  35. [MemorySSA] Extend removeMemoryAccess API to optimize MemoryPhis.

    Summary:
    EarlyCSE needs to optimize MemoryPhis after an access is removed and has
    special handling for it. This should be handled by MemorySSA instead.
    The default remains that MemoryPhis are *not* optimized after an access
    is removed.

    Reviewers: george.burgess.iv

    Subscribers: sanjoy, jlebar, llvm-commits, Prazek

    Differential Revision: https://reviews.llvm.org/D57199 — asbirlea / ViewSVN
  36. [DAG][SystemZ] Define unwrapAddress for PCREL_WRAPPER.

    Summary:
    Like with X86, this allows better DAG-level alias analysis and
    alignment inference for wrapped addresses.

    Reviewers: jonpa, uweigand

    Reviewed By: uweigand

    Subscribers: hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57407 — niravd / ViewSVN
  37. [ELF] Return the section name when calling getSymbolName on a section symbol.

    Summary:
    Previously, llvm-nm would report symbols for .debug and .note sections as: '?' with an empty  section name:

    ```
    00000000 ?
    00000000 ?
    ...
    ```

    With this patch the output more closely resembles GNU nm:
    ```
    00000000 N .debug_abbrev
    00000000 n .note.GNU-stack
    ...
    ```

    This patch calls `getSectionName` for sections that belong to symbols of type `ELF::STT_SECTION`, which returns the name of the section from the section string table.

    Reviewers: Bigcheese, davide, jhenderson

    Reviewed By: davide, jhenderson

    Subscribers: rupprecht, jhenderson, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57105 — mattd / ViewSVN
  38. [DAG] Aggressively cleanup dangling node in CombineZExtLogicopShiftLoad.

    While dangling nodes will eventually be pruned when they are
    considered, leaving them disables combines requiring single-use.

    Reviewers: Carrot, spatel, craig.topper, RKSimon, efriedma

    Subscribers: hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57520 — niravd / ViewSVN
  39. [Intrinsic] Expand SMULFIX to MUL, MULH[US], or [US]MUL_LOHI on vector arguments

    r zero scale SMULFIX, expand into MUL which produces better code for X86.

    For vector arguments, expand into MUL if SMULFIX is provided with a zero scale.
    Otherwise, expand into MULH[US] or [US]MUL_LOHI.

    Differential Revision: https://reviews.llvm.org/D56987 — leonardchan / ViewSVN
  40. Revert "[X86] Mark EMMS and FEMMS as clobbering MM0-7 and ST0-7."

    This is causing a failure in chromium — ctopper / ViewSVN
  41. Fix a bit of libc++-specific behavior in the regex tests; add a missing test. Reviewed as https://reviews.llvm.org/D57391 Thanks to Andrey Maksimov for the patch — marshall / ViewSVN
  42. Lower widenable_conditions in CGP

    This ensures that if we make it to the backend w/o lowering widenable_conditions first, that we generate correct code. Doing it in CGP - instead of isel - let's us fold control flow before hitting block local instruction selection.

    Differential Revision: https://reviews.llvm.org/D57473 — reames / ViewSVN
  43. [libFuzzer] relax a flaky test — kcc / ViewSVN
  44. GlobalISel: Fix handling of vectors of pointers in clamp{Min,Max}NumElements

    This avoids hitting the assert added in r352636 in a future commit. — arsenm / ViewSVN
  45. [ADT] Fix a typo in isOSVersionLT that breaks the Micro version check

    The original commit of this function (r129800 in 2011) had a typo where
    part of the "Micro" version check was actually comparing against the "Minor"
    version number. — Bob Wilson / ViewSVN
  46. Trim trailing whitespace. NFCI. — rksimon / ViewSVN
  47. [X86][AVX] Fold concat(broadcast(x),broadcast(x)) -> broadcast(x)

    Differential Revision: https://reviews.llvm.org/D57514 — rksimon / ViewSVN
  48. [X86][AVX] insert_subvector(bitcast(v), bitcast(s), c1) -> bitcast(insert_subvector(v,s,c2))

    Similar to what we already do in DAGCombiner, but this version also handles bitcasts from types with different scalar sizes, which x86 is better at handling.

    Differential Revision: https://reviews.llvm.org/D57514 — rksimon / ViewSVN
  49. [CallSite removal] Remove CallSite uses from InstCombine.

    Reviewers: chandlerc

    Reviewed By: chandlerc

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D57494 — ctopper / ViewSVN
  50. Recommit "[ThinLTO] Rename COMDATs for COFF when promoting/renaming COMDAT leader"

    Recommit of r352763 with fix for use after free. — tejohnson / ViewSVN
  51. revert r352766: [PatternMatch] add special-case uaddo matching for increment-by-one

    Missed some regression test updates when testing this. — spatel / ViewSVN
  52. Revert "[ThinLTO] Rename COMDATs for COFF when promoting/renaming COMDAT leader"

    This reverts commit r352763.

    Causing a couple bot failures, root cause pointed to by sanitizer bot:
    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/28909/steps/annotate/logs/stdio

    Use after free. I understand the issue but will revert and test with fix
    before recommitting. — tejohnson / ViewSVN
  53. [llvm-objcopy] Skip --localize-symbol for undefined symbols

    Summary:
    Include the symbol being defined in the list of requirements for using --localize-symbol.

    This is used, for example, when someone is depending on two different projects that have the same (or close enough) method defined in each library, and using "-L sym" for a conflicting symbol in one of the libraries so that the definition from the other one is used. However, the library may have internal references to the symbol, which cause program crashes when those are used, i.e.:

    ```
    $ cat foo.c
    int foo() { return 5; }
    $ cat bar.c
    int foo();
    int bar() { return 2 * foo(); }
    $ cat foo2.c
    int foo() { /* Safer implementation */ return 42; }
    $ cat main.c
    int bar();
    int main() {
      __builtin_printf("bar = %d\n", bar());
      return 0;
    }
    $ ar rcs libfoo.a foo.o bar.o
    $ ar rcs libfoo2.a foo2.o
    # Picks the wrong foo() impl
    $ clang main.o -lfoo -lfoo2 -L. -o main
    # Picks the right foo() impl
    $ objcopy -L foo libfoo.a && clang main.o -lfoo -lfoo2 -L. -o main
    # Links somehow, but crashes at runtime
    $ llvm-objcopy -L foo libfoo.a && clang main.o -lfoo -lfoo2 -L. -o main
    ```

    Reviewers: jhenderson, alexshap, jakehehrlich, espindola

    Subscribers: emaste, arichardson

    Differential Revision: https://reviews.llvm.org/D57417 — rupprecht / ViewSVN
  54. [PatternMatch] add special-case uaddo matching for increment-by-one

    This is the most important uaddo problem mentioned in PR31754:
    https://bugs.llvm.org/show_bug.cgi?id=31754

    We were failing to match the canonicalized pattern when it's an 'add 1' operation.
    Pattern matching, however, shouldn't assume that we have canonicalized IR, so we
    match 4 commuted variants of uaddo.

    There's also a test with a crazy type to show that the existing CGP transform
    based on this matcher is not limited by target legality checks, but that's a
    different problem.

    Differential Revision: https://reviews.llvm.org/D57516 — spatel / ViewSVN
  55. [clangd] Append "(fix available)" to diagnostic message when fixes are present.

    Summary:
    This would make diagnostic fixits more discoverable, especially for
    plugins like YCM.

    Reviewers: sammccall

    Reviewed By: sammccall

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57509 — ioeric / ViewSVN
  56. [ThinLTO] Rename COMDATs for COFF when promoting/renaming COMDAT leader

    Summary:
    COFF requires that COMDAT name match that of the leader. When we promote
    and rename an internal leader in ThinLTO due to an import, ensure we
    subsequently rename the associated COMDAT. Similar to D31963 which did
    this during ThinLTO module splitting.

    Fixes PR40414.

    Reviewers: pcc, inglorion

    Subscribers: mehdi_amini, dexonsmith, dmajor, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57395 — tejohnson / ViewSVN
  57. [CGP] add more tests for uaddo; NFC — spatel / ViewSVN
  58. Accomodate gcc 7.3.0's -Wdangling-else — nico / ViewSVN
  59. [OpenCL] Fixed addr space manging test.

    Fixed typo in the Filecheck directive and changed the
    test to verify output correctly.

    Fixes PR40029! — stulova / ViewSVN
  60. gn build: Merge r352483 — nico / ViewSVN
  61. gn build: Merge r352681, r352739 — nico / ViewSVN
  62. [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#3)

    This is the fourth (and final for now) of a series of patches
    simplifying llvm-symbolizer tests. See r352752, r352753 and 352754 for
    the previous ones. This patch splits out several more distinct test
    cases from llvm-symbolizer.test into separate tests, and simplifies them
    in various ways including:

    1) Building a test case for spaces in path from source, rather than
       using a pre-canned binary. This allows deleting of said binary and the
       source it was built from.
    2) Switching to specifying addresses and objects directly on the
       command-line rather than via stdin.

    This also adds an explict test for the ability to specify a file and
    address as a line in stdin, since the majority of the tests have been
    migrated away from this approach, leaving this largely untested.

    Reviewed by: dblaikie

    Differential Revision: https://reviews.llvm.org/D57446 — jhenderson / ViewSVN
  63. Revert "[Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls"

    This reverts commit r352690. This causes clang to crash. Sent reproducer to the
    author in the orginal commit. — ioeric / ViewSVN
  64. [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#2)

    This is the third of a series of patches simplifying llvm-symbolizer
    tests. See r352752 and r352753 for the previous two. This patch splits
    out a number of distinct test cases from llvm-symbolizer.test into
    separate tests, and simplifies them in various ways including:

    1) using --obj/positional arguments for the input file and addresses
       instead of stdin,
    2) using runtime-generated inputs rather than a pre-canned binary, and
    3) testing more specifically (i.e. checking only what is interesting to
       the behaviour changed in the original commit for that test case).

    This patch also removes the test case for using --obj. The
    tools/llvm-symbolizer/basic.s test already tests this case. Finally,
    this patch adds a simple test case to the demangle switch test case to
    show that demangling happens by default.

    See https://bugs.llvm.org/show_bug.cgi?id=40070#c1 for the motivation.

    Reviewed by: dblaikie

    Differential Revision: https://reviews.llvm.org/D57446 — jhenderson / ViewSVN
  65. [llvm-symbolizer][test] Extract tests from llvm-symbolizer.test and simplify (#1)

    This is the second of a series of patches simplifying llvm-symbolizer
    tests. See r352752 for the first. This one splits out 5 distinct test
    cases from llvm-symbolizer.test into separate tests, and simplifies them
    slightly by using --obj/positional arguments for the input file and
    addresses instead of stdin.

    See https://bugs.llvm.org/show_bug.cgi?id=40070#c1 for the motivation.

    Reviewed by: dblaikie

    Differential Revision: https://reviews.llvm.org/D57443 — jhenderson / ViewSVN
  66. [llvm-symbolizer][test] Simplify test input reading

    This change migrates most llvm-symbolizer tests away from reading input
    via stdin and instead using --obj + positional arguments for the file
    and addresses respectively, which makes the tests easier to read.

    One exception is the test test/tools/llvm-symbolizer/pdb/pdb.test, which
    was doing some manipulation on the input addresses. This patch
    simplifies this somewhat, but it still reads from stdin.

    More changes to follow to simplify/break-up other tests.

    Reviewed by: dblaikie

    Differential Revision: https://reviews.llvm.org/D57441 — jhenderson / ViewSVN
  67. [X86][AVX] Fold broadcast(bitcast(src)) -> bitcast(broadcast(src)) — rksimon / ViewSVN
  68. [CommandLine] Improve help text for cl::values style options

    In order to make an option value truly optional, both the ValueOptional
    and an empty-named value are required. This empty-named value appears in
    the command-line help text, which is not ideal.

    This change improves the help text for these sort of options in a number
    of ways:
    1) ValueOptional options with an empty-named value now print their help
    text twice: both without and then with '=<value>' after the name. The
    latter version then lists the allowed values after it.
    2) Empty-named values with no help text in ValueOptional options are not
    listed in the permitted values.
    3) Otherwise empty-named options are printed as =<empty> rather than
    simply '='.
    4) Option values without help text do not have the '-' separator
    printed.

    It also tweaks the llvm-symbolizer -functions help text to not print a
    trailing ':' as that looks bad combined with 1) above.

    Reviewed by: thopre, ruiu

    Differential Revision: https://reviews.llvm.org/D57030 — jhenderson / ViewSVN
  69. [X86][AVX] Add PR34394 subvector broadcast test cases

    Tidyup check-prefixes at the same time — rksimon / ViewSVN
  70. Revert "Support attribute used in member funcs of class templates"

    This reverts commit 352740: broke swift build — rafauler / ViewSVN
  71. Revert r352732: [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand

    This causes a failure on the following bot as well as our internal ones:

    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/23103 — jmorse / ViewSVN
  72. [llvm-strip] Add --strip-symbol

    Differential revision: https://reviews.llvm.org/D57440 — evgeny777 / ViewSVN
  73. [X86] combineExtractWithShuffle - more aggressively peek through bitcasts

    Fixes regression introduced by rL352743 — rksimon / ViewSVN
  74. [X86][AVX] Enable AVX1 broadcasts in shuffle combining

    Enables 32/64-bit scalar load broadcasts on AVX1 targets

    The extractelement-load.ll regression will be fixed shortly in a followup commit. — rksimon / ViewSVN
  75. [X86][AVX] Fold vt1 concat_vectors(vt2 undef, vt2 broadcast(x)) --> vt1 broadcast(x)

    If we're not inserting the broadcast into the lowest subvector then we can avoid the insertion by just performing a larger broadcast.

    Avoids a regression when we enable AVX1 broadcasts in shuffle combining — rksimon / ViewSVN
  76. [clang-tidy] refactor bugprone-exception-escape analysis into class

    Summary:
    The check `bugprone-exception-escape` does an AST-based analysis to determine
    if a function might throw an exception and warns based on that information.
    The analysis part is refactored into a standalone class similiar to
    `ExprMutAnalyzer` that is generally useful.
    I intent to use that class in a new check to automatically introduce `noexcept`
    if possible.

    Reviewers: aaron.ballman, alexfh, hokein, baloghadamsoftware, lebedev.ri

    Reviewed By: baloghadamsoftware, lebedev.ri

    Subscribers: lebedev.ri, mgorny, xazax.hun, rnkovacs, cfe-commits

    Tags: #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D57100 — jonastoth / ViewSVN
  77. Support attribute used in member funcs of class templates

    Summary:
    As PR17480 describes, clang does not support the used attribute
    for member functions of class templates. This means that if the member
    function is not used, its definition is never instantiated. This patch
    changes clang to emit the definition if it has the used attribute.

    Test Plan: Added a testcase

    Reviewed By: aaron.ballman

    Differential Revision: https://reviews.llvm.org/D56928 — rafauler / ViewSVN
  78. Default lowering for experimental.widenable.condition

    Introduces a pass that provides default lowering strategy for the
    `experimental.widenable.condition` intrinsic, replacing all its uses with
    `i1 true`.

    Differential Revision: https://reviews.llvm.org/D56096
    Reviewed By: reames — mkazantsev / ViewSVN
  79. Test commit. NFCI. — yrouban / ViewSVN
  80. [ARM] Thumb2: ConstantMaterializationCost

    Constants can also be materialised using the negated value and a MVN, and this
    case seem to have been missed for Thumb2. To check the constant materialisation
    costs, we now call getT2SOImmVal twice, once for the original constant and then
    also for its negated value, and this function checks if the constant can both
    be splatted or rotated.

    This was revealed by a test that optimises for minsize: instead of a LDR
    literal pool load and having a literal pool entry, just a MVN with an immediate
    is smaller (and also faster).

    Differential Revision: https://reviews.llvm.org/D57327 — sjoerdmeijer / ViewSVN
  81. [SelectionDAG] Codesize: don't expand SHIFT to SHIFT_PARTS

    And instead just generate a libcall. My motivating example on ARM was a simple:
     
      shl i64 %A, %B

    for which the code bloat is quite significant. For other targets that also
    accept __int128/i128 such as AArch64 and X86, it is also beneficial for these
    cases to generate a libcall when optimising for minsize. On these 64-bit targets,
    the 64-bits shifts are of course unaffected because the SHIFT/SHIFT_PARTS
    lowering operation action is not set to custom/expand.

    Differential Revision: https://reviews.llvm.org/D57386 — sjoerdmeijer / ViewSVN
  82. Fixup test after r352704 since it changes how paths may be emitted.

    On Unix/Mac OS X, normpath() returns the path unchanged (FileCheck), but
    on case-insensitive filesystems (like NTFS on Windows), it converts the
    path to lowercase (filecheck) which was causing the test to fail. — dyung / ViewSVN
  83. Commit tests for changes in revision D41940 — quolyk / ViewSVN
  84. Revert "[CMake] Unify scripts for generating VCS headers"

    This reverts commits r352729 and r352731: this broke Sanitizer Windows bots — phosek / ViewSVN
  85. [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand — kcc / ViewSVN
  86. [InstCombine] Missed optimization in math expression: simplify calls exp functions

    Summary: This patch enables folding following expressions under -ffast-math flag: exp(X) * exp(Y) -> exp(X + Y), exp2(X) * exp2(Y) -> exp2(X + Y). Motivation: https://bugs.llvm.org/show_bug.cgi?id=35594

    Reviewers: hfinkel, spatel, efriedma, lebedev.ri

    Reviewed By: spatel, lebedev.ri

    Subscribers: lebedev.ri, llvm-commits

    Differential Revision: https://reviews.llvm.org/D41342 — quolyk / ViewSVN
  87. [CMake] Unify scripts for generating VCS headers

    Previously, there were two different scripts for generating VCS headers:
    one used by LLVM and one used by Clang. They were both similar, but
    different. They were both broken in their own ways, for example the one
    used by Clang didn't properly handle monorepo resulting in an incorrect
    version information reported by Clang.

    This change unifies two the scripts by introducing a new script that's
    used from both LLVM and Clang, ensures that the new script supports both
    monorepo and standalone SVN and Git setups, and removes the old scripts.

    Differential Revision: https://reviews.llvm.org/D57063 — phosek / ViewSVN
  88. [SCEV] Prohibit SCEV transformations for huge SCEVs

    Currently SCEV attempts to limit transformations so that they do not work with
    big SCEVs (that may take almost infinite compile time). But for this, it uses heuristics
    such as recursion depth and number of operands, which do not give us a guarantee
    that we don't actually have big SCEVs. This situation is still possible, though it is not
    likely to happen. However, the bug PR33494 showed a bunch of simple corner case
    tests where we still produce huge SCEVs, even not reaching big recursion depth etc.

    This patch introduces a concept of 'huge' SCEVs. A SCEV is huge if its expression
    size (intoduced in D35989) exceeds some threshold value. We prohibit optimizing
    transformations if any of SCEVs we are dealing with is huge. This gives us a reliable
    check that we don't spend too much time working with them.

    As the next step, we can possibly get rid of old limiting mechanisms, such as recursion
    depth thresholds.

    Differential Revision: https://reviews.llvm.org/D35990
    Reviewed By: reames — mkazantsev / ViewSVN
  89. Add namespace to some types. — rtrieu / ViewSVN
  90. Fix missing C++ mode comment in header — arsenm / ViewSVN
  91. [CMake][compiler-rt] Enable statically linking unwinder and c++abi

    Rather than guessing whether to use static or shared version of
    unwinder and c++abi when using linking against the in-tree versions,
    provide a CMake option to control this.

    Differential Revision: https://reviews.llvm.org/D57492 — phosek / ViewSVN
  92. Revert "Reapply "[CGP] Check for existing inttotpr before creating new one""

    This change reverts r351626.

    The changes in r351626 cause quadratic work in several cases. (See r351626 thread on llvm-commits for details.) — dlj / ViewSVN
  93. [libFuzzer] Update Darwin test

    Support for -fsanitize-coverage=trace-pc[-guard] was removed from
    libFuzzer, which makes this currently fail.

    This commit aligns this Darwin-specific test with its Linux counterpart
    which changed in this commit:
    https://github.com/llvm/llvm-project/commit/3a94519a777b9ac407a1d5ff5c31ec48b3768eec — yln / ViewSVN
  94. GlobalISel: Handle odd splits in fewerElementsVector for load/store — arsenm / ViewSVN
  95. GlobalISel: Implement narrowScalar for bswap — arsenm / ViewSVN
  96. GlobalISel: Don't call changingInstruction before giving up — arsenm / ViewSVN
  97. GlobalISel: Allow bitcount ops to have different result type

    For AMDGPU the result is always 32-bit for 64-bit inputs. — arsenm / ViewSVN
  98. GlobalISel: Use helper function for MMO splitting

    Also fix an alignment bug getMachineMemOperand. If the
    tracked value is null, the offset isn't tracked so the
    base alignment needs to be reduced. — arsenm / ViewSVN
  99. [libFuzzer] update docs — kcc / ViewSVN
  100. [InstCombine] Expand testing for Windows (NFC)

    Added the checks to the existing cases when the target is Win64. — evandro / ViewSVN
  101. [libFuzzer] set libFuzzer's own SEGV handler even one is already present, but call that handler from ours (unless we are unprotecting lazy counters). Call ProtectLazyCounters later, so that it runs after the initialization code in the target. — kcc / ViewSVN
  102. GlobalISel: Fix creating MMOs with align 0 — arsenm / ViewSVN
  103. [libFuzzer] Set default sanitizer options in fuzzer tests

    Summary:
    Set default `ASAN_OPTIONS` when running libFuzzer tests. This allows us
    to remove special casing in code for Darwin where we usually pass
    `abort_on_error=0` to override platform defaults for tests.

    A previous commit changed the code to make the tests pass:
    https://github.com/llvm/llvm-project/commit/7764a04af007eca68eafcf5caaea560ed05e35a9

    Adapted a few tests to use `%env_asan_opts=` instead of directly setting
    the environment variable.

    rdar://problem/47515276

    Reviewers: kcc, george.karpenkov

    Differential Revision: https://reviews.llvm.org/D57465 — yln / ViewSVN
  104. [X86] Add a 32-bit command line to avx512-intrinsics.ll. Move all 64-bit mode only intrinsics to avx512-intrinsics-x86_64.ll.

    Most of the other intrinsic tests have a 32-bit command lines. — ctopper / ViewSVN
  105. [InstCombine] Simplify check clauses in test (NFC) — evandro / ViewSVN
  106. Reland "gn build: Add BPF target."

    Differential Revision: https://reviews.llvm.org/D57436 — pcc / ViewSVN
  107. lit: Let lit.util.which() return a normcase()ed path

    LLVMConfig.with_environment() uses os.path.normcase(os.path.normpath(x)) to
    normalize temporary env vars. LLVMConfig.use_clang() uses with_environment() to
    temporarily set PATH and then look for clang there. This means that on Windows,
    clang will be run with a path like c:\foo\bin\clang.EXE (with a lower-case
    "C:").

    lit.util.which() used to not do this, which means the executables added in
    clang/test/lit.cfg.py (e.g. c-index-test) were run with a path like
    C:\foo\bin\c-index-test.EXE (because both CMake and GN happen to write
    clang_tools_dir with an upper-case C to lit.site.cfg.py).

    clang/test/Index/pch-from-libclang.c requires that both c-index-test and clang
    use _exactly_ the same resource dir path (same case and everything), because a
    hash of the resource directory is used as module cache path.

    This patch is necessary but not sufficient to make pch-from-libclang.c pass on
    Windows.

    Differential Revision: https://reviews.llvm.org/D57343 — nico / ViewSVN
  108. [LegalizeVectorTypes] Allow illegal indices when splitting extract_vector_elt

    Summary:
    Fixes PR40267, in which the removed assertion was triggering on
    perfectly valid IR. As far as I can tell, constant out of bounds
    indices should be allowed when splitting extract_vector_elt, since
    they will simply be propagated as out of bounds indices in the
    resulting split vector and handled appropriately elsewhere.

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya

    Differential Revision: https://reviews.llvm.org/D57471 — tlively / ViewSVN
  109. [libFuzzer] experimental performance optimization -lazy_counters, off by default. Posix-only for now, tested on Linux — kcc / ViewSVN
  110. [LegalizeTypes] Use report_fatal_error instead of llvm_unreachable in the default case of some type legalization handlers that can be reached with intrinsics with result or operands that aren't legal types.

    These can be triggered by mistakenly using a 64-bit mode only intrinsics with a -mtriple=i686. Using report_fatal_error gives a better experience for this mistake in release builds instead of probably crashing.

    We already do this for some of the vector type legalization handles. — ctopper / ViewSVN
  111. [X86] Remove handling of ISD::INTRINSIC_WO_CHAIN in ReplaceNodeResults.

    I believe this was there to handle avx512bw intrinsics that returned i64 type in 32-bit mode. But all those intrinsics have since been changed to v64i1 results or replaced with generic IR. — ctopper / ViewSVN
  112. [X86] Add test case for pr40539. NFC — ctopper / ViewSVN
  113. [WebAssembly] Remove TODO on wasm.extract.exception intrinsic (NFC)

    Summary:
    We planned to delete this intrinsic and do custom lowering from
    `wasm.get.exception`, which has a token argument, to
    `EXTRACT_EXCEPTION`, a wasm pseudo instruction that simulates popping a
    value from the wasm stack.

    To do that, we need to introduce a new `WebAssemblyISD` node for this,
    which itself is not a problem, but also have to introduce the
    `WebAssemblyISD` namespace in SelectionDAGBuilder.cpp. I don't think any
    other targets are doing that in the file. And also putting a
    target-specific intrinsic in the common file is a little weird too. (All
    other intrinsic functions in this `visitIntrinsicCall` functions are not
    target-specific ones. Other target-specific intrinsics are usually
    handled in `lib/Target/[TargetName]/[TargetName]ISelLowering.cpp`. The
    reason we can't do this is it has a token argument.

    Anyway, so I think I prefer the current code with one redundant
    intrinsic more than adding one more `WebAssemblyISD` node and
    also introducing the `WebAssemblyISD` namespace into
    SelectionDAGBuilder.cpp. What do you think?

    Reviewers: dschuff

    Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57480 — aheejin / ViewSVN
  114. [RuntimeDyld] Don't try to allocate sections with align 0.

    ELF sections allow 0 for the alignment, which is specified to
    be the same as 1.  However many clients do not expect this and
    will behave poorly in the presence of a 0-aligned section (for
    example by trying to modulo something by the section alignment).
    We can be more polite by making sure that we always pass a
    non-zero value to clients.

    Differential Revision: https://reviews.llvm.org/D57482 — zturner / ViewSVN
  115. [analyzer] Make NullReturnedFromNonnullChecker depend on NullabilityBase

    Accidentally left this dependency out after D54438. — szelethus / ViewSVN
  116. [GlobalISel][AArch64] Select G_FEXP

    This teaches the legalizer to handle G_FEXP in AArch64. As a result, it also
    allows us to select G_FEXP.

    It...

    - Updates the legalizer-info tests
    - Adds a test for legalizing exp
    - Updates the existing fp tests to show that we can now select G_FEXP

    https://reviews.llvm.org/D57483 — paquette / ViewSVN
  117. [GlobalISel][LegalizerHelper] Add some missing MI change observer calls.

    No test as it's a preventative fix. — aemerson / ViewSVN
  118. [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls

    Summary:
    UBSan wants to detect when unreachable code is actually reached, so it
    adds instrumentation before every unreachable instruction. However, the
    optimizer will remove code after calls to functions marked with
    noreturn. To avoid this UBSan removes noreturn from both the call
    instruction as well as from the function itself. Unfortunately, ASan
    relies on this annotation to unpoison the stack by inserting calls to
    _asan_handle_no_return before noreturn functions. This is important for
    functions that do not return but access the the stack memory, e.g.,
    unwinder functions *like* longjmp (longjmp itself is actually
    "double-proofed" via its interceptor). The result is that when ASan and
    UBSan are combined, the noreturn attributes are missing and ASan cannot
    unpoison the stack, so it has false positives when stack unwinding is
    used.

    Changes:
    Clang-CodeGen now directly insert calls to `__asan_handle_no_return`
    when a call to a noreturn function is encountered and both
    UBsan-unreachable and ASan are enabled. This allows UBSan to continue
    removing the noreturn attribute from functions without any changes to
    the ASan pass.

    Previously generated code:
    ```
      call void @longjmp
      call void @__asan_handle_no_return
      call void @__ubsan_handle_builtin_unreachable
    ```

    Generated code (for now):
    ```
      call void @__asan_handle_no_return
      call void @longjmp
      call void @__asan_handle_no_return
      call void @__ubsan_handle_builtin_unreachable
    ```

    rdar://problem/40723397

    Reviewers: delcypher, eugenis, vsk

    Differential Revision: https://reviews.llvm.org/D57278 — yln / ViewSVN
  119. [PowerPC] delete no more needed workaround for readsRegister() in PowerPC
    Differential Revision: https://reviews.llvm.org/D57439 — shchenz / ViewSVN
  120. [CMake] Use correct visibility for linked libraries in CMake

    When linking library dependencies, we shouldn't need to export linked
    libraries to dependents. We should be explicit about this in
    target_link_libraries, otherwise other targets that depend on these such
    as sanitizers get repeated (and possibly even conflicting) dependencies.

    Differential Revision: https://reviews.llvm.org/D57456 — phosek / ViewSVN
  121. [CodeGenObjC] Handle exceptions when calling objc_alloc or objc_allocWithZone

    objc_alloc and objc_allocWithZone may throw exceptions if the
    underlying method does. If we're in a @try block, then make sure we
    emit an invoke instead of a call.

    rdar://47610407

    Differential revision: https://reviews.llvm.org/D57476 — epilk / ViewSVN
  122. MIR: Reject non-power-of-4 alignments in MMO parsing — arsenm / ViewSVN
  123. [GlobalISel][AArch64] Select G_FABS

    This adds instruction selection support for G_FABS in AArch64. It also updates
    the existing basic FP tests, adds a selection test for G_FABS.

    https://reviews.llvm.org/D57418 — paquette / ViewSVN
  124. [WebAssembly] MC: Use WritePatchableLEB helper function. NFC.

    Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57477 — sbc / ViewSVN
  125. [WebAssembly] Restore stack pointer right after catch instruction

    Summary:
    After the staack is unwound due to a thrown exxception,
    `__stack_pointer` global can point to an invalid address. So
    a `global.set` to restore `__stack_pointer` should be inserted right
    after `catch` instruction.

    But after r352598 the `global.set` instruction is inserted not right
    after `catch` but after `block` - `br-on-exn` - `end_block` -
    `extract_exception` sequence. This CL fixes it.

    While doing that, we can actually move ReplacePhysRegs pass after
    LateEHPrepare and merge EHRestoreStackPointer pass into LateEHPrepare,
    and now placing `global.set` to `__stack_pointer` right after `catch` is
    much easier. Otherwise it is hard to guarantee that `global.set` is
    still right after `catch` and not touched with other transformations, in
    which case we have to do something to hoist it.

    Reviewers: dschuff

    Subscribers: mgorny, sbc100, jgravelle-google, sunfish, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57421 — aheejin / ViewSVN
  126. [DAGCombiner] sub X, 0/1 --> add X, 0/-1

    This extends the existing transform for:
    add X, 0/1 --> sub X, 0/-1
    ...to allow the sibling subtraction fold.

    This pattern could regress with the proposed change in D57401. — spatel / ViewSVN
  127. [AArch64][x86] add tests for add/sub signbits fold; NFC

    As discussed/shown in D57401, we are missing a fold for
    subtract of 0/1 --> add 0/-1. — spatel / ViewSVN
  128. [ASTDump] Inline traverse methods into class

    This API will be extracted into a new template class.  This change will
    make the follow-up commit easier to review. — steveire / ViewSVN
  129. [GlobalISel][AArch64] Add instruction selection support for @llvm.log2

    This teaches GlobalISel to emit a RTLib call for @llvm.log2 when it encounters
    it.

    It updates the existing floating point tests to show that we don't fall back on
    the intrinsic, and select the correct instructions. It also adds a legalizer
    test for G_FLOG2.

    https://reviews.llvm.org/D57357 — paquette / ViewSVN
  130. Don't define __has_feature(objc_fixed_enum) in non-objc mode

    This is only a formal language feature in ObjC, otherwise its just an
    extension. Making this change was also an ABI break. — epilk / ViewSVN
  131. [GlobalISel][AArch64] Add instruction selection support for @llvm.sqrt

    This teaches the legalizer about G_FSQRT in AArch64. Also adds a legalizer
    test for G_FSQRT, a selection test for it, and updates existing floating point
    tests.

    https://reviews.llvm.org/D57361 — paquette / ViewSVN
  132. [GlobalISel] Add IRTranslator support for @llvm.sqrt -> G_FSQRT

    Follow-up commit to https://reviews.llvm.org/D57359. (r352668)

    This adds IRTranslator support for recognising a @llvm.sqrt intrinsic and
    translating it into a G_FSQRT.

    https://reviews.llvm.org/D57360 — paquette / ViewSVN
  133. [OPENMP]Fix PR40536: Do not emit __kmpc_push_target_tripcount if not
    required.

    Function __kmpc_push_target_tripcount should be emitted only if the
    offloading entry is going to be emitted (for use in tgt_target...
    functions). Otherwise, it should not be emitted. — abataev / ViewSVN
  134. [GlobalISel] Introduce a G_FSQRT generic instruction

    This introduces a generic instruction for computing the floating point
    square root of a value.

    Right now, we can't select @llvm.sqrt, so this is working towards fixing that. — paquette / ViewSVN
  135. Reverting r352642 - Handle restore instructions in LiveDebugValues - as it's causing
    assertions on some buildbots. — wolfgangp / ViewSVN
  136. Add a new builtin: __builtin_dynamic_object_size

    This builtin has the same UI as __builtin_object_size, but has the
    potential to be evaluated dynamically. It is meant to be used as a
    drop-in replacement for libraries that use __builtin_object_size when
    a dynamic checking mode is enabled. For instance,
    __builtin_object_size fails to provide any extra checking in the
    following function:

      void f(size_t alloc) {
        char* p = malloc(alloc);
        strcpy(p, "foobar"); // expands to __builtin___strcpy_chk(p, "foobar", __builtin_object_size(p, 0))
      }

    This is an overflow if alloc < 7, but because LLVM can't fold the
    object size intrinsic statically, it folds __builtin_object_size to
    -1. With __builtin_dynamic_object_size, alloc is passed through to
    __builtin___strcpy_chk.

    rdar://32212419

    Differential revision: https://reviews.llvm.org/D56760 — epilk / ViewSVN
  137. Add a 'dynamic' parameter to the objectsize intrinsic

    This is meant to be used with clang's __builtin_dynamic_object_size.
    When 'true' is passed to this parameter, the intrinsic has the
    potential to be folded into instructions that will be evaluated
    at run time. When 'false', the objectsize intrinsic behaviour is
    unchanged.

    rdar://32212419

    Differential revision: https://reviews.llvm.org/D56761 — epilk / ViewSVN
  138. [ASTDump] Make method definition order matches declaration order

    This will make follow-up changes easier to review. — steveire / ViewSVN
  139. [Tests] Add tests for propagation of undef elements in vector GEPs — reames / ViewSVN
  140. [ASTDump] Re-arrange method declarations to group Visit together

    This will make follow-up commits easier to review. — steveire / ViewSVN
  141. [X86] Mark EMMS and FEMMS as clobbering MM0-7 and ST0-7.

    This fixes the test case in PR35982 by preventing MMX instructions that read MM0-7 from being moved below EMMS/FEMMS by the post RA scheduler.

    Though as discussed in bugzilla, this is not a complete fix. There is still the possibility of reordering in IR or by the pre-RA scheduler.

    Differential Revision: https://reviews.llvm.org/D57298 — ctopper / ViewSVN
  142. gn build: Set executable bit on get.py — nico / ViewSVN
  143. Revert "[CMake] Use correct visibility for linked libraries in CMake"

    This reverts commit r352654: this broke libcxx and sanitizer bots. — phosek / ViewSVN
  144. [ASTDump] Rename methods which are conceptually Visits

    This is consistent with the TextNodeDumper, and is the appropriate name
    for the traverser class which will be extracted. — steveire / ViewSVN
  145. [ASTDump] NFC: Inline vestigial methods

    This was a porting aid. — steveire / ViewSVN
  146. [ASTDump] Move Decl node dumping to TextNodeDumper

    Reviewers: aaron.ballman

    Subscribers: jfb, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57419 — steveire / ViewSVN
  147. [CMake] Use correct visibility for linked libraries in CMake

    When linking library dependencies, we shouldn't need to export linked
    libraries to dependents. We should be explicit about this in
    target_link_libraries, otherwise other targets that depend on these such
    as sanitizers get repeated (and possibly even conflicting) dependencies.

    Differential Revision: https://reviews.llvm.org/D57456 — phosek / ViewSVN
  148. SimplifyDemandedVectorElts for all intrinsics

    The point is that this simplifies integration of new intrinsics into SimplifiedDemandedVectorElts, and ensures we don't miss any existing ones.

    This is intended to be NFC-ish, but as seen from the diffs, can produce slightly different output.  This is due to order of transforms w/in instcombine resulting in two slightly different fixed points.  That's something we should fix, but isn't a problem w/this patch per se.

    Differential Revision: https://reviews.llvm.org/D57398 — reames / ViewSVN
  149. The test comitted with r348896 needed -march=x86=64 on the llc command line. — wolfgangp / ViewSVN
  150. Revert "gn build: Add BPF target."

    This reverts commit r352638.

    The change in this patch is not trivial and it is merged
    without component owner approval. — yhs / ViewSVN
  151. [libc++] Explicitly initialize std::nothrow

    When building on Windows without libc++abi, this change fixes a build error of the form:

        src/new.cpp(38,17):  error: chosen constructor is explicit in copy-initialization
        const nothrow_t nothrow = {};
        include/vcruntime_new.h(53,22):  note: explicit constructor declared here
                    explicit nothrow_t() = default;

    Differential Revision: https://reviews.llvm.org/D57351 — thomasanderson / ViewSVN
  152. [libc++] Don't define operator new/delete when using vcruntime

    Fixes build errors on Windows without libc++abi of the form:

        new(173,36):  error: redeclaration of 'operator delete' cannot add 'dllexport' attribute
        _LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
        vcruntime_new.h(87,16):  note: previous declaration is here
        void __CRTDECL operator delete(
        new(205,70):  error: redefinition of 'operator new'
        _LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY void* operator new  (std::size_t, void* __p) _NOEXCEPT {return __p;}
        vcruntime_new.h(184,28):  note: previous definition is here
            inline void* __CRTDECL operator new(size_t _Size, _Writable_bytes_(_Size) void* _Where) noexcept
        new(206,70):  error: redefinition of 'operator new[]'
        _LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY void* operator new[](std::size_t, void* __p) _NOEXCEPT {return __p;}
        vcruntime_new.h(199,28):  note: previous definition is here
            inline void* __CRTDECL operator new[](size_t _Size,
        new(207,40):  error: redefinition of 'operator delete'
        inline _LIBCPP_INLINE_VISIBILITY void  operator delete  (void*, void*) _NOEXCEPT {}
        vcruntime_new.h(190,27):  note: previous definition is here
            inline void __CRTDECL operator delete(void*, void*) noexcept
        new(208,40):  error: redefinition of 'operator delete[]'
        inline _LIBCPP_INLINE_VISIBILITY void  operator delete[](void*, void*) _NOEXCEPT {}
        vcruntime_new.h(206,27):  note: previous definition is here
            inline void __CRTDECL operator delete[](void*, void*) noexcept

    Differential Revision: https://reviews.llvm.org/D57362 — thomasanderson / ViewSVN
  153. [libc++] Don't define exception destructors when using vcruntime

    Exception destructors are provided by vcruntime.  Fixes link errors like:

        lld-link: error: duplicate symbol: "public: virtual __cdecl std::invalid_argument::~invalid_argument(void)" (??1invalid_argument@std@@UEAA@XZ) in stdexcept.obj and in libcpmt.lib(xthrow.obj)
        lld-link: error: duplicate symbol: "public: virtual __cdecl std::length_error::~length_error(void)" (??1length_error@std@@UEAA@XZ) in stdexcept.obj and in libcpmt.lib(xthrow.obj)
        lld-link: error: duplicate symbol: "public: virtual __cdecl std::out_of_range::~out_of_range(void)" (??1out_of_range@std@@UEAA@XZ) in stdexcept.obj and in libcpmt.lib(xthrow.obj)
        lld-link: error: duplicate symbol: "public: virtual __cdecl std::overflow_error::~overflow_error(void)" (??1overflow_error@std@@UEAA@XZ) in stdexcept.obj and in libcpmt.lib(xthrow.obj)

    Differential Revision: https://reviews.llvm.org/D57425 — thomasanderson / ViewSVN
  154. [DEBUGINFO] Handle restore instructions in LiveDebugValues

    The LiveDebugValues pass recognizes spills but not restores, which can
    cause large gaps in location information for some variables, depending
    on control flow. This patch make LiveDebugValues recognize restores and
    generate appropriate DBG_VALUE instructions.

    Reviewers: aprantl, NicolaPrica

    Differential Revision: https://reviews.llvm.org/D57271 — wolfgangp / ViewSVN
  155. [llvm-objcopy][NFC] More error propagation (linkToBuildIdDir) — rupprecht / ViewSVN
  156. gn build: Add BPF target.

    Differential Revision: https://reviews.llvm.org/D57436 — pcc / ViewSVN
  157. GlobalISel: Add simpler way of always specifying custom lowering — arsenm / ViewSVN
  158. GlobalISel: Add assert that legalize mutation makes sense

    I've repeatedly encountered bugs resulting from custom legalize
    mutations returning nonsense legalize results, such as increasing the
    number of elements for FewerElements. Add an assert function to make
    sure the type to mutate to is consistent with the legalize action. — arsenm / ViewSVN
  159. AMDGPU: Stop generating unused intrinsic .inc files — arsenm / ViewSVN
  160. [X86][AVX] Prefer to combine shuffle to broadcasts whenever possible

    This is the first step towards improving broadcast support on AVX1 targets. — rksimon / ViewSVN
  161. [utils] Fix update scripts output when run on python3.

    This fixes a "bytes-like object is required, not 'str'" python3 error I hit on update_llc_test_checks.py (but present on the other scripts as well) by matching what update_mca_test_checks.py already does, plus I've added an explicit 'utf-8' encoding. — rksimon / ViewSVN
  162. [llvm-exegesis] Add throughput mode.

    Summary:
    This just uses the latency benchmark runner on the parallel uops snippet
    generator.

    Fixes PR37698.

    Reviewers: gchatelet

    Subscribers: tschuett, RKSimon, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57000 — courbet / ViewSVN
  163. [ASTDumper][OpenMP] CapturedDecl has a 'nothrow' bit

    Summary:
    Was trying to understand how complicated it would be to write
    a clang-tidy `openmp-exception-escape`-ish check once D57100 lands.

    Just so it happens, all the data is already there,
    it is just conveniently omitted from AST dump.

    Reviewers: aaron.ballman, steveire, ABataev

    Reviewed By: ABataev

    Subscribers: ABataev, guansong, cfe-commits

    Tags: #openmp, #clang

    Differential Revision: https://reviews.llvm.org/D57452 — lebedevri / ViewSVN
  164. [llvm-readobj] - Few minor cleanups. NFC.

    Minor code simplifications, relocations,
    renamings (to match LLVM style). — grimar / ViewSVN
  165. [CMake] Accept ENTITLEMENTS in llvm_add_library()

    Summary: We added support for code signing entitlements in add_llvm_executable() with D54443. In the future it would be useful to have this functionality available also for libraries.

    Reviewers: beanz, bogner

    Reviewed By: bogner

    Subscribers: mgorny, llvm-commits, lldb-commits, #lldb

    Differential Revision: https://reviews.llvm.org/D57334 — stefan.graenitz / ViewSVN
  166. [InstCombine][x86] add tests for addcarry intrinsic; NFC — spatel / ViewSVN
  167. [llvm-objcopy] Support -X|--discard-locals.

    Summary:
    This adds support for the --discard-locals flag, which acts similarly to --discard-all, except it only applies to compiler-generated symbols (i.e. symbols starting with `.L` in ELF).

    I am not sure about COFF local symbols: those appear to also use `.L` in most cases, but also use just `L` in other cases, so for now I am just leaving it unimplemented there.

    Fixes PR36160

    Reviewers: jhenderson, alexshap, jakehehrlich, mstorsjo, espindola

    Reviewed By: jhenderson

    Subscribers: llvm-commits, emaste, arichardson

    Differential Revision: https://reviews.llvm.org/D57248 — rupprecht / ViewSVN
  168. [llvm-objcopy][NFC] More error propagation

    Summary: Do some more error cleanup, removing some dependencies from llvm-objcopy's error/reportError in [ELF/COFF]Objcopy methods.

    Reviewers: jhenderson, alexshap, jakehehrlich, mstorsjo, espindola

    Subscribers: emaste, arichardson

    Differential Revision: https://reviews.llvm.org/D57423 — rupprecht / ViewSVN
  169. [clangd] Drop fixes if replying with tweaks resulted in an error

    This should not happen in normal operation, as it implies that the diagnostics
    with some available fixes were produced but the AST is invalid.
    Moreover, the code had an error: always returned code actions ignoring the
    SupportsCodeAction capability and writing a test for this is impossible,
    since this can only happen due to programmer's error rather than invalid inputs. — ibiryukov / ViewSVN
  170. [llvm-readobj] - Simplify the code.

    We have a Field struct which has a StringRef member Str.

    The code needs to create and keep alive the temporarily
    std::string variables because of that.
    That is not convenient and makes the code be more complicated
    than it could be.

    There seems to be no reason to keep Str be StringRef.
    The patch changes it to be std::string and
    rearranges the code around slightly.

    Differential revision: https://reviews.llvm.org/D57447 — grimar / ViewSVN
  171. [clang-format] Fix line parsing for noexcept lambdas

    Summary:
    > $ echo "int c = [b]() mutable noexcept { return [&b] { return b++; }(); }();" |clang-format

    ```
    int c = [b]() mutable noexcept {
      return [&b] { return b++; }();
    }
    ();
    ```
    with patch:
    > $ echo "int c = [b]() mutable noexcept { return [&b] { return b++; }(); }();" |bin/clang-format
    ```
    int c = [b]() mutable noexcept { return [&b] { return b++; }(); }();
    ```

    Contributed by hultman.

    Reviewers: benhamilton, jolesiak, klimek, Wizard

    Reviewed By: benhamilton

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D56909 — benhamilton / ViewSVN
  172. Properly use DT.verify in LoopSimplifyCFG — mkazantsev / ViewSVN
  173. [HIP] Fix size_t for MSVC environment

    In 64 bit MSVC environment size_t is defined as unsigned long long.
    In single source language like HIP, data layout should be consistent
    in device and host compilation, therefore copy data layout controlling
    fields from Aux target for AMDGPU target.

    Differential Revision: https://reviews.llvm.org/D56318 — yaxunl / ViewSVN
  174. Enable IRCE for narrow latch by defailt — mkazantsev / ViewSVN
  175. [OpenGL] Fix test on PPC after r352540

    Summary:
    Specify -triple like test/SemaOpenCL/logical-ops.cl. Otherwise, this test fails
    on PPC.

    Reviewers: bkramer

    Subscribers: Anastasia, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57442 — ioeric / ViewSVN
  176. [OpenCL] Add generic addr space to the return of implicit assignment.

    When creating the prototype of implicit assignment operators the
    returned reference to the class should be qualified with the same
    addr space as 'this' (i.e. __generic in OpenCL).

    Differential Revision: https://reviews.llvm.org/D57101 — stulova / ViewSVN
  177. [RISCV] Insert R_RISCV_ALIGN relocation type and Nops for code alignment when linker relaxation enabled

    Linker relaxation may change code size. We need to fix up the alignment
    of alignment directive in text section by inserting Nops and R_RISCV_ALIGN
    relocation type. So then linker could satisfy the alignment by removing Nops.

    To do this:

    1. Add shouldInsertExtraNopBytesForCodeAlign target hook to calculate
       the Nops we need to insert.

    2. Add shouldInsertFixupForCodeAlign target hook to insert
       R_RISCV_ALIGN fixup type.

    Differential Revision: https://reviews.llvm.org/D47755 — shiva / ViewSVN
  178. [NativePDB] Fix access to both old & new fpo data entries from dbi stream

    Summary:
    This patch fixes access to fpo streams in native pdb from DbiStream and makes
    code consistent with DbiStreamBuilder.

    Patch By: leonid.mashinskiy

    Reviewers: zturner, aleksandr.urakov

    Reviewed By: zturner

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D56725 — aleksandr.urakov / ViewSVN
  179. Add lit config file to skip tests if WebAssembly target is not available. — dyung / ViewSVN
  180. Commit tests for changes in revision D41342 — quolyk / ViewSVN
  181. [clangd] Fix a use after move

    Introduced in r352494. — ibiryukov / ViewSVN
  182. [clang] [Driver] [NetBSD] Append -rpath for shared compiler-rt runtimes

    Append appropriate -rpath when using shared compiler-rt runtimes,
    e.g. '-fsanitize=address -shared-libasan'.  There's already a similar
    logic in CommonArgs.cpp but it uses non-standard arch-suffixed
    installation directory while we want our driver to work with standard
    installation paths.

    Differential Revision: https://reviews.llvm.org/D57303 — mgorny / ViewSVN
  183. [X86] Remove unnecessary code from the top of handleCompareFP in X86FloatingPoint.cpp.

    There were checks to ensure some tables were sorted, but those tables aren't used by this function. The same tables are checked in the function that does use them. Maybe this was copy/pasted? — ctopper / ViewSVN
  184. [X86] Remove a couple places where we unnecessarily pass 0 to the EmitPriority of some FP instruction aliases. NFC

    As far as I can tell we already won't emit these aliases due to an operand count check in the tablegen code. Removing these because I couldn't make sense of the inconsistency between fadd and fmul from reading the code.

    I checked the AsmMatcher and AsmWriter files before and after this change and there were no differences. — ctopper / ViewSVN
  185. [X86] Add FPSW as a Def on some FP instructions that were missing it. — ctopper / ViewSVN
  186. [ModuleDependencyCollector] Use llvm::sys::fs::real_path (NFC)

    Use the real_path implementation from llvm::sys::fs::real_path instead
    of having a custom implementation in the ModuleDependencyCollector.

    Differential revision: https://reviews.llvm.org/D57411 — Jonas Devlieghere / ViewSVN
  187. [libFuzzer] remove stale code, NFC — kcc / ViewSVN
  188. [libFuzzer] refactor the handling of instrumentation counters so that they are grouped in regions one full page each. Needed for future optimization. NFC — kcc / ViewSVN
  189. [NFC] fix trivial typos in comments — inouehrs / ViewSVN
  190. GlobalISel: Implement fewerElementsVector for select — arsenm / ViewSVN
  191. [IR] Use CallBase to simplify some code

    Summary:
    This patch does the following to simplify the asm-goto patch

    -Move isInlineAsm from CallInst to CallBase to share with CallBrInst in the asm-goto patch.
    -Forward CallSite's data_operands_begin()/data_operands_end() to CallBase's implementation.
    -Forward CallSite's getOperandBundlesAsDefs to CallBase.

    Reviewers: chandlerc

    Reviewed By: chandlerc

    Subscribers: nickdesaulniers, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57415 — ctopper / ViewSVN
  192. AMDGPU/GlobalISel: Fix clamping shifts with 16-bit insts — arsenm / ViewSVN
  193. [WebAssembly] Exception handling: Switch to the new proposal

    Summary:
    This switches the EH implementation to the new proposal:
    https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md
    (The previous proposal was
    https://github.com/WebAssembly/exception-handling/blob/master/proposals/old/Exceptions.md)

    - Instruction changes
      - Now we have one single `catch` instruction that returns a except_ref
        value
      - `throw` now can take variable number of operations
      - `rethrow` does not have 'depth' argument anymore
      - `br_on_exn` queries an except_ref to see if it matches the tag and
        branches to the given label if true.
      - `extract_exception` is a pseudo instruction that simulates popping
        values from wasm stack. This is to make `br_on_exn`, a very special
        instruction, work: `br_on_exn` puts values onto the stack only if it
        is taken, and the # of values can vay depending on the tag.

    - Now there's only one `catch` per `try`, this patch removes all special
      handling for terminate pad with a call to `__clang_call_terminate`.
      Before it was the only case there are two catch clauses (a normal
      `catch` and `catch_all` per `try`).

    - Make `rethrow` act as a terminator like `throw`. This splits BB after
      `rethrow` in WasmEHPrepare, and deletes an unnecessary `unreachable`
      after `rethrow` in LateEHPrepare.

    - Now we stop at all catchpads (because we add wasm `catch` instruction
      that catches all exceptions), this creates new
      `findWasmUnwindDestinations` function in SelectionDAGBuilder.

    - Now we use `br_on_exn` instrution to figure out if an except_ref
      matches the current tag or not, LateEHPrepare generates this sequence
      for catch pads:
    ```
      catch
      block i32
      br_on_exn $__cpp_exception
      end_block
      extract_exception
    ```

    - Branch analysis for `br_on_exn` in WebAssemblyInstrInfo

    - Other various misc. changes to switch to the new proposal.

    Reviewers: dschuff

    Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57134 — aheejin / ViewSVN
  194. GlobalISel: Use appropriate extension for legalizing select conditions — arsenm / ViewSVN
  195. [PowerPC] [NFC] Create a helper function to copy register to particular register class at PPCFastISel

    Make copy register code as common function as following.

    unsigned copyRegToRegClass(const TargetRegisterClass *ToRC, unsigned SrcReg, unsigned Flag = 0, unsigned SubReg = 0);

    Differential Revision: https://reviews.llvm.org/D57368 — wuzish / ViewSVN
  196. Cleanup: replace uses of CallSite with CallBase. — jyknight / ViewSVN
  197. GlobalISel: Support narrowScalar for uneven loads — arsenm / ViewSVN
  198. Simplify and modernize this code a little.

    No functionality change intended. — rsmith / ViewSVN
  199. [WebAssembly] Optimize BUILD_VECTOR lowering for size

    Summary:
    Implements custom lowering logic that finds the optimal value for the
    initial splat of the vector and either uses it or uses v128.const if
    it is available and if it would produce smaller code. This logic
    replaces large TableGen ISEL patterns that would lower all non-splat
    BUILD_VECTORs into a splat followed by a fixed number of replace_lane
    instructions. This CL fixes PR39685.

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

    Differential Revision: https://reviews.llvm.org/D56633 — tlively / ViewSVN
  200. GlobalISel: Handle some odd splits in fewerElementsVector

    Also add some quick hacks to AMDGPU legality for the tests. — arsenm / ViewSVN
  201. [analyzer] [RetainCountChecker] Bugfix for tracking top-level parameters of Objective-C methods

    Differential Revision: https://reviews.llvm.org/D57433 — George Karpenkov / ViewSVN
  202. Add enum values to CodeGenOpt::Level

    The absolute values of this enum are important at least in that
    they get printed by SelectionDAGISel. e.g:
      `Before: -O2 ; After: -O0`

    Differential Revision: https://reviews.llvm.org/D57430 — sbc / ViewSVN
  203. [CMake][Fuchsia] Re-enable iOS runtimes for Fuchsia standard

    Turned out this is used by Flutter which uses Fuchsia Clang toolchain.

    Differential Revision: https://reviews.llvm.org/D57432 — phosek / ViewSVN
  204. GlobalISel: Handle more cases for widenScalar for G_STORE — arsenm / ViewSVN
  205. [CMake][Fuchsia] Enable hermetic static libunwind for Fuchsia

    In addition to libc++abi and libc++, we also want to use hermetic
    static libunwind on Fuchsia.

    Differential Revision: https://reviews.llvm.org/D57431 — phosek / ViewSVN
  206. [PowerPC] more opportunity for converting reg+reg to reg+imm
    Differential Revision: https://reviews.llvm.org/D57314 — shchenz / ViewSVN
  207. Add 8.0 release bug to merge request script — arsenm / ViewSVN
  208. GlobalISel: Verify memory size for load/store — arsenm / ViewSVN
  209. [libFuzzer] update a test — kcc / ViewSVN
  210. Remove a redundant space from an error message; NFC — George Burgess IV / ViewSVN
  211. Fix thread safety tests after r352549 — aaronpuchert / ViewSVN
  212. [WebAssembly] Add missing SymbolRef update from rL352551

    This change broke some MC tests which are now fixed.

    Differential Revision: https://reviews.llvm.org/D57424 — sbc / ViewSVN
  213. [analyzer] NFC: GenericTaintChecker: Revise rule specification mechanisms.

    Provide a more powerful and at the same time more readable way of specifying
    taint propagation rules for known functions within the checker.

    Now it should be possible to specify an unlimited amount of source and
    destination parameters for taint propagation.

    No functional change intended just yet.

    Patch by Gábor Borsik!

    Differential Revision: https://reviews.llvm.org/D55734 — dergachev / ViewSVN
  214. [libFuzzer] remove stale code — kcc / ViewSVN
  215. [WebAssembly] Lower SCALAR_TO_VECTOR to splats

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish

    Differential Revision: https://reviews.llvm.org/D57269 — tlively / ViewSVN
  216. [libFuzzer] revert an accidental commit — kcc / ViewSVN
  217. [libFuzzer] remove deprecated support for -fsanitize-coverage=trace-pc[-guard] — kcc / ViewSVN
  218. GlobalISel: Fix unused variable warning in release builds — arsenm / ViewSVN
  219. [libFuzzer] remove deprecated support for -fsanitize-coverage=trace-pc[-guard] — kcc / ViewSVN
  220. [IR] Use CallBase to reduce code duplication. NFC

    Noticed in the asm-goto patch. Callbr needs to go here too. One cast and call is better than 3.

    Differential Revision: https://reviews.llvm.org/D57295 — ctopper / ViewSVN
  221. GlobalISel: Verify pointer casts

    Not sure if the old AArch64 tests should be just
    deleted or not. — arsenm / ViewSVN
  222. [libc++] Fix Windows build error in <functional>

    On my Windows system, __allocator is defined to nothing.  This change fixes build errors of the below form:

        In file included from algorithm:644:
        functional(1492,31):  error: expected member name or ';' after declaration specifiers
            const _Alloc& __allocator() const { return __f_.second(); }

    Differential Revision: https://reviews.llvm.org/D57355 — thomasanderson / ViewSVN
  223. GlobalISel: Partially implement widenScalar for MERGE_VALUES — arsenm / ViewSVN
  224. NFC: Move GenericSelectionExpr dump to NodeDumper

    Reviewers: aaron.ballman

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D56961 — steveire / ViewSVN
  225. Check bool attribute value in getOptionalBoolLoopAttribute.

    Summary:
    Check the bool value of the attribute in getOptionalBoolLoopAttribute
    not just its existance.
    Eliminates the warning noise generated when vectorization is explicitly disabled.

    Reviewers: Meinersbur, hfinkel, dmgreen

    Subscribers: jlebar, sanjoy, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57260 — asbirlea / ViewSVN
  226. NFC: Implement GenericSelectionExpr::Association dump with Visitor

    Reviewers: aaron.ballman

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D56960 — steveire / ViewSVN
  227. [WebAssembly] Ensure BasicSymbolRef.getRawDataRefImpl().p is non-null

    Store a non-zero value to ref.d.a and use ref.d.b to store the symbol
    index.  This means that ref.p is never null, which was confusing
    llvm-nm.

    Fixes PR40497

    Differential Revision: https://reviews.llvm.org/D57373 — sbc / ViewSVN
  228. [docs] Prevent O0 optnone for opt input

    If we just compile with -O0, clang will add optnone attributes
    everywhere, so opt won't actually be able to perform any passes.
    Instruct clang to not emit the optnone so opt can do its thing.

    Differential Revision: https://reviews.llvm.org/D56950 — smeenai / ViewSVN
  229. Thread safety analysis: Improve diagnostics for double locking

    Summary:
    We use the existing diag::note_locked_here to tell the user where we saw
    the first locking.

    Reviewers: aaron.ballman, delesley

    Reviewed By: aaron.ballman

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D56967 — aaronpuchert / ViewSVN
  230. [AArch64][GlobalISel] Unmerge into scalars from a vector should use FPR bank.

    This currently shows up as a selection fallback since the dest regs were given
    GPR banks but the source was a vector FPR reg.

    Differential Revision: https://reviews.llvm.org/D57408 — aemerson / ViewSVN
  231. OpenCL: Try to fix bot test failure — arsenm / ViewSVN
  232. [OPENMP]Fix PR40513: lastprivate taskloop counter.

    We don't need to use the predetermined data-sharing attributes for the
    loop counters if the user explicitly specified correct data-sharing
    attributes for such variables. — abataev / ViewSVN
  233. [cc1as] Test that -g of empty .s file does something sensible.

    Depends on LLVM r352541. — probinson / ViewSVN
  234. [DWARF] Emit reasonable debug info for empty .s files. — probinson / ViewSVN
  235. OpenCL: Use length modifier for warning on vector printf arguments

    Re-enable format string warnings on printf.

    The warnings are still incomplete. Apparently it is undefined to use a
    vector specifier without a length modifier, which is not currently
    warned on. Additionally, type warnings appear to not be working with
    the hh modifier, and aren't warning on all of the special restrictions
    from c99 printf. — arsenm / ViewSVN
  236. Revert "OpenCL: Extend argument promotion rules to vector types"

    This reverts r348083. This was based on a misreading of the spec
    for printf specifiers.

    Also revert r343653, as without a subsequent patch, a correctly
    specified format for a vector will incorrectly warn.

    Fixes bug 40491. — arsenm / ViewSVN
  237. Fix the tests from r350970

    Relax the tests from r350970 to allow non-standard path for ld. — steven_wu / ViewSVN
  238. [InstCombine] canonicalize cmp/select form of uadd saturate with constant

    I'm circling back around to a loose end from D51929.

    The backend (either CGP or DAG) doesn't recognize this pattern, so we end up with different asm for these IR variants.

    Regardless of any future changes to canonicalize to saturation/overflow intrinsics, we want to get raw IR variations
    into the minimal number of raw IR forms. If/when we can canonicalize to intrinsics, that will make that step easier.

      Pre: C2 == ~C1
      %a = add i32 %x, C1
      %c = icmp ugt i32 %x, C2
      %r = select i1 %c, i32 -1, i32 %a
      =>
      %a = add i32 %x, C1
      %c2 = icmp ult i32 %x, C2
      %r = select i1 %c2, i32 %a, i32 -1

      https://rise4fun.com/Alive/pkH

    Differential Revision: https://reviews.llvm.org/D57352 — spatel / ViewSVN
  239. Fix the behavior of clang's -w flag.

    It is intended to disable _all_ warnings, even those upgraded to
    errors via `-Werror=warningname` or `#pragma clang diagnostic error'

    Fixes: https://llvm.org/PR38231
    Differential Revision: https://reviews.llvm.org/D53199 — jyknight / ViewSVN
  240. [analyzer] [RetainCountChecker] Track input parameters to the top-level function

    Track them for ISL/OS objects by default, and for NS/CF under a flag.

    rdar://47536377

    Differential Revision: https://reviews.llvm.org/D57356 — George Karpenkov / ViewSVN
  241. [analyzer] [RetainSummaryManager] [NFC] Split one function into two, as it's really doing two things

    Differential Revision: https://reviews.llvm.org/D57201 — George Karpenkov / ViewSVN
  242. [analyzer] [ARCMT] [NFC] Unify entry point into RetainSummaryManager

    Just use one single entry point, since we have AnyCall utility now.

    Differential Revision: https://reviews.llvm.org/D57346 — George Karpenkov / ViewSVN
  243. Extend AnyCall to handle callable declarations without the call expressions

    That weakens inner invariants, but allows the class to be more generic,
    allowing usage in situations where the call expression is not known (or
    should not matter).

    Differential Revision: https://reviews.llvm.org/D57344 — George Karpenkov / ViewSVN
  244. [analyzer] [RetainCountChecker] Support 'taggedRetain' and 'taggedRelease'

    Differential Revision: https://reviews.llvm.org/D57211 — George Karpenkov / ViewSVN
  245. [DAGCombiner] fold extract_subvector of extract_subvector

    This is the sibling fold for insert-of-insert that was added with D56604.

    Now that we have x86 shuffle narrowing (D57156), this change shows improvements for
    lots of AVX512 reduction code (not sure that we would ever expect extract-of-extract otherwise).

    There's a small regression in some of the partial-permute tests (extracting followed by splat).
    That is tracked by PR40500:
    https://bugs.llvm.org/show_bug.cgi?id=40500

    Differential Revision: https://reviews.llvm.org/D57336 — spatel / ViewSVN
  246. [VFS] Fix warning and use better check. — mspencer / ViewSVN
  247. [OPENMP]Make the loop with unsigned counter countable.

    According to the report, better to keep the original strict compare
    operation as the loop condition with unsigned loop counters to make the
    loop countable. This allows further loop transformations. — abataev / ViewSVN
  248. [libc++] Fix Windows build error in include/filesystem

    _LIBCPP_FUNC_VIS is redundant since the class is already annotated with
    _LIBCPP_EXCEPTION_ABI.

    Fixes this build error:

        In file included from fstream:188:
        filesystem(1350,3):  error: attribute 'dllimport' cannot be applied to member of 'dllimport' class
          _LIBCPP_FUNC_VIS
        __config(674,37):  note: expanded from macro '_LIBCPP_FUNC_VIS'
        #define _LIBCPP_FUNC_VIS            _LIBCPP_DLL_VIS
        __config(666,38):  note: expanded from macro '_LIBCPP_DLL_VIS'
        #  define _LIBCPP_DLL_VIS __declspec(dllimport)
        filesystem(1313,7):  note: previous attribute is here
        class _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
        __config(675,37):  note: expanded from macro '_LIBCPP_EXCEPTION_ABI'
        #define _LIBCPP_EXCEPTION_ABI       _LIBCPP_DLL_VIS
        __config(666,38):  note: expanded from macro '_LIBCPP_DLL_VIS'
        #  define _LIBCPP_DLL_VIS __declspec(dllimport)

    Differential Revision: https://reviews.llvm.org/D57354 — thomasanderson / ViewSVN
  249. Rollback unwindlib patch. — saugustine / ViewSVN
  250. GlobalISel: Fix narrowScalar for load/store with different mem size

    This was ignoring the memory size, and producing multiple loads/stores
    if the operand size was different from the memory size.

    I assume this is the intent of not having an explicit G_ANYEXTLOAD
    (although I think that would probably be better). — arsenm / ViewSVN
  251. Fix PR40495 - is_invokable_v<void> does not compile

    The meta-programming that attempted to form the invoke call expression
    was not in a SFINAE context. This made it a hard error to provide
    non-referencable types like 'void' or 'void (...) const'.

    This patch fixes the error by checking the validity of the call
    expression within a SFINAE context. — ericwf / ViewSVN
  252. [x86] add tests for vector bool math; NFC — spatel / ViewSVN
  253. [AArch64] add tests for vector bool math; NFC — spatel / ViewSVN
  254. [X86][Btver2] Improved latency/throughput model for scalar int-to-float conversions.

    Account for bypass delays when computing the latency of scalar int-to-float
    conversions.
    On Jaguar we need to account for an extra 6cy latency (see AMD fam16h SOG).
    This patch also fixes the number of micropcodes for the register-memory variants
    of scalar int-to-float conversions.

    Differential Revision: https://reviews.llvm.org/D57148 — adibiagio / ViewSVN
  255. [InstCombine] regenerate test checks; NFC — spatel / ViewSVN
  256. [InstCombine] add tests for ext-of-bool + add/sub; NFC

    We should choose one of these as canonical:

      %z = zext i1 %cmp to i32
      %r = sub i32 %x, %z
      =>
      %s = sext i1 %cmp to i32
      %r = add i32 %x, %s

    The test comments assume that the zext form is better,
    but we can adjust that if we decide to go the other way. — spatel / ViewSVN
  257. Adjust documentation for git migration.

    This fixes most references to the paths:
    llvm.org/svn/
    llvm.org/git/
    llvm.org/viewvc/
    github.com/llvm-mirror/
    github.com/llvm-project/
    reviews.llvm.org/diffusion/

    to instead point to https://github.com/llvm/llvm-project.

    This is *not* a trivial substitution, because additionally, all the
    checkout instructions had to be migrated to instruct users on how to
    use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of
    checking out various projects into various subdirectories.

    I've attempted to not change any scripts here, only documentation. The
    scripts will have to be addressed separately.

    Additionally, I've deleted one document which appeared to be outdated
    and unneeded:
      lldb/docs/building-with-debug-llvm.txt

    Differential Revision: https://reviews.llvm.org/D57330 — jyknight / ViewSVN
  258. [NFC] Add missing revision for removal of bad_array_length in ABI changelog — Louis Dionne / ViewSVN
  259. Mark some of the behavior in the move w/allocator constructors of deque/unordered containers as 'libc++-specific'. Thanks to Andrey Maksimov for pointing this out. — marshall / ViewSVN
  260. [clangd] Remove extra ';' to fix -Wpedantic warning. NFC — ibiryukov / ViewSVN
  261. [clangd] Attempt to fix failing buildbots after r352494

    For failures see:
    http://lab.llvm.org:8011/builders/clang-x86_64-linux-abi-test/builds/38501/steps/build-unified-tree/logs/stdio — ibiryukov / ViewSVN
  262. [clangd] Make -clang-tidy-checks a non-hidden command-line arg

    Summary:
    This looks like a useful user-facing configuration parameter,
    which should be discoverable.

    Also fix a small typo in the description.

    Reviewers: hokein

    Reviewed By: hokein

    Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

    Differential Revision: https://reviews.llvm.org/D57384 — ibiryukov / ViewSVN
  263. [SelectionDAGBuilder] Remove redundant variable. NFCI. — niravd / ViewSVN
  264. [llvm-objcopy] Implement --set-section-flags.

    Summary:
    --set-section-flags is used to change the section flags (e.g. SHF_ALLOC) for given sections. The flags allowed are the same from the existing --rename-section=.old=.new[,flags] feature.

    Additionally, make sure that --set-section-flag cannot be used with --rename-section (either the source or destination), since --rename-section accepts flags. This avoids ambiguity for something like "--rename-section=.foo=.bar,alloc --set-section-flag=.bar,code".

    Reviewers: jhenderson, jakehehrlich, alexshap, espindola

    Reviewed By: jhenderson, jakehehrlich

    Subscribers: llvm-commits, emaste, arichardson

    Differential Revision: https://reviews.llvm.org/D57198 — rupprecht / ViewSVN
  265. Reversing the checkin for version 352484 as tests are failing. — ayonam / ViewSVN

#259 (Jan 26, 2019 7:13:52 AM)

  1. [analyzer] Supply all checkers with a shouldRegister function

    Introduce the boolean ento::shouldRegister##CHECKERNAME(const LangOptions &LO)
    function very similarly to ento::register##CHECKERNAME. This will force every
    checker to implement this function, but maybe it isn't that bad: I saw a lot of
    ObjC or C++ specific checkers that should probably not register themselves based
    on some LangOptions (mine too), but they do anyways.

    A big benefit of this is that all registry functions now register their checker,
    once it is called, registration is guaranteed.

    This patch is a part of a greater effort to reinvent checker registration, more
    info here: D54438#1315953

    Differential Revision: https://reviews.llvm.org/D55424 — szelethus / ViewSVN
  2. [AST] Pack GenericSelectionExpr

    Store the controlling expression, the association expressions and the
    corresponding TypeSourceInfos as trailing objects.

    Additionally use the bit-fields of Stmt to store one SourceLocation,
    saving one additional pointer. This saves 3 pointers in total per
    GenericSelectionExpr.

    Differential Revision: https://reviews.llvm.org/D57104

    Reviewed By: aaron.ballman

    Reviewers: aaron.ballman, steveire — brunoricci / ViewSVN
  3. [AST][NFC] Various cleanups to GenericSelectionExpr

    Various cleanups to GenericSelectionExpr factored out of D57104. In particular:

    1. Move the friend declaration to the top.
    2. Introduce a constant ResultDependentIndex instead of the magic "-1".
    3. clang-format
    4. Group the member function together so that they can be removed as one block
       by D57106.

    NFC.

    Differential Revision: https://reviews.llvm.org/D57238

    Reviewed By: aaron.ballman — brunoricci / ViewSVN
  4. [X86] Add test case from PR34292 — rksimon / ViewSVN
  5. [llvm-mca][X86] Add some missing DQI tests

    Match more of the coverage of test\CodeGen\X86\avx512-schedule.ll as discussed on D57244 — rksimon / ViewSVN
  6. [X86] Add 'less_than_ideal' followup test case from PR24545 — rksimon / ViewSVN
  7. [X86] Autoupgrade some of the intrinsics used by stack folding tests that have been previously removed. — ctopper / ViewSVN
  8. [X86] Remove and autoupgrade vpconflict intrinsics that take a mask and passthru argument.

    We have unmasked versions as of r352172 — ctopper / ViewSVN

#258 (Jan 25, 2019 10:16:53 PM)

  1. Revert r352255 "[SelectionDAG][X86] Don't use SEXTLOAD for promoting masked loads in the type legalizer"

    This might be breaking an lldb windows buildbot. — ctopper / ViewSVN
  2. [X86] Custom codegen 512-bit cvt(u)qq2tops, cvt(u)qqtopd, and cvt(u)dqtops intrinsics.

    Summary:
    The 512-bit cvt(u)qq2tops, cvt(u)qqtopd, and cvt(u)dqtops intrinsics all have the possibility of taking an explicit rounding mode argument. If the rounding mode is CUR_DIRECTION we'd like to emit a sitofp/uitofp instruction and a select like we do for 256-bit intrinsics.

    For cvt(u)qqtopd and cvt(u)dqtops we do this when the form of the software intrinsics that doesn't take a rounding mode argument is used. This is done by using convertvector in the header with the select builtin. But if the explicit rounding mode form of the intrinsic is used and CUR_DIRECTION is passed, we don't do this. We shouldn't have this inconsistency.

    For cvt(u)qqtops nothing is done because we can't use the select builtin in the header without avx512vl. So we need to use custom codegen for this.

    Even when the rounding mode isn't CUR_DIRECTION we should also use select in IR for consistency. And it will remove another scalar integer mask from our intrinsics.

    To accomplish all of these goals I've taken a slightly unusual approach. I've added two new X86 specific intrinsics for sitofp/uitofp with rounding. These intrinsics are variadic on the input and output type so we only need 2 instead of 6. This avoids the need for a switch to map them in CGBuiltin.cpp. We just need to check signed vs unsigned. I believe other targets also use variadic intrinsics like this.

    So if the rounding mode is CUR_DIRECTION we'll use an sitofp/uitofp instruction. Otherwise we'll use one of the new intrinsics. After that we'll emit a select instruction if needed.

    Reviewers: RKSimon, spatel

    Reviewed By: RKSimon

    Subscribers: cfe-commits

    Differential Revision: https://reviews.llvm.org/D56998 — ctopper / ViewSVN
  3. [X86] Remove GCCBuiltins from 512-bit cvt(u)qqtops, cvt(u)qqtopd, and cvt(u)dqtops intrinsics. Add new variadic uitofp/sitofp with rounding mode intrinsics.

    Summary: See clang patch D56998 for a full description.

    Reviewers: RKSimon, spatel

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D56999 — ctopper / ViewSVN
  4. [libFuzzer] add CompressedTest.cpp, a real-life-ish test for a custom mutator — kcc / ViewSVN
  5. GlobalISel: Fix address space limit in LLT

    The IR enforced limit for the address space is 24-bits, but LLT was
    only using 23-bits. Additionally, the argument to the constructor was
    truncating to 16-bits.

    A similar problem still exists for the number of vector elements. The
    IR enforces no limit, so if you try to use a vector with > 65535
    elements the IRTranslator asserts in the LLT constructor. — arsenm / ViewSVN
  6. [libFuzzer] print uncovered functions when doing -print_coverage=1 — kcc / ViewSVN
  7. [WebAssembly][NFC] Group SIMD-related ISel configuration

    Reviewers: aheejin

    Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish

    Differential Revision: https://reviews.llvm.org/D57263 — tlively / ViewSVN
  8. [PowerPC] Update Vector Costs for P9

    For the power9 CPU, vector operations consume a pair of execution units rather
    than one execution unit like a scalar operation. Update the target transform
    cost functions to reflect the higher cost of vector operations when targeting
    Power9.

    Patch by RolandF.

    Differential revision: https://reviews.llvm.org/D55461 — nemanjai / ViewSVN
  9. [X86] Add DAG combine to merge vzext_movl with the various fp<->int conversion operations that only write the lower 64-bits of an xmm register and zero the rest.

    Summary: We have isel patterns for this, but we're missing some load patterns and all broadcast patterns. A DAG combine seems like a better fit for this.

    Reviewers: RKSimon, spatel

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D56971 — ctopper / ViewSVN
  10. [llvm-nm] Print out N_COLD_FUNC as "cold func"

    Per post-commit feedback from Mike, have llvm-nm print out this symbol
    attribute as "[cold func]". — Vedant Kumar / ViewSVN
  11. [NVPTX] Some nvvm.read.ptx.sreg intrinsics should have IntrInaccessibleMemOnly attribute.

    These intrinsics may return different values every time they are called
    and should not be CSE'd. IntrInaccessibleMemOnly appears to be the right
    attribute to model this behavior.

    Differential Revision: https://reviews.llvm.org/D57259 — tra / ViewSVN
  12. [SelectionDAG][X86] Don't use SEXTLOAD for promoting masked loads in the type legalizer

    Summary:
    I'm not sure why we were using SEXTLOAD. EXTLOAD seems more appropriate since we don't care about the upper bits.

    This patch changes this and then modifies the X86 post legalization combine to emit a extending shuffle instead of a sign_extend_vector_inreg. Could maybe use an any_extend_vector_inreg, but I just did what we already do in LowerLoad. I think we can actually get rid of this code entirely if we switch to -x86-experimental-vector-widening-legalization.

    On AVX512 targets I think we might be able to use a masked vpmovzx and not have to expand this at all.

    Reviewers: RKSimon, spatel

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D57186 — ctopper / ViewSVN
  13. Attempt to fix build on Windows with LLVM_ENABLE_PIC=OFF

    libclang can be built in shared or static mode. On Windows, with
    LLVM_ENABLE_PIC=OFF, it was built in neither mode, leading to clients of
    libclang (c-index-test, c-arcmt-test) failing to link with it set.

    Since PIC isn't really a thing on Windows, build libclang in shared mode when
    LLVM_ENABLE_PIC=OFF there. This is also somewhat symmetric with the existing
    ENABLE_STATIC a few lines down.

    Differential Revision: https://reviews.llvm.org/D57258 — nico / ViewSVN
  14. Fixed frontend clang tests in windows read-only container

    Summary:
    When mounting LLVM source into a windows container in read-only mode, certain tests fail. Ideally, we want all these tests to pass so that developers can mount the same source folder into multiple (windows) containers simultaneously, allowing them to build/test the same source code using various different configurations simultaneously.

    **Fix**: I've found that when attempting to open a file for writing on windows, if you don't have the correct permissions (trying to open a file for writing in a read-only folder), you get [Access is denied](https://support.microsoft.com/en-us/help/2623670/access-denied-or-other-errors-when-you-access-or-work-with-files-and-f). In llvm, we map this error message to a linux based error, see: https://github.com/llvm-mirror/llvm/blob/master/lib/Support/ErrorHandling.cpp

    This is why we see "Permission denied" in our output as opposed to the expected "No such file or directory", thus causing the tests to fail.

    I've changed the test locally to instead point to the root drive so that they can successfully bypass the Access is denied error when LLVM is mounted in as a read-only directory. This way, the test operate exactly the same, but we can get around the windows-complications of what error to expect in a read-only directory.

    Patch By: justice_adams

    Reviewers: rsmith, zturner, MatzeB, stella.stamenova

    Reviewed By: stella.stamenova

    Subscribers: ormris, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D50563 — stella.stamenova / ViewSVN
  15. Build LLVM-C.dll by default on windows and enable in release package

    With the fixes to the building of LLVM-C.dll in D56781 this should now
    be safe to land. This will greatly simplify dealing with LLVM for people
    that just want to use the C API on windows. This is a follow up from
    D35077.

    Patch by Jakob Bornecrantz!

    Differential revision: https://reviews.llvm.org/D56774 — hans / ViewSVN
  16. [NFC] Test commit : fix typo. — avl / ViewSVN
  17. [RISCV] Add target DAG combine for bitcast fabs/fneg on RV32FD

    DAGCombiner::visitBITCAST will perform:
    fold (bitconvert (fneg x)) -> (xor (bitconvert x), signbit)
    fold (bitconvert (fabs x)) -> (and (bitconvert x), (not signbit))

    As shown in double-bitmanip-dagcombines.ll, this can be advantageous. But
    RV32FD doesn't use bitcast directly (as i64 isn't a legal type), and instead
    uses RISCVISD::SplitF64. This patch adds an equivalent DAG combine for
    SplitF64. — asb / ViewSVN
  18. [llvm] Opt-in flag for X86DiscriminateMemOps

    Summary:
    Currently, if an instruction with a memory operand has no debug information,
    X86DiscriminateMemOps will generate one based on the first line of the
    enclosing function, or the last seen debug info.

    This may cause confusion in certain debugging scenarios. The long term
    approach would be to use the line number '0' in such cases, however, that
    brings in challenges: the base discriminator value range is limited
    (4096 values).

    For the short term, adding an opt-in flag for this feature.

    See bug 40319 (https://bugs.llvm.org/show_bug.cgi?id=40319)

    Reviewers: dblaikie, jmorse, gbedwell

    Reviewed By: dblaikie

    Subscribers: aprantl, eraman, hiraditya

    Differential Revision: https://reviews.llvm.org/D57257 — mtrofin / ViewSVN
  19. [GlobalISel][AArch64][NFC] Fix incorrect comment in selectUnmergeValues

    s/scalar/vector/ — paquette / ViewSVN
  20. Revert rL352238. — asbirlea / ViewSVN
  21. [RISCV] Add another potential combine to {double,float}-bitmanip-dagcombines.ll

    (fcopysign a, (fneg b)) will be expanded to bitwise operations by
    DAGTypeLegalizer::SoftenFloatRes_FCOPYSIGN if the floating point type isn't
    legal. Arguably it might be worth doing a combine even if it is legal. — asb / ViewSVN

#257 (Jan 25, 2019 1:03:29 PM)

  1. [Sema] Improve a -Warray-bounds diagnostic

    Fix a bug where we would compare array sizes with incompatible
    element types, and look through explicit casts.

    rdar://44800168

    Differential revision: https://reviews.llvm.org/D57064 — epilk / ViewSVN
  2. [WarnMissedTransforms] Set default to 1.

    Summary:
    Set default value for retrieved attributes to 1, since the check is against 1.
    Eliminates the warning noise generated when the attributes are not present.

    Reviewers: sanjoy

    Subscribers: jlebar, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57253 — asbirlea / ViewSVN
  3. Reapply: [RISCV] Set isAsCheapAsAMove for ADDI, ORI, XORI, LUI

    This reapplies commit r352010 with RISC-V test fixes. — apazos / ViewSVN
  4. [MBP] Don't move bottom block before header if it can't reduce taken branches

    If bottom of block BB has only one successor OldTop, in most cases it is profitable to move it before OldTop, except the following case:

    -->OldTop<-
    |    .    |
    |    .    |
    |    .    |
    ---Pred   |
         |    |
        BB-----

    Move BB before OldTop can't reduce the number of taken branches, this patch detects this case and prevent the moving.

    Differential Revision: https://reviews.llvm.org/D57067 — carrot / ViewSVN
  5. Fix XRayTest link on FreeBSD (and likely NetBSD too)

    Summary:
    As reported on llvm-testers, during 8.0.0-rc1 testing I got errors while
    building of `XRayTest`, during `check-all`:

    ```
    [100%] Generating XRayTest-x86_64-Test
    /home/dim/llvm/8.0.0/rc1/Phase3/Release/llvmCore-8.0.0-rc1.obj/./lib/libLLVMSupport.a(Signals.cpp.o): In function `llvm::sys::PrintStackTrace(llvm::raw_ostream&)':
    Signals.cpp:(.text._ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x24): undefined reference to `backtrace'
    Signals.cpp:(.text._ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x254): undefined reference to `llvm::itaniumDemangle(char const*, char*, unsigned long*, int*)'
    clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[3]: *** [projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/build.make:73: projects/compiler-rt/lib/xray/tests/unit/XRayTest-x86_64-Test] Error 1
    gmake[3]: Target 'projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/build' not remade because of errors.
    gmake[2]: *** [CMakeFiles/Makefile2:33513: projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/all] Error 2
    gmake[2]: Target 'CMakeFiles/check-all.dir/all' not remade because of errors.
    gmake[1]: *** [CMakeFiles/Makefile2:737: CMakeFiles/check-all.dir/rule] Error 2
    gmake[1]: Target 'check-all' not remade because of errors.
    gmake: *** [Makefile:277: check-all] Error 2
    [Release Phase3] check-all failed
    ```

    This is because the `backtrace` function requires `-lexecinfo` on BSD
    platforms.  To fix this, detect the `execinfo` library in
    `cmake/config-ix.cmake`, and add it to the unit test link flags.

    Additionally, since the code in `sys::PrintStackTrace` makes use of
    `itaniumDemangle`, also add `-lLLVMDemangle`.  (Note that this is more
    of a general problem with libLLVMSupport, but I'm looking for a quick
    fix now so it can be merged to the 8.0 branch.)

    Reviewers: dberris, hans, mgorny, samsonov

    Reviewed By: dberris

    Subscribers: krytarowski, delcypher, erik.pilkington, #sanitizers, emaste, llvm-commits

    Differential Revision: https://reviews.llvm.org/D57181 — dim / ViewSVN
  6. [CodeGen] Implement isTriviallyRecursive with StmtVisitor instead of RecursiveASTVisitor

    This code doesn't need to traverse types, lambdas, template arguments,
    etc to detect trivial recursion. We can do a basic statement traversal
    instead. This reduces the time spent compiling