Started 4 mo 1 day ago
Took 3 hr 59 min on green-dragon-09

Failed Build #4171 (Jul 19, 2019 4:17:58 AM)

Revisions
  • http://llvm.org/svn/llvm-project/llvm/trunk : 366562
  • http://llvm.org/svn/llvm-project/cfe/trunk : 366546
  • http://llvm.org/svn/llvm-project/compiler-rt/trunk : 366525
  • http://llvm.org/svn/llvm-project/lld/trunk : 366534
  • http://llvm.org/svn/llvm-project/debuginfo-tests/trunk : 364589
  • http://llvm.org/svn/llvm-project/libcxx/trunk : 366567
  • http://llvm.org/svn/llvm-project/test-suite/trunk : 366290
  • http://llvm.org/svn/llvm-project/clang-tools-extra/trunk : 366566
  • http://llvm.org/svn/llvm-project/polly/trunk : 366510
Changes
  1. [libc++] Fix link error with _LIBCPP_HIDE_FROM_ABI_PER_TU and std::string

    Summary:
    This is effectively a revert of r344616, which was a partial fix for
    PR38964 (compilation of <string> with GCC in C++03 mode). However, that
    configuration is explicitly not supported anymore and that partial fix
    breaks compilation with Clang when per-TU insulation is provided.

    PR42676
    rdar://52899715

    Reviewers: mclow.lists, EricWF

    Subscribers: christof, jkorous, dexonsmith, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D64941 (detail/ViewSVN)
    by Louis Dionne
  2. [Clangd] Fixed SelectionTree bug for macros

    Summary:
    Fixed SelectionTree bug for macros
    - Fixed SelectionTree claimRange for macros and template instantiations
    - Fixed SelectionTree unit tests
    - Changed a breaking test in TweakTests

    Reviewers: sammccall, kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64329 (detail/ViewSVN)
    by sureyeaah
  3. Don't update NoTrappingFPMath and FPDenormalMode in resetTargetOptions

    We'd like to remove this whole function, because these are properties of
    functions, not the target as a whole. These two are easy to remove
    because they are only used for emitting ARM build attributes, which
    expects them to represent the defaults for the whole module, not just
    the last function generated.

    This is needed to get correct build attributes when using IPRA on ARM,
    because IPRA causes resetTargetOptions to get called before
    ARMAsmPrinter::emitAttributes.

    Differential revision: https://reviews.llvm.org/D64929 (detail/ViewSVN)
    by ostannard
  4. Revert "Revert r366458, r366467 and r366468"

    This reverts commit 9c377105da0be7c2c9a3c70035ce674c71b846af.

    [clangd][BackgroundIndexLoader] Directly store DependentTU while loading shard

    Summary:
    We were deferring the population of DependentTU field in LoadedShard
    until BackgroundIndexLoader was consumed. This actually triggers a use after
    free since the shards FileToTU was pointing at could've been moved while
    consuming the Loader.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64980 (detail/ViewSVN)
    by kadircet
  5. [llvm-readelf] - A fix for: "--hash-symbols asserts for 64-bit ELFs"

    Fixes https://bugs.llvm.org/show_bug.cgi?id=42622.
    (--hash-symbols switch is currently broken for 64-bit ELF files, due to r352630.)

    Differential revision: https://reviews.llvm.org/D64788 (detail/ViewSVN)
    by grimar
  6. [IPRA] Don't rely on non-exact function definitions

    If a function definition is not exact, then the linker could select a
    differently-compiled version of it, which could use different registers.

    https://reviews.llvm.org/D64909 (detail/ViewSVN)
    by ostannard
  7. [ARM] Add <saturate> operand to SQRSHRL and UQRSHLL

    Summary:
    According to the new Armv8-M specification
    https://static.docs.arm.com/ddi0553/bh/DDI0553B_h_armv8m_arm.pdf the
    instructions SQRSHRL and UQRSHLL now have an additional immediate
    operand <saturate>. The new assembly syntax is:

    SQRSHRL<c> RdaLo, RdaHi, #<saturate>, Rm
    UQRSHLL<c> RdaLo, RdaHi, #<saturate>, Rm

    where <saturate> can be either 64 (the existing behavior) or 48, in
    that case the result is saturated to 48 bits.

    The new operand is encoded as follows:
      #64 Encoded as sat = 0
      #48 Encoded as sat = 1
    sat is bit 7 of the instruction bit pattern.

    This patch adds a new assembler operand class MveSaturateOperand which
    implements parsing and encoding. Decoding is implemented in
    DecodeMVEOverlappingLongShift.

    Reviewers: ostannard, simon_tatham, t.p.northover, samparker, dmgreen, SjoerdMeijer

    Reviewed By: simon_tatham

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64810 (detail/ViewSVN)
    by miyuki
  8. Revert r366458, r366467 and r366468

    r366458 is causing test failures. r366467 and r366468 had to be reverted as
    they were casuing conflict while reverting r366458.

    r366468 [clangd] Remove dead code from BackgroundIndex
    r366467 [clangd] BackgroundIndex stores shards to the closest project
    r366458 [clangd] Refactor background-index shard loading (detail/ViewSVN)
    by Azharuddin Mohammed
  9. [OpenCL] Define CLK_NULL_EVENT without cast

    Defining CLK_NULL_EVENT with a `(void*)` cast has the (unintended?)
    side-effect that the address space will be fixed (as generic in OpenCL
    2.0 mode).  The consequence is that any target specific address space
    for the clk_event_t type will not be applied.

    It is not clear why the void pointer cast was needed in the first
    place, and it seems we can do without it.

    Differential Revision: https://reviews.llvm.org/D63876 (detail/ViewSVN)
    by svenvh
  10. [clangd] Handle windows line endings in QueryDriver

    Summary:
    The previous patch did not fix the end mark. D64789
    fixes second case of https://github.com/clangd/clangd/issues/93

    Patch by @lh123 !

    Reviewers: sammccall, kadircet

    Reviewed By: kadircet

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

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D64970 (detail/ViewSVN)
    by kadircet
  11. [sanitizers] Use covering ObjectFormatType switches

    Summary:
    This patch removes the `default` case from some switches on
    `llvm::Triple::ObjectFormatType`, and cases for the missing enumerators
    (`UnknownObjectFormat`, `Wasm`, and `XCOFF`) are then added.

    For `UnknownObjectFormat`, the effect of the action for the `default`
    case is maintained; otherwise, where `llvm_unreachable` is called,
    `report_fatal_error` is used instead.

    Where the `default` case returns a default value, `report_fatal_error`
    is used for XCOFF as a placeholder. For `Wasm`, the effect of the action
    for the `default` case in maintained.

    The code is structured to avoid strongly implying that the `Wasm` case
    is present for any reason other than to make the switch cover all
    `ObjectFormatType` enumerator values.

    Reviewers: sfertile, jasonliu, daltenty

    Reviewed By: sfertile

    Subscribers: hiraditya, aheejin, sunfish, llvm-commits, cfe-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64222 (detail/ViewSVN)
    by hubert.reinterpretcast
  12. [AMDGPU] Simplify the exclusive scan used for optimized atomics

    Summary:
    Change the scan algorithm to use only power-of-two shifts (1, 2, 4, 8,
    16, 32) instead of starting off shifting by 1, 2 and 3 and then doing
    a 3-way ADD, because:

    1. It simplifies the compiler a little.
    2. It minimizes vgpr pressure because each instruction is now of the
       form vn = vn + vn << c.
    3. It is more friendly to the DPP combiner, which currently can't
       combine into an ADD3 instruction.

    Because of #2 and #3 the end result is improved from this:

      v_add_u32_dpp v4, v3, v3  row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:0
      v_mov_b32_dpp v5, v3  row_shr:2 row_mask:0xf bank_mask:0xf
      v_mov_b32_dpp v1, v3  row_shr:3 row_mask:0xf bank_mask:0xf
      v_add3_u32 v1, v4, v5, v1
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:4 row_mask:0xf bank_mask:0xe
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:8 row_mask:0xf bank_mask:0xc
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_bcast:15 row_mask:0xa bank_mask:0xf
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_bcast:31 row_mask:0xc bank_mask:0xf

    To this:

      v_add_u32_dpp v1, v1, v1  row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:0
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:2 row_mask:0xf bank_mask:0xf bound_ctrl:0
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:4 row_mask:0xf bank_mask:0xe
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_shr:8 row_mask:0xf bank_mask:0xc
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_bcast:15 row_mask:0xa bank_mask:0xf
      s_nop 1
      v_add_u32_dpp v1, v1, v1  row_bcast:31 row_mask:0xc bank_mask:0xf

    I.e. two fewer computational instructions, one extra nop where we could
    schedule something else.

    Reviewers: arsenm, sheredom, critson, rampitec, vpykhtin

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64411 (detail/ViewSVN)
    by foad
  13. [Loop Peeling] Enable peeling of multiple exits by default.

    Enable loop peeling with multiple exits where all non-latch exits
    ends up with deopt by default.

    Reviewers: reames, fhahn
    Reviewed By: reames
    Subscribers: xbolva00, hiraditya, zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64619 (detail/ViewSVN)
    by skatkov
  14. [clangd] cleanup: unify the implemenation of checking a location is inside main file.

    Summary: We have variant implementations in the codebase, this patch unifies them.

    Reviewers: ilya-biryukov, kadircet

    Subscribers: MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64915 (detail/ViewSVN)
    by hokein
  15. [InstCombine] Dropping redundant masking before left-shift [5/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    f. `((x << MaskShAmt) a>> MaskShAmt) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    f. `(ShiftShAmt-MaskShAmt) s>= 0` (i.e. `ShiftShAmt u>= MaskShAmt`)

    Normally, the inner pattern is sign-extend,
    but for our purposes it's no different to other patterns:

    alive proofs:
    f: https://rise4fun.com/Alive/7U3

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

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

    Differential Revision: https://reviews.llvm.org/D64524 (detail/ViewSVN)
    by lebedevri
  16. [InstCombine] Dropping redundant masking before left-shift [4/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    e. `((x << MaskShAmt) l>> MaskShAmt) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    e. `(ShiftShAmt-MaskShAmt) s>= 0` (i.e. `ShiftShAmt u>= MaskShAmt`)

    alive proofs:
    e: https://rise4fun.com/Alive/0FT

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

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

    Differential Revision: https://reviews.llvm.org/D64521 (detail/ViewSVN)
    by lebedevri
  17. [InstCombine] Dropping redundant masking before left-shift [3/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    d. `(x & ((-1 << MaskShAmt) >> MaskShAmt)) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    d. `(ShiftShAmt-MaskShAmt) s>= 0` (i.e. `ShiftShAmt u>= MaskShAmt`)

    alive proofs:
    d: https://rise4fun.com/Alive/I5Y

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

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

    Differential Revision: https://reviews.llvm.org/D64519 (detail/ViewSVN)
    by lebedevri
  18. [InstCombine] Dropping redundant masking before left-shift [2/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    c. `(x & (-1 >> MaskShAmt)) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    c. `(ShiftShAmt-MaskShAmt) s>= 0` (i.e. `ShiftShAmt u>= MaskShAmt`)

    alive proofs:
    c: https://rise4fun.com/Alive/RgJh

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

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

    Differential Revision: https://reviews.llvm.org/D64517 (detail/ViewSVN)
    by lebedevri
  19. [InstCombine] Dropping redundant masking before left-shift [1/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    b. `(x & (~(-1 << maskNbits))) << shiftNbits`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    b. `(MaskShAmt+ShiftShAmt) u>= bitwidth(x)`

    alive proof:
    b: https://rise4fun.com/Alive/y8M

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

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

    Differential Revision: https://reviews.llvm.org/D64514 (detail/ViewSVN)
    by lebedevri
  20. [InstCombine] Dropping redundant masking before left-shift [0/5] (PR42563)

    Summary:
    If we have some pattern that leaves only some low bits set, and then performs
    left-shift of those bits, if none of the bits that are left after the final
    shift are modified by the mask, we can omit the mask.

    There are many variants to this pattern:
    a. `(x & ((1 << MaskShAmt) - 1)) << ShiftShAmt`
    All these patterns can be simplified to just:
    `x << ShiftShAmt`
    iff:
    a. `(MaskShAmt+ShiftShAmt) u>= bitwidth(x)`

    alive proof:
    a: https://rise4fun.com/Alive/wi9

    Indeed, not all of these patterns are canonical.
    But since this fold will only produce a single instruction
    i'm really interested in handling even uncanonical patterns,
    since i have this general kind of pattern in hotpaths,
    and it is not totally outlandish for bit-twiddling code.

    For now let's start with patterns where both shift amounts are variable,
    with trivial constant "offset" between them, since i believe this is
    both simplest to handle and i think this is most common.
    But again, there are likely other variants where we could use
    ValueTracking/ConstantRange to handle more cases.

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

    Reviewers: spatel, nikic, huihuiz, xbolva00

    Reviewed By: xbolva00

    Subscribers: efriedma, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64512 (detail/ViewSVN)
    by lebedevri
  21. [ELF][test] Fix aarch64-condb-reloc.s (detail/ViewSVN)
    by maskray
  22. [NFC] Fix an indentation issue in llvm/Support/TargetRegistry.h (detail/ViewSVN)
    by hubert.reinterpretcast
  23. [ELF][AArch64] Improve some aarch64-*.s tests

    * Delete aarch64-tls-static.s: it is covered by aarch64-tlsdesc.c
    * Add --no-show-raw-insn to llvm-objdump -d tests
    * When linking an executable with %t.so, the path %t.so will be recorded in the DT_NEEDED entry if %t.so doesn't have DT_SONAME. The DT_NEEDED has varying lengths on different systems.
      Add -soname to make tests more robust. This issue will become outstanding if we allow overlapping PT_LOAD (D64930). (detail/ViewSVN)
    by maskray
  24. [DebugInfo] Some fields do not need relocations even relax is enabled.

    In debug frame information, some fields, e.g., Length in CIE/FDE and
    Offset in FDE are attributes to describe the structure of CIE/FDE. They
    are not related to the relaxed code. However, these attributes are
    symbol differences. So, in current design, these attributes will be
    filled as zero and LLVM generates relocations for them.

    We only need to generate relocations for symbols in executable sections.
    So, if the symbols are not located in executable sections, we still
    evaluate their values under relaxation.

    Differential Revision: https://reviews.llvm.org/D61584 (detail/ViewSVN)
    by hsiangkai
  25. unbreak links (detail/ViewSVN)
    by lattner
  26. replace the old kaleidoscope tutorial files with orphaned pages that forward to the new copy. (detail/ViewSVN)
    by lattner
  27. Point to the dusted off version of the kaleidoscope tutorial. (detail/ViewSVN)
    by lattner
  28. [test] [llvm-objcopy] Fix broken test case

    Summary: The test case added in D62718 did not work unless the user was root because write bits were not set for the output file. This change uses only permissions with user write (0200) to ensure tests pass regardless of the users permissions.

    Reviewers: jhenderson, rupprecht, MaskRay, espindola, alexshap

    Reviewed By: MaskRay

    Subscribers: emaste, arichardson, jakehehrlich, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64302 (detail/ViewSVN)
    by abrachet
  29. [NFC][PowerPC] Modify the test case add_cmp.ll (detail/ViewSVN)
    by zhangkang
  30. [libFuzzer] Set Android specific ALL_FUZZER_SUPPORTED_ARCH

    Build libFuzzer for all Android supported architectures. (detail/ViewSVN)
    by kongyi
  31. [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame.

    It is necessary to generate fixups in .debug_frame or .eh_frame as
    relaxation is enabled due to the address delta may be changed after
    relaxation.

    There is an opcode with 6-bits data in debug frame encoding. So, we
    also need 6-bits fixup types.

    Differential Revision: https://reviews.llvm.org/D58335 (detail/ViewSVN)
    by hsiangkai
  32. Use the MachineBasicBlock symbol for a callbr target

    Summary:
    Inline asm doesn't use labels when compiled as an object file. Therefore, we
    shouldn't create one for the (potential) callbr destination. Instead, use the
    symbol for the MachineBasicBlock.

    Reviewers: nickdesaulniers, craig.topper

    Reviewed By: nickdesaulniers

    Subscribers: xbolva00, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64888 (detail/ViewSVN)
    by void
  33. Fix formatting of inline argument comments. NFC.

    Also, remove the final arg from ItaniumCXXABI in the PNaCl case since
    its not needed.

    Differential Revision: https://reviews.llvm.org/D64955 (detail/ViewSVN)
    by sbc
  34. [GlobalISel] Translate calls to memcpy et al to G_INTRINSIC_W_SIDE_EFFECTs and legalize later.

    I plan on adding memcpy optimizations in the GlobalISel pipeline, but we can't
    do that unless we delay lowering to actual function calls. This patch changes
    the translator to generate G_INTRINSIC_W_SIDE_EFFECTS for these functions, and
    then have each target specify that using the new custom legalizer for intrinsics
    hook that they want it expanded it a libcall.

    Differential Revision: https://reviews.llvm.org/D64895 (detail/ViewSVN)
    by aemerson
  35. [cmake] Fix typo where a varible was checked for Apple instead of Darwin

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64965 (detail/ViewSVN)
    by lanza
  36. [cmake] Convert the NATIVE llvm build process to be project agnostic

    lldb recently added a tablegen tool. In order to properly cross compile
    lldb standalone there needs to be a mechanism to generate the native
    lldb build, analgous to what's done for the NATIVE llvm build. Thus,
    we can simply modify this setup to allow for any project to be used. (detail/ViewSVN)
    by lanza
  37. Reapply [llvm-lipo] Implement -create (with hardcoded alignments)

    This reapplies r366142 with a fix for the failing Windows test.

    Original commit message:

    Creates universal binary output file from input files. Currently uses
    hard coded value for alignment.  Want to get the create functionality
    approved before implementing the alignment function.

    Patch by Anusha Basana <anusha.basana@gmail.com>

    Differential Revision: https://reviews.llvm.org/D64102 (detail/ViewSVN)
    by smeenai
  38. Update the SimpleJIT class in the clang-interpreter example to use ORCv2.

    This will remove the ORCv1 deprecation warnings. (detail/ViewSVN)
    by Lang Hames
  39. Update polly test for SCEV change.

    r366419 adds nsw to more SCEV expressions, which allows polly to
    make more aggressive assumptions about the input expressions. (detail/ViewSVN)
    by efriedma
  40. [clang-scan-deps] Dependency directives source minimizer: handle #pragma once

    We should re-emit `#pragma once` to ensure the preprocessor will
    still honor it when running on minimized sources.

    Differential Revision: https://reviews.llvm.org/D64945 (detail/ViewSVN)
    by arphaman
  41. [AMDGPU] Drop Reg32 and use regular AsmName

    This allows to reduce generated AMDGPUGenAsmWriter.inc by ~100Kb.

    Differential Revision: https://reviews.llvm.org/D64952 (detail/ViewSVN)
    by rampitec
  42. [WebAssembly] Use passive segments by default when memory is shared

    Summary:
    This change makes it so that passing --shared-memory is all a user
    needs to do to get proper multithreaded code. This default can still
    be explicitly overridden for any reason using --passive-segments and
    --active-segments.

    Reviewers: sbc100, quantum

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64950 (detail/ViewSVN)
    by tlively
  43. [GlobalISel][AArch64] Add support for base register + offset register loads

    Add support for folding G_GEPs into loads of the form

    ```
    ldr reg, [base, off]
    ```

    when possible. This can save an add before the load. Currently, this is only
    supported for loads of 64 bits into 64 bit registers.

    Add a new addressing mode function, `selectAddrModeRegisterOffset` which
    performs this folding when it is profitable.

    Also add a test for addressing modes for G_LOAD.

    Differential Revision: https://reviews.llvm.org/D64944 (detail/ViewSVN)
    by paquette
  44. CodeGen: Allow !associated metadata to point to aliases.

    This is a small extension of !associated, mostly useful for the implementation
    convenience of instrumentation passes that RAUW globals with aliases, such
    as LowerTypeTests.

    Differential Revision: https://reviews.llvm.org/D64951 (detail/ViewSVN)
    by pcc
  45. Revert [X86] EltsFromConsecutiveLoads - support common source loads

    This reverts r366441 (git commit 48104ef7c9c653bbb732b66d7254957389fea337)

    This causes clang to fail to compile some file in Skia. Reduction soon. (detail/ViewSVN)
    by rnk
  46. [WebAssembly] fix bug in finding .tdata segment

    Summary: Fix bug in `wasm-ld`'s `Writer::createInitTLSFunction` that only finds `.tdata` if it's the first section.

    Reviewers: tlively, aheejin, sbc100

    Reviewed By: sbc100

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64947 (detail/ViewSVN)
    by quantum
  47. [WebAssembly] Fix __builtin_wasm_tls_base intrinsic

    Summary:
    Properly generate the outchain for the `__builtin_wasm_tls_base` intrinsic.

    Also marked the intrinsic pure, per @sunfish's suggestion.

    Reviewers: tlively, aheejin, sbc100, sunfish

    Reviewed By: tlively

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

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64949 (detail/ViewSVN)
    by quantum
  48. [cmake] Only run llvm-codesign if targetting apple on an apple host

    Summary:
    Other platforms don't have the capability to perform llvm_codesign
    step. If LLVM_CODESIGNING_IDENTITY is set then this chunk of code would
    attempt to codesign if the target was Apple. But when cross compiling
    to Darwin from Linux, for example, this step would fail. So test if the
    host is Apple as well.

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64942 (detail/ViewSVN)
    by lanza
  49. Fix typo in r366494. Spotted by Yuanfang Chen. (detail/ViewSVN)
    by pcc
  50. Remove the static initialize introduced in r365099

    Summary:
    Some polish for r365099 which adds a static initializer to
    MachOObjectFile. Remove it by moving it to file scope.

    Reviewers: smeenai, alexshap, compnerd, mtrent, anushabasana

    Reviewed By: smeenai

    Subscribers: hiraditya, jkorous, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64873 (detail/ViewSVN)
    by steven_wu
  51. IR: Teach Constant::needsRelocation() that relative pointers don't need to be relocated.

    This causes sections with relative pointers to be marked as read only,
    which means that they won't end up sharing pages with writable data.

    Differential Revision: https://reviews.llvm.org/D64948 (detail/ViewSVN)
    by pcc
  52. [ASan] Support `{f}puts(NULL)` on Darwin, part 2

    Add braces around macro `{ MACRO(); }` to guard against macros that
    expand to multiple statements. (detail/ViewSVN)
    by yln
  53. gn build: Merge r366458. (detail/ViewSVN)
    by pcc
  54. FileSystem: Check for DTTOIF alone, not _DIRENT_HAVE_D_TYPE

    While 'd_type' is a non-standard extension to `struct dirent`, only
    glibc signals its presence with a macro '_DIRENT_HAVE_D_TYPE'.
    However, any platform with 'd_type' also includes a way to convert to
    mode_t values using the macro 'DTTOIF', so we can check for that alone
    and still be confident that the 'd_type' member exists.

    (If this turns out to be wrong, I'll go back and set up an actual
    CMake check.)

    I couldn't think of how to write a test for this, because I couldn't
    think of how to test that a 'stat' call doesn't happen without
    controlling the filesystem or intercepting 'stat', and there's no good
    cross-platform way to do that that I know of.

    Follow-up (almost a year later) to r342089.

    rdar://problem/50592673
    https://reviews.llvm.org/D64940 (detail/ViewSVN)
    by jrose
  55. [ORC] Suppress an ORCv1 deprecation warning. (detail/ViewSVN)
    by Lang Hames
  56. [libc++] Add C++17 deduction guides for std::function

    Summary: http://llvm.org/PR39606

    Reviewers: Quuxplusone

    Subscribers: christof, dexonsmith, libcxx-commits

    Differential Revision: https://reviews.llvm.org/D54410 (detail/ViewSVN)
    by Louis Dionne
  57. [OPENMP]Fix sharing of threadprivate variables with TLS support.

    If the threadprivate variable is used in the copyin clause on inner
    parallel directive with TLS support, we capture this variable in all
    outer OpenMP scopes. It leads to the fact that in all scopes we're
    working with the original variable, not the threadprivate copies. (detail/ViewSVN)
    by abataev
  58. [compiler-rt] Complete revert of r366413

    Incomplete revert. Mea culpa. This test is failing on sanitizer-x86_64-linux
    and our internal CI. (detail/ViewSVN)
    by ormris
  59. Fix C++ modules build

    llvm-svn: 366344 missed an include that broke the LLVM_ENABLE_MODULES
    build. (detail/ViewSVN)
    by Raphael Isemann
  60. [RISCV] Hard float ABI support

    The RISC-V hard float calling convention requires the frontend to:

    * Detect cases where, once "flattened", a struct can be passed using
    int+fp or fp+fp registers under the hard float ABI and coerce to the
    appropriate type(s)
    * Track usage of GPRs and FPRs in order to gate the above, and to
    determine when signext/zeroext attributes must be added to integer
    scalars

    This patch attempts to do this in compliance with the documented ABI,
    and uses ABIArgInfo::CoerceAndExpand in order to do this. @rjmccall, as
    author of that code I've tagged you as reviewer for initial feedback on
    my usage.

    Note that a previous version of the ABI indicated that when passing an
    int+fp struct using a GPR+FPR, the int would need to be sign or
    zero-extended appropriately. GCC never did this and the ABI was changed,
    which makes life easier as ABIArgInfo::CoerceAndExpand can't currently
    handle sign/zero-extension attributes.

    Re-landed after backing out 366450 due to missed hunks.

    Differential Revision: https://reviews.llvm.org/D60456 (detail/ViewSVN)
    by asb
  61. [COFF] Change a variable type to be const in the HeapAllocSite map. (detail/ViewSVN)
    by akhuang
  62. [FPEnv] Teach the IRBuilder about constrained FPTrunc and FPExt

    The IRBuilder doesn't know that FPTrunc and FPExt have constrained
    equivalents. Add the support by building on the strict FP mode now
    present in the IRBuilder.

    Reviewed by: John McCall
    Approved by: John McCall
    Differential Revision: https://reviews.llvm.org/D64934 (detail/ViewSVN)
    by kpn
  63. [WebAssembly] Implement __builtin_wasm_tls_base intrinsic

    Summary:
    Add `__builtin_wasm_tls_base` so that LeakSanitizer can find the thread-local
    block and scan through it for memory leaks.

    Reviewers: tlively, aheejin, sbc100

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

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64900 (detail/ViewSVN)
    by quantum
  64. [OPENMP]Provide correct data sharing attributes for loop control
    variables.

    Loop control variables are private in loop-based constructs and we shall
    take this into account when generate the code for inner constructs.
    Currently, those variables are reported as shared in many cases. Moved
    the analysis of the data-sharing attributes of the loop control variable
    to an early semantic stage to correctly handle their attributes. (detail/ViewSVN)
    by abataev
  65. [LibTooling] Relax Transformer to allow rewriting macro expansions

    Summary:
    Currently, Transformer rejects any changes to source locations inside macro
    expansions. This change relaxes that constraint to allow rewrites when the
    entirety of the expansion is replaced, since that can be mapped to replacing the
    entirety of the expansion range in the file source.  This change makes
    Transformer consistent with the handling of edit ranges in `clang::edit::Commit`
    (which is used, for example, for applying `FixItHint`s from diagnostics).

    Reviewers: ilya-biryukov

    Subscribers: gribozavr, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64518 (detail/ViewSVN)
    by ymandel
  66. Revert "Fix asan infinite loop on undefined symbol"

    This reverts commit 63719119c78ca965b5d80e5c20fcfe81ba28f896.

    The tests in this commit were failing on a Linux sanitizer bot
    and our internal CI.

    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22401/steps/test%20standalone%20compiler-rt%20with%20symbolizer/logs/stdio (detail/ViewSVN)
    by ormris
  67. [LAA] Re-check bit-width of pointers after stripping.

    Summary:
    - As the pointer stripping now tracks through `addrspacecast`, prepare
      to handle the bit-width difference from the result pointer.

    Reviewers: jdoerfert

    Subscribers: jvesely, nhaehnle, hiraditya, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64928 (detail/ViewSVN)
    by hliao
  68. [LibTooling] Add function to translate and validate source range for editing

    Summary:
    Adds the function `getRangeForEdit` to validate that a given source range is
    editable and, if needed, translate it into a range in the source file (for
    example, if it's sourced in macro expansions).

    Reviewers: ilya-biryukov

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64924 (detail/ViewSVN)
    by ymandel
  69. [clangd] Remove dead code from BackgroundIndex (detail/ViewSVN)
    by kadircet
  70. [clangd] BackgroundIndex stores shards to the closest project

    Summary:
    Changes persistance logic to store shards at the directory of closest
    CDB. Previously we were storing all shards to directory of the CDB that
    triggered indexing, it had its downsides.

    For example, if you had two TUs coming from a different CDB but depending on the
    same header foo.h, we will store the foo.h only for the first CDB, and it would
    be missing for the second and we would never persist it since it was actually
    present in the memory and persisted before.

    This patch still stores only a single copy of a shard, but makes the directory a
    function of the file name. So that the shard place will be unique even with
    multiple CDBs accessing the file. This directory is determined as the first
    directory containing a CDB in the file's parent directories, if no such
    directory exists we make use of the home directory.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64745 (detail/ViewSVN)
    by kadircet
  71. ELF: Add support for remaining R_AARCH64_MOVW* relocations.

    Differential Revision: https://reviews.llvm.org/D64685 (detail/ViewSVN)
    by pcc
  72. [NFC][llvm-readobj] Refactor dynamic string table indexing into a function.

    Restore printDynamicString removed in rL363868. It provides better
    error handling whenever indexing dynamic string table is needed.

    Reviewers: jhenderson, MaskRay, grimar

    Reviewed by: jhenderson, MaskRay, grimar

    Differential Revision: https://reviews.llvm.org/D64674 (detail/ViewSVN)
    by yuanfang
  73. ELF: Simplify test. NFCI.

    Avoid splitting the test into multiple files and use zero for the value of
    the symbol with addends at relocations so that it's clear what value is
    being used at relocations.

    Differential Revision: https://reviews.llvm.org/D64684 (detail/ViewSVN)
    by pcc
  74. MC: AArch64: Add support for prel_g* relocation specifiers.

    Differential Revision: https://reviews.llvm.org/D64683 (detail/ViewSVN)
    by pcc
  75. AArch64: Unify relocation restrictions between MOVK/MOVN/MOVZ.

    There doesn't seem to be a practical reason for these instructions to have
    different restrictions on the types of relocations that they may be used
    with, notwithstanding the language in the ELF AArch64 spec that implies that
    specific relocations are meant to be used with specific instructions.

    For example, we currently forbid the first instruction in the following
    sequence, despite it currently being used by clang to generate a global
    reference under -mcmodel=large:

    movz x0, #:abs_g0_nc:foo
    movk x0, #:abs_g1_nc:foo
    movk x0, #:abs_g2_nc:foo
    movk x0, #:abs_g3:foo

    Therefore, allow MOVK/MOVN/MOVZ to accept the union of the set of relocations
    that they currently accept individually.

    Differential Revision: https://reviews.llvm.org/D64466 (detail/ViewSVN)
    by pcc
  76. ELF: Allow forward references to linked sections.

    It's possible to create IR that uses !associated to refer to a global that
    appears later in the module, which can result in these types of forward
    references being generated. Unfortunately our assembler does not currently
    accept the resulting .s so I needed to use yaml2obj to test this.

    Differential Revision: https://reviews.llvm.org/D64880 (detail/ViewSVN)
    by pcc
  77. [clangd] Refactor background-index shard loading

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64712 (detail/ViewSVN)
    by kadircet
  78. [ASTUnit] Attempt to unbreak Windows buildbots after r366448 (detail/ViewSVN)
    by ibiryukov
  79. Minor styling fix. NFC. (detail/ViewSVN)
    by hliao
  80. [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64860 (detail/ViewSVN)
    by kadircet
  81. Revert "[RISCV] Hard float ABI support" r366450

    The commit was missing a few hunks. Will fix and recommit. (detail/ViewSVN)
    by asb
  82. Revert r366449: [CrossTU] Add a function to retrieve original source location.

    Reason: the commit breaks layering by adding a dependency on ASTUnit
    (which is inside clangFrontend) from the ASTImporter (which is inside
    clangAST). (detail/ViewSVN)
    by ibiryukov
  83. [Clangd] NFC: Fixed tweaks CMakeLists order to alphabetical (detail/ViewSVN)
    by sureyeaah
  84. [Clangd] Changed ExtractVariable to only work on non empty selections

    Summary:
    - For now, we don't trigger in any case if it's an empty selection
    - Fixed unittests

    Reviewers: kadircet, sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64912 (detail/ViewSVN)
    by sureyeaah
  85. [RISCV] Hard float ABI support

    The RISC-V hard float calling convention requires the frontend to:

    * Detect cases where, once "flattened", a struct can be passed using
    int+fp or fp+fp registers under the hard float ABI and coerce to the
    appropriate type(s) * Track usage of GPRs and FPRs in order to gate the
    above, and to
    determine when signext/zeroext attributes must be added to integer
    scalars

    This patch attempts to do this in compliance with the documented ABI,
    and uses ABIArgInfo::CoerceAndExpand in order to do this. @rjmccall, as
    author of that code I've tagged you as reviewer for initial feedback on
    my usage.

    Note that a previous version of the ABI indicated that when passing an
    int+fp struct using a GPR+FPR, the int would need to be sign or
    zero-extended appropriately. GCC never did this and the ABI was changed,
    which makes life easier as ABIArgInfo::CoerceAndExpand can't currently
    handle sign/zero-extension attributes.

    Differential Revision: https://reviews.llvm.org/D60456 (detail/ViewSVN)
    by asb
  86. [CrossTU] Add a function to retrieve original source location.

    Summary:
    A new function will be added to get the original SourceLocation
    for a SourceLocation that was imported as result of getCrossTUDefinition.
    The returned SourceLocation is in the context of the (original)
    SourceManager for the original source file. Additionally the
    ASTUnit object for that source file is returned. This is needed
    to get a SourceManager to operate on with the returned source location.

    The new function works if multiple different source files are loaded
    with the same CrossTU context.

    This patch can be treated as part of a bigger change that is needed to
    improve macro expansion handliong at plist generation.

    Reviewers: martong, shafik, a_sidorin, xazax.hun

    Reviewed By: martong

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64554 (detail/ViewSVN)
    by balazske
  87. [ASTUnit] Fix a regression in cached completions

    Summary:
    After r345152 cached completions started adding namespaces after
    nested name specifiers, e.g. in `some_name::^`

    The CCC_Symbol indicates the completed item cannot be a namespace (it is
    described as being "a type, a function or a variable" in the comments).

    Therefore, 'nested specifier' completions should only be added from cache
    when the context is CCC_SymbolOrNewName (which roughly seems to indicate
    that a nested name specifier is allowed).

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

    Reviewers: kadircet, sammccall

    Reviewed By: kadircet, sammccall

    Subscribers: arphaman, nik, sammccall, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64918 (detail/ViewSVN)
    by ibiryukov
  88. [CMake] Don't set Python_ADDITIONAL_VERSIONS

    Until recently, Python_ADDITIONAL_VERSIONS was used to limit LLVM's
    Python support to 2.7. Now that both LLVM and LLDB both support Python
    3, there's no longer a need to put an arbitrary limit on this.

    However, instead of removing the variable, r365692 expanded the list,
    which has the (presumably unintentional) side-effect of expression
    preference for Python 3.

    Instead, as Michal proposed in the original code review, we should just
    not set the list at all, and let CMake pick whatever Python interpreter
    you have in your path.

    This patch removes the Python_ADDITIONAL_VERSIONS variable in llvm,
    clang and lld. I've also updated the docs with the default behavior and
    how to force a different Python version to be used.

    Differential revision: https://reviews.llvm.org/D64894 (detail/ViewSVN)
    by Jonas Devlieghere
  89. [clangd] Suppress unwritten scopes when expanding auto.

    Summary: otherwise the replacement will break the code.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64627 (detail/ViewSVN)
    by hokein
  90. [ELF][PPC] Delete ppc64-dynamic-relocations.s

    I forgot to delete it in r366424. (detail/ViewSVN)
    by maskray
  91. Revert "[DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame."

    This reverts commit 17e3cbf5fe656483d9016d0ba9e1d0cd8629379e. (detail/ViewSVN)
    by hsiangkai
  92. [clangd] Disable DumpRecordLayout by default per https://bugs.llvm.org/show_bug.cgi?id=42670 (detail/ViewSVN)
    by sammccall
  93. [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame.

    It is necessary to generate fixups in .debug_frame or .eh_frame as
    relaxation is enabled due to the address delta may be changed after
    relaxation.

    There is an opcode with 6-bits data in debug frame encoding. So, we
    also need 6-bits fixup types.

    Differential Revision: https://reviews.llvm.org/D58335 (detail/ViewSVN)
    by hsiangkai
  94. [X86] EltsFromConsecutiveLoads - support common source loads

    This patch enables us to find the source loads for each element, splitting them into a Load and ByteOffset, and attempts to recognise consecutive loads that are in fact from the same source load.

    A helper function, findEltLoadSrc, recurses to find a LoadSDNode and determines the element's byte offset within it. When attempting to match consecutive loads, byte offsetted loads then attempt to matched against a previous load that has already been confirmed to be a consecutive match.

    Next step towards PR16739 - after this we just need to account for shuffling/repeated elements to create a vector load + shuffle.

    Differential Revision: https://reviews.llvm.org/D64551 (detail/ViewSVN)
    by rksimon
  95. [analyzer] Add CTU user docs

    Reviewers: dkrupp, a_sidorin, Szelethus, NoQ

    Subscribers: whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, gamesh411, Charusso, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64801 (detail/ViewSVN)
    by martong
  96. [OPENMP][NVPTX]Mark barrier functions calls as convergent.

    Added convergent attribute to the barrier functions calls for correct
    optimizations. (detail/ViewSVN)
    by abataev
  97. Restrict asan + dlopen testcase to x86 (detail/ViewSVN)
    by serge_sans_paille
  98. [DAGCombine] Pull getSubVectorSrc helper out of narrowInsertExtractVectorBinOp. NFCI.

    NFC step towards reusing this in other EXTRACT_SUBVECTOR combines. (detail/ViewSVN)
    by rksimon
  99. [FileCheck] Fix numeric variable redefinition

    Summary:
    Commit r365249 changed usage of FileCheckNumericVariable to have one
    instance of that class per variable as opposed to one instance per
    definition of a given variable as was done before. However, it retained
    the safety check in setValue that it should only be called with the
    variable unset, even after r365625.

    However this causes assert failure when a non-pseudo variable is being
    redefined. And while redefinition of @LINE at each CHECK line work in
    the general case, it caused problem when a substitution failed (fixed in
    r365624) and still causes problem when a CHECK line does not match since
    @LINE's value is cleared after substitutions in match() happened but
    printSubstitutions also attempts a substitution.

    This commit solves the root of the problem by changing setValue to set a
    new value regardless of whether a value was set or not, thus fixing all
    the aforementioned issues.

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64882 (detail/ViewSVN)
    by thopre
  100. Relax regexp to detect failed interception by asan

    This should fix failed detection on aarch64/ppc64/thumbv8... (detail/ViewSVN)
    by serge_sans_paille
  101. [x86] try harder to form LEA from ADD to avoid flag conflicts (PR40483)

    LEA doesn't affect flags, so use it more liberally to replace an ADD when
    we know that the ADD operands affect flags.

    In the motivating example from PR40483:
    https://bugs.llvm.org/show_bug.cgi?id=40483
    ...this lets us avoid duplicating a math op just to avoid flag conflict.

    As mentioned in the TODO comments, this heuristic can be extended to
    fire more often if that leads to more improvements.

    Differential Revision: https://reviews.llvm.org/D64707 (detail/ViewSVN)
    by spatel
  102. [llvm-readelf] - Remove the precompiled binary from gnu-hash-symbols.test

    I am working on https://bugs.llvm.org/show_bug.cgi?id=42622
    and this patch reworks the gnu-hash-symbols.test so that it
    will be easier to expand it with x86_64 case.

    Differential revision: https://reviews.llvm.org/D64750 (detail/ViewSVN)
    by grimar
  103. Revert r366422: [OpenCL] Improve destructor support in C++ for OpenCL

    Reason: this commit causes crashes in the clang compiler when building
    LLVM Support with libc++, see https://bugs.llvm.org/show_bug.cgi?id=42665
    for details. (detail/ViewSVN)
    by ibiryukov
  104. Bump the trunk version to 10.0.0svn

    and clear the release notes. (detail/ViewSVN)
    by hans
  105. [ELF][PPC] Refactor some ppc64 tests

    Merge ppc64-dynamic-relocations.s into ppc64-plt-stub.s
    Add ppc64-tls-ie.s: covers ppc64-initial-exec-tls.s and ppc64-tls-ie-le.s
    Add ppc64-tls-gd.s: covers ppc64-general-dynamic-tls.s, ppc64-gd-to-ie.s, ppc64-tls-gd-le.s, and ppc64-tls-gd-le-small.s (detail/ViewSVN)
    by maskray
  106. [ARM][DAGCOMBINE][FIX] PerformVMOVRRDCombine

    Summary:
    PerformVMOVRRDCombine ommits adding a offset
    of 4 to the PointerInfo, when converting a
    f64 = load[M]
    to
    {i32, i32} = {load[M], load[M + 4]}

    Which would allow the machine scheduller
    to break dependencies with the second load.

    - pr42638

    Reviewers: eli.friedman, dmgreen, ostannard

    Reviewed By: ostannard

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64870 (detail/ViewSVN)
    by dnsampaio
  107. [OpenCL] Improve destructor support in C++ for OpenCL

    Summary:
    This patch does mainly three things:
    1. It fixes a false positive error detection in Sema that is similar to
        D62156. The error happens when explicitly calling an overloaded
        destructor for different address spaces.
    2. It selects the correct destructor when multiple overloads for
        address spaces are available.
    3. It inserts the expected address space cast when invoking a
        destructor, if needed, and therefore fixes a crash due to the unmet
        assertion in llvm::CastInst::Create.

    The following is a reproducer of the three issues:

        struct MyType {
          ~MyType() {}
          ~MyType() __constant {}
        };

        __constant MyType myGlobal{};

        kernel void foo() {
          myGlobal.~MyType(); // 1 and 2.
          // 1. error: cannot initialize object parameter of type
          //    '__generic MyType' with an expression of type '__constant MyType'
          // 2. error: no matching member function for call to '~MyType'
        }

        kernel void bar() {
          // 3. The implicit call to the destructor crashes due to:
          //    Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed.
          //    in llvm::CastInst::Create.
          MyType myLocal;
        }

    The added test depends on D62413 and covers a few more things than the
    above reproducer.

    Subscribers: yaxunl, Anastasia, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64569 (detail/ViewSVN)
    by mantognini
  108. [OpenCL] Update comments/diagnostics to refer to C++ for OpenCL

    Clang doesn't implement OpenCL C++, change the comments to
    reflect that.

    Differential Revision: https://reviews.llvm.org/D64867 (detail/ViewSVN)
    by stulova
  109. [clangd] Added highlightings for template parameters and specializations.

    Summary: Template parameters and specializations were not being highlighted before. This adds highlightings to those types of tokens by adding two Visit* methods.

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64855 (detail/ViewSVN)
    by jvikstrom
  110. [SCEV] add no wrap flag for SCEVAddExpr.
    Differential Revision: https://reviews.llvm.org/D64868 (detail/ViewSVN)
    by shchenz
  111. [lld] Fix vs-diagnostics-version-script test. NFC.

    Removed unnecessary llvm-mc call. (detail/ViewSVN)
    by chrisj
  112. [OpenCL][PR42033] Fix addr space deduction with template parameters

    If dependent types appear in pointers or references we allow addr
    space deduction because the addr space in template argument will
    belong to the pointee and not the pointer or reference itself.

    We also don't diagnose addr space on a function return type after
    template instantiation. If any addr space for the return type was
    provided on a template parameter this will be diagnosed during the
    parsing of template definition.

    Differential Revision: https://reviews.llvm.org/D62584 (detail/ViewSVN)
    by stulova
  113. Fixup r366333 (require x86 in test)

    Seems to be required for the other added tests too. (detail/ViewSVN)
    by rovka
  114. Fix asan infinite loop on undefined symbol

    Fix llvm#39641

    Differential Revision: https://reviews.llvm.org/D63877 (detail/ViewSVN)
    by serge_sans_paille
  115. [RISCV] Reset NoPHIS MachineFunctionProperty in emitSelectPseudo

    We insered PHIS were there were none before, so the property must be
    reset. This error was found on an EXPENSIVE_CHECKS build. (detail/ViewSVN)
    by asb
  116. [LoopInfo] Use early return in branch weight update functions. NFC. (detail/ViewSVN)
    by skatkov
  117. [RISCV][DebugInfo] Fix dwarf-riscv-relocs.ll test on Windows

    Windows sees DW_AT_decl_file (".\dwarf-riscv-relocs.c") while Linux sees
    DW_AT_decl_file ("./dwarf-riscv-relocs.c").

    This fixes a failure introduced in rL366402. (detail/ViewSVN)
    by asb
  118. [CodeComplete] Fix ASTUnit cached completion of macros from preamble, broken in r342528

    Summary:
    The problem is the default LoadExternal with no completer, which happens when
    loading global results.

    Reviewers: ilya-biryukov, nik

    Subscribers: arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64864 (detail/ViewSVN)
    by sammccall
  119. clang-tidy release notes: Split and order changes by type

    Patch by Eugene Zelenko! (detail/ViewSVN)
    by hans
  120. [NFC][PowerPC] Add the test to test the pass block-placement (detail/ViewSVN)
    by zhangkang
  121. [PowerPC][Clang] Remove use of malloc in mm_malloc

    Remove dependency of malloc in implementation of mm_malloc function in PowerPC
    intrinsics and alignment assumption on glibc.

    Reviewed By: Hal Finkel

    Differential Revision: https://reviews.llvm.org/D64850 (detail/ViewSVN)
    by chaofan
  122. [X86] Disable combineConcatVectors for vXi1 vectors.

    I'm not convinced the code this calls is properly vetted for
    vXi1 vectors. Experimental vector widening legalization testing
    for D55251 is now hitting an assertion failure inside
    EltsFromConsecutiveLoads. This is occurring from a v2i1 load
    having a store size different than its VT size. Hopefully
    this commit will keep such issues from happening. (detail/ViewSVN)
    by ctopper
  123. Fix typo in programmer's manual cantFile -> cantFail (detail/ViewSVN)
    by lanza
  124. [DWARF][RISCV] Add support for RISC-V relocations needed for debug info

    When code relaxation is enabled many RISC-V fixups are not resolved but
    instead relocations are emitted. This happens even for DWARF debug
    sections. Therefore, to properly support the parsing of DWARF debug info
    we need to be able to resolve RISC-V relocations. This patch adds:

    * Support for RISC-V relocations in RelocationResolver
    * DWARF support for two relocations per object file offset
    * DWARF changes to support relocations in more DIE fields

    The two relocations per offset change is needed because some RISC-V
    relocations (used for label differences) come in pairs.

    Relocations can also be emitted for DWARF fields where relocations were
    not yet evaluated. Adding relocation support for some of these fields is
    essencial. On the other hand, LLVM currently emits RISC-V relocations
    for fixups that could be safely evaluated, since they can never be
    affected by code relaxations. This patch also adds relocation support
    for the fields affected by those extraneous relocations (the DWARF unit
    entry Length, and the DWARF debug line entry TotalLength and
    PrologueLength), for testing purposes.

    Differential Revision: https://reviews.llvm.org/D62062
    Patch by Luís Marques. (detail/ViewSVN)
    by asb
  125. [ELF][test] Merge/rename some basic*.s tests

    basic64be.s is a big-endian powerpc64 test that just duplicates what
    basic-ppc64.s does. Extend basic-ppc64.s to add big-endian tests.
    Delete basic64be.s

    Rename basic32.s to basic-i386.s (detail/ViewSVN)
    by maskray
  126. [clangd] Fix Fix -Wunused-lambda-capture after r366339 (detail/ViewSVN)
    by maskray
  127. [RISCV] Re-land r366331 d RISCV to LLVM_ALL_TARGETS

    *San flagged issues should be now be addressed. (detail/ViewSVN)
    by asb
  128. [RISCV] Avoid signed integer overflow UB in RISCVMatInt::generateInstSeq

    Found by UBSan. (detail/ViewSVN)
    by asb
  129. [RISCV] Don't acccess an invalidated iterator in RISCVInstrInfo::removeBranch

    Issue found by ASan. (detail/ViewSVN)
    by asb
  130. [AArch64] Add dependency from AArch64CodeGen to TransformUtils to fix -DBUILD_SHARED_LIBS=on link error after D64173/r366361

    This fixes:

    ld.lld: error: undefined symbol: llvm::findAllocaForValue(llvm::Value*, llvm::DenseMap<llvm::Value*, llvm::Alloc aInst*, llvm::DenseMapInfo<llvm::Value*>, llvm::detail::DenseMapPair<llvm::Value*, llvm::AllocaInst*> >&)
    >>> referenced by AArch64StackTagging.cpp (detail/ViewSVN)
    by maskray
  131. [Tests] Add a test showing how we handle overaligned allocas w/ no-realign-stack

    (At the moment, we ignore the alignment requirement.) (detail/ViewSVN)
    by reames
  132. [analyzer] MallocChecker: Prevent Integer Set Library false positives

    Summary:
    Integer Set Library using retain-count based allocation which is not
    modeled in MallocChecker.

    Reviewed By: NoQ

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64680 (detail/ViewSVN)
    by charusso
  133. Changes to display code view debug info type records in hex format (detail/ViewSVN)
    by nilanjana_basu
  134. hwasan: Use C++ driver for cfi.cc test.

    It turns out that this test was only passing by accident. It was relying on
    the optimizer to remove the only reference to A's vtable by realizing that
    the CFI check will always fail. The vtable contains a reference to RTTI in
    libc++, which will be unresolved because the C driver won't link against it.

    This was found by my prototype implementation of HWASAN for globals, which
    happens to end up preserving the reference.

    Differential Revision: https://reviews.llvm.org/D64890 (detail/ViewSVN)
    by pcc
  135. Make DT a transitive dependency of LI.

    Summary:
    LoopInfoWrapperPass::verify uses DT, which means DT must be alive
    even if it has no direct users.

    Fixes a crash in expensive checks mode.

    Reviewers: pcc, leonardchan

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64896 (detail/ViewSVN)
    by eugenis
  136. [llvm-bcanalyzer] Fixed error 'Expected<T> must be checked before access or destruction'

    After rL365286 I had failing test:
      LLVM :: tools/gold/X86/v1.12/thinlto_emit_linked_objects.ll

    It was failing with the output:
    $ llvm-bcanalyzer --dump llvm/test/tools/gold/X86/v1.12/Output/thinlto_emit_linked_objects.ll.tmp3.o.thinlto.bc
    Expected<T> must be checked before access or destruction.
    Unchecked Expected<T> contained error:
    Unexpected end of file reading 0 of 0 bytesStack dump:

    Change-Id: I07e03262074ea5e0aae7a8d787d5487c87f914a2 (detail/ViewSVN)
    by dendibakh
  137. llvm-pdbdump: Fix several smaller issues with injected source compression handling

    - getCompression() used to return a PDB_SourceCompression even though
      the docs for IDiaInjectedSource are explicit about the return value
      being compiler-dependent. Return an uint32_t instead, and make the
      printing code handle unknown values better by printing "Unknown" and
      the int value instead of not printing any compression.

    - Print compressed contents as hex dump, not as string.

    - Add compression type "DotNet", which is used (at least) by csc.exe,
      the C# compiler. Also add a lengthy comment describing the stream
      contents (derived from looking at the raw hex contents long enough
      to see the GUIDs, which led me to the roslyn and mono implementations
      for handling this).

    - The native injected source dumper was dumping the contents of the
      whole data stream -- but csc.exe writes a stream that's padded with
      zero bytes to the next 512 boundary, and the dia api doesn't display
      those padding bytes. So make NativeInjectedSource::getCode() do the
      same thing.

    Differential Revision: https://reviews.llvm.org/D64879 (detail/ViewSVN)
    by nico
  138. [AMDGPU] Simplify AMDGPUInstPrinter::printRegOperand()

    Differential Revision: https://reviews.llvm.org/D64892 (detail/ViewSVN)
    by rampitec
  139. AMDGPU: Set inaccessiblememonly on sendmsg intrinsics (detail/ViewSVN)
    by arsenm
  140. [X86] Make sure we mark 128/256 MLOAD as Legal with VLX when min-legal-vector-width=256 is in effect.

    This started triggering an assertion after r364718 when we made
    these Custom under AVX2. (detail/ViewSVN)
    by ctopper
  141. gn build: Merge r366361. (detail/ViewSVN)
    by pcc
  142. hwasan: Initialize the pass only once.

    This will let us instrument globals during initialization. This required
    making the new PM pass a module pass, which should still provide access to
    analyses via the ModuleAnalysisManager.

    Differential Revision: https://reviews.llvm.org/D64843 (detail/ViewSVN)
    by pcc
  143. [NFC][ScopBuilder] Move buildSchedule and its callees to ScopBuilder or ScopHelper

    Scope of changes:
    1. Moved buildSchedule functions to ScopBuilder.
    2. Moved combineInSequence function to ScopBuilder.
    3. Moved mapToDimension function to ScopBuilder.
    4. Moved LoopStackTy to ScopBuilder.
    5. Moved getLoopSurroundingScop to ScopHelper.
    6. Moved getNumBlocksInLoop to ScopHelper.
    7. Moved getNumBlocksInRegionNode to ScopHelper.
    8. Moved getRegionNodeLoop to ScopHelper.

    Differential Revision: https://reviews.llvm.org/D64223 (detail/ViewSVN)
    by domada
  144. [AMDGPU] Stop special casing flat_scratch for register name

    Differential Revision: https://reviews.llvm.org/D64885 (detail/ViewSVN)
    by rampitec
  145. Speculative fix for stack-tagging.ll failure.

    Depending on the evaluation order of function call arguments,
    the current code may insert a use before def. (detail/ViewSVN)
    by eugenis
  146. [NFC][ScopBuilder]Move finalizeAccesses and its callees to ScopBuilder

    Scope of changes:
    1) Moved finalizeAccesses to ScopBuilder
    2) Moved updateAccessDimensionality to ScopBuilder
    3) Moved foldSizeConstantsToRight to ScopBuilder
    4) Moved foldSizeConstantsToRight to ScopBuilder
    5) Moved assumeNoOutOfBounds to ScopBuilder
    6) Moved markFortranArrays to ScopBuilder
    7) Added iterator range for AccessFunctions vector.

    Differential Revision: https://reviews.llvm.org/D63794 (detail/ViewSVN)
    by domada
  147. [Attributor][NFC] Remove unnecessary debug output (detail/ViewSVN)
    by uenoku
  148. Adding inline comments to code view type record directives for better readability (detail/ViewSVN)
    by nilanjana_basu
  149. [PEI] Don't re-allocate a pre-allocated stack protector slot

    The LocalStackSlotPass pre-allocates a stack protector and makes sure
    that it comes before the local variables on the stack.

    We need to make sure that later during PEI we don't re-allocate a new
    stack protector slot. If that happens, the new stack protector slot will
    end up being **after** the local variables that it should be protecting.

    Therefore, we would have two slots assigned for two different stack
    protectors, one at the top of the stack, and one at the bottom. Since
    PEI will overwrite the assigned slot for the stack protector, the load
    that is used to compare the value of the stack protector will use the
    slot assigned by PEI, which is wrong.

    For this, we need to check if the object is pre-allocated, and re-use
    that pre-allocated slot.

    Differential Revision: https://reviews.llvm.org/D64757 (detail/ViewSVN)
    by thegameg
  150. [CodeGen] Add stack protector tests where the guard gets re-assigned

    In preparation of a fix, add tests for multiple backends. (detail/ViewSVN)
    by thegameg
  151. [CodeGen][NFC] Simplify checks for stack protector index checking

    Use `hasStackProtectorIndex()` instead of `getStackProtectorIndex() >=
    0`. (detail/ViewSVN)
    by thegameg
  152. Renamed and changed the wording of warn_cconv_ignored

    As discussed in D64780 the wording of this warning message is being
    changed to say 'is not supported' instead of 'ignored', and the
    diag ID itself is being changed to warn_cconv_not_supported. (detail/ViewSVN)
    by ssrivastava
  153. GlobalISel: Handle widenScalar of arbitrary G_MERGE_VALUES sources

    Extract the sources to the GCD of the original size and target size,
    padding with implicit_def as necessary.

    Also fix the case where the requested source type is wider than the
    original result type. This was ignoring the type, and just using the
    destination. Do the operation in the requested type and truncate back. (detail/ViewSVN)
    by arsenm
  154. GlobalISel: Handle more cases for widenScalar of G_MERGE_VALUES

    Use an anyext to the requested type for the leftover operand to
    produce a slightly wider type, and then truncate the final merge.

    I have another implementation almost ready which handles arbitrary
    widens, but I think it produces worse code in this example (which I
    think is 90% due to not folding redundant copies or folding out
    implicit_def users), so I wanted to add this as a baseline first. (detail/ViewSVN)
    by arsenm
  155. Basic MTE stack tagging instrumentation.

    Summary:
    Use MTE intrinsics to tag stack variables in functions with
    sanitize_memtag attribute.

    Reviewers: pcc, vitalybuka, hctim, ostannard

    Subscribers: srhines, mgorny, javed.absar, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64173 (detail/ViewSVN)
    by eugenis
  156. Basic codegen for MTE stack tagging.

    Implement IR intrinsics for stack tagging. Generated code is very
    unoptimized for now.

    Two special intrinsics, llvm.aarch64.irg.sp and llvm.aarch64.tagp are
    used to implement a tagged stack frame pointer in a virtual register.

    Differential Revision: https://reviews.llvm.org/D64172 (detail/ViewSVN)
    by eugenis
  157. [libc++] XFAIL a test that does not behave properly on older Clang

    rdar://53015486 (detail/ViewSVN)
    by Louis Dionne
  158. [lld][WebAssembly] Fix handling of comdat functions in init array.

    When hidden symbols are discarded by comdat rules we still want to
    create a local defined symbol, otherwise `Symbol::isDiscarded()` relies
    on begin able to check `getChunk->discarded`.

    This is a followup on rL362769. The comdat.ll test was previously GC'ing
    the `__wasm_call_ctors` functions so `do_init` was not actually being
    included in the link.  Once that function was included in triggered the
    crash bug that this change addresses.

    Fixes: https://github.com/emscripten-core/emscripten/issues/8981

    Differential Revision: https://reviews.llvm.org/D64872 (detail/ViewSVN)
    by sbc
  159. [OPENMP]Fix PR42632: crash on the analysis of the OpenMP constructs.

    Fixed processing of the CapturedStmt children to fix the crash of the
    OpenMP constructs during analysis. (detail/ViewSVN)
    by abataev
  160. Revert [AArch64] Add support for Transactional Memory Extension (TME)

    This reverts r366322 (git commit 4b8da3a503e434ddbc08ecf66582475765f449bc) (detail/ViewSVN)
    by chill
  161. [clang-tidy] Exclude forward decls from fuchsia-multiple-inheritance

    Addresses b39770.

    Differential Revision: https://reviews.llvm.org/D64813 (detail/ViewSVN)
    by juliehockett
  162. [clang-tidy] Fix crash on end location inside macro

    Summary:
    Lexer::getLocForEndOfToken is defined to return an
    invalid location if the given location is inside a macro.
    Other checks conditionally warn based off location
    validity. Updating this check to do the same.

    Reviewers: JonasToth, aaron.ballman, nickdesaulniers

    Reviewed By: nickdesaulniers

    Subscribers: lebedev.ri, nickdesaulniers, xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64607 (detail/ViewSVN)
    by nathan-huckleberry
  163. [Docs][OpenCL] Documentation of C++ for OpenCL mode

    Added documentation of C++ for OpenCL mode into Clang
    User Manual and Language Extensions document.

    Differential Revision: https://reviews.llvm.org/D64418 (detail/ViewSVN)
    by stulova
  164. [AMDGPU] Tune inlining parameters for AMDGPU target

    Summary:
    Since the target has no significant advantage of vectorization,
    vector instructions bous threshold bonus should be optional.

    amdgpu-inline-arg-alloca-cost parameter default value and the target
    InliningThresholdMultiplier value tuned then respectively.

    Reviewers: arsenm, rampitec

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, eraman, hiraditya, haicheng, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64642 (detail/ViewSVN)
    by dfukalov
  165. [ORC] Add deprecation warnings to ORCv1 layers and utilities.

    Summary:
    ORCv1 is deprecated. The current aim is to remove it before the LLVM 10.0
    release. This patch adds deprecation attributes to the ORCv1 layers and
    utilities to warn clients of the change.

    Reviewers: dblaikie, sgraenitz, AlexDenisov

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64609 (detail/ViewSVN)
    by Lang Hames
  166. [RISCV] Revert r366331 as it exposed some sanitizer failures

    See <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/33612>. (detail/ViewSVN)
    by asb
  167. [ASan] Support `{f}puts(NULL)` on Darwin

    On Darwin, the man page states that "both fputs() and puts() print
    `(null)' if str is NULL."

    rdar://48227136

    Reviewed By: Lekensteyn

    Differential Revision: https://reviews.llvm.org/D64773 (detail/ViewSVN)
    by yln
  168. AMDGPU: Use getTargetConstant

    Avoids creating an extra intermediate mov. (detail/ViewSVN)
    by arsenm
  169. Fix MSVC 'implicitly capture' compile error. NFCI. (detail/ViewSVN)
    by rksimon
  170. [clangd] Type hierarchy: don't resolve parents if the client only asked for children

    Summary: Also reorganize the code for computing supertypes to make it more symmetric to subtypes.

    Reviewers: kadircet

    Reviewed By: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64613 (detail/ViewSVN)
    by nridge
  171. [clang-tidy] Adjust location of namespace comment diagnostic

    Summary:
    If there is no comment, place it at the closing brace of a namespace
    definition. Previously it was placed at the next character after the
    closing brace.

    The new position produces a better location for highlighting in clangd
    and does not seem to make matters worse for clang-tidy.

    Reviewers: alexfh, hokein

    Reviewed By: alexfh, hokein

    Subscribers: xazax.hun, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64861 (detail/ViewSVN)
    by ibiryukov
  172. [OPENMP]Fix crash in LoopCounterRefChecker when MemberExpr is not Var or Field

    checkDecl is only valid for VarDecls or FieldDecls, since getCanonicalDecl
    expects only these. Prevent other Decl kinds (such as CXXMethodDecls and
    EnumConstantDecls) from entering and asserting.

    Differential Revision: https://reviews.llvm.org/D64842 (detail/ViewSVN)
    by mikerice
  173. [Attributor] Deduce "willreturn" function attribute

    Summary:
    Deduce the "willreturn" attribute for functions.

    For now, intrinsics are not willreturn. More annotation will be done in another patch.

    Reviewers: jdoerfert

    Subscribers: jvesely, nhaehnle, nicholas, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63046 (detail/ViewSVN)
    by uenoku
  174. [llvm-ar][test] Add tests failing on Darwin

    These tests that failed on Darwin but passed on other machines due to the default archive format differing
    on a Darwin machine, and what looks to be bugs in the output of this format.
    I can not investigate these issue further so the tests are considered expected failures on Darwin.

    Differential Revision: https://reviews.llvm.org/D64802 (detail/ViewSVN)
    by gbreynoo
  175. [lld] Add Visual Studio compatible diagnostics

    Summary:
    Add a --vs-diagnostics flag that alters the format of diagnostic output
    to enable source hyperlinks in Visual Studio.

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

    Reviewed by: ruiu (detail/ViewSVN)
    by chrisj
  176. [ASTImporter] Fix structural eq of lambdas

    Summary:
    The structural equivalence check reported false eq between lambda classes
    with different parameters in their call signature.
    The solution is to check the methods for equality too in case of lambda
    classes.

    Reviewers: a_sidorin, a.sidorin

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64075 (detail/ViewSVN)
    by martong
  177. [RISCV] Add RISCV to LLVM_ALL_TARGETS so it s built by default

    This follows the RFC <http://lists.llvm.org/pipermail/llvm-dev/2019-July/133724.html>.

    Follow-on commits will add appropriate release notes changes etc.

    Pushing this now and in a minimal form so there is reasonable time before 9.0
    branches to resolve any issues arising from e.g. the backend being exposed on
    different sanitizer setups.

    The current builder for RISC-V is on the staging build-bot
    <http://lab.llvm.org:8014/builders/llvm-riscv-linux>, however with the RISCV
    backend being built by default it won't provide any real additional coverage.
    We will shortly set up a builder that runs the test-suite in qemu-user. (detail/ViewSVN)
    by asb
  178. [RISCV][NFC] Remove outdated TODO from test/CodeGen/RISCV/dwarf-eh.ll (detail/ViewSVN)
    by asb
  179. [AsmPrinter] Make the encoding of call sites in .gcc_except_table configurable and use for RISC-V

    The original behavior was to always emit the offsets to each call site in the
    call site table as uleb128 values, however on some architectures (eg RISCV)
    these uleb128 offsets into the code cannot always be resolved until link time
    (because relaxation will invalidate any calculated offsets), and there are no
    appropriate relocations for uleb128 values. As a consequence it needs to be
    possible to specify an alternative.

    This also switches RISCV to use DW_EH_PE_udata4 for call side encodings in
    .gcc_except_table

    Differential Revision: https://reviews.llvm.org/D63415
    Patch by Edward Jones. (detail/ViewSVN)
    by asb
  180. Mips: Remove immarg from copy and insert intrinsics

    These intrinsics do in fact work with non-constant index arguments.

    These are lowered to either the generic
    ISD::INSERT_VECTOR_ELT/ISD::EXTRACT_VECTOR_ELT, or to
    VEXTRACT_SEXT_ELT. The handling of these all accept variable
    indexes. Turning these into generic instructions which do allow
    variables introduces complications in a future change to immarg
    handling.

    Since these just turn into generic instructions, these are kind of
    pointless and should probably just be autoupgraded to
    extractelement/insertelement. (detail/ViewSVN)
    by arsenm
  181. [RISCV] Set correct encodings for DWARF exception handling

    This patch sets correct encodings for DWARF exception handling for RISC-V
    (other than call site encoding, which must be udata4 rather than uleb128 and
    is handled by D63415).

    This has the same intend as D63409, except this version matches GCC/binutils
    behaviour which uses the same encodings regardless of PIC/non-PIC and
    medlow/medany code model. (detail/ViewSVN)
    by asb
  182. [RISCV][NFC] Add tests that capture current encodings for DWARF EH

    Items which are known to be wrong/different vs GCC are marked as TODO and will
    be address in follow-up patches. (detail/ViewSVN)
    by asb
  183. [ASTImporter] Fix LLDB lookup in transparent ctx and with ext src

    Summary:
    With LLDB we use localUncachedLookup(), however, that fails to find
    Decls when a transparent context is involved and the given DC has
    external lexical storage.  The solution is to use noload_lookup, which
    works well with transparent contexts.  But, we cannot use only the
    noload_lookup since the slow case of localUncachedLookup is still needed
    in some other cases.

    These other cases are handled in ASTImporterLookupTable, but we cannot
    use that with LLDB since that traverses through the AST which initiates
    the load of external decls again via DC::decls().

    We must avoid loading external decls during the import becuase
    ExternalASTSource is implemented with ASTImporter, so external loads
    during import results in uncontrolled and faulty import.

    Reviewers: shafik, teemperor, jingham, clayborg, a_sidorin, a.sidorin

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

    Tags: #clang, #lldb

    Differential Revision: https://reviews.llvm.org/D61333 (detail/ViewSVN)
    by martong
  184. [llvm-ar][test] \r\n -> \n

    Also simplify some empty output tests with 'count 0' (detail/ViewSVN)
    by maskray
  185. [AMDGPU] Optimize atomic AND/OR/XOR

    Summary: Extend the atomic optimizer to handle AND, OR and XOR.

    Reviewers: arsenm, sheredom

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64809 (detail/ViewSVN)
    by foad
  186. [AArch64] Add support for Transactional Memory Extension (TME)

    TME is a future architecture technology, documented in

    https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools
    https://developer.arm.com/docs/ddi0601/a

    More about the future architectures:

    https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/new-technologies-for-the-arm-a-profile-architecture

    This patch adds support for the TME instructions TSTART, TTEST, TCOMMIT, and
    TCANCEL and the target feature/arch extension "tme".

    It also implements TME builtin functions, defined in ACLE Q2 2019
    (https://developer.arm.com/docs/101028/latest)

    Patch by Javed Absar and Momchil Velikov

    Differential Revision: https://reviews.llvm.org/D64416 (detail/ViewSVN)
    by chill
  187. [clangd] Force the required interpretation of #import on windows tests.

    Summary: NFC but should fix a bunch of tests.

    Reviewers: kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64857 (detail/ViewSVN)
    by sammccall
  188. [clangd] Handle windows line endings in QueryDriver

    Summary: fixes second case of https://github.com/clangd/clangd/issues/93

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64789 (detail/ViewSVN)
    by kadircet
  189. PowerPC: Fix register spilling for SPE registers

    Summary:
    Missed in the original commit, use the correct callee-saved register
    list for spilling, instead of the standard SVR432 list.  This avoids
    needlessly spilling the SPE non-volatile registers when they're not used.

    As part of this, also add where missing, and sort, the spill opcode
    checks for SPE and SPE4 register classes.

    Reviewers: nemanjai, hfinkel, joerg

    Subscribers: kbarton, jsji, llvm-commits

    Differential Revision: https://reviews.llvm.org/D56703 (detail/ViewSVN)
    by jhibbits
  190. PowerPC/SPE: Fix load/store handling for SPE

    Summary:
    Pointed out in a comment for D49754, register spilling will currently
    spill SPE registers at almost any offset.  However, the instructions
    `evstdd` and `evldd` require a) 8-byte alignment, and b) a limit of 256
    (unsigned) bytes from the base register, as the offset must fix into a
    5-bit offset, which ranges from 0-31 (indexed in double-words).

    The update to the register spill test is taken partially from the test
    case shown in D49754.

    Additionally, pointed out by Kei Thomsen, globals will currently use
    evldd/evstdd, though the offset isn't known at compile time, so may
    exceed the 8-bit (unsigned) offset permitted.  This fixes that as well,
    by forcing it to always use evlddx/evstddx when accessing globals.

    Part of the patch contributed by Kei Thomsen.

    Reviewers: nemanjai, hfinkel, joerg

    Subscribers: kbarton, jsji, llvm-commits

    Differential Revision: https://reviews.llvm.org/D54409 (detail/ViewSVN)
    by jhibbits
  191. [MIPS GlobalISel] ClampScalar and select pointer G_ICMP

    Add narrowScalar to half of original size for G_ICMP.
    ClampScalar G_ICMP's operands 2 and 3 to to s32.
    Select G_ICMP for pointers for MIPS32. Pointer compare is same
    as for integers, it is enough to declare them as legal type.

    Differential Revision: https://reviews.llvm.org/D64856 (detail/ViewSVN)
    by petar.avramovic
  192. [AArch64] Consistent types and naming for AArch64 target features (NFC)

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

    Committed as obvious. (detail/ViewSVN)
    by chill
  193. AMDGPU/GFX10: Apply the VMEM-to-scalar-write hazard also to writes to EXEC

    Summary: Change-Id: I854fbf7d48e937bef9f8f3f5d0c8aeb970652630

    Reviewers: rampitec, mareko

    Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

    Tags: #llvm

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

    Change-Id: I4405b3a7f84186acea5a78d291bff71056e745fc (detail/ViewSVN)
    by nha
  194. AMDGPU: Improve alias analysis for GDS

    Summary: GDS cannot alias anything else.

    Original patch by: Marek Olšák

    Reviewers: arsenm, mareko

    Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, Petar.Avramovic, llvm-commits

    Tags: #llvm

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

    Change-Id: I07bfbd96f5d5c37a6dfba7997df12f291dd794b0 (detail/ViewSVN)
    by nha
  195. [TableGen] Do not set ReadNone attribute on intrinsics with side effects

    If an intrinsic is defined without outputs, but having side effects,
    it still can be removed completely from the program. This patch makes
    TableGen not set Attribute::ReadNone for intrinsics which
    are declared with IntrHasSideEffects.

    Differential Revision: https://reviews.llvm.org/D64414 (detail/ViewSVN)
    by chill
  196. [clangd] Fix error message in tweaktests to be useful. NFC (detail/ViewSVN)
    by sammccall
  197. [llvm-ar][test] Add coverage for replace and update key letters

    Some more tests to increase llvm-ar test coverage, this time for replace 'r' and update 'u'.

    Differential Revision: https://reviews.llvm.org/D64803 (detail/ViewSVN)
    by gbreynoo
  198. [ARM GlobalISel] Cleanup CallLowering. NFC

    Migrate CallLowering::lowerReturnVal to use the same infrastructure as
    lowerCall/FormalArguments and remove the now obsolete code path from
    splitToValueTypes.

    Forgot to push this earlier. (detail/ViewSVN)
    by rovka
  199. [ELF] Delete redundant pageAlign at PT_GNU_RELRO boundaries after D58892

    Summary:
    After D58892 split the RW PT_LOAD on the PT_GNU_RELRO boundary, the new
    layout is:

    PT_LOAD(PT_GNU_RELRO(.data.rel.ro .bss.rel.ro)) PT_LOAD(.data. .bss)

    The two pageAlign() calls at PT_GNU_RELRO boundaries are redundant due
    to the existence of PT_LOAD.

    Reviewers: grimar, peter.smith, ruiu, espindola

    Reviewed By: ruiu

    Subscribers: sfertile, atanasyan, emaste, arichardson, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64854 (detail/ViewSVN)
    by maskray
  200. [OpenCL][Sema] Minor refactoring and constraint checking

    Summary:
    Simplify code a bit and add assertion to address post-landing comments
    from D64083.

    Subscribers: yaxunl, Anastasia, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64804 (detail/ViewSVN)
    by mantognini
  201. [Driver] Enable __cxa_atexit on Solaris

    Starting with Solaris 11.4 (which is now the required minimal version), Solaris does
    support __cxa_atexit.  This patch reflects that.

    One might consider removing the affected tests altogether instead of inverting them,
    as is done on other targets.

    Besides, this lets two ASan tests PASS:

      AddressSanitizer-i386-sunos :: TestCases/init-order-atexit.cc
      AddressSanitizer-i386-sunos-dynamic :: TestCases/init-order-atexit.cc

    Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D64491 (detail/ViewSVN)
    by ro
  202. Replace CRLF with LF. (detail/ViewSVN)
    by ruiu
  203. [mips] Remove redundant test case. NFC

    The `inlineasm-constraint-reg64.ll` test checks the same functionality. (detail/ViewSVN)
    by atanasyan
  204. [mips] Name inline asm constraint test cases in a uniform manner. NFC (detail/ViewSVN)
    by atanasyan
  205. [mips] Use mult/mflo pattern on 64-bit targets prior to MIPS64

    The `MUL` instruction is available starting from the MIPS32/MIPS64 targets. (detail/ViewSVN)
    by atanasyan
  206. [mips] Implement .cplocal directive

    This directive forces to use the alternate register for context pointer.
    For example, this code:
      .cplocal $4
      jal foo
    expands to:
      ld    $25, %call16(foo)($4)
      jalr  $25

    Differential Revision: https://reviews.llvm.org/D64743 (detail/ViewSVN)
    by atanasyan
  207. [mips] Support the "o" inline asm constraint

    As well as other LLVM targets we do not handle "offsettable"
    memory addresses in any special way. In other words, the "o" constraint
    is an exact equivalent of the "m" one. But some existing code require
    the "o" constraint support.

    This fixes PR42589.

    Differential Revision: https://reviews.llvm.org/D64792 (detail/ViewSVN)
    by atanasyan
  208. [LoopInfo] Fix getUniqueNonLatchExitBlocks

    It is possible that exit block has two predecessors and one of them is a latch
    block while another is not.

    Current algorithm is based on the assumption that all exits are dedicated
    and therefore we can check only first predecessor of loop exit to find all unique
    exits.

    However if we do not consider latch block and it is first predecessor of some
    exit then this exit will be found.

    Regression test is added.

    As a side effect of algorithm re-writing, the restriction that all exits are dedicated
    is eliminated.

    Reviewers: reames, fhahn, efriedma
    Reviewed By: efriedma
    Subscribers: llvm-commits
    Differential Revision: https://reviews.llvm.org/D64787 (detail/ViewSVN)
    by skatkov
  209. Update email address. (detail/ViewSVN)
    by chaofan
  210. Fix more -Werror issues with obsequi. (detail/ViewSVN)
    by aemerson
  211. gn build: Merge r366265 (detail/ViewSVN)
    by nico
  212. gn build: Merge r366216 (detail/ViewSVN)
    by nico
  213. Obsequi: fix implicit declaration of a function, breaks -Werror builds. (detail/ViewSVN)
    by aemerson
  214. AMDGPU: Add some missing builtins (detail/ViewSVN)
    by arsenm
  215. Fix OpenCLCXX test on 32-bit Windows where thiscall is present (detail/ViewSVN)
    by rnk
  216. [AMDGPU] Autogenerate register asm names

    Differential Revision: https://reviews.llvm.org/D64839 (detail/ViewSVN)
    by rampitec
  217. Fix darwin-ld.c if dsymutil.exe exists on PATH (detail/ViewSVN)
    by rnk
  218. ARM: Fix missing immarg for space intrinsic (detail/ViewSVN)
    by arsenm
  219. GlobalISel: Add overload of handleAssignments with CCState

    AMDGPU needs to allocate special argument registers separately from
    the user function argument list, so needs direct control over the
    CCState.

    The ArgLocs argument is only really necessary because CCState doesn't
    allow access to it. (detail/ViewSVN)
    by arsenm
  220. [TableGen] Generate offsets into a flat array for getOperandType

    Rather than an array of std::initializer_list, generate a table of
    offsets and a flat array of the operands for getOperandType. This is a
    bit more efficient on platforms that don't manage to get the array of
    inintializer_lists initialized at link time (I'm looking at you
    macOS). It's also quite quite a bit faster to compile. (detail/ViewSVN)
    by Justin Bogner
  221. Enable the obsequi application for Darwin. It seems to run with no issues. (detail/ViewSVN)
    by aemerson
  222. Fix a typo in target features

    There was a slight typo in r364352 that ended up causing our backend to
    complain on some x86 Android builds. This CL fixes that.

    Differential Revision: https://reviews.llvm.org/D64781 (detail/ViewSVN)
    by George Burgess IV
  223. [WebAssembly] Compile all TLS on Emscripten as local-exec

    Summary:
    Currently, on Emscripten, dynamic linking is not supported with threads.
    This means that if thread-local storage is used, it must be used in a
    statically-linked executable. Hence, local-exec is the only possible model.

    This diff compiles all TLS variables to use local-exec on Emscripten as a
    temporary measure until dynamic linking is supported with threads.

    The goal for this is to allow C++ types with constructors to be thread-local.

    Currently, when `clang` compiles a `thread_local` variable with a constructor,
    it generates `__tls_guard` variable:

        @__tls_guard = internal thread_local global i8 0, align 1

    As no TLS model is specified, this is treated as general-dynamic, which we do
    not support (and cannot support without implementing dynamic linking support
    with threads in Emscripten). As a result, any C++ constructor in `thread_local`
    variables would not compile.

    By compiling all `thread_local` as local-exec, `__tls_guard` will compile and
    we can support C++ constructors with TLS without implementing dynamic linking
    with threads.

    Depends on D64537

    Reviewers: tlively, aheejin, sbc100

    Reviewed By: aheejin

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64776 (detail/ViewSVN)
    by quantum
  224. [TableGen] Add "getOperandType" to get operand types from opcode/opidx

    The InstrInfoEmitter outputs an enum called "OperandType" which gives
    numerical IDs to each operand type. This patch makes use of this enum
    to define a function called "getOperandType", which allows looking up
    the type of an operand given its opcode and operand index.

    Patch by Nicolas Guillemot. Thanks!

    Differential Revision: https://reviews.llvm.org/D63320 (detail/ViewSVN)
    by Justin Bogner
  225. Add REQUIRES: x86 to safeseh-no.s test for x86 (detail/ViewSVN)
    by rnk
  226. [WebAssembly] Implement thread-local storage (local-exec model)

    Summary:
    Thread local variables are placed inside a `.tdata` segment. Their symbols are
    offsets from the start of the segment. The address of a thread local variable
    is computed as `__tls_base` + the offset from the start of the segment.

    `.tdata` segment is a passive segment and `memory.init` is used once per thread
    to initialize the thread local storage.

    `__tls_base` is a wasm global. Since each thread has its own wasm instance,
    it is effectively thread local. Currently, `__tls_base` must be initialized
    at thread startup, and so cannot be used with dynamic libraries.

    `__tls_base` is to be initialized with a new linker-synthesized function,
    `__wasm_init_tls`, which takes as an argument a block of memory to use as the
    storage for thread locals. It then initializes the block of memory and sets
    `__tls_base`. As `__wasm_init_tls` will handle the memory initialization,
    the memory does not have to be zeroed.

    To help allocating memory for thread-local storage, a new compiler intrinsic
    is introduced: `__builtin_wasm_tls_size()`. This instrinsic function returns
    the size of the thread-local storage for the current function.

    The expected usage is to run something like the following upon thread startup:

        __wasm_init_tls(malloc(__builtin_wasm_tls_size()));

    Reviewers: tlively, aheejin, kripken, sbc100

    Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, jfb, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64537 (detail/ViewSVN)
    by quantum
  227. AMDGPU: Partially revert r366250

    GCCBuiltin doesn't work for these, because they have a mangled type
    (although they arguably should not). (detail/ViewSVN)
    by arsenm
  228. [ORC][docs] Fix an RST error: the code-block directive needs a newline after it. (detail/ViewSVN)
    by Lang Hames
  229. [ORC][docs] Trim ORCv1 to ORCv2 transition section, add a how-to section. (detail/ViewSVN)
    by Lang Hames
  230. [x86] use more phadd for reductions

    This is part of what is requested by PR42023:
    https://bugs.llvm.org/show_bug.cgi?id=42023

    There's an extension needed for FP add, but exactly how we would specify
    that using flags is not clear to me, so I left that as a TODO.
    We're still missing patterns for partial reductions when the input vector
    is 256-bit or 512-bit, but I think that's a failure of vector narrowing.
    If we can reduce the widths, then this matching should work on those tests.

    Differential Revision: https://reviews.llvm.org/D64760 (detail/ViewSVN)
    by spatel
  231. [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

    Summary:
    Previously, clang-format detected something like the following as a C++11 attribute specifier.

      @[[NSArray class]]

    instead of an array with an Objective-C method call inside. In general, when the attribute specifier checking runs, if it sees 2 identifiers in a row, it decides that the square brackets represent an Objective-C method call. However, here, `class` is tokenized as a keyword instead of an identifier, so this check fails.

    To fix this, the attribute specifier first checks whether the first square bracket has an "@" before it. If it does, then that square bracket is not the start of a attribute specifier because it is an Objective-C array literal. (The assumption is that @[[.*]] is not valid C/C++.)

    Contributed by rkgibson2.

    Reviewers: benhamilton

    Reviewed By: benhamilton

    Subscribers: aaron.ballman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64632 (detail/ViewSVN)
    by benhamilton
  232. [NFC][ScopBuilder] Move addUserContext to ScopBuilder

    Scope of changes:
    1) Moved addUserContext to ScopBuilder.
    2) Moved command line option UserContextStr to ScopBuilder.

    Differential Revision: https://reviews.llvm.org/D63740 (detail/ViewSVN)
    by domada
  233. [clang-tidy] initial version of readability-convert-member-functions-to-static

    Summary:
    Finds non-static member functions that can be made ``static``.

    I have run this check (repeatedly) over llvm-project. It made 1708 member functions
    ``static``. Out of those, I had to exclude 22 via ``NOLINT`` because their address
    was taken and stored in a variable of pointer-to-member type (e.g. passed to
    llvm::StringSwitch).
    It also made 243 member functions ``const``. (This is currently very conservative
    to have no false-positives and can hopefully be extended in the future.)

    You can find the results here: https://github.com/mgehre/llvm-project/commits/static_const_eval

    Reviewers: alexfh, aaron.ballman

    Subscribers: mgorny, xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D61749 (detail/ViewSVN)
    by mgehre
  234. DWARF: Skip zero column for inline call sites

    D64033 <https://reviews.llvm.org/D64033> added DW_AT_call_column for
    inline sites. However, that change wasn't aware of "-gno-column-info".
    To avoid adding column info when "-gno-column-info" is used, now
    DW_AT_call_column is only added when we have non-zero column (when
    "-gno-column-info" is used, column will be zero).

    Patch by Wenlei He!

    Differential Revision: https://reviews.llvm.org/D64784 (detail/ViewSVN)
    by dblaikie
  235. [libcxx] Rejigger test for destroying delete feature-test macros

    In r361572, we introduced library support for C++20 destroying delete
    and decided to only define the library feature-test macro when the
    compiler supports the underlying language feature. This patch reworks
    the tests to mirror that. (detail/ViewSVN)
    by Louis Dionne
  236. [NFC][ScopBuilder] Move buildAliasChecks and its implementing methods to ScopBuilder

    Scope of changes:
    1) Moved buildAliasChecks to ScopBuilder.
    2) Moved buildAliasGroup to ScopBuilder.
    3) Moved buildAliasGroups to ScopBuilder.
    4) Moved buildAliasGroupsForAccesses to ScopBuilder.
    5) Moved splitAliasGroupsByDomain to ScopBuilder.
    6) Moved addNonEmptyDomainConstraints to ScopBuilder.
    7) Moved buildMinMaxAccess to ScopBuilder.
    8) Moved calculateMinMaxAccess to ScopBuilder.
    9) Moved getAccessDomain to ScopBuilder.
    10) Moved command line options used only by buildAliasChecks functions to ScopBuilder.
    11) Refactored buildAliasGroup function. Added addAliasGroup function to Scop class for pushing back calculated min/max accesses.
    12) Added function incrementNumberOfAliasingAssumptions which increments number of statistic variable AssumptionsAliasing. AssumptionsAliasing variable is defined by STATISTIC macro inside ScopInfo.cpp and it is also used by function trackAssumption from Scop class.
    13) Added reference to OptimizationRemarkEmitter to ScopBuilder class.
    14) Moved calculateMinMaxAccess function to ScopBuilder class.

    Differential Revision: https://reviews.llvm.org/D63693 (detail/ViewSVN)
    by domada
  237. [NFC][ScopBuilder] Move addRecordedAssumption to ScopBuilder

    Scope of changes:
    1) Moved addRecordedAssumptions to ScopBuilder.
    2) Moved Assumption struct outside Scop class.
    3) Refactored addRecordedAssumptions function. Replaced while loop by
    for range loop.
    4) Added function to clear processed Assumptions.

    Differential Revision: https://reviews.llvm.org/D63572 (detail/ViewSVN)
    by domada
  238. [libc++] Add missing UNSUPPORTED for CTAD tests

    The tests for unordered_set and unordered_multiset were missing UNSUPPORTED
    markup for Apple Clang 9.1, which is still being used on some CI bots. (detail/ViewSVN)
    by Louis Dionne
  239. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.6

    Cleanup ARM64 assembly after removing unnecessary computation of mangled
    stack pointer in previous commit. (detail/ViewSVN)
    by yln
  240. AMDGPU/GlobalISel: Select G_ASHR (detail/ViewSVN)
    by arsenm
  241. AMDGPU/GlobalISel: Select G_LSHR (detail/ViewSVN)
    by arsenm
  242. [PowerPC][HTM] Fix impossible reg-to-reg copy assert with ttest builtin

    Summary:
    This is exposed by our internal testing.
    The reduced testcase will assert with "Impossible reg-to-reg copy"

    We can't use COPY to do 32-bit to 64-bit conversion.

    Reviewers: kbarton, hfinkel, nemanjai

    Reviewed By: hfinkel

    Subscribers: hiraditya, MaskRay, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64499 (detail/ViewSVN)
    by jsji
  243. AMDGPU/GlobalISel: Select G_SHL

    I think this manages to not break the DAG handling with the divergent
    predicates because the stadalone divergent patterns end up with a
    higher priority than the pattern on the instruction definition.

    The 16-bit versions don't work yet. (detail/ViewSVN)
    by arsenm
  244. [GWP-ASan] Add thread ID to PRNG seed.

    Summary:
    Adds thread ID to PRNG seed for increased entropy. In particular, this allows
    multiple runs in quick succession that will have different PRNG seeds, allowing
    for better demos/testing.

    Reviewers: kcc

    Reviewed By: kcc

    Subscribers: kubamracek, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D64453 (detail/ViewSVN)
    by hctim
  245. [AMDGPU] Change register type for v32 vectors

    When it is AReg_1024 this results in unnecessary copying into
    AGPRs of a 32 element vectors even though they are not intended
    for an mfma instruction.

    Differential Revision: https://reviews.llvm.org/D64815 (detail/ViewSVN)
    by rampitec
  246. Fix -Wreturn-type warning. NFC. (detail/ViewSVN)
    by hliao
  247. AMDGPU: Fix some missing GCCBuiltin declarations (detail/ViewSVN)
    by arsenm
  248. AMDGPU/GlobalISel: Fix selection of private stores (detail/ViewSVN)
    by arsenm
  249. AMDGPU/GlobalISel: Select private loads (detail/ViewSVN)
    by arsenm
  250. AMDGPU/GlobalISel: Select flat stores (detail/ViewSVN)
    by arsenm
  251. Mark new test as requiring an x86 backend for LTO native object generation (detail/ViewSVN)
    by rnk
  252. Fix linkrepro.test after safeseh:no change

    Add the @feat.00 flag to the input. (detail/ViewSVN)
    by rnk
  253. AMDGPU: Add register classes to flat store patterns

    For some reason GlobalISelEmitter needs register classes to import
    these, although it works for the load patterns. (detail/ViewSVN)
    by arsenm
  254. [IndVars] Speculative fix for an assertion failure seen in bots

    I don't have an IR sample which is actually failing, but the issue described in the comment is theoretically possible, and should be guarded against even if there's a different root cause for the bot failures. (detail/ViewSVN)
    by reames
  255. AMDGPU: Replace store PatFrags

    Convert the easy cases to formats understood for GlobalISel. (detail/ViewSVN)
    by arsenm
  256. [COFF] Implement /safeseh:no and check @feat.00 flags by default

    Summary:
    Fixes PR41828. Before this, LLD always emitted SafeSEH chunks and
    defined __safe_se_handler_table & size. Now, /safeseh:no leaves those
    undefined.

    Additionally, we were checking for the safeseh @feat.00 flag in two
    places: once to emit errors, and once during safeseh table construction.
    The error was set up to be off by default, but safeseh is supposed to be
    on by default. I combined the two checks, so now LLD emits an error if
    an input object lacks @feat.00 and safeseh is enabled. This caused the
    majority of 32-bit LLD tests to fail, since many test input object files
    lack @feat.00 symbols. I explicitly added -safeseh:no to those tests to
    preserve behavior.

    Finally, LLD no longer sets IMAGE_DLL_CHARACTERISTICS_NO_SEH if any
    input file wasn't compiled for safeseh.

    Reviewers: mstorsjo, ruiu, thakis

    Reviewed By: ruiu, thakis

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63570 (detail/ViewSVN)
    by rnk
  257. AMDGPU/GlobalISel: Select flat loads

    Now that the patterns use the new PatFrag address space support, the
    only blocker to importing most load patterns is the addressing mode
    complex patterns. (detail/ViewSVN)
    by arsenm
  258. Teach `llvm-pdbutil pretty -native` about `-injected-sources`

    `pretty -native -injected-sources -injected-source-content` works with
    this patch, and produces identical output to the dia version.

    Differential Revision: https://reviews.llvm.org/D64428 (detail/ViewSVN)
    by nico
  259. [AMDGPU] Optimize atomic max/min

    Summary:
    Extend the atomic optimizer to handle signed and unsigned max and min
    operations, as well as add and subtract.

    Reviewers: arsenm, sheredom, critson, rampitec

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64328 (detail/ViewSVN)
    by foad
  260. AMDGPU: Redefine load PatFrags

    Rewrite PatFrags using the new PatFrag address space matching in
    tablegen. These will now work with both SelectionDAG and GlobalISel. (detail/ViewSVN)
    by arsenm
  261. fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic

    The original commit is r366076. It is temporarily reverted (r366155)
    due to test failure. This resubmit makes test more robust by accepting
    regex instead of hardcoded names/references in several places.

    This is a followup patch for https://reviews.llvm.org/D61809.
    Handle unnamed bitfield properly and add more test cases.

    Fixed the unnamed bitfield issue. The unnamed bitfield is ignored
    by debug info, so we need to ignore such a struct/union member
    when we try to get the member index in the debug info.

    D61809 contains two test cases but not enough as it does
    not checking generated IRs in the fine grain level, and also
    it does not have semantics checking tests.
    This patch added unit tests for both code gen and semantics checking for
    the new intrinsic.

    Signed-off-by: Yonghong Song <yhs@fb.com> (detail/ViewSVN)
    by yhs
  262. AMDGPU: Fix missing immarg for mfma intrinsics (detail/ViewSVN)
    by arsenm
  263. Removed -mno-omit-leaf-frame-pointer from flags.

    Removes -mno-omit-leaf-frame-pointer from Scudo and GWP-ASan's CFlags. Attempt to fix
    the sanitizer buildbots. (detail/ViewSVN)
    by hctim
  264. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.10

    Remove now-unused assembly code for determining xor key on
    Linux/AArch64. This is the final commit of this refactoring. (detail/ViewSVN)
    by yln
  265. [AMDGPU] Add the adjusted FP as a livein register.

    Reviewers: arsenm, rampitec

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64145 (detail/ViewSVN)
    by hliao
  266. [Strict FP] Allow more relaxed scheduling

    Reimplement scheduling constraints for strict FP instructions in
    ScheduleDAGInstrs::buildSchedGraph to allow for more relaxed
    scheduling.  Specifially, allow one strict FP instruction to
    be scheduled across another, as long as it is not moved across
    any global barrier.

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

    Reviewed By: cameron.mcinally (detail/ViewSVN)
    by uweigand
  267. Revert [tools] [llvm-nm] Default to reading from stdin not a.out

    This reverts r365889 (git commit 60c81354b1d3fced1bd284d334f118d2d792ab4b) (detail/ViewSVN)
    by abrachet
  268. Add missing test for r366215 (detail/ViewSVN)
    by aemerson
  269. [Remarks] Simplify and refactor the RemarkParser interface

    Before, everything was based on some kind of type erased parser
    implementation which container a lot of boilerplate code when multiple
    formats were to be supported.

    This simplifies it by:

    * the remark now owns its arguments
    * *always* returning an error from the implementation side
    * working around the way the YAML parser reports errors: catch them through
    callbacks and re-insert them in a proper llvm::Error
    * add a CParser wrapper that is used when implementing the C API to
    avoid cluttering the C++ API with useless state
    * LLVMRemarkParserGetNext now returns an object that needs to be
    released to avoid leaking resources
    * add a new API to dispose of a remark entry: LLVMRemarkEntryDispose (detail/ViewSVN)
    by thegameg
  270. [Remarks][NFC] Combine ParserFormat and SerializerFormat

    It's useless to have both. (detail/ViewSVN)
    by thegameg
  271. [ADCE] Fix non-deterministic behaviour due to iterating over a pointer set.

    Original patch by Yann Laigle-Chapuy

    Differential Revision: https://reviews.llvm.org/D64785 (detail/ViewSVN)
    by aemerson
  272. [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry.

    Summary:
    As per title. DAGCombiner only mathes the special case where b = 0, this patches extends the pattern to match any value of b.

    Depends on D57302

    Reviewers: hfinkel, RKSimon, craig.topper

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D59208 (detail/ViewSVN)
    by deadalnix
  273. [OpenCL] Fixing sampler initialisations for C++ mode.

    Allow conversions between integer and sampler type.

    Differential Revision: https://reviews.llvm.org/D64791 (detail/ViewSVN)
    by neil.hickey
  274. [OPENMP]Add support for analysis of if clauses.

    Summary:
    Added support for analysis of if clauses in the OpenMP directives to be
    able to check for the use of uninitialized variables.

    Reviewers: NoQ

    Subscribers: guansong, jfb, jdoerfert, caomhin, kkwli0, cfe-commits

    Tags: clang

    Differential Revision: https://reviews.llvm.org/D64646 (detail/ViewSVN)
    by abataev
  275. AMDGPU/GlobalISel: Fix test failures in release build

    Apparently the check for legal instructions during instruction
    select does not happen without an asserts build, so these would
    successfully select in release, and fail in debug.

    Make s16 and/or/xor legal. These can just be selected directly
    to the 32-bit operation, as is already done in SelectionDAG, so just
    make them legal. (detail/ViewSVN)
    by arsenm
  276. [llvm-ar][test] Add to llvm-ar test coverage

    This change adds tests to cover existing llvm-ar functionality.
    print.test is omitted due to failing on Darwin.

    Differential Revision: https://reviews.llvm.org/D64330 (detail/ViewSVN)
    by gbreynoo
  277. [clangd] Added highlighting for the targets in typedefs and using.

    Summary:
    In `typedef int A` the `A` was not highlighted previously.

    This patch gives `A` the same kind of highlighting that the underlying type has (class/enum) (which in this example is no special highlighting because builtins are not handled yet)
    Will add highlightings for built ins in another patch.

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64754 (detail/ViewSVN)
    by jvikstrom
  278. Reapply [llvm-ar][test] Increase llvm-ar test coverage

    This reapplies 365316 without extract.test due to failing on Darwin.

    Differential Revision: https://reviews.llvm.org/D63935 (detail/ViewSVN)
    by gbreynoo
  279. remove a duplicate declaration (detail/ViewSVN)
    by sylvestre
  280. Document the LLVM_ENABLE_BINDINGS option (detail/ViewSVN)
    by sylvestre
  281. [Object/llvm-readelf/llvm-readobj] - Improve error reporting when e_shstrndx is broken.

    When e_shstrndx is broken, it is impossible to get a section name.
    In this patch I improved the error message we show and
    added tests for Object and for llvm-readelf/llvm-readobj

    Message was changed in two places:
    1) llvm-readelf/llvm-readobj previously used a code from Object/ELF.h,
    now they have a modified version of it (it has less checks and allows
    dumping broken things).
    2) Code in Object/ELF.h is still used for generic cases.

    Differential revision: https://reviews.llvm.org/D64714 (detail/ViewSVN)
    by grimar
  282. [Driver] Don't pass --dynamic-linker to ld on Solaris

    I noticed that clang currently passes --dynamic-linker to ld.  This has been the case
    since Solaris 11 support was added initially back in 2012 by David Chisnall (r150580).
    I couldn't find any patch submission, let alone a justification, for this, and it seems
    completely useless: --dynamic-linker is a gld compatibility form of the option, the
    native option being -I.  First of all, however, the dynamic linker passed is simply the
    default, so there's no reason at all to specify it in the first place.

    This patch removes passing the option and adjusts the affected testcase accordingly.

    Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D64493 (detail/ViewSVN)
    by ro
  283. Reapply [llvm-ar][test] Add to MRI test coverage

    This reapplies 363232 without mri-utf8.test due to failing on Darwin.

    Differential Revision: https://reviews.llvm.org/D63197 (detail/ViewSVN)
    by gbreynoo
  284. [SemaTemplate] Fix uncorrected typos after pack expansion

    Summary:
    This case is particularly important for clangd, as it is triggered after
    inserting the snippet for variadic functions.

    Reviewers: kadircet, ilya-biryukov

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64677 (detail/ViewSVN)
    by sammccall
  285. [clangd] Don't rebuild background index until we indexed one TU per thread.

    Summary:
    This increases the odds that the boosted file (cpp file matching header)
    will be ready. (It always enqueues first, so it'll be present unless
    another thread indexes *two* files before the first thread indexes one.)

    Reviewers: kadircet

    Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64682 (detail/ViewSVN)
    by sammccall
  286. Remove username from git-llvm script, erroneously added in 366197 (detail/ViewSVN)
    by sammccall
  287. [AArch64] Implement __jcvt intrinsic from Armv8.3-A

    The jcvt intrinsic defined in ACLE [1] is available when ARM_FEATURE_JCVT is defined.

    This change introduces the AArch64 intrinsic, wires it up to the instruction and a new clang builtin function.
    The __ARM_FEATURE_JCVT macro is now defined when an Armv8.3-A or higher target is used.
    I've implemented the target detection logic in Clang so that this feature is enabled for architectures from armv8.3-a onwards (so -march=armv8.4-a also enables this, for example).

    make check-all didn't show any new failures.

    [1] https://developer.arm.com/docs/101028/latest/data-processing-intrinsics

    Differential Revision: https://reviews.llvm.org/D64495 (detail/ViewSVN)
    by ktkachov
  288. [NFC] Test commit: add full stop at end of comment (detail/ViewSVN)
    by ktkachov
  289. [clang-scan-view] Force utf-8 when handling report (python2 only)

    Original patch by random human <random.bored.human@gmail.com>

    Differential Revision: https://reviews.llvm.org/D64129 (detail/ViewSVN)
    by serge_sans_paille
  290. [COFF] Rename variale references in comments after VariableName -> variableName change (detail/ViewSVN)
    by maskray
  291. [WebAssembly] Rename variale references in comments after VariableName -> variableName change (detail/ViewSVN)
    by maskray
  292. [NFC][PowerPC] Add test case for D64195 (detail/ViewSVN)
    by wuzish
  293. [DWARF] Fix the reserved values for unit length in DWARFDebugLine.

    The DWARF3 documentation had inconsistency concerning the reserved range
    for unit length values. The issue was fixed in DWARF4.

    Differential Revision: https://reviews.llvm.org/D64622 (detail/ViewSVN)
    by ikudrin
  294. [DWARF] Fix an incorrect format specifier.

    This adjusts the format specifier because PCOffset is uint16_t.

    Differential Revision: https://reviews.llvm.org/D64620 (detail/ViewSVN)
    by ikudrin
  295. [DWARF] Simplify DWARFAttribute. NFC.

    The first argument in the constructor was ignored, and the remaining
    arguments were always passed as their defaults.

    Differential Revision: https://reviews.llvm.org/D64407 (detail/ViewSVN)
    by ikudrin
  296. Finish "Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO"

    i.e., recent 5745eccef54ddd3caca278d1d292a88b2281528b:

    * Bump the function_type_mismatch handler version, as its signature has changed.

    * The function_type_mismatch handler can return successfully now, so
      SanitizerKind::Function must be AlwaysRecoverable (like for
      SanitizerKind::Vptr).

    * But the minimal runtime would still unconditionally treat a call to the
      function_type_mismatch handler as failure, so disallow -fsanitize=function in
      combination with -fsanitize-minimal-runtime (like it was already done for
      -fsanitize=vptr).

    * Add tests.

    Differential Revision: https://reviews.llvm.org/D61479 (detail/ViewSVN)
    by sberg
  297. [NFC][test] Fix for riscv tests.

    Following tests need updating for: https://reviews.llvm.org/D55277 (detail/ViewSVN)
    by zer0
  298. [X86] In combineStore, don't convert v2f32 load/store pairs to f64 loads/stores.

    Type legalization can take care of this. This gives DAG combine
    a little more time with the original types. (detail/ViewSVN)
    by ctopper
  299. [ELF] Fix variable names in comments after VariableName -> variableName change

    Also fix some typos. (detail/ViewSVN)
    by maskray
  300. [RISCV] Match GNU tools canonical JALR and add aliases

    The canonical GNU form of JALR resembles a load/store instruction rather
    than placing the immediate offset as a separate argument, so match this
    behaviour. Also add parser-only aliases for the three-operand form, and
    add other shorter aliases also emitted by GNU tools.

    Differential Revision: https://reviews.llvm.org/D55277
    Patch by James Clarke. (detail/ViewSVN)
    by asb
  301. Fix parameter name comments using clang-tidy. NFC.

    This patch applies clang-tidy's bugprone-argument-comment tool
    to LLVM, clang and lld source trees. Here is how I created this
    patch:

    $ git clone https://github.com/llvm/llvm-project.git
    $ cd llvm-project
    $ mkdir build
    $ cd build
    $ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \
        -DLLVM_ENABLE_PROJECTS='clang;lld;clang-tools-extra' \
        -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_LLD=On \
        -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../llvm
    $ ninja
    $ parallel clang-tidy -checks='-*,bugprone-argument-comment' \
        -config='{CheckOptions: [{key: StrictMode, value: 1}]}' -fix \
        ::: ../llvm/lib/**/*.{cpp,h} ../clang/lib/**/*.{cpp,h} ../lld/**/*.{cpp,h} (detail/ViewSVN)
    by ruiu
  302. [RISCV] Avoid overflow when determining number of nops for code align

    RISCVAsmBackend::shouldInsertExtraNopBytesForCodeAlign() assumed that the
    align specified would be greater than or equal to the minimum nop length, but
    that is not always the case - for example if a user specifies ".align 0" in
    assembly.

    Differential Revision: https://reviews.llvm.org/D63274
    Patch by Edward Jones. (detail/ViewSVN)
    by asb
  303. [RISCV] Fix a potential issue in shouldInsertFixupForCodeAlign()

    The bool result of shouldInsertExtraNopBytesForCodeAlign() is not checked but
    the returned nop count is unconditionally read even though it could be
    uninitialized.

    Differential Revision: https://reviews.llvm.org/D63285
    Patch by Edward Jones. (detail/ViewSVN)
    by asb
  304. [RISCV][NFC] Split PseudoCALL pattern out from instruction

    Since PseudoCALL defines AsmString, it can be generated from assembly,
    and so code-gen patterns should be defined separately to be consistent
    with the style of the RISCV backend. Other pseudo-instructions exist
    that have code-gen patterns defined directly, but these instructions are
    purely for code-gen and cannot be written in assembly.

    Differential Revision: https://reviews.llvm.org/D64012
    Patch by James Clarke. (detail/ViewSVN)
    by asb
  305. [RISCV][NFC] Fix HasStedExtA -> HasStdExtA typo in comment

    Differential Revision: https://reviews.llvm.org/D64011
    Patch by James Clarke. (detail/ViewSVN)
    by asb
  306. [RISCV] Make RISCVELFObjectWriter::getRelocType check IsPCRel

    Previously, this function didn't check the IsPCRel argument. But doing so is a
    useful check for errors, and also seemingly necessary for FK_Data_4 (which we
    produce a R_RISCV_32_PCREL relocation for if IsPCRel).

    Other than R_RISCV_32_PCREL, this should be NFC. Future exception handling
    related patches will include tests that capture this behaviour. (detail/ViewSVN)
    by asb
  307. hwasan: Pad arrays with non-1 size correctly.

    Spotted by eugenis.

    Differential Revision: https://reviews.llvm.org/D64783 (detail/ViewSVN)
    by pcc
  308. Add contains method to associative containers. This patch implements P0458R2, adding contains to map, multimap, unordered_map, unordered_multimap, set, multiset, unordered_set, and unordered_multiset. (detail/ViewSVN)
    by zoecarver
  309. Revert "[OPENMP]Add support for analysis of if clauses."

    This reverts commit rL366068.
    The patch broke 86 tests under clang/test/OpenMP/ when run with address sanitizer. (detail/ViewSVN)
    by tamur
  310. AMDGPU: Avoid code predicates for extload PatFrags

    Use the MemoryVT field. This will be necessary for tablegen to
    automatically handle patterns for GlobalISel.

    Doesn't handle the d16 lo/hi patterns. Those are a special case since
    it involvess the custom node type. (detail/ViewSVN)
    by arsenm
  311. Change a lit test to permit vendor specific clang version

    A test manually checks for the string `__VERSION__ "Clang`. This needs
    to permit vendor specific variants. (detail/ViewSVN)
    by lanza
  312. reland "add -fthinlto-index= option to clang-cl"

    Summary:
    This is a reland of r366146, adding in the previously missing '--'
    flag that prevents filenames from being interpreted as flags.

    Original description:
    This adds a -fthinlto-index= option to clang-cl, which allows it to
    be used to drive ThinLTO backend passes. This allows clang-cl to be
    used for distributed ThinLTO.

    Tags: #clang (detail/ViewSVN)
    by inglorion
  313. Re-land "[DebugInfo] Move function from line table to the prologue (NFC)"

    In LLDB, when parsing type units, we don't need to parse the whole line
    table. Instead, we only need to parse the "support files" from the line
    table prologue.

    To make that possible, this patch moves the respective functions from
    the LineTable into the Prologue. Because I don't think users of the
    LineTable should have to know that these files come from the Prologue,

    I've left the original methods in place, and made them redirect to the
    LineTable.

    Differential revision: https://reviews.llvm.org/D64774 (detail/ViewSVN)
    by Jonas Devlieghere
  314. [Sema] Suppress additional warnings for C's zero initializer

    Summary:
    D28148 relaxed some checks for assigning { 0 } to a structure for all C
    standards, but it failed to handle structures with non-integer
    subobjects. Relax -Wmissing-braces checks for such structures, and add
    some additional tests.

    This fixes PR39931.

    Patch By: al3xtjames

    Reviewed By: Lekensteyn

    Differential Revision: https://reviews.llvm.org/D61838 (detail/ViewSVN)
    by lekensteyn
  315. [InstructionSimplify] Apply sext/trunc after pointer stripping

    Summary:
    - As the pointer stripping could trace through `addrspacecast` now, need
      to sext/trunc the offset to ensure it has the same width as the
      pointer after stripping.

    Reviewers: jdoerfert

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64768 (detail/ViewSVN)
    by hliao
  316. Revert "[DebugInfo] Move function from line table to the prologue (NFC)"

    This broke LLD, which I didn't have enabled. (detail/ViewSVN)
    by Jonas Devlieghere
  317. Allow for vendor prefixes in a list test

    Summary:
    Preprocessor/init.c contains a line that explicitly checks for the
    string

    __VERSION__ "Clang{{.*}}

    It's valid to have a toolchain configured to emit a vendor prefix
    before the word Clang. e.g.

    __VERSION__ "Vendor Clang{{.*}}

    Subscribers: fedor.sergeev, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64772 (detail/ViewSVN)
    by lanza
  318. [DebugInfo] Move function from line table to the prologue (NFC)

    In LLDB, when parsing type units, we don't need to parse the whole line
    table. Instead, we only need to parse the "support files" from the line
    table prologue.

    To make that possible, this patch moves the respective functions from
    the LineTable into the Prologue. Because I don't think users of the
    LineTable should have to know that these files come from the Prologue,

    I've left the original methods in place, and made them redirect to the
    LineTable.

    Differential revision: https://reviews.llvm.org/D64774 (detail/ViewSVN)
    by Jonas Devlieghere
  319. Temporarily revert "add -fthinlto-index= option to clang-cl"

    This is causing testsuite failures on (at least) darwin release+asserts.

    This reverts commit r366146. (detail/ViewSVN)
    by echristo
  320. Temporarily Revert "fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic"

    The commit had tests that would only work with names in the IR.

    This reverts commit r366076. (detail/ViewSVN)
    by echristo
  321. Temporarily Revert "[SLP] Recommit: Look-ahead operand reordering heuristic."

    As there are some reported miscompiles with AVX512 and performance regressions
    in Eigen. Verified with the original committer and testcases will be forthcoming.

    This reverts commit r364964. (detail/ViewSVN)
    by echristo
  322. Revert "[NewPM] Port Sancov"

    This reverts commit 5652f35817f07b16f8b3856d594cc42f4d7ee29c. (detail/ViewSVN)
    by leonardchan
  323. [DirectoryWatcher][linux] Fix for older kernels

    IN_EXCL_UNLINK exists since Linux 2.6.36

    Differential Revision: https://reviews.llvm.org/D64764 (detail/ViewSVN)
    by Jan Korous
  324. [X86] Teach convertToThreeAddress to handle SUB with immediate

    We mostly avoid sub with immediate but there are a couple cases that can create them. One is the add 128, %rax -> sub -128, %rax trick in isel. The other is when a SUB immediate gets created for a compare where both the flags and the subtract value is used. If we are unable to linearize the SelectionDAG to satisfy the flag user and the sub result user from the same instruction, we will clone the sub immediate for the two uses. The one that produces flags will eventually become a compare. The other will have its flag output dead, and could then be considered for LEA creation.

    I added additional test cases to add.ll to show the the sub -128 trick gets converted to LEA and a case where we don't need to convert it.

    This showed up in the current codegen for PR42571.

    Differential Revision: https://reviews.llvm.org/D64574 (detail/ViewSVN)
    by ctopper
  325. [TSan] Fix asm token error (again) (detail/ViewSVN)
    by yln
  326. [WebAssembly] Add missing utility methods for exnref type

    Summary:
    This adds missing utility methods and copy instruction handling for
    `exnref` type and also adds tests.

    `tee` instruction tests are missing because `isTee` is currently only
    used in ExplicitLocals pass and testing that pass in mir requires
    serialization of stackified registers in mir files, which is a bit
    nontrivial because `MachineFunctionInfo` only has info of vreg numbers
    (which are large integers) but not the mir's register numbers. But this
    change is quite trivial anyway.

    Reviewers: tlively

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64705 (detail/ViewSVN)
    by aheejin
  327. [llvm-readelf] Print "File: lib.a(file.o)" info when dumping archive files.

    Match GNU readelf.

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

    Reviewers: jhenderson, grimar, MaskRay, rupprecht

    Reviewed by: jhenderson, MaskRay, grimar

    Differential Revision: https://reviews.llvm.org/D64361 (detail/ViewSVN)
    by yuanfang
  328. add -fthinlto-index= option to clang-cl

    Summary:
    This adds a -fthinlto-index= option to clang-cl, which allows it to
    be used to drive ThinLTO backend passes. This allows clang-cl to be
    used for distributed ThinLTO.

    Reviewers: tejohnson, pcc, rnk

    Subscribers: mehdi_amini, steven_wu, dexonsmith, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64458 (detail/ViewSVN)
    by inglorion
  329. [WebAssembly] Rename except_ref type to exnref

    Summary:
    We agreed to rename `except_ref` to `exnref` for consistency with other
    reference types in
    https://github.com/WebAssembly/exception-handling/issues/79. This also
    renames WebAssemblyInstrExceptRef.td to WebAssemblyInstrRef.td in order
    to use the file for other reference types in future.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64703 (detail/ViewSVN)
    by aheejin
  330. Revert [llvm-lipo] Implement -create (with hardcoded alignments)

    This reverts r366142 (git commit 67cee1dc7ee285b03372eb818a3894d35efa7394)

    The test is failing on the Windows buildbots. Reverting while I
    investigate. (detail/ViewSVN)
    by smeenai
  331. [OpenCL] Make TableGen'd builtin tables and helper functions static

    Reviewers: Pierre, Anastasia

    Reviewed By: Anastasia

    Subscribers: yaxunl, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64608 (detail/ViewSVN)
    by tstellar
  332. [llvm-lipo] Implement -create (with hardcoded alignments)

    Creates universal binary output file from input files. Currently uses
    hard coded value for alignment.  Want to get the create functionality
    approved before implementing the alignment function.

    Patch by Anusha Basana <anusha.basana@gmail.com>

    Differential Revision: https://reviews.llvm.org/D64102 (detail/ViewSVN)
    by smeenai
  333. [clang-fuzzer] Remove 'setUseOrcMCJITReplacement(false)' call.

    The default value for this option (UseMCJITReplacement) is already false, and
    OrcMCJITReplacement is going to have deprecation warnings attached in LLVM 9.0.
    Removing this call removes a spurious warning. (detail/ViewSVN)
    by Lang Hames
  334. [WebAssembly] Simplify regcopy.mir

    Summary:
    This deletes the ll templates from the functions because they don't need
    them (mir files need ll templates only when they have function calls or
    BB names that are not numbers).

    This also renames the filename to `reg-copy.mir`, because I'm planning
    to add some more `reg-*.mir` soon.

    Reviewers: tlively

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64704 (detail/ViewSVN)
    by aheejin
  335. [WebAssembly] Assembler: support special floats: infinity / nan

    Summary:
    These are emitted as identifiers by the InstPrinter, so we should
    parse them as such. These could potentially clash with symbols of
    the same name, but that is out of our (the WebAssembly backend) control.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64770 (detail/ViewSVN)
    by aardappel
  336. [DirectoryWatcher][test] Relax test assumptions

    Workaround for FSEvents sometimes sending notifications for events that happened
    before DirectoryWatcher was created.

    This caused tests to be flaky on green dragon. (detail/ViewSVN)
    by Jan Korous
  337. [DirectoryWatcher][NFC][test] Add typedef for enum (detail/ViewSVN)
    by Jan Korous
  338. [ASan] Fix >80 character line. (detail/ViewSVN)
    by morehouse
  339. [AMDGPU] Enable merging m0 initializations.

    Summary:
    Enable hoisting and merging m0 defs that are initialized with the same
    immediate value. Fixes bug where removed instructions are not considered
    to interfere with other inits, and make sure to not hoist inits before block
    prologues.

    Reviewers: rampitec, arsenm

    Reviewed By: rampitec

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64766 (detail/ViewSVN)
    by kerbowa
  340. [ScopInfo][NFC] Add dot at the end of comment statement. (detail/ViewSVN)
    by domada
  341. [mips] Print BEQZL and BNEZL pseudo instructions

    One of the reasons - to be compatible with GNU tools. (detail/ViewSVN)
    by atanasyan
  342. AMDGPU: Use standalone MUBUF load patterns

    We already do this for the flat and DS instructions, although it is
    certainly uglier and more verbose.

    This will allow using separate pattern definitions for extload and
    zextload. Currently we get away with using a single PatFrag with
    custom predicate code to check if the extension type is a zextload or
    anyextload. The generic mechanism the global isel emitter understands
    treats these as mutually exclusive. I was considering making the
    pattern emitter accept zextload or sextload extensions for anyextload
    patterns, but in global isel, the different extending loads have
    distinct opcodes, and there is currently no mechanism for an opcode
    matcher to try multiple (and there probably is very little need for
    one beyond this case). (detail/ViewSVN)
    by arsenm
  343. [TSan] Fix asm token error (detail/ViewSVN)
    by yln
  344. [LoopUnroll+LoopUnswitch] do not transform loops containing callbr

    Summary:
    There is currently a correctness issue when unrolling loops containing
    callbr's where their indirect targets are being updated correctly to the
    newly created labels, but their operands are not.  This manifests in
    unrolled loops where the second and subsequent copies of callbr
    instructions have blockaddresses of the label from the first instance of
    the unrolled loop, which would result in nonsensical runtime control
    flow.

    For now, conservatively do not unroll the loop.  In the future, I think
    we can pursue unrolling such loops provided we transform the cloned
    callbr's operands correctly.

    Such a transform and its legalities are being discussed in:
    https://reviews.llvm.org/D64101

    Link: https://bugs.llvm.org/show_bug.cgi?id=42489
    Link: https://groups.google.com/forum/#!topic/clang-built-linux/z-hRWP9KqPI

    Reviewers: fhahn, hfinkel, efriedma

    Reviewed By: fhahn, hfinkel, efriedma

    Subscribers: efriedma, hiraditya, zzheng, dmgreen, llvm-commits, pirama, kees, nathanchance, E5ten, craig.topper, chandlerc, glider, void, srhines

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64368 (detail/ViewSVN)
    by nickdesaulniers
  345. TableGen/GlobalISel: Fix handling of truncstore patterns

    This was failing to import the AMDGPU truncstore patterns. The
    truncating stores from 32-bit to 8/16 were then somehow being
    incorrectly selected to a 4-byte store.

    A separate check is emitted for the LLT size in comparison to the
    specific memory VT, which looks strange to me but makes sense based on
    the hierarchy of PatFrags used for the default truncstore PatFrags. (detail/ViewSVN)
    by arsenm
  346. TableGen: Add address space to matchers

    Currently AMDGPU uses a CodePatPred to check address spaces from the
    MachineMemOperand. Introduce a new first class property so that the
    existing patterns can be easily modified to uses the new generated
    predicate, which will also be handled for GlobalISel.

    I would prefer these to match against the pointer type of the
    instruction, but that would be difficult to get working with
    SelectionDAG compatbility. This is much easier for now and will avoid
    a painful tablegen rewrite for all the loads and stores.

    I'm also not sure if there's a better way to encode multiple address
    spaces in the table, rather than putting the number to expect. (detail/ViewSVN)
    by arsenm
  347. [clang] allow -fthinlto-index= without -x ir

    Summary:
    Previously, passing -fthinlto-index= to clang required that bitcode
    files be explicitly marked by -x ir. This change makes us detect files
    with object file extensions as bitcode files when -fthinlto-index= is
    present, so that explicitly marking them is no longer necessary.
    Explicitly specifying -x ir is still accepted and continues to be part
    of the test case to ensure we continue to support it.

    Reviewers: tejohnson, rnk, pcc

    Subscribers: mehdi_amini, steven_wu, dexonsmith, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64610 (detail/ViewSVN)
    by inglorion
  348. [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.9

    Switch over to computing the xor key in C, instead of assembly for
    Linux/AArch64. (detail/ViewSVN)
    by yln
  349. AMDGPU/GlobalISel: Allow scalar s1 and/or/xor

    If a 1-bit value is in a 32-bit VGPR, the scalar opcodes set SCC to
    whether the result is 0. If the inputs are SCC, these can be copied to
    a 32-bit SGPR to produce an SCC result. (detail/ViewSVN)
    by arsenm
  350. [libc++] Implement P0433: deduction guides for <unordered_map>

    Thanks to Arthur O'Dwyer for the patch.

    Differential Revision: https://reviews.llvm.org/D58590 (detail/ViewSVN)
    by Louis Dionne
  351. ARM MTE stack sanitizer.

    Add "memtag" sanitizer that detects and mitigates stack memory issues
    using armv8.5 Memory Tagging Extension.

    It is similar in principle to HWASan, which is a software implementation
    of the same idea, but there are enough differencies to warrant a new
    sanitizer type IMHO. It is also expected to have very different
    performance properties.

    The new sanitizer does not have a runtime library (it may grow one
    later, along with a "debugging" mode). Similar to SafeStack and
    StackProtector, the instrumentation pass (in a follow up change) will be
    inserted in all cases, but will only affect functions marked with the
    new sanitize_memtag attribute.

    Reviewers: pcc, hctim, vitalybuka, ostannard

    Subscribers: srhines, mehdi_amini, javed.absar, kristof.beyls, hiraditya, cryptoad, steven_wu, dexonsmith, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64169 (detail/ViewSVN)
    by eugenis
  352. Constrain workaround to avoid affecting other buildbots (detail/ViewSVN)
    by ericwf
  353. AMDGPU/GlobalISel: Select G_AND/G_OR/G_XOR (detail/ViewSVN)
    by arsenm
  354. AMDGPU/GlobalISel: Don't constrain source register of VCC copies

    This is a hack until I come up with a better way of dealing with the
    pseudo-register banks used for boolean values. If the use instruction
    constrains the register, the selector for the def instruction won't
    see that the bank was VCC. A 1-bit SReg_32 is could ambiguously have
    been SCCRegBank or VCCRegBank in wave32.

    This is necessary to successfully select branches with and and/or/xor
    condition. (detail/ViewSVN)
    by arsenm
  355. AMDGPU/GlobalISel: Fix selecting vcc->vcc bank copies

    The extra test change is correct, although how it arrives there is a
    bug that needs work. With wave32, the test for isVCC ambiguously
    reports true for an SCC or VCC source. A new allocatable pseudo
    register class for SCC may be necesssary. (detail/ViewSVN)
    by arsenm
  356. AMDGPU/GlobalISel: Fix not constraining result reg of copies to VCC (detail/ViewSVN)
    by arsenm
  357. AMDGPU/GlobalISel: Fix handling of sgpr (not scc bank) s1 to VCC

    This was emitting a copy from a 32-bit register to a 64-bit. (detail/ViewSVN)
    by arsenm
  358. AMDGPU/GlobalISel: Custom legalize G_INSERT_VECTOR_ELT (detail/ViewSVN)
    by arsenm
  359. AMDGPU/GlobalISel: Custom legalize G_EXTRACT_VECTOR_ELT

    Turn the constant cases into G_EXTRACTs. (detail/ViewSVN)
    by arsenm
  360. AMDGPU/GlobalISel: Fix G_ICMP for wave32 (detail/ViewSVN)
    by arsenm
  361. GlobalISel: Implement narrowScalar for vector extract/insert indexes (detail/ViewSVN)
    by arsenm
  362. AMDGPU: Fix missing immarg from interp intrinsics (detail/ViewSVN)
    by arsenm
  363. [FileCheck] Store line numbers as optional values

    Summary:
    Processing of command-line definition of variable and logic around
    implicit not directives both reuse parsing code that expects a line
    number to be defined. So far, a special line number of 0 was used for
    those users of the parsing code where a line number does not make sense.
    This commit instead represents line numbers as Optional values so that
    they can be None for those cases.

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64639 (detail/ViewSVN)
    by thopre
  364. [cmake] Don't set install rules for tblgen if building utils is disabled

    Summary:
    This is a follow up to D64032. Afterwards if building utils is disabled
    and cross compilation is attempted, CMake will complain that adding
    `install()` directives to targets with EXCLUDE_FROM_ALL set is "undefined".
    Indeed, it appears depending on the CMake version and the selected
    Generator, the install rule will error because the underlying target isn't
    built. Fix that by not adding the install rule if building utils is not
    requested. Note that this doesn't prevent building tblgen as a
    dependency in not cross-build, even if building tools is disabled.

    Reviewed By: smeenai
    Differential Revision: https://reviews.llvm.org/D64225 (detail/ViewSVN)
    by kfischer
  365. Expand comment about how StringsToBuckets was computed, and add more entries

    The construction was explained in
    https://reviews.llvm.org/D44810?id=139526#inline-391999 but reading the code
    shouldn't require hunting down old reviews to understand it.

    The precomputed list was missing an entry for the empty list case, and
    one entry at the very end. (The current last entry is the last one where
    3 * BucketCount fits in a signed int, but the reference implementation
    uses unsigneds as far as I can tell, so there's room for one more entry.)

    No behavior change for inputs seen in practice.

    Differential Revision: https://reviews.llvm.org/D64738 (detail/ViewSVN)
    by nico
  366. [ARM] MVE vector for 64bit types

    We need to make sure that we are sensibly dealing with vectors of types v2i64
    and v2f64, even if most of the time we cannot generate native operations for
    them. This mostly adds a lot of testing, plus fixes up a couple of the issues
    found. And, or and xor can be legal for v2i64, and shifts combining needs a
    slight fixup.

    Differential Revision: https://reviews.llvm.org/D64316 (detail/ViewSVN)
    by dmgreen
  367. [sanitizers][windows][mingw32] Mingw32 RTL fixes
    RTL interception broke mingw32, this should fix those builds by
    removing dependency on windows.h

    reviewed in https://reviews.llvm.org/D64694 (detail/ViewSVN)
    by mcgov
  368. [WebAssembly] Assembler: recognize .init_array as data section.

    Reviewers: sbc100

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64602 (detail/ViewSVN)
    by aardappel
  369. AMDGPU/GlobalISel: Widen vector extracts (detail/ViewSVN)
    by arsenm
  370. AMDGPU/GlobalISel: Handle llvm.amdgcn.if.break (detail/ViewSVN)
    by arsenm
  371. AMDGPU: Remove reserved value accidentally left in for gfx908 (detail/ViewSVN)
    by kzhuravl
  372. AMDGPU/GlobalISel: Select llvm.amdgcn.end.cf (detail/ViewSVN)
    by arsenm
  373. [x86] try to keep FP casted+truncated+extracted vector element out of GPRs

    inttofp (trunc (extelt X, 0)) --> inttofp (extelt (bitcast X), 0)

    We have pseudo-vectorization of scalar int to FP casts, so this tries to
    make that more likely by replacing a truncate with a bitcast. I didn't see
    any test diffs starting from 'uitofp', so I left that as a TODO. We can't
    only match the shorter trunc+extract pattern because there's an opposing
    transform somewhere, so we infinite loop. Waiting to try this during
    lowering is another possibility.

    A motivating case is shown in PR39975 and included in the test diffs here:
    https://bugs.llvm.org/show_bug.cgi?id=39975

    Differential Revision: https://reviews.llvm.org/D64710 (detail/ViewSVN)
    by spatel
  374. [llvm-lib] Add a dependency to intrinsics_gen to the LLVMLibDriver build

    Summary:
    Occasionally the build of LLVMLibDriver will fail because Attributes.inc has not been generated yet. Add an explicit dependency, so that we can guarantee that the file has been generated before LLVMLibDriver is build.

    ##[error]llvm\include\llvm\IR\Attributes.h(73,0): Error C1083: Cannot open include file: 'llvm/IR/Attributes.inc': No such file or directory
    llvm\include\llvm/IR/Attributes.h(73): fatal error C1083: Cannot open include file: 'llvm/IR/Attributes.inc': No such file or directory [LLVMLibDriver.vcxproj]

    Reviewers: asmith

    Subscribers: mgorny, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64357 (detail/ViewSVN)
    by stella.stamenova
  375. [X86] Return UNDEF from LowerScalarImmediateShift when the shift amount is out of range.

    I think we only turn out of range shiftss to undef when
    all elements are out of range or the shift amount is a splat out
    of range. I'm not sure which, I didn't check.

    During lowering we can split a shift where some elements
    are out of range into multiple shifts. This can create a
    new shift with a splat shift amount that is out of range.

    This patch returns undef for this case.

    Fixes PR42615.

    Differential Revision: https://reviews.llvm.org/D64699 (detail/ViewSVN)
    by ctopper
  376. Reland "[COFF] Add null check in case of symbols defined in LTO blobs"

    This reverts r365990 (git commit 1a6053ebc61cb0b8146f5ca27b74859a9a91e0a3)

    The test no longer depends on the Visual C++ libraries. I confirmed that
    the crash still reproduces with the new test case if I remove the null
    check. (detail/ViewSVN)
    by rnk
  377. AMDGPU: Add 24-bit mul intrinsics

    Insert these during codegenprepare.

    This works around a DAG issue where generic combines eliminate the and
    asserting the high bits are zero, which then exposes an unknown read
    source to the mul combine. It doesn't worth the hassle of trying to
    insert an AssertZext or something to try to deal with it. (detail/ViewSVN)
    by arsenm
  378. Add some release notes for 9.0 release (detail/ViewSVN)
    by arsenm
  379. [AMDGPU] Copy missing predicate from pseudo to real

    NFC at the momemnt, needed for future commit.

    Differential Revision: https://reviews.llvm.org/D64761 (detail/ViewSVN)
    by rampitec
  380. Update __VERSION__ to remove the hardcoded 4.2.1 version

    Summary:
    Just like in https://reviews.llvm.org/D56803
    for -dumpversion

    Reviewers: rnk

    Reviewed By: rnk

    Subscribers: dexonsmith, lebedev.ri, hubert.reinterpretcast, xbolva00, fedor.sergeev, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63048 (detail/ViewSVN)
    by sylvestre
  381. [FunctionAttrs] Remove readonly and writeonly assertion

    There are scenarios where mutually recursive functions may cause the SCC
    to contain both read only and write only functions. This removes an
    assertion when adding read attributes which caused a crash with a the
    provided test case, and instead just doesn't add the attributes.

    Patch by Luke Lau <luke.lau@intel.com>

    Differential Revision: https://reviews.llvm.org/D60761 (detail/ViewSVN)
    by jdoerfert
  382. [ARM] Minor formatting in ARMInstrMVE.td. NFC (detail/ViewSVN)
    by dmgreen
  383. Use a unique_ptr instead of manual memory management for LineTable (detail/ViewSVN)
    by nico
  384. AMDGPU/GlobalISel: Select easy cases for G_BUILD_VECTOR (detail/ViewSVN)
    by arsenm
  385. AMDGPU/GlobalISel: RegBankSelect for G_CONCAT_VECTORS (detail/ViewSVN)
    by arsenm
  386. Use a unique_ptr instead of manual memory management for CustomDiagInfo (detail/ViewSVN)
    by nico
  387. Use unique_ptr instead of manual delete in one place. No behavior change. (detail/ViewSVN)
    by nico
  388. [x86] add tests for reductions that might be better with more horizontal ops; NFC (detail/ViewSVN)
    by spatel
  389. Revert "r366069: [PatternMatch] Implement matching code for LibFunc"

    Reason: the change introduced a layering violation by adding a
    dependency on IR to Analysis. (detail/ViewSVN)
    by ibiryukov
  390. [docs][llvm-nm] Fix inconsistent grammar (detail/ViewSVN)
    by jhenderson
  391. [X86][SSE] Regenerated packss.ll test file.

    Not sure what went wrong in rL366077.... (detail/ViewSVN)
    by rksimon
  392. [X86][SSE] Add PACKSS with zero shuffle masks.

    This is an example of expansion due to D61129 - it should combine back to a PACKSS with a zero operand. (detail/ViewSVN)
    by rksimon
  393. fix unnamed fiefield issue and add tests for __builtin_preserve_access_index intrinsic

    This is a followup patch for https://reviews.llvm.org/D61809.
    Handle unnamed bitfield properly and add more test cases.

    Fixed the unnamed bitfield issue. The unnamed bitfield is ignored
    by debug info, so we need to ignore such a struct/union member
    when we try to get the member index in the debug info.

    D61809 contains two test cases but not enough as it does
    not checking generated IRs in the fine grain level, and also
    it does not have semantics checking tests.
    This patch added unit tests for both code gen and semantics checking for
    the new intrinsic.

    Signed-off-by: Yonghong Song <yhs@fb.com> (detail/ViewSVN)
    by yhs
  394. [ORC] Start adding ORCv1 to ORCv2 transition tips to the ORCv2 doc. (detail/ViewSVN)
    by Lang Hames
  395. [AMDGPU] fixed scheduler crash in gfx908

    For some reason scheduler can send down an SUnit without an
    instruction.

    Differential Revision: https://reviews.llvm.org/D64709 (detail/ViewSVN)
    by rampitec
  396. [clangd] Fix doc (detail/ViewSVN)
    by kadircet
  397. gn build: Add a note on how to locally tell git to ignore build dir (detail/ViewSVN)
    by nico
  398. [AMDGPU][MC][GFX9][GFX10] Added support of GET_DOORBELL message

    Reviewers: artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D64729 (detail/ViewSVN)
    by dpreobra
  399. [clangd] Fix duplicate highlighting tokens appearing in initializer lists.

    Summary: The RecursiveASTVisitor sometimes visits exprs in initializer lists twice. Added deduplication to prevent duplicate highlighting tokens from appearing. Done by sorting and a linear search.

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64634 (detail/ViewSVN)
    by jvikstrom
  400. [PatternMatch] Implement matching code for LibFunc

    Summary: Provides m_LibFunc pattern that can be used to match LibFuncs.

    Reviewers: spatel, hfinkel, efriedma, lebedev.ri

    Reviewed By: lebedev.ri

    Subscribers: lebedev.ri, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D42047 (detail/ViewSVN)
    by quolyk
  401. [OPENMP]Add support for analysis of if clauses.

    Summary:
    Added support for analysis of if clauses in the OpenMP directives to be
    able to check for the use of uninitialized variables.

    Reviewers: NoQ

    Subscribers: guansong, jfb, jdoerfert, caomhin, kkwli0, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64646 (detail/ViewSVN)
    by abataev
  402. [AMDGPU][MC] Corrected encoding of src0 for DS_GWS_* instructions

    See bug 42599: https://bugs.llvm.org/show_bug.cgi?id=42599

    Reviewers: artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D64716 (detail/ViewSVN)
    by dpreobra
  403. [X86] isTargetShuffleEquivalent - assert the expected mask is correctly formed. NFCI.

    While we don't make any assumptions about the actual mask, assert that the expected mask only contains valid mask element values. (detail/ViewSVN)
    by rksimon
  404. [Testing] Add missing "REQUIRES: asserts"

    This broke after r366048 / https://reviews.llvm.org/D63923 (detail/ViewSVN)
    by davezarzycki
  405. [mips] Remove "else-after-return". NFC (detail/ViewSVN)
    by atanasyan
  406. [OpenCL] Deduce addr space for pointee of dependent types in instantiation.

    Since pointee doesn't require context sensitive addr space deduction
    it's easier to handle pointee of dependent types during templ
    instantiation.

    Differential Revision: https://reviews.llvm.org/D64400 (detail/ViewSVN)
    by stulova
  407. Fix uninitialized variable analyzer warning. NFCI. (detail/ViewSVN)
    by rksimon
  408. [ASTImporter] Using Lang_CXX14 in ASTImporterVisibilityTest.

    Summary:
    These tests may work with C++14 language constructs in the future
    (variable templates and others).
    To avoid warnings about language version C++ version constants in the tests
    are updated.

    Reviewers: martong, a.sidorin

    Reviewed By: martong

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64477 (detail/ViewSVN)
    by balazske
  409. PDB HashTable: Make iterator key type const

    Having the hash table key change during iteration is bad, so make it
    impossible. Nothing relied on the key type not being const.

    (This is also necessary to be able to call the const version of
    iterator_facade_base::operator->(). Nothing calls this, and nothing
    will, but I tried using it locally during development and it took me a
    while to understand what was going wrong.)

    Also rename the iterator typedef to const_iterator.

    No behavior change.

    Differential Revision: https://reviews.llvm.org/D64641 (detail/ViewSVN)
    by nico
  410. [OpenCL][PR41727] Prevent ICE on global dtors

    Pass NULL to pointer arg of __cxa_atexit if addr space
    is not matching with its param. This doesn't align yet
    with how dtors are generated that should be changed too.

    Differential Revision: https://reviews.llvm.org/D62413 (detail/ViewSVN)
    by stulova
  411. Recommit r366052 "[obj2yaml] - Rework tool's error reporting logic for ELF target."

    No changes, LLD code was updated in r366057.

    Original commit message:

    ELF.h contains two getSymbol methods
    which seems to be used only from obj2yaml.

    One of these methods calls another, which in turn
    contains untested error message which doesn't
    provide enough information.

    Problem is that after improving only just that message,
    obj2yaml will not show it,
    ("Error reading file: yaml: Invalid data was
    encountered while parsing the file" message will be shown instead),
    because internal errors handling of tool is based on ErrorOr<> class which
    stores a error code and as a result can only show a predefined error string, what
    actually isn't very useful.

    In this patch, I rework obj2yaml's error reporting system
    for ELF targets to use Error  Expected<> classes.
    Also, I improve the error message produced
    by getSymbol for demonstration of the new functionality.

    Differential revision: https://reviews.llvm.org/D64631 (detail/ViewSVN)
    by grimar
  412. [LLD][ELF] - Minor simplification. NFC.

    This removes a call to `object::getSymbol<ELFT>`.
    We used this function in a next way: it was given an
    array of symbols and index and returned either a symbol
    at the index given or a error.

    This function was removed in D64631.
    (rL366052, but was reverted because of LLD compilation error
    that I didn't know about).

    It does not make much sense to keep this function on LLVM side
    only for LLD, because having only a list of symbols and the index it
    is not able to produce a valueable error message about context anyways. (detail/ViewSVN)
    by grimar
  413. [ARM] MVE Vector Shifts

    This adds basic lowering for MVE shifts. There are many shifts in MVE, but the
    instructions handled here are:
    VSHL (imm)
    VSHRu (imm)
    VSHRs (imm)
    VSHL (vector)
    VSHL (register)

    MVE, like NEON before it, doesn't have shift right by a vector (or register).
    We instead have to negate the amount and shift in the opposite direction. This
    means we have to convert any SHR's into a form of SHL (that is still signed or
    unsigned) with a negated condition and selecting from there. MVE still does
    have shifting by an immediate for SHL, ASR and LSR.

    This adds lowering for these and for register forms, which work well for shift
    lefts but may require an extra fold of neg(vdup(x)) -> vdup(neg(x)) to potentially
    work optimally for right shifts.

    Differential Revision: https://reviews.llvm.org/D64212 (detail/ViewSVN)
    by dmgreen
  414. [libFuzzer] Disable fork.test on AArch64

    This crashes sporadically on our AArch64 buildbots. Disable for now. (detail/ViewSVN)
    by rovka
  415. [ARM] Move Shifts after Bits. NFC

    This just moves the shift instruction definitions further down the
    ARMInstrMVE.td file, to make positioning patterns slightly more natural. (detail/ViewSVN)
    by dmgreen
  416. Revert r366052 "[obj2yaml] - Rework tool's error reporting logic for ELF target."

    Seems it broke LLD:
    http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48434 (detail/ViewSVN)
    by grimar
  417. [obj2yaml] - Rework tool's error reporting logic for ELF target.

    ELF.h contains two getSymbol methods
    which seems to be used only from obj2yaml.

    One of these methods calls another, which in turn
    contains untested error message which doesn't
    provide enough information.

    Problem is that after improving only just that message,
    obj2yaml will not show it,
    ("Error reading file: yaml: Invalid data was
    encountered while parsing the file" message will be shown instead),
    because internal errors handling of tool is based on ErrorOr<> class which
    stores a error code and as a result can only show a predefined error string, what
    actually isn't very useful.

    In this patch, I rework obj2yaml's error reporting system
    for ELF targets to use Error  Expected<> classes.
    Also, I improve the error message produced
    by getSymbol for demonstration of the new functionality.

    Differential revision: https://reviews.llvm.org/D64631 (detail/ViewSVN)
    by grimar
  418. [ARM] Adjust how NEON shifts are lowered

    This adjusts the way that we lower NEON shifts to use a DAG target node, not
    via a neon intrinsic. This is useful for handling MVE shifts operations in the
    same the way. It also renames some of the immediate shift nodes for
    consistency, and moves some of the processing of immediate shifts into
    LowerShift allowing it to capture more cases.

    Differential Revision: https://reviews.llvm.org/D64426 (detail/ViewSVN)
    by dmgreen
  419. [Loop Peeling] Fix the bug with IDom setting for exit loops

    It is possible that loop exit has two predecessors in a loop body.
    In this case after the peeling the iDom of the exit should be a clone of
    iDom of original exit but no a clone of a block coming to this exit.

    Reviewers: reames, fhahn
    Reviewed By: reames
    Subscribers: hiraditya, zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64618 (detail/ViewSVN)
    by skatkov
  420. [LoopVectorize] Pass unfiltered list of arguments to getIntrinsicInstCost.

    We do not compute the scalarization overhead in getVectorIntrinsicCost
    and TTI::getIntrinsicInstrCost requires the full arguments list. (detail/ViewSVN)
    by fhahn
  421. [Loop Peeling] Enable peeling for loops with multiple exits

    This CL enables peeling of the loop with multiple exits where
    one exit should be from latch and others are basic blocks with
    call to deopt.

    The peeling is enabled under the flag which is false by default.

    Reviewers: reames, mkuper, iajbar, fhahn
    Reviewed By: reames
    Subscribers: xbolva00, hiraditya, zzheng, llvm-commits
    Differential Revision: https://reviews.llvm.org/D63923 (detail/ViewSVN)
    by skatkov
  422. [clangd] Added highlighting for members and methods.

    Summary: Added highlighting for members and methods.

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64617 (detail/ViewSVN)
    by jvikstrom
  423. DeveloperPolicy: fix a typo (detail/ViewSVN)
    by rsandifo
  424. [clangd] Added highlighting to enum constants.

    Summary: VSCode does not have a scope for enum constants. So they were placed under "constant.other.enum" as that seems to be the most correct scope for enum constants. However, this makes theia color them blue (the same color it uses for keywords).

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64624 (detail/ViewSVN)
    by jvikstrom
  425. [PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble

    gcc PowerPC supports 3 representations of long double:

    * -mlong-double-64

      long double has the same representation of double but is mangled as `e`.
      In clang, this is the default on AIX, FreeBSD and Linux musl.

    * -mlong-double-128

      2 possible 128-bit floating point representations:

      + -mabi=ibmlongdouble
        IBM extended double format. Mangled as `g`
        In clang, this is the default on Linux glibc.
      + -mabi=ieeelongdouble
        IEEE 754 quadruple-precision format. Mangled as `u9__ieee128` (`U10__float128` before gcc 8.2)
        This is currently unavailable.

    This patch adds -mabi=ibmlongdouble and -mabi=ieeelongdouble, and thus
    makes the IEEE 754 quadruple-precision long double available for
    languages supported by clang.

    Reviewed By: hfinkel

    Differential Revision: https://reviews.llvm.org/D64283 (detail/ViewSVN)
    by maskray
  426. [Attributor] Deduce "nonnull" attribute

    Summary:
    Porting nonnull attribute to attributor.

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: xbolva00, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63604 (detail/ViewSVN)
    by uenoku
  427. [LoopUtils] Extend the scope of getLoopEstimatedTripCount

    With this patch the getLoopEstimatedTripCount function will
    accept also the loops where there are more than one exit but
    all exits except latch block should ends up with a call to deopt.

    This side exits should not impact the estimated trip count.

    Reviewers: reames, mkuper, danielcdh
    Reviewed By: reames
    Subscribers: fhahn, lebedev.ri, hiraditya, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64553 (detail/ViewSVN)
    by skatkov
  428. Remove set but unused variable. (detail/ViewSVN)
    by void
  429. [LoopInfo] Introduce getUniqueNonLatchExitBlocks utility function

    Extract the code from LoopUnrollRuntime into utility function to
    re-use it in D63923.

    Reviewers: reames, mkuper
    Reviewed By: reames
    Subscribers: fhahn, hiraditya, zzheng, dmgreen, llvm-commits
    Differential Revision: https://reviews.llvm.org/D64548 (detail/ViewSVN)
    by skatkov
  430. [PowerPC] Support fp128 libcalls

    On PowerPC, IEEE 754 quadruple-precision libcall names use "kf" instead of "tf".

    In libgcc, libgcc/config/rs6000/float128-sed converts TF names to KF
    names. This patch implements its 24 substitution rules.

    Reviewed By: hfinkel

    Differential Revision: https://reviews.llvm.org/D64282 (detail/ViewSVN)
    by maskray
  431. [BPF] add unit tests for preserve_{array,union,struct}_access_index intrinsics

    This is a followup patch for https://reviews.llvm.org/D61810/new/,
    which adds new intrinsics preserve_{array,union,struct}_access_index.

    Currently, only BPF backend utilizes preserve_{array,union,struct}_access_index
    intrinsics, so all tests are compiled with BPF target.

    https://reviews.llvm.org/D61524 already added some tests for these
    intrinsics, but some of them pretty complex.
    This patch added a few unit test cases focusing on individual intrinsic
    functions.

    Also made a few clarification on language reference for these intrinsics.

    Differential Revision: https://reviews.llvm.org/D64606 (detail/ViewSVN)
    by yhs
  432. [NFC][PowerPC] Add the test block-placement.mir (detail/ViewSVN)
    by zhangkang
  433. [ValueTracking] Look through constant Int2Ptr/Ptr2Int expressions

    Summary:
    This is analogous to the int2ptr/ptr2int instruction handling introduced
    in D54956.

    Reviewers: fhahn, efriedma, spatel, nlopes, sanjoy, lebedev.ri

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64708 (detail/ViewSVN)
    by jdoerfert
  434. [X86] Separate the memory size of vzext_load/vextract_store from the element size of the result type. Use them improve the codegen of v2f32 loads/stores with sse1 only.

    Summary:
    SSE1 only supports v4f32. But does have instructions like movlps/movhps that load/store 64-bits of memory.

    This patch breaks the connection between the node VT of the vzext_load/vextract_store patterns and the memory VT. Enabling a v4f32 node with a 64-bit memory VT. I've used i64 as the memory VT here. I've written the PatFrag predicate to just check the store size not the specific VT. I think the VT will only matter for CSE purposes. We could use v2f32, but if we want to start using these operations in more places a simple integer type might make the most sense.

    I'd like to maybe use this same thing for SSE2 and later as well, but that will need more work to be supported by EltsFromConsecutiveLoads to avoid regressing lit tests. I'd maybe also like to combine bitcasts with these load/stores nodes now that the types are disconnected. And I'd also like to consider canonicalizing (scalar_to_vector + load) to vzext_load.

    If you want I can split the mechanical tablegen stuff where I added the 32/64 off from the sse1 change.

    Reviewers: spatel, RKSimon

    Reviewed By: RKSimon

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64528 (detail/ViewSVN)
    by ctopper
  435. Improve compile time of variant.

    In particular, improve the compile time of the overload set builder
    that variant uses to determine which alternative to construct.

    Instead of having the __overload type construct itself recursively,
    this patch uses a flat construction for the overload set. (detail/ViewSVN)
    by ericwf
  436. Add test for variant construction with duplicate types. (detail/ViewSVN)
    by ericwf
  437. [TargetParser][ARM] Account dependencies when processing target features

    Teaches ARM::appendArchExtFeatures to account dependencies when processing
    target features: i.e. when you say -march=armv8.1-m.main+mve.fp+nofp it
    means mve.fp should get discarded too. (Split from D63936)

    Differential Revision: https://reviews.llvm.org/D64048 (detail/ViewSVN)
    by alelab01
  438. [LV] Exclude loop-invariant inputs from scalar cost computation.

    Loop invariant operands do not need to be scalarized, as we are using
    the values outside the loop. We should ignore them when computing the
    scalarization overhead.

    Fixes PR41294

    Reviewers: hsaito, rengolin, dcaballe, Ayal

    Reviewed By: Ayal

    Differential Revision: https://reviews.llvm.org/D59995 (detail/ViewSVN)
    by fhahn
  439. Fix uninitialized variable analyzer warning. NFCI. (detail/ViewSVN)
    by rksimon
  440. Support __seg_fs and __seg_gs on x86

    Summary:
    GCC supports named address spaces macros:
      https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html

    clang does as well with address spaces:
      https://clang.llvm.org/docs/LanguageExtensions.html#memory-references-to-specified-segments

    Add the __seg_fs and __seg_gs macros for compatibility with GCC.

    <rdar://problem/52944935>

    Subscribers: jkorous, dexonsmith, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64676 (detail/ViewSVN)
    by jfb
  441. [clang][Driver][ARM] Favor -mfpu over default CPU features

    When processing the command line options march, mcpu and mfpu, we store
    the implied target features on a vector. The change D62998 introduced a
    temporary vector, where the processed features get accumulated. When
    calling DecodeARMFeaturesFromCPU, which sets the default features for
    the specified CPU, we certainly don't want to override the features
    that have been explicitly specified on the command line. Therefore, the
    default features should appear first in the final vector. This problem
    became evident once I added the missing (unhandled) target features in
    ARM::getExtensionFeatures.

    Differential Revision: https://reviews.llvm.org/D63936 (detail/ViewSVN)
    by alelab01
  442. Cleanup whitespace in <variant>. NFC. (detail/ViewSVN)
    by ericwf
  443. Harden variant test added in r366022

    The test was brittle since it only went boom for one specific type, when
    really it should go boom for all of them. (detail/ViewSVN)
    by ericwf
  444. consistency in the release notes (detail/ViewSVN)
    by sylvestre
  445. [GitSVN][NFC] Mark dry-run commits as such in the log output

    Summary: This helps to avoid worries about the "dry run flag" while testing.

    Reviewers: jyknight, rnk, mehdi_amini

    Subscribers: bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64697 (detail/ViewSVN)
    by jdoerfert
  446. Avoid eager template instantiation caused by the variant narrowing checks.

    The standard disallows narrowing conversions when constructing a variant.
    This is checked by attempting to perform braced initialization of the
    destination type from the argument type. However, braced initialization
    can force the compiler (mostly clang) to eagerly instantiate the
    constructors of the destintation type -- which can lead to errors in
    a non-immediate context.

    However, as variant is currently specified, the narrowing checks only
    observably apply when the destination type is arithmetic. Meaning we can
    skip the check for class types. Hense avoiding the hard errors.

    In order to cause fewer build breakages, this patch avoids the narrowing
    check except when the destination type is arithmetic. (detail/ViewSVN)
    by ericwf
  447. [InstCombine] Add assume context test; NFC

    Baseline test for D37215. (detail/ViewSVN)
    by nikic
  448. [Hashing] hash_1to3_bytes - avoid trunc(v + zext(x)) NFCI.

    MSVC complains about the extension to uint64_t for an addition followed by truncation back to uint32_t - add an explicit uint32_t cast to avoid this. (detail/ViewSVN)
    by rksimon
  449. [x86] add test for sub-with-flags opportunity (PR40483); NFC (detail/ViewSVN)
    by spatel
  450. Recommit "[BitcodeReader] Validate OpNum, before accessing Record array."

    This recommits r365750 (git commit 8b222ecf2769ee133691f208f6166ce118c4a164)

    Original message:

       Currently invalid bitcode files can cause a crash, when OpNum exceeds
       the number of elements in Record, like in the attached bitcode file.

       The test case was generated by clusterfuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15698

       Reviewers: t.p.northover, thegameg, jfb

       Reviewed By: jfb

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

       llvm-svn: 365750jkkkk (detail/ViewSVN)
    by fhahn
  451. [BitcodeReader] Use tighter upper bound to validate forward references.

    At the moment, bitcode files with invalid forward reference can easily
    cause the bitcode reader to run out of memory, by creating a forward
    reference with a very high index.

    We can use the size of the bitcode file as an upper bound, because a
    valid bitcode file can never contain more records. This should be
    sufficient to fail early in most cases. The only exception is large
    files with invalid forward references close to the file size.

    There are a couple of clusterfuzz runs that fail with out-of-memory
    because of very high forward references and they should be fixed by this
    patch.

    A concrete example for this is D64507, which causes out-of-memory on
    systems with low memory, like the hexagon upstream bots.

    Reviewers: t.p.northover, thegameg, jfb, efriedma, hfinkel

    Reviewed By: jfb

    Differential Revision: https://reviews.llvm.org/D64577 (detail/ViewSVN)
    by fhahn
  452. VirtRegMap - add missing initializers. NFCI. (detail/ViewSVN)
    by rksimon
  453. SlotIndexes - add missing initializer. NFCI. (detail/ViewSVN)
    by rksimon
  454. [MachineOutliner] Add missing initializers for OutlinedFunction. NFCI.

    Appeases MSVC/cppcheck. (detail/ViewSVN)
    by rksimon
  455. [Driver] Simplify AddLibgcc (detail/ViewSVN)
    by maskray
  456. [Driver] Simplify -lgcc & -lgcc_s

    gcc defaults to -shared-libgcc in C++ mode.
    Letting getLibGccType() return SharedLibGcc simplifies the logic. (detail/ViewSVN)
    by maskray
  457. [X86] Remove offset of 8 from the call to FuseInst for UNPCKLPDrr folding added in r365287.

    This was copy/pasted from above and I forgot to change it. We just
    need the default offset of 0 here.

    Fixes PR42616. (detail/ViewSVN)
    by ctopper
  458. Remove extra ';' to silent compiler warning.

    - Plus extra style formatting. (detail/ViewSVN)
    by hliao
  459. [Attributor][Fix] Never override given argument numbers (detail/ViewSVN)
    by jdoerfert
  460. [ARM] Add sign and zero extend patterns for MVE

    The vmovlb instructions can be uses to sign or zero extend vector registers
    between types. This adds some patterns for them and relevant testing. The
    VBICIMM generation is also put behind a hasNEON check (as is already done for
    VORRIMM).

    Code originally by David Sherwood.

    Differential Revision: https://reviews.llvm.org/D64069 (detail/ViewSVN)
    by dmgreen
  461. Template-related improvements to Visual Studio visualizers (detail/ViewSVN)
    by mps
  462. [ARM] MVE VNEG instruction patterns

    This selects integer VNEG instructions, which can be especially useful with shifts.

    Differential Revision: https://reviews.llvm.org/D64204 (detail/ViewSVN)
    by dmgreen
  463. [ARM] MVE integer abs

    Similar to floating point abs, we also have instructions for integers.

    Differential Revision: https://reviews.llvm.org/D64027 (detail/ViewSVN)
    by dmgreen
  464. [ARM] MVE integer min and max

    This simply makes the MVE integer min and max instructions legal and adds the
    relevant patterns for them.

    Differential Revision: https://reviews.llvm.org/D64026 (detail/ViewSVN)
    by dmgreen
  465. [ARM] MVE VRINT support

    This adds support for the floor/ceil/trunc/... series of instructions,
    converting to various forms of VRINT. They use the same suffixes as their
    floating point counterparts. There is not VTINTR, so nearbyint is expanded.

    Also added a copysign test, to show it is expanded.

    Differential Revision: https://reviews.llvm.org/D63985 (detail/ViewSVN)
    by dmgreen
  466. [ARM] MVE minnm and maxnm instructions

    This adds the patterns for minnm and maxnm from the fminnum and fmaxnum nodes,
    similar to scalar types.

    Original patch by Simon Tatham

    Differential Revision: https://reviews.llvm.org/D63870 (detail/ViewSVN)
    by dmgreen
  467. FileCheck [7/12]: Arbitrary long numeric expressions

    Summary:
    This patch is part of a patch series to add support for FileCheck
    numeric expressions. This specific patch extend numeric expression to
    support an arbitrary number of operands, either variable or literals.

    Copyright:
        - Linaro (changes up to diff 183612 of revision D55940)
        - GraphCore (changes in later versions of revision D55940 and
                     in new revision created off D55940)

    Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

    Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D60387 (detail/ViewSVN)
    by thopre
  468. Revert "[InstCombine] add tests for umin/umax via usub.sat; NFC"

    This reverts commit rL365999 / 0f6148df23edcd3081f5e761de19edd4f823f16d.
    The tests already exist in this file, and the hoped-for transform
    (mentioned in D62871) is invalid because of undef as discussed in
    D63060. (detail/ViewSVN)
    by spatel
  469. [InstCombine] add tests for umin/umax via usub.sat; NFC (detail/ViewSVN)
    by spatel
  470. [x86] simplify cmov with same true/false operands (detail/ViewSVN)
    by spatel
  471. [Object] isNotObjectErrorInvalidFileType: simplify (detail/ViewSVN)
    by maskray
  472. [Object] isNotObjectErrorInvalidFileType: fix use-after-move (detail/ViewSVN)
    by maskray
  473. Fix -Wdocumentation warning. NFCI. (detail/ViewSVN)
    by rksimon
  474. [CMake][Fuchsia] Define asan+noexcept multilib

    Using noexcept multilib with -fno-exceptions can lead to significant
    space savings when statically linking libc++abi because we don't need
    all the unwinding and demangling code.

    When compiling with ASan, we already get a lot of overhead from the
    instrumentation itself, when statically linking libc++abi, that overhead
    is even larger.

    Having the noexcept variant for ASan can help significantly, we've seen
    more than 50% size reduction in our system image, which offsets the cost
    of having to build another multilib.

    Differential Revision: https://reviews.llvm.org/D64140 (detail/ViewSVN)
    by phosek
  475. Simplify with llvm::is_contained. NFC (detail/ViewSVN)
    by maskray
  476. This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784.

    Some targets such as Python 2.7.16 still use VERSION in
    their builds. Without VERSION defined, the source code
    has syntax errors.

    Reverting as it will probably break many other things.

    Noticed by Sterling Augustine (detail/ViewSVN)
    by sylvestre
  477. Revert "[COFF] Add null check in case of symbols defined in LTO blobs"

    This reverts commit r365979: COFF/undefined-symbol-lto.test is failing. (detail/ViewSVN)
    by phosek
  478. Initialize the non-trivial C union bits I added to RecordDeclBitfields
    in r365985

    These bits weren't being initialized in the RecordDecl's constructor,
    which probably caused test/Modules/stress1.cpp to fail on a couple of
    bots. (detail/ViewSVN)
    by ahatanak
  479. [clangd] Mark type hierarchy as a supported feature in the docs

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64614 (detail/ViewSVN)
    by nridge
  480. [clangd] Implement typeHierarchy/resolve for subtypes

    Summary:
    This allows the client to resolve subtypes one level at a time.

    For supertypes, this is not necessary, because we eagerly compute
    supertypes and return all levels.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64308 (detail/ViewSVN)
    by nridge
  481. [Sema] Diagnose default-initialization, destruction, and copying of
    non-trivial C union types

    This patch diagnoses uses of non-trivial C unions and structs/unions
    containing non-trivial C unions in the following contexts, which require
    default-initialization, destruction, or copying of the union objects,
    instead of disallowing fields of non-trivial types in C unions, which is
    what we currently do:

    - function parameters.
    - function returns.
    - assignments.
    - compound literals.
    - block captures except capturing of `__block` variables by non-escaping
      blocks.
    - local and global variable definitions.
    - lvalue-to-rvalue conversions of volatile types.

    See the discussion in https://reviews.llvm.org/D62988 for more background.

    rdar://problem/50679094

    Differential Revision: https://reviews.llvm.org/D63753 (detail/ViewSVN)
    by ahatanak
  482. [Attributor][NFC] Run clang-format on the attributor files (.h/.cpp)

    The Attributor files are kept formatted with clang-format, we should try
    to keep this state. (detail/ViewSVN)
    by jdoerfert
  483. [Attributor] Only return attributes with a valid state

    Attributor::getAAFor will now only return AbstractAttributes with a
    valid AbstractState. This simplifies call sites as they only need to
    check if the returned pointer is non-null. It also reduces the potential
    for accidental misuse. (detail/ViewSVN)
    by jdoerfert
  484. [TSan] Tiny cleanup of UnmangleLongJmpSp for Linux/x86_64

    NFC. (detail/ViewSVN)
    by yln
  485. clang/test/Driver/fsanitize.c: Fix -fsanitize=vptr using default target

    The default implementation of getSupportedSanitizers isn't able to turn
    on the vptr sanitizer, and thus, any platform that runs this test will
    fail with the error:

        clang: error: unsupported option '-fsanitize=vptr' for target '<target>'

    Patch by James Nagurne! (detail/ViewSVN)
    by maskray
  486. Extend function attributes bitset size from 64 to 96.

    Summary: We are going to add a function attribute number 64.

    Reviewers: pcc, jdoerfert, lebedev.ri

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64663 (detail/ViewSVN)
    by eugenis
  487. [COFF] Add null check in case of symbols defined in LTO blobs

    The test case could probably be improved further if the failure path was
    better understood.

    Fixes PR42536 (detail/ViewSVN)
    by rnk
  488. [Attributor][FIX] Lookup of (call site) argument attributes (detail/ViewSVN)
    by jdoerfert
  489. [DirectoryWatcher][test][NFC] Add information to test failure reports (detail/ViewSVN)
    by Jan Korous
  490. Re-land [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

    Use //net/dir like other test cases for windows compatibility (detail/ViewSVN)
    by sammccall
  491. PDB HashTable: Move TraitsT from class parameter to the methods that need it

    The traits object is only used by a few methods. Deserializing a hash
    table and walking it is possible without the traits object, so it
    shouldn't be required to build a dummy object for that use case.

    The TraitsT object used to be a function template parameter before
    r327647, this restores it to that state.

    This makes it clear that the traits object isn't needed at all in 1 of
    the current 3 uses of HashTable (and I am going to add another use that
    doesn't need it), and that the default PdbHashTraits isn't used outside
    of tests.

    While here, also re-enable 3 checks in the test that were commented out
    (which requires making HashTableInternals templated and giving FooBar
    an operator==).

    No intended behavior change.

    Differential Revision: https://reviews.llvm.org/D64640 (detail/ViewSVN)
    by nico
  492. Fix non-conformance it `std::tuple`.

    Previously we implemented all one trillion tuple-like constructors using
    a single generic overload. This worked fairly well, except that it
    differed in behavior from the standard version because it didn't
    consider both T&& and T const&. This was observable for certain
    types.

    This patch addresses that issue by splitting the generic constructor
    in two. We now provide both T&& and T const& versions of the
    tuple-like constructors (sort of). (detail/ViewSVN)
    by ericwf
  493. [AMDGPU] use v32f32 for 3 mfma intrinsics

    These should really use v32f32, but were defined as v32i32
    due to the lack of the v32f32 type.

    Differential Revision: https://reviews.llvm.org/D64667 (detail/ViewSVN)
    by rampitec
  494. isBytewiseValue checks ConstantVector element by element

    Summary: Vector of the same value with few undefs will sill be considered "Bytewise"

    Reviewers: eugenis, pcc, jfb

    Reviewed By: jfb

    Subscribers: dexonsmith, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64031 (detail/ViewSVN)
    by Vitaly Buka
  495. [MemorySSA] Use SetVector to avoid nondeterminism.

    Summary:
    Use a SetVector for DeadBlockSet.
    Resolves PR42574.

    Reviewers: george.burgess.iv, uabelho, dblaikie

    Subscribers: jlebar, Prazek, mgrang, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64601 (detail/ViewSVN)
    by asbirlea
  496. NFC: utils/perf-training: Python 3 compatibility for lit.cfg

    The output of subprocess.check_output is now bytes. We need to decode it. (detail/ViewSVN)
    by arphaman
  497. [DirectoryWatcher][NFC] Silence warnings in release build (detail/ViewSVN)
    by Jan Korous
  498. [clang-doc] Fix failing tests on Windows

    Tests on Windows were failing due to path separator differences.
    '/' was being used as separator in the expected output, paths in expected
    output are now changed to their native form before comparing them to the
    actual output.

    Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com).

    Differential Revision: https://reviews.llvm.org/D64669 (detail/ViewSVN)
    by juliehockett
  499. [DirectoryWatcher][linux] Fix use of uninitialized value (detail/ViewSVN)
    by Jan Korous
  500. [WebAssembly] refactored utilities to not depend on MachineInstr

    Summary:
    Most of these functions can work for MachineInstr and MCInst
    equally now.

    Reviewers: dschuff

    Subscribers: MatzeB, sbc100, jgravelle-google, aheejin, sunfish, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64643 (detail/ViewSVN)
    by aardappel
  501. [macCatalyst] Use macCatalyst pretty name in .build_version darwin
    assembly command

    'macCatalyst' is more readable than 'maccatalyst'. I renamed the objdump output,
    but the assembly should match it as well. (detail/ViewSVN)
    by arphaman
  502. Remove __VERSION__

    Summary:
    It has been introduced in 2011 for gcc compat:
    https://github.com/llvm-mirror/clang/commit/ad1a4c6e89594e704775ddb6b036ac982fd68cad
    it is probably time to remove it


    Reviewers: rnk, dexonsmith

    Reviewed By: rnk

    Subscribers: dschuff, aheejin, fedor.sergeev, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64062 (detail/ViewSVN)
    by sylvestre
  503. [test][AArch64] Relax the opcode tests for FP min/max instructions. (detail/ViewSVN)
    by dyung
  504. Add option to disable variant narrowing conversion changes.

    The paper P0608R3 - "A sane variant converting constructor" disallows
    narrowing conversions in variant. It was meant to address this
    surprising problem:

      std::variant<std::string, bool> v = "abc";
      assert(v.index() == 1); // constructs a bool.

    However, it also disables every potentially narrowing conversion. For
    example:

      variant<unsigned> v = 0; // ill-formed
      variant<string, double> v2 = 42; // ill-formed (int -> double narrows)

    These latter changes break code. A lot of code. Within Google it broke
    on the order of a hundred thousand target with thousands of root causes
    responsible for the breakages.

    Of the breakages related to the narrowing restrictions, none of them
    exposed outstanding bugs. However, the breakages caused by boolean
    conversions (~13 root causes), all but one of them were bugs.

    For this reasons, I am adding a flag to disable the narrowing conversion
    changes but not the boolean conversions one.

    One purpose of this flag is to allow users to opt-out of breaking changes
    in variant until the offending code can be cleaned up. For non-trivial
    variant usages the amount of cleanup may be significant.

    This flag is also required to support automated tooling, such as
    clang-tidy, that can automatically fix code broken by this change.
    In order for clang-tidy to know the correct alternative to construct,
    it must know what alternative was being constructed previously, which
    means running it over the old version of std::variant.

    Because this change breaks so much code, I will be implementing the
    aforementioned clang-tidy check in the very near future.

    Additionally I'm plan present this new information to the committee so they can
    re-consider if this is a breaking change we want to make.

    I think libc++ should very seriously consider pulling this change
    before the 9.0 release branch is cut. But that's a separate discussion
    that I will start on the lists.

    For now this is the minimal first step. (detail/ViewSVN)
    by ericwf
  505. [InstCombine] Disable fold from D64285 for non-integer types (detail/ViewSVN)
    by xbolva00
  506. Factor out resolveFrameOffsetReference (NFC).

    Split AArch64FrameLowering::resolveFrameIndexReference in two parts
    * Finding frame offset for the index.
    * Finding base register and offset to that register.

    The second part will be used to implement a virtual frame pointer in
    armv8.5 MTE stack instrumentation lowering.

    Reviewers: pcc, vitalybuka, hctim, ostannard

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64171 (detail/ViewSVN)
    by eugenis
  507. [builtins] Fix assembly in arm sync-ops.h

    This assembly is part of a macro that was reformatted in D60351.
    The missing space between push and { results in:

        Error: bad instruction `push{r4, r5,r6,lr}' (detail/ViewSVN)
    by nikic
  508. Revert driver: Don't warn about assembler flags being unused when not assembling

    This reverts r365703 (git commit 101c1afdfd1c88f05da94c6fd317b489bb704f40)
    and r365714.

    This broke some autoconf-style assembler flags checks in the Linux
    build:
    https://github.com/ClangBuiltLinux/linux/issues/598 (detail/ViewSVN)
    by rnk
  509. [clangd] Fix off-by-one in CodeComplete and assertion in Dex (detail/ViewSVN)
    by sammccall
  510. Reland [clang] DirectoryWatcher

    This reverts commit f561227d133224d2d6a5a016abe4be051fa75501.

    - DirectoryWatcher
    - Fix the build for platforms that don't have DW implementated.
    - Fix the threading dependencies (thanks to compnerd). (detail/ViewSVN)
    by Jan Korous
  511. AMDGPU: Drop remnants of byval support for shaders

    Before 2018, mesa used to use byval interchangably with inreg, which
    didn't really make sense. Fix tests still using it to avoid breaking
    in a future commit. (detail/ViewSVN)
    by arsenm
  512. Fix missing use of defined() in include guard

    Subscribers: arsenm, jvesely, nhaehnle, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64657 (detail/ViewSVN)
    by daltenty
  513. [SystemZ] Fix addcarry of addcarry of const carry (PR42606)

    This fixes https://bugs.llvm.org/show_bug.cgi?id=42606 by extending
    D64213. Instead of only checking if the carry comes from a matching
    operation, we now check the full chain of carries. Otherwise we might
    custom lower the outermost addcarry, but then generically legalize
    an inner addcarry.

    Differential Revision: https://reviews.llvm.org/D64658 (detail/ViewSVN)
    by nikic
  514. Revert "Reland [clang] DirectoryWatcher"

    This reverts commit fdcb7f47e783933e0af8a5fae91132269a208268. (detail/ViewSVN)
    by Jan Korous
  515. Reland [clang] DirectoryWatcher

    This reverts commit abce8c457dd3de6b156756e547cc0eefb7653c79.

    + Fix the build for platforms that don't have DW implementated. (detail/ViewSVN)
    by Jan Korous
  516. [X86] Use MachineInstr::findRegisterDefOperand to simplify some code in optimizeCompareInstr. NFCI (detail/ViewSVN)
    by ctopper
  517. [DebugInfo] Add column info for inline sites

    The column field is missing for all inline sites, currently it's always
    zero. This changes populates DW_AT_call_column field for inline sites.
    Test case modified to cover this change.

    Patch by: Wenlei He

    Differential revision: https://reviews.llvm.org/D64033 (detail/ViewSVN)
    by Jonas Devlieghere
  518. The variable "Latch" is only used in an assert, which makes builds that use "-DNDEBUG" fail with unused variable messages.

    Summary: Move the logic into the assert itself.

    Subscribers: hiraditya, sanjoy, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64654 (detail/ViewSVN)
    by saugustine
  519. [SystemZ] Fix build bot failure after r365932

    Insert LLVM_FALLTHROUGH to avoid compiler warning. (detail/ViewSVN)
    by uweigand
  520. [x86] add test for bogus cmov (PR40483); NFC (detail/ViewSVN)
    by spatel
  521. [AMDGPU] Extend MIMG opcode to 8 bits

    This is NFC, but required for future commit.

    Differential Revision: https://reviews.llvm.org/D64649 (detail/ViewSVN)
    by rampitec
  522. Addition to rL365925, removing remaining virtuals (detail/ViewSVN)
    by sstefan
  523. [clang-doc] Add html links to references

    <a> tags are added for the parents and members of records and return type and
    params of functions. The link redirects to the reference's info file.

    The directory path where each info file will be saved is now generated in the
    serialization phase and stored as an attribute in each Info.

    Bitcode writer and reader were modified to handle the new attributes.

    Committed on behalf of Diego Astiazarán (diegoaat97@gmail.com).

    Differential Revision: https://reviews.llvm.org/D63663 (detail/ViewSVN)
    by juliehockett
  524. Slightly simplify MappedBlockStream::createIndexedStream() calls

    All callers had a PDBFile object at hand, so call
    Pdb.createIndexedStream() instead, which pre-populates all the arguments
    (and returns nullptr for kInvalidStreamIndex).

    Also change safelyCreateIndexedStream() to only take the string index,
    and update callers. Make the method public and call it in two places
    that manually did the bounds checking before.

    No intended behavior change.

    Differential Revision: https://reviews.llvm.org/D64633 (detail/ViewSVN)
    by nico
  525. [WebAssembly] Make pthread imply bulk-memory, mutable-globals

    Summary:
    This paves the way for using passive segments in pthread builds, which
    will make separate memory files unnecessary. Mutable globals are also
    necessary for the upcoming implementation of TLS.

    Reviewers: aheejin, dschuff

    Subscribers: sbc100, jgravelle-google, sunfish, jfb, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64586 (detail/ViewSVN)
    by tlively
  526. Add explicit newline at end of `llvm-pdbutil dump`

    All dump modes I checked didn't print a trailing newline, so add one. (detail/ViewSVN)
    by nico
  527. [SystemZ] Add support for new cpu architecture - arch13

    This patch series adds support for the next-generation arch13
    CPU architecture to the SystemZ backend.

    This includes:
    - Basic support for the new processor and its features.
    - Support for low-level builtins mapped to new LLVM intrinsics.
    - New high-level intrinsics in vecintrin.h.
    - Indicate support by defining  __VEC__ == 10303.

    Note: No currently available Z system supports the arch13
    architecture.  Once new systems become available, the
    official system name will be added as supported -march name. (detail/ViewSVN)
    by uweigand
  528. [SystemZ] Add support for new cpu architecture - arch13

    This patch series adds support for the next-generation arch13
    CPU architecture to the SystemZ backend.

    This includes:
    - Basic support for the new processor and its features.
    - Assembler/disassembler support for new instructions.
    - CodeGen for new instructions, including new LLVM intrinsics.
    - Scheduler description for the new processor.
    - Detection of arch13 as host processor.

    Note: No currently available Z system supports the arch13
    architecture.  Once new systems become available, the
    official system name will be added as supported -march name. (detail/ViewSVN)
    by uweigand
  529. Remove unused methods in Sancov. (detail/ViewSVN)
    by leonardchan
  530. [WebAssembly] i32.const operands should be signed

    Summary:
    This was causing large addresses to be emitted as negative numbers,
    which rightfully caused crashes in binaryen.

    Reviewers: aheejin, dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64612 (detail/ViewSVN)
    by tlively
  531. [X86] Add NEG to isUseDefConvertible.

    We can use the C flag from NEG to detect that the input was zero.

    Really we could probably use the Z flag too. But C matches what
    we'd do for usubo 0, X.

    Haven't found a test case for this due to the usubo formation
    in CGP. But I verified if I comment out the CGP code this
    transformation catches some of the same cases. (detail/ViewSVN)
    by ctopper
  532. [X86][AVX] Add PR34359 shuffle test case. (detail/ViewSVN)
    by rksimon
  533. [Attributor] Removing unnecessary `virtual` keywords.

    Some function in the Attributor framework are unnecessarily
    marked virtual. This patch removes virtual keyword

    Reviewers: jdoerfert

    Subscribers: hiraditya, llvm-commits

    Differential Revision: https://reviews.llvm.org/D64637 (detail/ViewSVN)
    by sstefan
  534. [Attributor] Deduce "nofree" function attribute

    Summary: Deduce "nofree" function attribute. A more concise description of "nofree" is on D49165.

    Reviewers: jdoerfert

    Reviewed By: jdoerfert

    Subscribers: homerdin, hfinkel, lebedev.ri, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62687 (detail/ViewSVN)
    by uenoku
  535. [libc++] Add XFAILs for CTAD tests on older compilers (detail/ViewSVN)
    by Louis Dionne
  536. Revert [clang-shlib] Fix clang-shlib for PRIVATE dependencies

    This reverts r365825 (git commit 3173c60f96c3ccfc17d403a192ae58e720153c23)

    This is breaking BUILD_SHARED_LIBS=ON builds. Reverting while I rethink it. (detail/ViewSVN)
    by smeenai
  537. CodeGet: Init 32bit pointers with 0xFFFFFFFF

    Summary:
    Patch makes D63967 effective for 32bit platforms and improves pattern
    initialization there. It cuts size of 32bit binary compiled with
    -ftrivial-auto-var-init=pattern by 2% (3% with -Os).

    Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options)
    ```
                       master           patch      diff
    Os pattern   7.915580e+05    7.698424e+05 -0.028387
    O3 pattern   9.953688e+05    9.752952e+05 -0.019325
    ```

    Zero vs Pattern on master
    ```
                   zero       pattern      diff
    Os     7.689712e+05  7.915580e+05  0.031380
    O3     9.744796e+05  9.953688e+05  0.021133
    ```

    Zero vs Pattern with the patch
    ```
                   zero       pattern      diff
    Os     7.689712e+05  7.698424e+05  0.000789
    O3     9.744796e+05  9.752952e+05  0.000742
    ```

    Reviewers: pcc, eugenis, glider, jfb

    Reviewed By: jfb

    Subscribers: hubert.reinterpretcast, dexonsmith, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64597 (detail/ViewSVN)
    by Vitaly Buka
  538. [IndVars] Use exit count reasoning to discharge obviously untaken exits

    Continue in the spirit of D63618, and use exit count reasoning to prove away loop exits which can not be taken since the backedge taken count of the loop as a whole is provably less than the minimal BE count required to take this particular loop exit.

    As demonstrated in the newly added tests, this triggers in a number of cases where IndVars was previously unable to discharge obviously redundant exit tests. And some not so obvious ones.

    Differential Revision: https://reviews.llvm.org/D63733 (detail/ViewSVN)
    by reames
  539. Dump actual line numbers when dumping the AST to JSON.

    The "line" attribute is now the physical line within the source file for the location. A "presumedLine" attribute is printed when the presumed line number does not match the given source line number. We continue to not print repeated line information in subsequent source locations, but we track presumed and actual lines separately. (detail/ViewSVN)
    by aaronballman
  540. Fix some minor coding-style issues in git-llvm. (detail/ViewSVN)
    by jyknight
  541. Allow the 'git-llvm' tool to push to svn from the split repositories
    for 'test-suite', 'lnt', 'zorg', and 'www'.

    This is done by looking at the pathname of the git remote named
    'origin', which is not 100% reliable, but should work in most cases. (detail/ViewSVN)
    by jyknight
  542. [FunctionAttrs] Add a test for "nofree" function attribute

    This patch adds a test for nofree function attribute. (detail/ViewSVN)
    by uenoku
  543. [Support] Move the static initializer install_out_memory_new_handler to InitLLVM

    An application linking against LLVMSupport should not get the gratuitous
    set::std_new_handler call.

    Reviewed By: jfb

    Differential Revision: https://reviews.llvm.org/D64505 (detail/ViewSVN)
    by maskray
  544. Add missing <atomic> include to appease MSVC builds. (detail/ViewSVN)
    by rksimon
  545. Minor cleanup.

    Simplify things a bit by removing unnecessary full type qualification.
    This also happens to avoid a build break with now-unsupported
    Visual Studio 2015.

    Differential Review: https://reviews.llvm.org/D64588 (detail/ViewSVN)
    by tra
  546. Test commit (detail/ViewSVN)
    by uenoku
  547. Support for dumping current PrettyStackTrace on SIGINFO (Ctrl-T)

    Support SIGINFO (and SIGUSR1 for POSIX purposes) to tell what
    long-running jobs are doing, as inspired by BSD tools (including on
    macOS), by dumping the current PrettyStackTrace.

    This adds a new kind of signal handler for non-fatal "info" signals,
    similar to the "interrupt" handler that already exists for SIGINT
    (Ctrl-C). It then uses that handler to update a "generation count"
    managed by the PrettyStackTrace infrastructure, which is then checked
    whenever a PrettyStackTraceEntry is pushed or popped on each
    thread. If the generation has changed---i.e. if the user has pressed
    Ctrl-T---the stack trace is dumped, though unfortunately it can't
    include the deepest entry because that one is currently being
    constructed/destructed.

    https://reviews.llvm.org/D63750 (detail/ViewSVN)
    by jrose
  548. [AMDGPU] Fix DPP combiner check for exec modification

    Summary:
    r363675 changed the exec modification helper function, now called
    execMayBeModifiedBeforeUse, so that if no UseMI is specified it checks
    all instructions in the basic block, even beyond the last use. That
    meant that the DPP combiner no longer worked in any basic block that
    ended with a control flow instruction, and in particular it didn't work
    on code sequences generated by the atomic optimizer.

    Fix it by reinstating the old behaviour but in a new helper function
    execMayBeModifiedBeforeAnyUse, and limiting the number of instructions
    scanned.

    Reviewers: arsenm, vpykhtin

    Subscribers: kzhuravl, nemanjai, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kbarton, MaskRay, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64393 (detail/ViewSVN)
    by foad
  549. [clang-format][tests] Explicitly specify style in some tests

    Summary: This fixes broken tests when doing an out-of-source build that picks up a random .clang-format on the file system due to the default "file" style.

    Reviewers: djasper, klimek, MyDeveloperDay, krasimir

    Reviewed By: MyDeveloperDay

    Subscribers: lebedev.ri, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D61001 (detail/ViewSVN)
    by r.stahl
  550. [LegacyPassManager] Small ModuleCount cleanup (detail/ViewSVN)
    by maskray
  551. Revert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands."

    New test is failing on Windows bot

    This reverts commit 9c0391b36a76f8e3949588de3f44b7314c2318bf. (detail/ViewSVN)
    by russell_gallop
  552. cmake: Fix install of libclang-cpp.so when LLVM_INSTALL_TOOLCHAIN_ONLY=ON

    Summary:
    If CLANG_LINK_CLANG_DYLIB is also enabled, then this library needs to be
    installed.

    Fixes PR42575.

    Reviewers: beanz, smeenai

    Subscribers: mgorny, cfe-commits

    Tags: #clang

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

    Conflicts:
    clang/tools/clang-shlib/CMakeLists.txt (detail/ViewSVN)
    by tstellar
  553. [AMDGPU] Restrict v_cndmask_b32 abs/neg modifiers to f32

    Summary:
    D64497 allowed abs/neg source modifiers on v_cndmask_b32 but it doesn't
    make any sense to apply them to f16 operands; they would interpret the
    bits of the value as an f32, giving nonsensical results. This patch
    restricts them to f32 operands.

    Reviewers: arsenm, hakzsam

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64636 (detail/ViewSVN)
    by foad
  554. Delete dead stores (detail/ViewSVN)
    by maskray
  555. cmake: Add INSTALL_WITH_TOOLCHAIN option to add_*_library macros

    Summary:
    This will simplify the macros by allowing us to remove the hard-coded
    list of libraries that should be installed when
    LLVM_INSTALL_TOOLCHAIN_ONLY is enabled.

    Reviewers: beanz, smeenai

    Reviewed By: beanz

    Subscribers: aheejin, mehdi_amini, mgorny, steven_wu, dexonsmith, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D64580 (detail/ViewSVN)
    by tstellar
  556. Delete dead stores (detail/ViewSVN)
    by maskray
  557. Dump floating-point values as strings when dumping to JSON.

    This fixes a bug where we would have an invalid JSON attribute (e.g., "value": inf). It also increases the precision of the values because they're not represented as approximate doubles with the host architecture's floating-point model. (detail/ViewSVN)
    by aaronballman
  558. Revert "[clangd] Implement typeHierarchy/resolve for subtypes"

    Causing test failure on Windows bot

    This reverts commit 5b9484e559d44bd923fc290e335891b1dd2e17c4. (detail/ViewSVN)
    by russell_gallop
  559. [Driver] Delete dead code (detail/ViewSVN)
    by maskray
  560. [gn] Tag unneeded variable.

    When only building targets without assembly parsers (e.g. `llvm_targets_to_build
    = ["NVPTX"]`), `all_targets` is empty and causes GN to warn about an
    assigned-but-unused variable.

    Differential Revision: https://reviews.llvm.org/D31727 (detail/ViewSVN)
    by bryant
  561. [DAGCombine] narrowExtractedVectorBinOp - wrap subvector extraction in helper. NFCI.

    First step towards supporting 'free' subvector extractions other than concat_vectors. (detail/ViewSVN)
    by rksimon
  562. [LIT] Emit timeout error message only if timeout was reached

    Summary:
    This improves readability of LIT output: previously
    error messages gets emitted that say that there was no error:

    error: command reached timeout: False

    Patch by Alexey Sachkov.

    Reviewers: ddunbar, mgorny, modocache

    Reviewed By: mgorny

    Subscribers: delcypher, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64240 (detail/ViewSVN)
    by bader
  563. [clangd] Fixed toHalfOpenFileRange

    Summary:
    - Fixed toHalfOpenFileRange to work for macros as well as template
    instantiations
    - Added unit tests

    Breaking test case for older version of toHalfOpenFileRange:
    \# define FOO(X) X++
    int a = 1;
    int b = FOO(a);
    toHalfOpenFileRange for the sourceRange of VarDecl for b returned the
    wrong Range.

    Reviewers: sammccall, kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64562 (detail/ViewSVN)
    by sureyeaah
  564. [InstCombine] Fold select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y) to ashr (X, Y))

    Summary:
    (select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y)) -> ashr (X, Y))
    (select (icmp slt x, 1), ashr (X, Y), lshr (X, Y)) -> ashr (X, Y))

    Fixes PR41173

    Alive proof by @lebedev.ri (thanks)
    Name: PR41173
      %cmp = icmp slt i32 %x, 1
      %shr = lshr i32 %x, %y
      %shr1 = ashr i32 %x, %y
      %retval.0 = select i1 %cmp, i32 %shr1, i32 %shr
      =>
      %retval.0 = ashr i32 %x, %y

    Optimization: PR41173
    Done: 1
    Optimization is correct!

    Reviewers: lebedev.ri, spatel

    Reviewed By: lebedev.ri

    Subscribers: nikic, craig.topper, llvm-commits, lebedev.ri

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64285 (detail/ViewSVN)
    by xbolva00
  565. Fix test case of llvm-nm using implicit a.out (detail/ViewSVN)
    by abrachet
  566. [test/Object, obj2yaml] - Move test cases from test/Object and cleanup.

    test/Object is not correct place to have tests that check obj2yaml
    functionality, because we have test/tools/obj2yaml folder for that.

    In this patch I merged a few test cases with their YAMLs from Inputs
    folder, converted one of binary inputs and moved them to
    tools/obj2yaml folder.

    There are still another tests that might need the same, so it is initial step.

    Differential revision: https://reviews.llvm.org/D64555 (detail/ViewSVN)
    by grimar
  567. [tools] [llvm-nm] Default to reading from stdin not a.out

    Summary: This moves away from defaulting to a.out and uses stdin only if stdin has a file redirected to it. This has been discussed on the llvm-dev mailing list [[ https://lists.llvm.org/pipermail/llvm-dev/2019-July/133642.html | here ]].

    Reviewers: jhenderson, rupprecht, MaskRay, chrisjackson

    Reviewed By: jhenderson, MaskRay

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64290 (detail/ViewSVN)
    by abrachet
  568. [clangd] Prioritize indexing of files that share a basename with the open file.

    Summary:
    In practice, opening Foo.h will still often result in Foo.cpp making the
    second index build instead of the first, as the rebuild policy doesn't
    know to wait.

    Reviewers: kadircet

    Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64575 (detail/ViewSVN)
    by sammccall
  569. [JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands.

    Summary:
    It's common to use compiler wrappers by setting CC="gomacc clang++".
    This results in both args appearing in compile_commands.json, and clang's driver
    can't handle this.

    This patch attempts to recognize this pattern (by looking for well-known
    wrappers) and dropping argv0 in this case.

    It conservatively ignores other cases for now:
    - wrappers with unknown names
    - wrappers that accept -flags
    - wrappers where the compiler to use is implied (usually cc or gcc)

    This is done at the JSONCompilationDatabase level rather than somewhere more
    fundamental, as (hopefully) this isn't a general conceptual problem, but a messy
    aspect of the nature of the ecosystem around compile_commands.json.
    i.e. compilation databases more tightly tied to the build system should not have
    this problem.

    Reviewers: phosek, klimek

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64297 (detail/ViewSVN)
    by sammccall
  570. Revert "[DwarfDebug] Dump call site debug info"

    A build failure was found on the SystemZ platform.

    This reverts commit 9e7e73578e54cd22b3c7af4b54274d743b6607cc. (detail/ViewSVN)
    by djtodoro
  571. [clangd] Move the expandAuto tweak from global namespace into annoymous namespace. (detail/ViewSVN)
    by hokein
  572. [Object/ELF] - Improve error reporting for notes.

    This patch improves the error messages reported for
    note sections and phdrs and also makes a cleanup for
    existent test case.

    Differential revision: https://reviews.llvm.org/D64470 (detail/ViewSVN)
    by grimar
  573. [NFC][PowerPC] Added test for MachinePRE. (detail/ViewSVN)
    by lkail
  574. [clangd] Don't run the prepare for tweaks that are disabled.

    Summary: Previously, we ran the prepare, even for the tweaks that are disabled.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64565 (detail/ViewSVN)
    by hokein
  575. [RISCV] Allow parsing dot '.' in assembly

    Summary:
    Useful for jumps, such as `j .`.

    I am not sure who should review this. Do not hesitate to change the reviewers if needed.

    Reviewers: asb, jrtc27, lenary

    Reviewed By: lenary

    Subscribers: MaskRay, lenary, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits

    Tags: #llvm

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

    Patch by John LLVM (JohnLLVM) (detail/ViewSVN)
    by lenary
  576. Enable compiler-rt on SPARC

    This patch enables compiler-rt on SPARC targets. Most of the changes are straightforward:

    - Add 32 and 64-bit sparc to compiler-rt

    - lib/builtins/fp_lib.h needed to check if the int128_t and uint128_t types exist (which they don't on sparc)

    There's one issue of note: many asan tests fail to compile on Solaris/SPARC:

    fatal error: error in backend: Function "_ZN7testing8internal16BoolFromGTestEnvEPKcb": over-aligned dynamic alloca not supported.

    Therefore, while asan is still built, both asan and ubsan-with-asan testing is disabled. The
    goal is to check if asan keeps compiling on Solaris/SPARC. This serves asan in gcc,
    which doesn't have the problem above and works just fine.

    With this patch, sparcv9-sun-solaris2.11 test results are pretty good:

    Failing Tests (9):
        Builtins-sparc-sunos :: divtc3_test.c
        Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c
        Builtins-sparcv9-sunos :: divtc3_test.c
    [...]
        UBSan-Standalone-sparc :: TestCases/TypeCheck/misaligned.cpp
        UBSan-Standalone-sparcv9 :: TestCases/TypeCheck/misaligned.cpp

    The builtin failures are due to Bugs 42493 and 42496. The tree contained a few additonal
    patches either currently in review or about to be submitted.

    Tested on sparcv9-sun-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D40943 (detail/ViewSVN)
    by ro
  577. [Sanitizers] Fix SanitizerCommon-Unit :: ./Sanitizer-*-Test/MemoryMappingLayout.DumpListOfModules on Solaris

    The MemoryMappingLayout.DumpListOfModules currently FAILs on Solaris:

      [ RUN      ] MemoryMappingLayout.DumpListOfModules
      /vol/llvm/src/compiler-rt/local/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc:52: Failure
      Value of: found
        Actual: false
      Expected: true
      [  FAILED  ] MemoryMappingLayout.DumpListOfModules (22 ms)

    The problem is that the test expects the executable name from modules[i].full_name(),
    however the pr_mapname field of struct prmap is just the entry in /proc/<pid>/object,
    which is "a.out" instead of "Sanitizer-i386-Test".  Fortunately, the real name can
    be determined by looking in proc/<pid>/path where "a.out" is a symlink to the
    real path.

    Tested on x86_64-pc-solaris2.11.

    Differential Revision: https://reviews.llvm.org/D64559 (detail/ViewSVN)
    by ro
  578. Test commit. NFC.

    Formatting fix. (detail/ViewSVN)
    by bryant
  579. [Driver] Delete --no-add-needed for RHEL7 or newer

    This is really not needed. gcc driver doesn't add this option.
    BTW, since binutils 2.22, --no-copy-dt-needed-entries (new name of
    --no-add-needed) is the default. (detail/ViewSVN)
    by maskray
  580. [YAMLIO] Wrap explicit specialization in llvm::yaml to appease build bots (detail/ViewSVN)
    by maskray
  581. Fix odd variable names. (detail/ViewSVN)
    by ruiu
  582. [test] Delete trailing spaces from YAML tests after D65566/r365869 (detail/ViewSVN)
    by maskray
  583. [test] Delete trailing spaces from YAML tests (detail/ViewSVN)
    by maskray
  584. test/Driver/fsanitize.c: delete -target x86_64-linux-gnu from tests that should always be available

    Follow-up of D64317/r365587. (detail/ViewSVN)
    by maskray
  585. [AMDGPU] Fixed comment. NFC. (detail/ViewSVN)
    by rampitec
  586. [mips] Fix JmpLink to texternalsym and tglobaladdr on mcroMIPS R6

    There is not match for the `MipsJmpLink texternalsym` and `MipsJmpLink
    tglobaladdr` patterns for microMIPS R6. As a result LLVM incorrectly
    selects the `JALRC16` compact 2-byte instruction which takes a target
    instruction address from a register only and assign `R_MIPS_32` relocation
    for this instruction. This relocation completely overwrites `JALRC16`
    and nearby instructions.

    This patch adds missed matching patterns, selects `BALC` instruction and
    assign a correct `R_MICROMIPS_PC26_S1` relocation.

    Differential Revision: https://reviews.llvm.org/D64552 (detail/ViewSVN)
    by atanasyan
  587. [YAMLIO] Remove trailing spaces when outputting maps

    llvm::yaml::Output::paddedKey unconditionally outputs spaces, which
    are superfluous if the value to be dumped is a sequence or map.
    Change `bool NeedsNewLine` to `StringRef Padding` so that it can be
    overridden to `\n` if the value is a sequence or map.

    An empty map/sequence is special. It is printed as `{}` or `[]` without
    a newline, while a non-empty map/sequence follows a newline. To handle
    this distinction, add another variable `PaddingBeforeContainer` and does
    the special handling in endMapping/endSequence.

    Reviewed By: grimar, jhenderson

    Differential Revision: https://reviews.llvm.org/D64566 (detail/ViewSVN)
    by maskray
  588. [clangd] Implement typeHierarchy/resolve for subtypes

    Summary:
    This allows the client to resolve subtypes one level at a time.

    For supertypes, this is not necessary, because we eagerly compute
    supertypes and return all levels.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64308 (detail/ViewSVN)
    by nridge
  589. [X86][PowerPC] Support -mlong-double-128

    This patch makes the driver option -mlong-double-128 available for X86
    and PowerPC. The CC1 option -mlong-double-128 is available on all targets
    for users to test on unsupported targets.

    On PowerPC, -mlong-double-128 uses the IBM extended double format
    because we don't support -mabi=ieeelongdouble yet (D64283).

    Reviewed By: rnk

    Differential Revision: https://reviews.llvm.org/D64277 (detail/ViewSVN)
    by maskray
  590. docs/GithubMove.rst: Add link to GitHub migration status page (detail/ViewSVN)
    by tstellar
  591. Return Undef from isBytewiseValue for empty arrays or structs

    Reviewers: pcc, eugenis

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64052 (detail/ViewSVN)
    by Vitaly Buka
  592. NFC: Unforget a colon in a few CHECK: directives.

    Differential Revision: https://reviews.llvm.org/D64526 (detail/ViewSVN)
    by dergachev
  593. [PowerPC] Default to -fomit-frame-pointer when optimization is enabled

    NetBSD, Linux, CloudABI and Hurd already omit frame pointer for PowerPC.
    Make it do so for other platforms. (detail/ViewSVN)
    by maskray
  594. [analyzer] exploded-graph-rewriter: Improve source location dumps.

    - Correctly display macro expansion and spelling locations.
    - Use the same procedure to display location context call site locations.
    - Display statement IDs for program points. (detail/ViewSVN)
    by dergachev
  595. [Driver] Refactor interaction between -f(no-)?omit-frame-pointer and -m(no-)?omit-leaf-frame-pointer

    Use a tri-state enum to represent shouldUseFramePointer() and
    shouldUseLeafFramePointer().

    This simplifies the logic and fixes PR9825:
      -fno-omit-frame-pointer doesn't imply -mno-omit-leaf-frame-pointer.

    and PR24003:
      /Oy- /O2 should not omit leaf frame pointer: this matches MSVC x86-32.
      (/Oy- is a no-op on MSVC x86-64.)

    and:
      when CC1 option -mdisable-fp-elim if absent, -momit-leaf-frame-pointer
      can also be omitted.

    The new behavior matches GCC:
      -fomit-frame-pointer wins over -mno-omit-leaf-frame-pointer
      -fno-omit-frame-pointer loses out to -momit-leaf-frame-pointer

    The behavior makes lots of sense. We have 4 states:

    - 00) leaf retained, non-leaf retained
    - 01) leaf retained, non-leaf omitted  (this is invalid)
    - 10) leaf omitted, non-leaf retained  (what -momit-leaf-frame-pointer was designed for)
    - 11) leaf omitted, non-leaf omitted

    "omit" options taking precedence over "no-omit" options is the only way
    to make 3 valid states representable with -f(no-)?omit-frame-pointer and
    -m(no-)?omit-leaf-pointer.

    Reviewed By: ychen

    Differential Revision: https://reviews.llvm.org/D64294 (detail/ViewSVN)
    by maskray
  596. [MachinePipeliner] Fix order for nodes with Anti dependence in same cycle

    Summary:
    Problem exposed in PowerPC functional testing.

    We did not consider Anti dependence for nodes in same cycle,
    so we may end up generating bad machine code.
    eg: the reduced test won't verify.

    *** Bad machine code: Using an undefined physical register ***
    - function:    lame_encode_buffer_interleaved
    - basic block: %bb.4  (0x4bde4e12928)
    - instruction: %29:gprc = ADDZE %27:gprc, implicit-def dead $carry, implicit $carry
    - operand 3:   implicit $carry

    Reviewers: bcahoon, kparzysz, hfinkel

    Subscribers: MaskRay, wuzish, nemanjai, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64192 (detail/ViewSVN)
    by jsji
  597. Handle IntToPtr in isBytewiseValue

    Summary:
    This helps with more efficient use of memset for pattern initialization

    From @pcc prototype for -ftrivial-auto-var-init=pattern optimizations

    Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options)
    ```
                       master           patch      diff
    Os           8.238864e+05    8.238864e+05       0.0
    O3           1.054797e+06    1.054797e+06       0.0
    Os zero      8.292384e+05    8.292384e+05       0.0
    O3 zero      1.062626e+06    1.062626e+06       0.0
    Os pattern   8.579712e+05    8.338048e+05 -0.030299
    O3 pattern   1.090502e+06    1.067574e+06 -0.020481
    ```

    Zero vs Pattern on master
    ```
                   zero       pattern      diff
    Os     8.292384e+05  8.579712e+05  0.036578
    O3     1.062626e+06  1.090502e+06  0.025124
    ```

    Zero vs Pattern with the patch
    ```
                   zero       pattern      diff
    Os     8.292384e+05  8.338048e+05  0.003333
    O3     1.062626e+06  1.067574e+06  0.003193
    ```

    Reviewers: pcc, eugenis

    Subscribers: hiraditya, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D63967 (detail/ViewSVN)
    by Vitaly Buka
  598. Codegen, NFC: 32bit test in auto-var-init.cpp (detail/ViewSVN)
    by Vitaly Buka
  599. Mark destroying delete test as UNSUPPORTED with clang 7 (detail/ViewSVN)
    by ericwf
  600. Tolerate import errors in "not.py" implementation (detail/ViewSVN)
    by ericwf
  601. Reorganize the 'bit' header to make most of the facilities available for internal use pre-C++20. NFC for external users (detail/ViewSVN)
    by marshall
  602. NFC: lit: python3 compatibility for functions
    usePlatformSdkOnDarwin/findPlatformSdkVersionOnMacOS

    These functions should decode subprocess output (detail/ViewSVN)
    by arphaman
  603. [InstCombine] Reorder pow() transformations (NFC)

    Move the transformation from `powf(x, itofp(y))` to `powi(x, y)` to the
    group of transformations related to the exponent. (detail/ViewSVN)
    by evandro
  604. Re-Revert Devirtualize destructor of final class.

    This reverts r365509 (git commit d088720edad9c29ee0d622b5d69092e18a9ac0bd)

    This is a second revert[1] due to failures in internal test cases (shared offline) found during more thorough testing.

    [1] Original patch commited as r364100, reverted as r364359, recommitted as r365509 (detail/ViewSVN)
    by rupprecht
  605. [clangd] Add a missing early return in getTypeHierarchy()

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64307 (detail/ViewSVN)
    by nridge
  606. Add another buildbot username to the workaround list (detail/ViewSVN)
    by ericwf
  607. Attempt to override broken buildbot config for libc++abi.

    The buildbots were changed to pass -DLIBCXX_CXX_ABI=libcxxabi, but
    they don't provide an include path for the library, so cxxabi.h is
    never found while building libc++.

    This is a temporary change until the buildbots are updated or until
    D63883 lands in a form that unbreaks the bots (detail/ViewSVN)
    by ericwf
  608. [AMDGPU] Skip calculating callee saved registers for entry function.

    Reviewers: arsenm

    Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64596 (detail/ViewSVN)
    by hliao
  609. [CMake][Fuchsia] Use RelWithDebInfo to build runtimes

    We want to preserve debug info in our runtimes to aid symbolization and
    debugging; for shared libraries this will be stripped away during
    install-stripped step and distributed via .build-id, for static archives
    it's part of the archive and it's a responsibility of the consumer to
    strip it away in the final binary if not needed.

    Differential Revision: https://reviews.llvm.org/D64605 (detail/ViewSVN)
    by phosek
  610. [clangd] Fix MSVC build failure.

    http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/26898 (detail/ViewSVN)
    by probinson
  611. AMDGPU: s_waitcnt field should be treated as unsigned

    Also make it an ImmLeaf, so it should work with global isel as well,
    which was part of the point of moving it in the first place. (detail/ViewSVN)
    by arsenm
  612. Use clang driver for libfuzzer tests on Windows

    Summary:
    There's no real reason to use clang-cl on Windows, the clang driver
    works just as well. This fixes a test which uses the -O0 flag, which was
    recently removed from clang-cl to match MSVC, which lacks this flag.

    While I'm here, remove the explicit -std=c++11 flag. Previously, this
    flag was necessary when the default C++ standard was C++98. Now that the
    default is C++14, this is no longer necessary. It's problematic on
    Windows, because the Visual C++ standard library relies on C++14
    features, and attempting to compile it with C++11 results in errors.
    Rather than adding logic to conditionally set the standard to C++11 only
    on non-Win, this flag can be removed.

    See http://lab.llvm.org:8011/builders/clang-x64-windows-msvc and
    https://reviews.llvm.org/D64506.

    Reviewers: morehouse, thakis

    Subscribers: #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D64587 (detail/ViewSVN)
    by rnk
  613. Fix memory leak in set and map.

    When assigning an initializer list into set/map, libc++ would
    leak memory if the initializer list contained equivalent keys
    because we failed to check if the insertion was successful. (detail/ViewSVN)
    by ericwf
  614. [sancov] Ignore PC samples with value 0

    The sancov runtime for the (Fuchsia) Zircon kernel delivers results
    in the standard format, but as the full array of possible samples
    with 0 in uncovered slots. That runtime delivers "live" data and
    has no final "export" pass to compactify out the uncovered slots,
    and it seems silly to require another offline tool just for that.

    Patch By: mcgrathr
    Differential Revision: https://reviews.llvm.org/D63695 (detail/ViewSVN)
    by phosek
  615. [NewPM] Port Sancov

    This patch contains a port of SanitizerCoverage to the new pass manager. This one's a bit hefty.

    Changes:

    - Split SanitizerCoverageModule into 2 SanitizerCoverage for passing over
      functions and ModuleSanitizerCoverage for passing over modules.
    - ModuleSanitizerCoverage exists for adding 2 module level calls to initialization
      functions but only if there's a function that was instrumented by sancov.
    - Added legacy and new PM wrapper classes that own instances of the 2 new classes.
    - Update llvm tests and add clang tests.

    Differential Revision: https://reviews.llvm.org/D62888 (detail/ViewSVN)
    by leonardchan
  616. [AMDGPU] Fixed asan error with agpr spilling

    Instruction was used after it was erased. (detail/ViewSVN)
    by rampitec
  617. Fix build errors LLVM tests are disabled.

    Original patch from alanbaker@google.com

    Fixes the error:
    CMake Error in <...>/llvm/cmake/modules/CMakeLists.txt:

    export called with target "LLVMTestingSupport" which requires target
    "gtest" that is not in the export set.

    This occurs when LLVM is embedded in a larger project, but is configured not to
    include tests. If testing is disabled gtest isn't available and LLVM fails to
    configure.

    Differential revision: https://reviews.llvm.org/D63097 (detail/ViewSVN)
    by dnovillo
  618. CodeGen: Suppress c++ warnings in test (detail/ViewSVN)
    by Vitaly Buka
  619. [mips] Simplify test case. NFC

    Before rL295040 the linker just crashed when a GOT relocation (R_MIPS_GOT16)
    comes from a merge section. To ensure that this bug still fixed it's enough
    to check that the linker does not crash and create GOT entries. (detail/ViewSVN)
    by atanasyan
  620. [AMDGPU] gfx908 agpr spilling

    Differential Revision: https://reviews.llvm.org/D64594 (detail/ViewSVN)
    by rampitec
  621. Fix a Python3 compatibility error

      File "clang/test/lit.cfg.py", line 186, in <module>
        config.available_features.add('macos-sdk-' + macOSSDKVersion)
    TypeError: must be str, not bytes (detail/ViewSVN)
    by Azharuddin Mohammed
  622. Rename libclang_shared to libclang-cpp

    Summary: Fix bug 42475

    Reviewers: beanz, tstellar

    Reviewed By: beanz

    Subscribers: kimgr, mgorny, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64278 (detail/ViewSVN)
    by sylvestre
  623. [Attributor] Deduce "nosync" function attribute.

    Introduce and deduce "nosync" function attribute to indicate that a function
    does not synchronize with another thread in a way that other thread might free memory.

    Reviewers: jdoerfert, jfb, nhaehnle, arsenm

    Subscribers: wdng, hfinkel, nhaenhle, mehdi_amini, steven_wu,
    dexonsmith, arsenm, uenoku, hiraditya, jfb, llvm-commits

    Differential Revision: https://reviews.llvm.org/D62766 (detail/ViewSVN)
    by sstefan
  624. [AMDGPU] gfx908 hazard recognizer

    Differential Revision: https://reviews.llvm.org/D64593 (detail/ViewSVN)
    by rampitec
  625. [InstCombine][NFCI] Add more test coverage to onehot_merge.ll

    Prep work for upcoming patch D64275. (detail/ViewSVN)
    by huihuiz
  626. [analyzer] exploded-graph-rewriter: Fix filenames in program point.

    Fix a typo in JSON field name. (detail/ViewSVN)
    by dergachev
  627. [AMDGPU] gfx908 scheduling

    Differential Revision: https://reviews.llvm.org/D64590 (detail/ViewSVN)
    by rampitec
  628. [clang-shlib] Fix clang-shlib for PRIVATE dependencies

    Any static library with a PRIVATE dependency ends up with a
    $<LINK_ONLY:...> generator expression in its INTERFACE_LINK_LIBRARIES,
    which won't be evaluated by the $<TARGET_PROPERTY:...>, so we end up
    with an unevaluated generator expression in the generated build file and
    Ninja chokes on the dollar sign. Just use the static library directly
    for its dependencies instead of trying to propagate dependencies
    manually.

    Differential Revision: https://reviews.llvm.org/D64579 (detail/ViewSVN)
    by smeenai
  629. [AMDGPU] gfx908 mfma support

    Differential Revision: https://reviews.llvm.org/D64584 (detail/ViewSVN)
    by rampitec
  630. [COFF] Share the tail in delayimport symbol thunks

    E.g. for x86_64, previously each symbol's thunk was 87 bytes. Now
    there's a 12 byte thunk per symbol, plus a shared 83 byte tail
    function.

    This is similar to what both MS link.exe and GNU tools do for
    delay imports.

    Differential Revision: https://reviews.llvm.org/D64288 (detail/ViewSVN)
    by mstorsjo
  631. CodeGen, NFC: Test for auto-init for 32bit pointers (detail/ViewSVN)
    by Vitaly Buka
  632. [OPENMP]Improve handling of analysis of unsupported VLAs in reductions.

    Fixed the processing of the unsupported VLAs in the reduction clauses.
    Used targetDiag if the diagnostics can be delayed and emit it
    immediately if the target does not support VLAs and we're parsing target
    directive with the reduction clauses. (detail/ViewSVN)
    by abataev
  633. Open native file handles to avoid converting from FDs, NFC

    Follow up to r365588. (detail/ViewSVN)
    by rnk
  634. [UpdateTestChecks] Emit warning when invalid test paths

    Summary:
    Recently I ran into the following issue:

    ./update_test_checks.py /path/not-existing-file.ll

    The script was silent and I was suprised why the real test file hadn't been updated.

    Solution:
    Emit warning if we detect this problem.



    Reviewers: lebedev.ri, spatel, jdoerfert, nikic

    Reviewed By: lebedev.ri, spatel, jdoerfert, nikic

    Subscribers: jdoerfert, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64572 (detail/ViewSVN)
    by xbolva00
  635. [scudo][standalone] NFC corrections

    Summary:
    A few corrections:
    - rename `TransferBatch::MaxCached` to `getMaxCached` to conform with
      the style guide;
    - move `getBlockBegin` from `Chunk::` to `Allocator::`: I believe it
      was a fallacy to have this be a `Chunk` method, as chunks'
      relationship to backend blocks are up to the frontend allocator. It
      makes more sense now, particularly with regard to the offset. Update
      the associated chunk test as the method isn't available there
      anymore;
    - add a forgotten `\n` to a log string;
    - for `releaseToOs`, instead of starting at `1`, start at `0` and
      `continue` on `BatchClassId`: in the end it's identical but doesn't
      assume a particular class id for batches;
    - change a `CHECK` to a `reportOutOfMemory`: it's a clearer message

    Reviewers: hctim, morehouse, eugenis, vitalybuka

    Reviewed By: hctim

    Subscribers: delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D64570 (detail/ViewSVN)
    by cryptoad
  636. [NFC] Revisited tests for D64285 (detail/ViewSVN)
    by xbolva00
  637. Revert "[CGDebugInfo] Simplify EmitFunctionDecl parameters, NFC"

    This reverts commit 1af41074445229fea66b99710a850e5f42ecfa95. (detail/ViewSVN)
    by Vedant Kumar
  638. [NVPTX] Remove now unused atomic.load.add.f32 intrinsics (detail/ViewSVN)
    by d0k
  639. [PowerPC][NFC] Update testcase to avoid dead code

    The original testcase might be optimized out due to dead code,
    update the testcase to avoid it. (detail/ViewSVN)
    by jsji
  640. [CGDebugInfo] Simplify EmitFunctionDecl parameters, NFC

    Replace a `llvm::Function *` parameter with a bool, which seems harder
    to set to the wrong value by accident.

    Differential Revision: https://reviews.llvm.org/D64540 (detail/ViewSVN)
    by Vedant Kumar
  641. [Driver] -noprofilelib flag

    This flag is analoguous to other flags like -nostdlib or -nolibc
    and could be used to disable linking of profile runtime library.
    This is useful in certain environments like kernel, where profile
    instrumentation is still desirable, but we cannot use the standard
    runtime library. (detail/ViewSVN)
    by phosek
  642. [lld-link] implement -thinlto-{prefix,object-suffix}-replace

    Summary:
    Adds the following two options to lld-link:

    -thinlto-prefix-replace: allows replacing a prefix in paths generated
    for ThinLTO. This can be used to ensure index files and native object
    files are stored in unique directories, allowing multiple distributed
    ThinLTO links to proceed concurrently.

    -thinlto-object-suffix-replace: allows replacing a suffix in object
    file paths involved in ThinLTO. This allows minimized index files to
    be used for the thin link while storing the paths to the full bitcode
    files for subsequent steps (code generation and final linking).

    Reviewers: ruiu, tejohnson, pcc, rnk

    Subscribers: mehdi_amini, steven_wu, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64542 (detail/ViewSVN)
    by inglorion
  643. [TSan] Move DECLARE_REAL macro outside of namespace

    This should fix the "undefined reference to
    tsan::interception::real_setjmp" linker errors. (detail/ViewSVN)
    by yln
  644. [profile][test] Fix Profile-* :: instrprof-merge.c etc. on SPARC

    While working on https://reviews.llvm.org/D40900 (which effectively is about enabling compiler-rt on sparc these days), I came across two failing profile testcases:

      Profile-sparc :: instrprof-merge-match.test
      Profile-sparc :: instrprof-merge.c
      Profile-sparcv9 :: instrprof-merge-match.test
      Profile-sparcv9 :: instrprof-merge.c

    All of them crashed with a SIGBUS in __llvm_profile_merge_from_buffer:

      Thread 2 received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 1 (LWP 1)]
      0x00012368 in __llvm_profile_merge_from_buffer (
          ProfileData=0x2384c <main.Buffer> "\377lprofR\201", ProfileSize=360)
          at /vol/llvm/src/llvm/local/projects/compiler-rt/lib/profile/InstrProfilingMerge.c:95
      95        SrcDataEnd = SrcDataStart + Header->DataSize;

    where Header is insufficiently aligned for a strict-alignment target like SPARC.

    Fixed by forcing the alignment to uint64_t, the members of struct __llvm_profile_header,
    in the callers.

    Tested on sparcv9-sun-solaris2.11.

    https://reviews.llvm.org/D64498 (detail/ViewSVN)
    by ro
  645. [clangd][NFC] Decrease template depth limit in RecursiveHierarchyUnbounded test

    ...to minimize the chance of stack overflow before reaching the limit. (detail/ViewSVN)
    by Jan Korous
  646. [X86] Pre commit test cases for D64574. Along with a test case for PR42571. NFC (detail/ViewSVN)
    by ctopper
  647. [WebAssembly] Assembler: support negative float constants.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64367 (detail/ViewSVN)
    by aardappel
  648. Explicitly define __STDC_FORMAT_MACROS for PRIu64

    Summary:
    Builds are failing on RHEL machines because of PRIu64.

    lvm/projects/compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp:420:50: error: expected ')'

    `snprintf(ThreadBuffer, kThreadBufferLen, "%" PRIu64, ThreadID);`
    inttypes.h in RHEL uses PRIu64 macros only when __STDC_FORMAT_MACROS is defined.

    Author: DTharun

    Reviewers: hctim

    Reviewed By: hctim

    Differential Revision: https://reviews.llvm.org/D64388 (detail/ViewSVN)
    by hctim
  649. [lld-link] implement -thinlto-index-only

    Summary:
    This implements -thinlto-index-only, -thinlto-index-only:,
    and -thinlto-emit-imports-files options in lld-link. They are
    analogous to their counterparts in ld.lld: -thinlto-index-only
    causes us to perform ThinLTO's thin link and write index files,
    but not perform code generation. -thinlto-index-only: does the
    same, but also writes a text file listing the native object
    files expected to be generated. -thinlto-emit-imports-files
    creates a text file next to each index file, listing the files
    to import from.

    Reviewers: ruiu, tejohnson, pcc, rnk

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64461 (detail/ViewSVN)
    by inglorion
  650. [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012

    Differential Revision: https://reviews.llvm.org/D64364 (detail/ViewSVN)
    by yaxunl
  651. [CodeGen] NVPTX: Switch from atomic.load.add.f32 to atomicrmw fadd (detail/ViewSVN)
    by d0k
  652. [Docs] Add standardized header links to analyzer doc

    Summary:
    Header links should have some standard form so clang tidy
    docs can easily reference them. The form is as follows.

    Start with the analyzer full name including packages.
    Replace all periods with dashes and lowercase everything.

    Ex: core.CallAndMessage -> core-callandmessage

    Reviewers: JonasToth, aaron.ballman, NoQ, Szelethus

    Reviewed By: aaron.ballman, Szelethus

    Subscribers: nickdesaulniers, lebedev.ri, baloghadamsoftware, mgrang, a.sidorin, Szelethus, jfb, donat.nagy, dkrupp, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64543 (detail/ViewSVN)
    by nathan-huckleberry
  653. [NVPTX] Use atomicrmw fadd instead of intrinsics

    AutoUpgrade the old intrinsics to atomicrmw fadd. (detail/ViewSVN)
    by d0k
  654. gn build: Merge r365792 (detail/ViewSVN)
    by nico
  655. [clangd] Avoid template in Task constructor, hopefully fix MSVC build (detail/ViewSVN)
    by sammccall
  656. [clangd] Consume llvm::Error in test after r365792 (detail/ViewSVN)
    by sammccall
  657. [clangd] Implementation of auto type expansion.

    Add a tweak for clangd to replace an auto keyword to the deduced type.

    This way a user can declare something with auto and then have the
    IDE/clangd replace auto with whatever type clangd thinks it is. In case
    of long/complext types this makes is reduces writing effort for the
    user.

    The functionality is similar to the hover over the auto keyword.

    Example (from the header):

    ```
    /// Before:
    ///    auto x = Something();
    ///    ^^^^
    /// After:
    ///    MyClass x = Something();
    ///    ^^^^^^^
    ```

    Patch by kuhnel! (Christian Kühnel)
    Differential Revision: https://reviews.llvm.org/D62855 (detail/ViewSVN)
    by sammccall
  658. [X86] Merge negated ISD::SUB nodes into X86ISD::SUB equivalent (PR40483)

    Follow up to D58597, where it was noted that the commuted ISD::SUB variant
    was having problems with lack of combines.

    See also D63958 where we untangled setcc/sub pairs.

    Differential Revision: https://reviews.llvm.org/D58875 (detail/ViewSVN)
    by spatel
  659. [scudo][standalone] Merge Spin & Blocking mutex into a Hybrid one

    Summary:
    We ran into a problem on Fuchsia where yielding threads would never
    be deboosted, ultimately resulting in several threads spinning on the
    same TSD, and no possibility for another thread to be scheduled,
    dead-locking the process.

    While this was fixed in Zircon, this lead to discussions about if
    spinning without a break condition was a good decision, and settled on
    a new hybrid model that would spin for a while then block.

    Currently we are using a number of iterations for spinning that is
    mostly arbitrary (based on sanitizer_common values), but this can
    be tuned in the future.

    Since we are touching `common.h`, we also use this change as a vehicle
    for an Android optimization (the page size is fixed in Bionic, so use
    a fixed value too).

    Reviewers: morehouse, hctim, eugenis, dvyukov, vitalybuka

    Reviewed By: hctim

    Subscribers: srhines, delcypher, jfb, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D64358 (detail/ViewSVN)
    by cryptoad
  660. Fix a few 'no newline at end of file' warnings that Xcode emits

    (Xcode even has a snazzy "Fix" button, but clicking that inserts two
    newlines. So close!) (detail/ViewSVN)
    by nico
  661. [libc++] Implement deduction guides for <unordered_set>

    Thanks to Arthur O'Dwyer for the patch.
    Differential Revision: https://reviews.llvm.org/D58617 (detail/ViewSVN)
    by Louis Dionne
  662. gn build: Merge r365773 (detail/ViewSVN)
    by nico
  663. [OPENMP]Initial fix PR42392: Improve -Wuninitialized warnings for OpenMP programs.

    Summary:
    Some OpenMP clauses rely on the values of the variables. If the variable
    is not initialized and used in OpenMP clauses that depend on the
    variables values, it should be reported that the uninitialized variable
    is used in the OpenMP clause expression.
    This patch adds initial processing for uninitialized variables in OpenMP
    constructs. Currently, it checks for use of the uninitialized variables
    in the structured blocks.

    Reviewers: NoQ, Szelethus, dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet

    Subscribers: rnkovacs, guansong, jfb, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64356 (detail/ViewSVN)
    by abataev
  664. [DAGCombine] narrowInsertExtractVectorBinOp - add CONCAT_VECTORS support

    We already split extract_subvector(binop(insert_subvector(v,x),insert_subvector(w,y))) -> binop(x,y).

    This patch adds support for extract_subvector(binop(concat_vectors(),concat_vectors())) cases as well.

    In particular this means we don't have to wait for X86 lowering to convert concat_vectors to insert_subvector chains, which helps avoid some cases where demandedelts/combine calls occur too late to split large vector ops.

    The fast-isel-store.ll load folding regression is annoying but I don't think is that critical.

    Differential Revision: https://reviews.llvm.org/D63653 (detail/ViewSVN)
    by rksimon
  665. RegUsageInfoCollector: Skip calling conventions I missed before (detail/ViewSVN)
    by arsenm
  666. Fix support for user mode emulation when using cmake/lit.

    When using user mode emulation, i.e. cross-compiling programs for a
    different target and running them on a host under qemu user mode
    emulation, timeit and fpcmp should have host versions, not target
    versions.

    Running under user mode emulation had been broken for a while,
    presumably since https://reviews.llvm.org/rT341257

    I first tried an alternative approach where fpcmp would be run under qemu user
    mode emulation too.  That in itself worked, but if going for that approach, for
    orthogonality reasons, we probably should also run the other helper programs as
    if they were running on the target, i.e. also under qemu user mode emulation.
    I ran into issues with running timeit under qemu user mode emulation and also
    running RunSafely.sh under user mode emulation doesn't seem trivial.

    In the end, it seemed better to me to explicitly add a cmake option to mark
    that we're running under qemu user mode emulation, and in that mode, only aim
    to run the test/benchmark under qemu user mode emulation, rather than also all
    the helper programs (such as fpcmp, timeit, RunSafely.sh) under it (which is
    what would be needed if we just kept on using only the RUN_UNDER option for
    qemu user mode emulation.

    Differential Revision: https://reviews.llvm.org/D61597 (detail/ViewSVN)
    by kbeyls
  667. AMDGPU/GlobalISel: Move kernel argument handling to separate function (detail/ViewSVN)
    by arsenm
  668. Fix missing C++ mode comment (detail/ViewSVN)
    by arsenm
  669. GlobalISel: Use Register (detail/ViewSVN)
    by arsenm
  670. Revert r365775 - "[Object/ELF] - Improve error reporting for notes."

    It broke BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/15419 (detail/ViewSVN)
    by grimar
  671. [clangd] Remove an extra ";", NFC (detail/ViewSVN)
    by hokein
  672. Added mapping for pointers captured in Lambdas in OpenMP target regions,
    by David Truby.

    Summary:
    This adds a zero length array section mapping for each pointer captured by a lambda that is used in a target region, as per section 2.19.7.1 of the OpenMP 5 specification.

    Reviewers: ABataev

    Reviewed By: ABataev

    Subscribers: guansong, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64558 (detail/ViewSVN)
    by abataev
  673. [clangd][QueryDriver] Use language from underlying database if possible

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64489 (detail/ViewSVN)
    by kadircet
  674. [Object/ELF] - Improve error reporting for notes.

    This patch improves the error messages reported for
    note sections and phdrs and also makes a cleanup for
    existent test case.

    Differential revision: https://reviews.llvm.org/D64470 (detail/ViewSVN)
    by grimar
  675. [InstCombine] don't move FP negation out of a constant expression

    -(X * ConstExpr) becomes X * (-ConstExpr), so don't reverse that
    and infinite loop. (detail/ViewSVN)
    by spatel
  676. [clangd] Add priorities to background index queue, extract to separate class

    Reviewers: kadircet

    Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64560 (detail/ViewSVN)
    by sammccall
  677. [yaml2obj/elf-override-shsize.yaml] - An attemp to fix ppc64 bot.

    Failture:
    http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/35670/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Aelf-override-shsize.yaml

    Solution:
    Change `od` tool invocation to print single bytes. (detail/ViewSVN)
    by grimar
  678. [WebAssembly] Import __stack_pointer when building -pie binaries

    The -pie binary doesn't know that layout ahead of time so needs to
    import the stack pointer from the embedder, just like we do already
    for shared libraries.

    This change is needed in order to address:
    https://github.com/emscripten-core/emscripten/issues/8915

    Differential Revision: https://reviews.llvm.org/D64516 (detail/ViewSVN)
    by sbc
  679. OpaquePtr: switch to GlobalValue::getValueType in a few places. NFC. (detail/ViewSVN)
    by Tim Northover
  680. OpaquePtr: use byval accessor instead of inspecting pointer type. NFC.

    The accessor can deal with both "byval(ty)" and "ty* byval" forms
    seamlessly. (detail/ViewSVN)
    by Tim Northover
  681. OpaquePtr: use load instruction directly for type. NFC. (detail/ViewSVN)
    by Tim Northover
  682. InstructionSimplify: Simplify InstructionSimplify. NFC.

    The interface predates CallBase, so both it and implementation were
    significantly more complicated than they needed to be. There was even
    some redundancy that could be eliminated.

    Should also help with OpaquePointers by not trying to derive a
    function's type from it's PointerType. (detail/ViewSVN)
    by Tim Northover
  683. [yaml2obj] - Allow overriding the sh_size field.

    There is no way to set broken sh_size field currently
    for sections. It can be usefull for writing the
    test cases.

    Differential revision: https://reviews.llvm.org/D64401 (detail/ViewSVN)
    by grimar
  684. [NFC] Updated tests for D64285 (detail/ViewSVN)
    by xbolva00
  685. [clangd] Remove the extra ";", NFC (detail/ViewSVN)
    by hokein
  686. [clangd] Fix an assertion crash in "ExtractVariable" tweak

    Summary:
    GetTypePtr requires that the type should not be null, otherwise we hit
    an assertion, we should use getTypePtrOrNull instead.

    Reviewers: sammccall, SureYeaah

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64556 (detail/ViewSVN)
    by hokein
  687. [llvm-readobj/llvm-readelf] - Report a warning instead of a error when dumping a broken dynamic section.

    It does not make sence to stop dumping the object if the broken
    dynamic section was found. In this patch I changed the behavior from
    "report an error" to "report a warning". This matches GNU.

    Differential revision: https://reviews.llvm.org/D64472 (detail/ViewSVN)
    by grimar
  688. [ELF] Handle non-glob patterns before glob patterns in version scripts & fix a corner case of --dynamic-list

    This fixes PR38549, which is silently accepted by ld.bfd.
    This seems correct because it makes sense to let non-glob patterns take
    precedence over glob patterns.

    lld issues an error because
    `assignWildcardVersion(ver, VER_NDX_LOCAL);` is processed before `assignExactVersion(ver, v.id, v.name);`.

    Move all assignWildcardVersion() calls after assignExactVersion() calls
    to fix this.

    Also, move handleDynamicList() to the bottom. computeBinding() called by
    includeInDynsym() has this cryptic rule:

        if (versionId == VER_NDX_LOCAL && isDefined() && !isPreemptible)
          return STB_LOCAL;

    Before the change:

    * foo's version is set to VER_NDX_LOCAL due to `local: *`
    * handleDynamicList() is called
      - foo.computeBinding() is STB_LOCAL
      - foo.includeInDynsym() is false
      - foo.isPreemptible is not set (wrong)
    * foo's version is set to V1

    After the change:

    * foo's version is set to VER_NDX_LOCAL due to `local: *`
    * foo's version is set to V1
    * handleDynamicList() is called
      - foo.computeBinding() is STB_GLOBAL
      - foo.includeInDynsym() is true
      - foo.isPreemptible is set (correct)

    Reviewed By: ruiu

    Differential Revision: https://reviews.llvm.org/D64550 (detail/ViewSVN)
    by maskray
  689. [ELF] Warn rather than error when duplicate version assignments occur

    In lvm2, libdevmapper.so is linked with a version script with duplicate
    version assignments:

        DM_1_02_138 { global: ... dm_bitset_parse_list; ... };
        DM_1_02_129 { global: ... dm_bitset_parse_list; ... };

    ld.bfd silently accepts this while gold issues a warning. We currently
    error, thus inhibit producing the executable. Change the error to
    warning to allow this case, and improve the message.

    There are some cases where ld.bfd error
    `anonymous version tag cannot be combined with other version tags`
    but we just warn. It is probably OK for now.

    Reviewed By: grimar, ruiu

    Differential Revision: https://reviews.llvm.org/D64549 (detail/ViewSVN)
    by maskray
  690. [InstCombine] Reorder recently added/improved pow transformations

    Changed cases are now faster with exp2. (detail/ViewSVN)
    by xbolva00
  691. Revert [BitcodeReader] Validate OpNum, before accessing Record array.

    This reverts r365750 (git commit 8b222ecf2769ee133691f208f6166ce118c4a164)

    llvm-dis runs out of memory while opening invalid-fcmp-opnum.bc on
    llvm-hexagon-elf, probably because the bitcode file contains other
    suspicious values.

    http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/21949 (detail/ViewSVN)
    by fhahn
  692. [clangd] Fix windows buildbots (detail/ViewSVN)
    by kadircet
  693. [X86] Regenerate intrinsics tests. NFCI. (detail/ViewSVN)
    by rksimon
  694. [AMDGPU] Regenerate idot tests. NFCI.

    Reduces diff in D63281. (detail/ViewSVN)
    by rksimon
  695. [llvm-objcopy] Don't change permissions of non-regular output files

    There is currently an EPERM error when a regular user executes `llvm-objcopy a.o /dev/null`.
    Worse, root can even change the mode bits of /dev/null.

    Fix it by checking if the output file is special.

    A new overload of llvm::sys::fs::setPermissions with FD as the parameter
    is added. Users should provide `perm & ~umask` as the parameter if they
    intend to respect umask.

    The existing overload of llvm::sys::fs::setPermissions may be deleted if
    we can find an implementation of fchmod() on Windows. fchmod() is
    usually better than chmod() because it saves syscalls and can avoid race
    condition.

    Reviewed By: jakehehrlich, jhenderson

    Differential Revision: https://reviews.llvm.org/D64236 (detail/ViewSVN)
    by maskray
  696. [X86] -fno-plt: use GOT __tls_get_addr only if GOTPCRELX is enabled

    Summary:
    As of binutils 2.32, ld has a bogus TLS relaxation error when the GD/LD
    code sequence using R_X86_64_GOTPCREL (instead of R_X86_64_GOTPCRELX) is
    attempted to be relaxed to IE/LE (binutils PR24784). gold and lld are good.

    In gcc/config/i386/i386.md, there is a configure-time check of as/ld
    support and the GOT relaxation will not be used if as/ld doesn't support
    it:

        if (flag_plt || !HAVE_AS_IX86_TLS_GET_ADDR_GOT)
          return "call\t%P2";
        return "call\t{*%p2@GOT(%1)|[DWORD PTR %p2@GOT[%1]]}";

    In clang, -DENABLE_X86_RELAX_RELOCATIONS=OFF is the default. The ld.bfd
    bogus error can be reproduced with:

        thread_local int a;
        int main() { return a; }

    clang -fno-plt -fpic a.cc -fuse-ld=bfd

    GOTPCRELX gained relative good support in 2016, which is considered
    relatively new.  It is even difficult to conditionally default to
    -DENABLE_X86_RELAX_RELOCATIONS=ON due to cross compilation reasons. So
    work around the ld.bfd bug by only using GOT when GOTPCRELX is enabled.

    Reviewers: dalias, hjl.tools, nikic, rnk

    Reviewed By: nikic

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64304 (detail/ViewSVN)
    by maskray
  697. [clangd] Add a missing "return nullptr;" to the SelectionTree::commonAncestor.

    This would fix some mysterious crashes on codeAction in clangd. (detail/ViewSVN)
    by hokein
  698. [BitcodeReader] Validate OpNum, before accessing Record array.

    Currently invalid bitcode files can cause a crash, when OpNum exceeds
    the number of elements in Record, like in the attached bitcode file.

    The test case was generated by clusterfuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15698

    Reviewers: t.p.northover, thegameg, jfb

    Reviewed By: jfb

    Differential Revision: https://reviews.llvm.org/D64507 (detail/ViewSVN)
    by fhahn
  699. [ARM][LowOverheadLoops] Correct offset checking
       
    This patch addresses a couple of problems:
    1) The maximum supported offset of LE is -4094.
    2) The offset of WLS also needs to be checked, this uses a
       maximum positive offset of 4094.
       
    The use of BasicBlockUtils has been changed because the block offsets
    weren't being initialised, but the isBBInRange checks both positive
    and negative offsets.
       
    ARMISelLowering has been tweaked because the test case presented
    another pattern that we weren't supporting. (detail/ViewSVN)
    by sam_parker
  700. [clangd] Reland rL365634

    This was reverted in rL365678, the failure was due to YAML parsing of
    compile_commands.json.

    Converting backslashes to forward slashes to fix the issue in unittest. (detail/ViewSVN)
    by kadircet
  701. [ARM] Remove nonexistent unsigned forms of MVE VQDMLAH.

    The VQDMLAH.U8, VQDMLAH.U16 and VQDMLAH.U32 instructions don't
    actually exist: the Armv8.1-M architecture spec only lists signed
    forms of that instruction. The unsigned ones were added in error: they
    existed in an early draft of the spec, but they were removed before
    the public version, and we missed that particular spec change.

    Also affects the variant forms VQDMLASH, VQRDMLAH and VQRDMLASH.

    Reviewers: miyuki

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64502 (detail/ViewSVN)
    by statham
  702. [NFC][PowerPC] Added test to track current behaviour of TailDup (detail/ViewSVN)
    by lkail
  703. [clangd] Added highlightings for namespace specifiers.

    Summary: Added highlightings for namespace specifiers.

    Reviewers: hokein, sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64492 (detail/ViewSVN)
    by jvikstrom
  704. [MIPS GlobalISel] Skip copies in addUseDef and addDefUses

    Skip copies between virtual registers during search for UseDefs
    and DefUses.
    Since each operand has one def search for UseDefs is straightforward.
    But since operand can have many uses, we have to check all uses of
    each copy we traverse during search for DefUses.

    Differential Revision: https://reviews.llvm.org/D64486 (detail/ViewSVN)
    by petar.avramovic
  705. [MIPS GlobalISel] RegBankSelect for chains of ambiguous instructions

    When one of the uses/defs of ambiguous instruction is also ambiguous
    visit it recursively and search its uses/defs for instruction with
    only one mapping available.
    When all instruction in a chain are ambiguous arbitrary mapping can
    be selected. For s64 operands in ambiguous chain fprb is selected since
    it results in less instructions then having to narrow scalar s64 to s32.
    For s32 both gprb and fprb result in same number of instructions and
    gprb is selected like a general purpose option.

    At the moment we always avoid cross register bank copies.
    TODO: Implement a model for costs calculations of different mappings
    on same instruction and cross bank copies. Allow cross bank copies
    when appropriate according to cost model.

    Differential Revision: https://reviews.llvm.org/D64485 (detail/ViewSVN)
    by petar.avramovic
  706. Revert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches from the Option class."

    This reverts r365675 (git commit 43d75f977853c3ec891a440c362b2df183a211b5)

    The patch causes a crash in SupportTests (CommandLineTest.AliasesWithArguments). (detail/ViewSVN)
    by hokein
  707. Remove some redundant code from r290372 and improve a comment. (detail/ViewSVN)
    by foad
  708. [ARM][ParallelDSP] Change the search for smlads
       
    Two functional changes have been made here:
    - Now search up from any add instruction to find the chains of
      operations that we may turn into a smlad. This allows the
      generation of a smlad which doesn't accumulate into a phi.
    - The search function has been corrected to stop it falsely searching
      up through an invalid path.
       
    The bulk of the changes have been making the Reduction struct a class
    and making it more C++y with getters and setters.

    Differential Revision: https://reviews.llvm.org/D61780 (detail/ViewSVN)
    by sam_parker
  709. [ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on Fuchsia

    This is the optimized implementation for Fuchsia provided by the libc.

    Differential Revision: https://reviews.llvm.org/D64166 (detail/ViewSVN)
    by phosek
  710. [test] Silence gcc 7.4 warning [NFC]

    Without this gcc 7.4.0 complains with
    ../unittests/Analysis/ValueTrackingTest.cpp:937:66: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror]
                              ::testing::ValuesIn(IsBytewiseValueTests));
                                                                       ^ (detail/ViewSVN)
    by uabelho
  711. Fix build breakage on Win32. (detail/ViewSVN)
    by ruiu
  712. [clang-doc] Silence compiler warning with gcc 7.4 [NFC]

    Without the fix gcc 7.4.0 complains with

    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'llvm::SmallString<16> clang::doc::{anonymous}::HTMLTag::ToString() const':
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:165:1: error: control reaches end of non-void function [-Werror=return-type]
    }
    ^
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::HasInlineChildren() const':
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:142:1: error: control reaches end of non-void function [-Werror=return-type]
    }
    ^
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::IsSelfClosing() const':
    /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:126:1: error: control reaches end of non-void function [-Werror=return-type]
    }
    ^
    cc1plus: all warnings being treated as errors (detail/ViewSVN)
    by uabelho
  713. Add NetBSD LSan support

    Summary:
    Combine few relatively small changes into one:

    - implement internal_ptrace() and internal_clone() for NetBSD
    - add support for stoptheworld based on the ptrace(2) API
    - define COMPILER_RT_HAS_LSAN for NetBSD
    - enable tests for NetBSD/amd64

    Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC.

    The implementation is in theory CPU independent through well defined macros
    across all NetBSD ports, however only the x86_64 version was tested.

    Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb

    Reviewed By: vitalybuka

    Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64057 (detail/ViewSVN)
    by kamil
  714. Fix build breakage on Darwin. (detail/ViewSVN)
    by ruiu
  715. Update comments for r365730. NFC. (detail/ViewSVN)
    by ruiu
  716. Fix build breakage on Win32. (detail/ViewSVN)
    by ruiu
  717. [WebAssembly] Print error message for llvm.clear_cache intrinsic

    Summary:
    Wasm does not currently support `llvm.clear_cache` intrinsic, and this
    prints a proper error message instead of segfault.

    Reviewers: dschuff, sbc100, sunfish

    Subscribers: jgravelle-google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64322 (detail/ViewSVN)
    by aheejin
  718. [Coding style change][lld] Rename variables for non-ELF ports

    This patch does the same thing as r365595 to other subdirectories,
    which completes the naming style change for the entire lld directory.

    With this, the naming style conversion is complete for lld.

    Differential Revision: https://reviews.llvm.org/D64473 (detail/ViewSVN)
    by ruiu
  719. [InstCombine][NFCI] Add test coverage to onehot_merge.ll

    Prep work for upcoming patch D64275. (detail/ViewSVN)
    by huihuiz
  720. Increase the number of parser diagnostics.

    The reserved range for parser diagnostics is getting close to being filled,
    so increase the space for them. (detail/ViewSVN)
    by rtrieu
  721. [SCEV] teach SCEV symbolical execution about overflow intrinsics folding.
    Differential Revision: https://reviews.llvm.org/D64422 (detail/ViewSVN)
    by shchenz
  722. Change another test I missed in r365724 (detail/ViewSVN)
    by nico
  723. clang-cl: Remove -O0 option

    cl.exe doesn't understand it; there's /Od instead. See also the review
    thread for r229575.

    Update lots of compiler-rt tests to use -Od instead of -O0.
    Ran `rg -l 'clang_cl.*O0' compiler-rt/test/ | xargs sed -i -c 's/-O0/-Od/'`

    Differential Revision: https://reviews.llvm.org/D64506 (detail/ViewSVN)
    by nico
  724. Replace three "strip & accumulate" implementations with a single one

    This patch replaces the three almost identical "strip & accumulate"
    implementations for constant pointer offsets with a single one,
    combining the respective functionalities. The old interfaces are kept
    for now.

    Differential Revision: https://reviews.llvm.org/D64468 (detail/ViewSVN)
    by jdoerfert
  725. [NFC] Adjust "invalid.ll.bc" tests to check for AttrKind #255 not #63

    We are about to add enum attributes with AttrKind numbers >= 63. This
    means we cannot use AttrKind #63 to test for an invalid attribute number
    in the RAW format anymore. This patch changes the number of an invalid
    attribute to #255. There is no change to the character of the tests.

    Differential Revision: https://reviews.llvm.org/D64531 (detail/ViewSVN)
    by jdoerfert
  726. Various minor tweaks to CLCompatOptions.td

    - Add back indentation I accidentally removed in r364901
    - Wrap two lines to 80 cols
    - Slightly tighten up help text for several flags
    - Consistently use "Do not" instead of "Don't"
    - Make every option description start with a verb
    - Use "Set" instead of "Specify"
    - Mark default values of options more consistently
    - Remove text about "/Zi" not producing PDBs since it's confusing
      for people not intimately familiar with the implementation of
      the normal PDB pipeline. /Zi lets the linker produce PDBs, which
      is what most users want.
    - Consistently use "file" over "filename" in meta var names,
      consistently use "file name" over "filename" in text
    - Make all output setting options have consistent language (detail/ViewSVN)
    by nico
  727. [X86] Don't convert 8 or 16 bit ADDs to LEAs on Atom in FixupLEAPass.

    We use the functions that convert to three address to do the
    conversion, but changing an 8 or 16 bit will cause it to create
    a virtual register. This can't be done after register allocation
    where this pass runs.

    I've switched the pass completely to a white list of instructions
    that can be converted to LEA instead of a blacklist that was
    incorrect. This will avoid surprises if we enhance the three
    address conversion function to include additional instructions
    in the future.

    Fixes PR42565. (detail/ViewSVN)
    by ctopper
  728. [AMDGPU] gfx908 atomic fadd and atomic pk_fadd

    Differential Revision: https://reviews.llvm.org/D64435 (detail/ViewSVN)
    by rampitec
  729. [CGDebugInfo] Fix -femit-debug-entry-values crash on os_log_helpers

    An os_log_helper FunctionDecl may not have a body. Ignore these for the
    purposes of debug entry value emission.

    Fixes an assertion failure seen in a stage2 build of clang:

    Assertion failed: (FD->hasBody() && "Functions must have body here"),
    function analyzeParametersModification (detail/ViewSVN)
    by Vedant Kumar
  730. [AMDGPU] gfx908 dot instruction support

    Differential Revision: https://reviews.llvm.org/D64431 (detail/ViewSVN)
    by rampitec
  731. Attempt to fix bots after r365703 (detail/ViewSVN)
    by nico
  732. rL365634 adds a unique_ptr<CompilationDatabase> in GobalCompilationDatabase.h:108 but CompilationDatabase is only forward declared. This makes the header not compile standalone, because unique_ptrs expect to have the full-definition of the...

    Summary:
    ...template argument.

    Remove the forward declaration and include the appropriate header instead.
    Remove CompileCommand too, which is also in the header. (detail/ViewSVN)
    by saugustine
  733. Revert [llvm-objcopy] Allow strip symtab from executables and DSOs

    This reverts r365193 (git commit 194f16b3548bcb23a7f0fd638778ed72edd18d37)

    This patch doesn't work with binaries built w/ `--emit-relocs`, e.g.

    ```
    $ echo 'int main() { return 0; }' | clang -Wl,--emit-relocs -x c - -o foo && llvm-objcopy --strip-unneeded foo
    llvm-objcopy: error: 'foo': not stripping symbol '__gmon_start__' because it is named in a relocation
    ``` (detail/ViewSVN)
    by rupprecht
  734. [SDAG] commute setcc operands to match a subtract

    If we have:

    R = sub X, Y
    P = cmp Y, X

    ...then flipping the operands in the compare instruction can allow using a subtract that sets compare flags.

    Motivated by diffs in D58875 - not sure if this changes anything there,
    but this seems like a good thing independent of that.

    There's a more involved version of this transform already in IR (in instcombine
    although that seems misplaced to me) - see "swapMayExposeCSEOpportunities()".

    Differential Revision: https://reviews.llvm.org/D63958 (detail/ViewSVN)
    by spatel
  735. Add IsBytewiseValue unit test

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63966 (detail/ViewSVN)
    by Vitaly Buka
  736. NFC: Pass DataLayout into isBytewiseValue

    Summary:
    We will need to handle IntToPtr which I will submit in a separate patch as it's
    not going to be NFC.

    Reviewers: eugenis, pcc

    Reviewed By: eugenis

    Subscribers: hiraditya, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D63940 (detail/ViewSVN)
    by Vitaly Buka
  737. NFC: Convert large lambda into method

    Reviewers: pcc, eugenis

    Reviewed By: eugenis

    Subscribers: cfe-commits, lldb-commits

    Tags: #clang, #lldb

    Differential Revision: https://reviews.llvm.org/D63854 (detail/ViewSVN)
    by Vitaly Buka
  738. [TSan] Fix linker error on Linux/AArch64 (detail/ViewSVN)
    by yln
  739. GodeGen, NFC: Add test to track emitStoresForConstant behavior

    Reviewers: eugenis, pcc

    Reviewed By: eugenis

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64385 (detail/ViewSVN)
    by Vitaly Buka
  740. [X86] Add patterns with and_flag_nocf for BLSI and TBM instructions.

    Fixes similar issues to r352306. (detail/ViewSVN)
    by ctopper
  741. [X86] Add a few more TBM and BLSI test cases that show the same issue that r352306 fixed for BLSR. (detail/ViewSVN)
    by ctopper
  742. driver: Don't warn about assembler flags being unused when not assembling

    clang currently warns when passing flags for the assembler (e.g.
    -Wa,-mbig-obj) to an invocation that doesn't run the assembler (e.g.
    -E).

    At first sight, that makes sense -- the flag really is unused. But many
    other flags don't have an effect if no assembler runs (e.g.
    -fno-integrated-as, -ffunction-sections, and many others), and those
    currently don't warn. So this seems more like a side effect of how
    CollectArgsForIntegratedAssembler() is implemented than like an
    intentional feature.

    Since it's a bit inconvenient when debugging builds and adding -E,
    always call CollectArgsForIntegratedAssembler() to make sure assembler
    args always get claimed. Currently, this affects only these flags:
    -mincremental-linker-compatible, -mimplicit-it= (on ARM), -Wa, -Xassembler

    It does have the side effect that assembler options now need to be valid
    even if -E is passed. Previously, `-Wa,-mbig-obj` would error for
    non-coff output only if the assembler ran, now it always errors. This
    too makes assembler flags more consistent with all the other flags and
    seems like a progression.

    Fixes PR42066.

    Differential Revision: https://reviews.llvm.org/D64527 (detail/ViewSVN)
    by nico
  743. [X86] Add BLSR and BLSMSK to isUseDefConvertible.

    Unfortunately subo formation in CGP prevents obvious ways of
    testing this.

    But we already have BLSI in here and the flag behavior is
    well understood.

    Might become more useful if we improve PR42571. (detail/ViewSVN)
    by ctopper
  744. [NFC]Fix IR/MC depency issue for function descriptor SDAG implementation

    Summary: llvm/IR/GlobalValue.h can't be included in MC, that creates a circular dependency between MC and IR libraries. This circular dependency is causing an issue for build system that enforce layering.

    Author: Xiangling_L

    Reviewers: sfertile, jasonliu, hubert.reinterpretcast, gribozavr

    Reviewed By: gribozavr

    Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64445 (detail/ViewSVN)
    by daltenty
  745. [clang-scan-deps] Dependency directives source minimizer:
    single quotes are not digit separators after a valid character literal prefix

    The single quote character can act as a c++ digit separator.
    However, the minimizer shouldn't treat it as such when it's actually following
    a valid character literal prefix, like L, U, u, or u8.

    Differential Revision: https://reviews.llvm.org/D64525 (detail/ViewSVN)
    by arphaman

Started by upstream project SVN: Clang Stage 1: cmake, RA, using system compiler build number 58122
originally caused by:

This run spent:

  • 5.6 sec waiting;
  • 3 hr 59 min build duration;
  • 3 hr 59 min total from scheduled to completion.

Identified problems

Ninja target failed

Below is a link to the first failed ninja target.
Indication 1

Compile Error

This build failed because of a compile error. Below is a list of all errors in the build log:
Indication 2

Assertion failure

This build failed because of an assertion failure. Below is a list of all errors in the build log:
Indication 3