Started 1 mo 2 days ago
Took 19 min

Success Build clang-r363501-t57508-b57508.tar.gz (Jun 15, 2019 4:04:03 PM)

Issues

No known issues detected

Build Log

Revision: 362564
Changes
  1. [lldb-cmake-standalone] Ninja verbose flag is -v (detail)
    by stefan.graenitz
  2. [lldb-cmake-standalone] Remove note about Xcode generator

    This was fixed with https://reviews.llvm.org/rGa0781b6e3a3a (detail)
    by stefan.graenitz
  3. [lldb-cmake-standalone] Enable tests for CMake-generated Xcode project (detail)
    by stefan.graenitz
  4. [lldb-cmake-standalone] Run check-lldb in TERM=vt100 (detail)
    by stefan.graenitz
  5. [lldb-cmake-standalone] Checkout libc++ the same way as other subprojects (detail)
    by stefan.graenitz
Revision: 362564
Changes
  1. [X86] CombineShuffleWithExtract - assert all src ops types are multiples of rootsize. NFCI. (detail)
    by rksimon
  2. [X86][AVX] Handle lane-crossing shuffle(extract_subvector(x,c1),extract_subvector(y,c2),m1) shuffles

    Pull out the existing (non)lane-crossing fold into a helper lambda and use for lane-crossing unary shuffles as well.

    Fixes PR34380 (detail)
    by rksimon
  3. [X86][AVX] Decode constant bits from insert_subvector(c1, c2, c3)

    This mostly happens due to SimplifyDemandedVectorElts reducing a vector to insert_subvector(undef, c1, 0) (detail)
    by rksimon
  4. [NFC][MCA][X86] Add one more 'clear super register' pattern - movss/movsd load clears high XMM bits (detail)
    by lebedevri
  5. [NFC][MCA][X86] Add baseline test coverage for AMD Barcelona (aka K10, fam10h)

    Looking into sched model for that CPU ... (detail)
    by lebedevri
  6. [Clang] Harmonize Split DWARF options with llc

    Summary:
    With Split DWARF the resulting object file (then called skeleton CU)
    contains the file name of another ("DWO") file with the debug info.
    This can be a problem for remote compilation, as it will contain the
    name of the file on the compilation server, not on the client.

    To use Split DWARF with remote compilation, one needs to either

    * make sure only relative paths are used, and mirror the build directory
      structure of the client on the server,
    * inject the desired file name on the client directly.

    Since llc already supports the latter solution, we're just copying that
    over. We allow setting the actual output filename separately from the
    value of the DW_AT_[GNU_]dwo_name attribute in the skeleton CU.

    Fixes PR40276.

    Reviewers: dblaikie, echristo, tejohnson

    Reviewed By: dblaikie

    Differential Revision: https://reviews.llvm.org/D59673 (detail)
    by aaronpuchert
  7. [PowerPC] Set the innermost hot loop to align 32 bytes

    Summary:
    If the nested loop is an innermost loop, prefer to a 32-byte alignment, so that
    we can decrease cache misses and branch-prediction misses. Actual alignment of
    the loop will depend on the hotness check and other logic in alignBlocks.

    The old code will only align hot loop to 32 bytes when the LoopSize larger than
    16 bytes and smaller than 32 bytes, this patch will align the innermost hot loop
    to 32 bytes not only for the hot loop whose size is 16~32 bytes.

    Reviewed By: steven.zhang, jsji

    Differential Revision: https://reviews.llvm.org/D61228 (detail)
    by zhangkang
  8. [clang] Add storage for APValue in ConstantExpr

    Summary:
    When using ConstantExpr we often need the result of the expression to be kept in the AST. Currently this is done on a by the node that needs the result and has been done multiple times for enumerator, for constexpr variables... . This patch adds to ConstantExpr the ability to store the result of evaluating the expression. no functional changes expected.

    Changes:
    - Add trailling object to ConstantExpr that can hold an APValue or an uint64_t. the uint64_t is here because most ConstantExpr yield integral values so there is an optimized layout for integral values.
    - Add basic* serialization support for the trailing result.
    - Move conversion functions from an enum to a fltSemantics from clang::FloatingLiteral to llvm::APFloatBase. this change is to make it usable for serializing APValues.
    - Add basic* Import support for the trailing result.
    - ConstantExpr created in CheckConvertedConstantExpression now stores the result in the ConstantExpr Node.
    - Adapt AST dump to print the result when present.

    basic* : None, Indeterminate, Int, Float, FixedPoint, ComplexInt, ComplexFloat,
    the result is not yet used anywhere but for -ast-dump.

    Reviewers: rsmith, martong, shafik

    Reviewed By: rsmith

    Subscribers: rnkovacs, hiraditya, dexonsmith, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D62399 (detail)
    by tyker
  9. [BranchProbability] Delete a redundant overflow check (detail)
    by maskray
  10. [SCEV] Use unsigned/signed intersection type in SCEV

    Based on D59959, this switches SCEV to use unsigned/signed range
    intersection based on the sign hint. This will prefer non-wrapping
    ranges in the relevant domain. I've left the one intersection in
    getRangeForAffineAR() to use the smallest intersection heuristic,
    as there doesn't seem to be any obvious preference there.

    Differential Revision: https://reviews.llvm.org/D60035 (detail)
    by nikic
  11. [SimplifyIndVar] Simplify non-overflowing saturating add/sub

    If we can detect that saturating math that depends on an IV cannot
    overflow, replace it with simple math. This is similar to the CVP
    optimization from D62703, just based on a different underlying
    analysis (SCEV vs LVI) that catches different cases.

    Differential Revision: https://reviews.llvm.org/D62792 (detail)
    by nikic
  12. [RISCV] Regenerate remat.ll and atomic-rmw.ll after D43256 (detail)
    by maskray
  13. [RISCV] Simplify RISCVAsmBackend::writeNopData(). NFC (detail)
    by maskray
  14. [objcopy] Error when --preserve-dates is specified with standard streams

    Summary: llvm-objcopy/strip now error when -p is specified when reading from stdin or writing to stdout

    Reviewers: jhenderson, rupprecht, espindola, alexshap

    Reviewed By: jhenderson, rupprecht

    Subscribers: emaste, arichardson, jakehehrlich, MaskRay, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63090 (detail)
    by abrachet
  15. adding more fmf propagation for selects plus updated tests (detail)
    by mcberg2017
  16. Revert "adding more fmf propagation for selects plus tests"

    This reverts rL363474. -debug-only=isel was added to some tests that
    don't specify `REQUIRES: asserts`. This causes failures on
    -DLLVM_ENABLE_ASSERTIONS=off builds.

    I chose to revert instead of fixing the tests because I'm not sure
    whether we should add `REQUIRES: asserts` to more tests. (detail)
    by maskray
  17. [InstCombine] Add tests to show missing fold opportunity for "icmp and shift" (nfc).

    Summary:
    For icmp pred (and (sh X, Y), C), 0

      When C is signbit, expect to fold (X << Y) & signbit ==/!= 0 into (X << Y) >=/< 0,
      rather than (X & (signbit >> Y)) != 0.

      When C+1 is power of 2, expect to fold (X << Y) & ~C ==/!= 0 into (X << Y) </>= C+1,
      rather than (X & (~C >> Y)) == 0.

    For icmp pred (and X, (sh signbit, Y)), 0

      Expect to fold (X & (signbit l>> Y)) ==/!= 0 into (X << Y) >=/< 0
      Expect to fold (X & (signbit << Y)) ==/!= 0 into (X l>> Y) >=/< 0

      Reviewers: lebedev.ri, efriedma, spatel, craig.topper

      Reviewed By: lebedev.ri

      Subscribers: llvm-commits

      Tags: #llvm

      Differential Revision: https://reviews.llvm.org/D63025 (detail)
    by huihuiz
  18. Reapply "GlobalISel: Avoid producing Illegal copies in RegBankSelect"

    This reapplies r363410, avoiding null dereference if there is no
    AltRegBank. (detail)
    by arsenm
  19. Add a map_range function for applying map_iterator to a range.

    In preparation for use in Clang. (detail)
    by rsmith
  20. Revert "GlobalISel: Avoid producing Illegal copies in RegBankSelect"

    This patch breaks UBSan build bots. See
    https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild for
    a guide as to how to reproduce the error.

    This reverts commit c2864c0de07efb5451d32d27a7d4ff2984830929.
    This reverts rL363410. (detail)
    by hctim
  21. adding more fmf propagation for selects plus tests (detail)
    by mcberg2017
  22. [MBP] Move a latch block with conditional exit and multi predecessors to top of loop

    Current findBestLoopTop can find and move one kind of block to top, a latch block has one successor. Another common case is:

        * a latch block
        * it has two successors, one is loop header, another is exit
        * it has more than one predecessors

    If it is below one of its predecessors P, only P can fall through to it, all other predecessors need a jump to it, and another conditional jump to loop header. If it is moved before loop header, all its predecessors jump to it, then fall through to loop header. So all its predecessors except P can reduce one taken branch.

    Differential Revision: https://reviews.llvm.org/D43256 (detail)
    by carrot
  23. [ObjC][ARC] Delete ObjC runtime calls on global variables annotated
    with 'objc_arc_inert'

    Those calls are no-ops, so they can be safely deleted.

    rdar://problem/49839633

    Differential Revision: https://reviews.llvm.org/D62433 (detail)
    by ahatanak
  24. AMDGPU: Avoid most waitcnts before calls

    Currently you get extra waits, because waits are inserted for the
    register dependencies of the call, and the function prolog waits on
    everything.

    Currently waits are still inserted on returns. It may make sense to
    not do this, and wait in the caller instead. (detail)
    by arsenm
  25. Add --print-supported-cpus flag for clang.

    This patch allows clang users to print out a list of supported CPU models using
    clang [--target=<target triple>] --print-supported-cpus

    Then, users can select the CPU model to compile to using
    clang --target=<triple> -mcpu=<model> a.c

    It is a handy feature to help cross compilation. (detail)
    by ziangwan725
  26. [Remarks][NFC] Improve testing and documentation of -foptimization-record-passes

    This adds:

    * documentation to the user manual
    * nicer error message
    * test for the error case
    * test for the gold plugin (detail)
    by thegameg
  27. SROA: Allow eliminating addrspacecasted allocas

    There is a circular dependency between SROA and InferAddressSpaces
    today that requires running both multiple times in order to be able to
    eliminate all simple allocas and addrspacecasts. InferAddressSpaces
    can't remove addrspacecasts when written to memory, and SROA helps
    move pointers out of memory.

    This should avoid inserting new commuting addrspacecasts with GEPs,
    since there are unresolved questions about pointer wrapping between
    different address spaces.

    For now, don't replace volatile operations that don't match the alloca
    addrspace, as it would change the address space of the access. It may
    be still OK to insert an addrspacecast from the new alloca, but be
    more conservative for now. (detail)
    by arsenm
  28. [PowerPC][NFC] Comments update and remove some unused def (detail)
    by jsji
  29. SROA: Add baseline test for addrspacecast changes (detail)
    by arsenm
  30. AMDGPU: Fix capitalized register names in asm constraints

    This was a workaround a long time ago, but the canonical lower case
    names work now. (detail)
    by arsenm
  31. AMDGPU: Fix dropping memref for ds append/consume

    The way SelectionDAG treats memory operands is very frustrating, and
    by default drops them unless a property is set on the pattern. There
    is no pattern for manually selected instructions, so this requires
    manually setting them. (detail)
    by arsenm
  32. AMDGPU: Set isTrap on S_TRAP

    This seems to only be used for generating some kind
    of documentation, but might as well set it. (detail)
    by arsenm
  33. AMDGPU: Add baseline test for call waitcnt insertion (detail)
    by arsenm
  34. UpdateTestChecks: Consider .section as end of function for AMDGPU

    Kernels seem to go directly to a section switch instead of emitting
    .Lfunc_end. This fixes including all of the kernel metadata in the
    check lines, which is undesirable most of the time. (detail)
    by arsenm
  35. [x86] add test for 256-bit blendv with AVX targets; NFC

    This is a reduction of the pattern seen in D63233. (detail)
    by spatel
  36. [JITLink] Move JITLinkMemoryManager into its own header. (detail)
    by Lang Hames
  37. build: extract LLVM distribution target handling

    This extracts the LLVM distribution target handling into a support module.
    Extraction will enable us to restructure the builds to support multiple
    distribution configurations (e.g. developer and user) to permit us to build the
    development package and the user package at once. (detail)
    by Saleem Abdulrasool
  38. [Remarks] Use the RemarkSetup error in setupOptimizationRemarks

    Added the errors in r363415 but they were not used in the
    RemarkStreamer. (detail)
    by thegameg
  39. gn build: Add NVPTX target

    The NVPTX target is a bit unusual in that it's the only target without a
    disassembler, and one of three targets without an asm parser (and the
    first one of those three in the gn build). NVPTX doesn't have those
    because it's not a binary format.

    The CMake build checks for the existence of
    {AsmParser,Disassembler}/CMakeLists.txt when setting
    LLVM_ENUM_ASM_PARSERS / LLVM_ENUM_DISASSEBLERS
    (http://llvm-cs.pcc.me.uk/CMakeLists.txt#744). The GN build doesn't want
    to hit the disk for things like this, so instead I'm adding explicit
    `targets_with_asm_parsers` and `targets_with_disassemblers` lists. Since
    both are needed rarely, they are defined in their own gni files.

    Differential Revision: https://reviews.llvm.org/D63210 (detail)
    by nico
  40. gn build: Simplify Target build files

    Now that the cycle between MCTargetDesc and TargetInfo is gone
    (see revisions 360709 360718 360722 360724 360726 360731 360733 360735 360736),
    remove the dependency from TargetInfo on MCTargetDesc:tablegen. In most
    targets, this makes MCTargetDesc:tablegen have just a single use, so
    inline it there.

    For AArch64, ARM, and RISCV there's still a similar cycle between
    MCTargetDesc and Utils, so the MCTargetDesc:tablegen indirection is
    still needed there.

    Differential Revision: https://reviews.llvm.org/D63200 (detail)
    by nico
  41. [GlobalISel] Add a G_BRJT opcode.

    This is a branch opcode that takes a jump table pointer, jump table index and an
    index into the table to do an indirect branch.

    We pass both the table pointer and JTI to allow targets like ARM64 to more
    easily use the existing jump table compression optimization without having to
    walk up the block to find a paired G_JUMP_TABLE.

    Differential Revision: https://reviews.llvm.org/D63159 (detail)
    by aemerson
  42. Revert Fix a bug w/inbounds invalidation in LFTR

    Reverting because it breaks a green dragon build:
        http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/18208

    This reverts r363289 (git commit eb88badff96dacef8fce3f003dec34c2ef6900bf) (detail)
    by fhahn
  43. Revert [LFTR] Stylistic cleanup as suggested in last review comment of D62939 [NFC]

    Reverting because it depends on r363289, which breaks a green dragon build:
        http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/18208

    This reverts r363292 (git commit 42a3fc133d3544b5c0c032fe99c6e8a469a836c2) (detail)
    by fhahn
  44. Revert [LFTR] Rename variable to minimize confusion [NFC]

    Reverting because it depends on r363289, which breaks a green dragon
    build:
        http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/18208

    This reverts r363293 (git commit c37be29634214fb1cb4c823840bffc31e5ebfe40) (detail)
    by fhahn
  45. [GISel]: Fix pattern matcher for m_OneUse

    https://reviews.llvm.org/D63302 (detail)
    by aditya_nandakumar
  46. [PowerPC][NFC] Format comments in P9InstrResrouce.td (detail)
    by jsji
  47. [SimpligyCFG] NFC intended, remove GCD that was only used for powers of two

    and replace with an equilivent countTrailingZeros.

    GCD is much more expensive than this, with repeated division.

    This depends on D60823

    Differential Revision: https://reviews.llvm.org/D61151 (detail)
    by shawnl
  48. build: don't attempt to run config.guess on Windows

    When cross-compiling LLVM to android from Windows (for LLVMSupport), we would
    attempt to execute `config.guess` to determine the host triple since
    `CMAKE_SYSTEM_NAME` is not Windows and `CMAKE_C_COMPILER` will be set to GNU or
    Clang.  This will fail as `config.guess` is a shell script which cannot be
    executed on Windows.  Simply log a warning instead.  The user can specify the
    value for this instead in those cases. (detail)
    by Saleem Abdulrasool
  49. [AMDGPU] Don't constrain callees with inlinehint from inlining on MaxBB check

    Summary: Function bodies marked inline in an opencl source are eliminated but MaxBB check may prevent inlining them leaving undefined references.

    Reviewers: rampitec, arsenm

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63337 (detail)
    by vpykhtin
  50. [FPEnv] Lower STRICT_FP_EXTEND and STRICT_FP_ROUND nodes in preprocess phase of ISelLowering to mirror non-strict nodes on x86.

    I recently discovered a bug on the x86 platform: The fp80 type was not handled well by x86 for constrained floating point nodes, as their regular counterparts are replaced by extending loads and truncating stores during the preprocess phase. Normally, platforms don't have this issue, as they don't typically attempt to perform such legalizations during instruction selection preprocessing. Before this change, strict_fp nodes survived until they were mutated to normal nodes, which happened shortly after preprocessing on other platforms. This modification lowers these nodes at the same phase while properly utilizing the chain.5

    Submitted by: Drew Wock <drew.wock@sas.com>
    Reviewed by: Craig Topper, Kevin P. Neal
    Approved by: Craig Topper
    Differential Revision: https://reviews.llvm.org/D63271 (detail)
    by kpn
  51. [AMDGPU] gfx1010 BoolReg definition. NFC.

    Earlier commit has added AMDGPUOperand::isBoolReg(). Turns out
    gcc issues warning about unused function since D63204 is not
    yet submitted.

    Added NFC part of D63204 to have a use of that function and
    mute the warning. (detail)
    by rampitec
  52. Reland: [Remarks] Refactor optimization remarks setup

    * Add a common function to setup opt-remarks
    * Rename common options to the same names
    * Add error types to distinguish between file errors and regex errors (detail)
    by thegameg
  53. [x86] move vector shift tests for PR37428; NFC

    As suggested in the post-commit thread for rL363392 - it's
    wasteful to have so many runs for larger tests. AVX1/AVX2
    is what shows the diff and probably what matters most going
    forward. (detail)
    by spatel
  54. GlobalISel: Avoid producing Illegal copies in RegBankSelect

    Avoid producing illegal register bank copies for reg_sequence and
    phi. The default implementation assumes it is possible to pick any
    operand's bank and use that for the result, introducing a copy for
    operands with a different bank. This does not check for illegal
    copies. It is not legal to introduce a VGPR->SGPR copy, so any VGPR
    operand requires the result to be a VGPR.

    The changes in getInstrMappingImpl aren't strictly necessary, since
    AMDGPU now just bypasses this for reg_sequence/phi. This could be
    replaced with an assert in case other targets run into this. It is
    currently responsible for producing the error for unsatisfiable
    copies, but this will be better served with a verifier check.

    For phis, for now assume any undetermined operands must be
    VGPRs. Eventually, this needs to be able to defer mapping these
    operations. This also does not yet have a way to check for whether the
    block is in a divergent region. (detail)
    by arsenm
  55. [CodeGenPrepare] propagate debuginfo when copying a shuffle (detail)
    by spatel
  56. [Attributor] Disable the Attributor by default and fix a comment (detail)
    by jdoerfert
  57. [Attributor] Introduce bit-encodings for abstract states

    Summary:
    The IntegerState, and its sepecialization BooleanState, can be used to
    simplify the implementation of abstract attributes. The two abstract
    state implementations provide storage and helpers to deal with bit-wise
    encoded state.

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D60012 (detail)
    by jdoerfert
  58. AMDGPU: Fold readlane intrinsics of constants

    I'm not 100% sure about this, since I'm worried about IR transforms
    that might end up introducing divergence downstream once replaced with
    a constant, but I haven't come up with an example yet. (detail)
    by arsenm
  59. [ARM] Add MVE horizontal accumulation instructions

    This is the family of vector instructions that combine all the lanes
    in their input vector(s), and output a value in one or two GPRs.

    Differential Revision: https://reviews.llvm.org/D62670 (detail)
    by miyuki
  60. Revert "Revert r363377: [yaml2obj] - Allow setting custom section types for implicit sections."

    LLD test case will be fixed in a following commit.

    Original commit message:

    [yaml2obj] - Allow setting custom section types for implicit sections.

    We were hardcoding the final section type for sections that
    are usually implicit. The patch fixes that.

    This also fixes a few issues in existent test cases and removes
    one precompiled object.

    Differential revision: https://reviews.llvm.org/D63267 (detail)
    by grimar
  61. Revert r363377: [yaml2obj] - Allow setting custom section types for implicit sections.

    This reverts commit r363377 because lld's ELF/invalid/undefined-local-symbol-in-dso.test
    test started failing after this commit. (detail)
    by ruiu
  62. Fix failing test on ARM buildbot

    r363261 caused test failure on 32-bit ARM buildbot,
    because of unsigned integer overflow. This patch
    fixes it changing offset type from size_t to uint64_t. (detail)
    by evgeny777
  63. [x86] add test for original example in PR37428; NFC

    The reduced case may avoid complications seen in this larger function. (detail)
    by spatel
  64. RegBankSelect: Remove checks for invalid mappings

    Avoid a check for valid and a set of redundant asserts. The place
    InstructionMapping is constructed asserts all of the default fields
    are passed anyway for an invalid mapping, so don't overcomplicate
    this. (detail)
    by arsenm
  65. AMDGPU: Fix input chain when gluing copies to m0

    I don't think this was causing any observable issues, but was making
    reading the DAG dump confusing. (detail)
    by arsenm
  66. [lit] Fix UnicodeEncodeError when test commands contain non-ASCII chars

    Ensure that the bash script written by lit TestRunner is open with UTF-8
    encoding when using Python 3.  Otherwise, attempt to write non-ASCII
    characters causes UnicodeEncodeError.  This happened e.g. with
    the following LLD test:

    UNRESOLVED: lld :: ELF/format-binary-non-ascii.s (657 of 2119)
    ******************** TEST 'lld :: ELF/format-binary-non-ascii.s' FAILED ********************
    Exception during script execution:
    Traceback (most recent call last):
      File "/home/mgorny/llvm-project/llvm/utils/lit/lit/worker.py", line 63, in _execute_test
        result = test.config.test_format.execute(test, lit_config)
      File "/home/mgorny/llvm-project/llvm/utils/lit/lit/formats/shtest.py", line 25, in execute
        self.execute_external)
      File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1644, in executeShTest
        res = _runShTest(test, litConfig, useExternalSh, script, tmpBase)
      File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1590, in _runShTest
        res = executeScript(test, litConfig, tmpBase, script, execdir)
      File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1157, in executeScript
        f.write('{ ' + '; } &&\n{ '.join(commands) + '; }')
    UnicodeEncodeError: 'ascii' codec can't encode character '\xa3' in position 274: ordinal not in range(128)

    Differential Revision: https://reviews.llvm.org/D63254 (detail)
    by mgorny
  67. [MCA] Ignore invalid processor resource writes of zero cycles. NFCI

    In debug mode, the tool also raises a warning and prints out a message which
    helps identify the problematic MCWriteProcResEntry from the scheduling class.
    This message would have been useful to have when triaging PR42282. (detail)
    by adibiagio
  68. Fix not calling TargetCustom PSVs printer

    If the enum value was greater than the starting target custom value,
    the custom printer wasn't called. (detail)
    by arsenm
  69. AMDGPU: Refactor to prepare for manually selecting more intrinsics (detail)
    by arsenm
  70. AMDGPU: Fix printing trailing whitespace after s_endpgm (detail)
    by arsenm
  71. AMDGPU: Fix missing const (detail)
    by arsenm
  72. [docs][llvm-dwarfdump] Make the --show-parents and --show-children help text and docs more consistent and correct

    The docs and help text for --show-parents and --show-children were a bit
    inconsistent. The help text claimed they had an effect when "=<offset>"
    was used, whereas the doc said it had an effect when "--find" or
    "--name" were used. This change changes the doc to mention "=<offset>"
    and removes this reference from the help text, to avoid having a very
    long description in the help text (it still says "when selectively
    printing entries").

    Reviewed by: JDevlieghere, aprantl

    Differential Revision: https://reviews.llvm.org/D63275 (detail)
    by jhenderson
  73. Revert r363298 "[lit] Disable test on darwin when building shared libs."

    It broke running check-lld on mac, see https://reviews.llvm.org/D61697 (detail)
    by nico
  74. gn build: Merge r363376 (detail)
    by nico
  75. [yaml2obj] - Allow setting custom section types for implicit sections.

    We were hardcoding the final section type for sections that
    are usually implicit. The patch fixes that.

    This also fixes a few issues in existent test cases and removes
    one precompiled object.

    Differential revision: https://reviews.llvm.org/D63267 (detail)
    by grimar
  76. [llvm-readobj] Don't abort printing of dynamic table if string reference is invalid

    If dynamic table is missing, output "dynamic strtab not found'. If the index is
    out of range, output "Invalid Offset<..>".

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

    Reviewed by: jhenderson, grimar, MaskRay

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

    Patch by Yuanfang Chen. (detail)
    by jhenderson
  77. [llvm-readobj] - Do not fail to dump the object which has wrong type of .shstrtab.

    Imagine we have object that has .shstrtab with type != SHT_STRTAB.
    In this case, we fail to dump the object, though GNU readelf dumps it without
    any issues and warnings.

    This patch fixes that. It adds a code to ELFDumper.cpp which is based on the implementation of getSectionName from the ELF.h:

    https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L608
    https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L431
    https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L539

    The difference is that all non critical errors are ommitted what allows us to
    improve the dumping on a tool side. Also, this opens a road for a follow-up that
    should allow us to dump the section headers, but drop the section names in case if .shstrtab is completely absent and/or broken.

    Differential revision: https://reviews.llvm.org/D63266 (detail)
    by grimar
  78. [ARM] MVE VPT Block Pass

    Initial commit of a new pass to create vector predication blocks, called VPT
    blocks, that are supported by the Armv8.1-M MVE architecture.

    This is a first naive implementation. I.e., for 2 consecutive predicated
    instructions I1 and I2, for example, it will generate 2 VPT blocks:

    VPST
    I1
    VPST
    I2

    A more optimal implementation would obviously put instructions in the same VPT
    block when they are predicated on the same condition and when it is allowed to
    do this:

    VPTT
    I1
    I2

    We will address this optimisation with follow up patches when the groundwork is
    in. Creating VPT Blocks is very similar to IT Blocks, which is the reason I
    added this to Thumb2ITBlocks.cpp. This allows reuse of the def use analysis
    that we need for the more optimal implementation.

    VPT blocks cannot be nested in IT blocks, and vice versa, and so these 2 passes
    cannot interact with each other. Instructions allowed in VPT blocks must
    be MVE instructions that are marked as VPT compatible.

    Differential Revision: https://reviews.llvm.org/D63247 (detail)
    by sjoerdmeijer
  79. [yaml2obj] - Allow setting the custom Address for .strtab

    Despite the fact that .strtab is non-allocatable,
    there is no reason to disallow setting the custom address
    for it.

    The patch also adds a test case showing we can set any address
    we want for other implicit sections.

    Differential revision: https://reviews.llvm.org/D63137 (detail)
    by grimar
  80. [yaml2obj] - Allow setting cutom Flags for implicit sections.

    With this patch we get ability to set any flags we want
    for implicit sections defined in YAML.

    Differential revision: https://reviews.llvm.org/D63136 (detail)
    by grimar
  81. [SCEV] Pass NoWrapFlags when expanding an AddExpr

    InsertBinop now accepts NoWrapFlags, so pass them through when
    expanding a simple add expression.

    This is the first re-commit of the functional changes from rL362687,
    which was previously reverted.

    Differential Revision: https://reviews.llvm.org/D61934 (detail)
    by sam_parker
  82. [llvm-objcopy][IHEX] Improve test case formatting. NFC

    Differential revision: https://reviews.llvm.org/D63258 (detail)
    by evgeny777
  83. Move commentary on opcode translation for code16 mov instructions
    to segment registers closer to the segment register check for when
    we add further optimizations. (detail)
    by echristo
  84. [llvm-objcopy] Remove no-op flush of errs

    Reviewers: alexshap, rupprecht, jhenderson

    Subscribers: jakehehrlich, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63313 (detail)
    by abrachet
  85. gn build: Merge r363204 (clang-scan-deps) (detail)
    by nico
  86. [llvm-objcopy] Changed command line parsing errors

    Summary: Tidied up errors during command line parsing to be more consistent with the rest of llvm-objcopy errors.

    Reviewers: jhenderson, rupprecht, espindola, alexshap

    Reviewed By: jhenderson, rupprecht

    Subscribers: emaste, arichardson, MaskRay, llvm-commits, jakehehrlich

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62973 (detail)
    by abrachet
  87. DebugInfo: Include enumerators in pubnames

    This is consistent with GCC's behavior (which is the defacto standard
    for pubnames). Though I find the presence of enumerators from enum
    classes to be a bit confusing, possibly a bug on GCC's end (since they
    can't be named unqualified, unlike the other names - and names nested in
    classes don't go in pubnames, for instance - presumably because one must
    name the class first & that's enough to limit the scope of the search) (detail)
    by dblaikie
  88. [X86] Add target triple for live-debug-values-fragments.mir (detail)
    by timshen
  89. Add REQUIRES: zlib to test added in r363325 as the profile uses zlib compression. (detail)
    by dyung
  90. [AMDGPU] gfx1011/gfx1012 targets

    Differential Revision: https://reviews.llvm.org/D63307 (detail)
    by rampitec
  91. Revert "[Remarks] Refactor optimization remarks setup"

    This reverts commit 6e6e3af55bb97e1a4c97375c15a2b0099120c5a7.

    This breaks greendragon. (detail)
    by thegameg
  92. [Coverage] Speculative fix for r363325 for an older compiler

    It looks like an older version of gcc can't figure out that it needs to
    move a unique_ptr while implicitly constructing an Expected object. (detail)
    by Vedant Kumar
  93. [AMDGPU] gfx1010 wave32 icmp/fcmp intrinsic changes for wave32

    Differential Revision: https://reviews.llvm.org/D63301 (detail)
    by rampitec
  94. [llvm-objcopy] Fix sparc target endianness

    Summary: AFAIK, the "sparc" target is big endian and the target for 32-bit little-endian SPARC is denoted as "sparcel". This patch fixes the endianness of "sparc" target and adds "sparcel" target for 32-bit little-endian SPARC.

    Reviewers: espindola, alexshap, rupprecht, jhenderson

    Reviewed By: jhenderson

    Subscribers: jyknight, emaste, arichardson, fedor.sergeev, jakehehrlich, MaskRay, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63251 (detail)
    by seiya
  95. Use fully qualified name when printing S_CONSTANT records

    Summary:
    Before it was using the fully qualified name only for static data members.
    Now it does for all variable names to match MSVC.

    Reviewers: rnk

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63012 (detail)
    by akhuang
  96. Symbolize: Remove dead code. NFCI.

    The only caller of SymbolizableObjectFile::create passes a non-null
    DebugInfoContext and asserts that they do so. Move the assert into
    SymbolizableObjectFile::create and remove null checks.

    Differential Revision: https://reviews.llvm.org/D63298 (detail)
    by pcc
  97. [AMDGPU] gfx10 documentation update. NFC. (detail)
    by rampitec
  98. [GlobalISel][IRTranslator] Add debug loc with line 0 to constants emitted into the entry block.

    Constants, including G_GLOBAL_VALUE, are all emitted into the entry block which
    lets us use the vreg def assuming it dominates all other users. However, it can
    cause jumpy debug behaviour since the DebugLoc attached to these MIs are from
    a user instruction that could be in a different block.

    Fixes PR40887.

    Differential Revision: https://reviews.llvm.org/D63286 (detail)
    by aemerson
  99. [X86Disassembler] Unify the EVEX and VEX code in emitContextTable. Merge the ATTR_VEXL/ATTR_EVEXL bits. NFCI

    Merging the two bits shrinks the context table from 16384 bytes to 8192 bytes.

    Remove the ATTRIBUTE_BITS macro and just create an enum directly. Then fix the ATTR_max define to be 8192 to reflect the table size so we stop hardcoding it separately. (detail)
    by ctopper
  100. [MachinePiepliner] Don't check boundary node in checkValidNodeOrder

    This was exposed by PowerPC target enablement.

    In ScheduleDAG, if we haven't seen any uses in this scheduling region,
    we will create a dependence edge to ExitSU to model the live-out latency.
    This is required for vreg defs with no in-region use, and prefetches with
    no vreg def.

    When we build NodeOrder in Scheduler, we ignore these boundary nodes.
    However, when we check Succs in checkValidNodeOrder, we did not skip
    them, so we still assume all the nodes have been sorted and in order in
    Indices array. So when we call lower_bound() for ExitSU, it will return
    Indices.end(), causing memory issues in following Node access.

    Differential Revision: https://reviews.llvm.org/D63282 (detail)
    by jsji
  101. [Remarks] Refactor optimization remarks setup

    * Add a common function to setup opt-remarks
    * Rename common options to the same names
    * Add error types to distinguish between file errors and regex errors (detail)
    by thegameg
  102. [Coverage] Load code coverage data from archives

    Support loading code coverage data from regular archives, thin archives,
    and from MachO universal binaries which contain archives.

    Testing: check-llvm, check-profile (with {A,UB}San enabled)

    rdar://51538999

    Differential Revision: https://reviews.llvm.org/D63232 (detail)
    by Vedant Kumar
  103. gn build: Merge r363242 (detail)
    by nico
  104. [AMDGPU] gfx1010 AMDGPUSetCCOp definition

    It was missing from D63293 and breaks in a debug tablegen w/o
    this part. (detail)
    by rampitec
  105. [ORC] Rename MaterializationResponsibility resolve and emit methods to
    notifyResolved/notifyEmitted.

    The 'notify' prefix better describes what these methods do: they update the JIT
    symbol states and notify any pending queries that the 'resolved' and 'emitted'
    states have been reached (rather than actually performing the resolution or
    emission themselves). Since new states are going to be introduced in the near
    future (to track symbol registration/initialization) it's worth changing the
    convention pre-emptively to avoid further confusion. (detail)
    by Lang Hames
  106. [LangRef] Clarify poison semantics

    I find the current documentation of poison somewhat confusing,
    mainly because its use of "undefined behavior" doesn't seem to
    align with our usual interpretation (of immediate UB). Especially
    the sentence "any instruction that has a dependence on a poison
    value has undefined behavior" is very confusing.

    Clarify poison semantics by:

    * Replacing the introductory paragraph with the standard rationale
       for having poison values.
    * Spelling out that instructions depending on poison return poison.
    * Spelling out how we go from a poison value to immediate undefined
       behavior and give the two examples we currently use in ValueTracking.
    * Spelling out that side effects depending on poison are UB.

    Differential Revision: https://reviews.llvm.org/D63044 (detail)
    by nikic
  107. [SimplifyCFG] NFC, update Switch tests as a baseline.

    Also add baseline tests to show effect of later patches.

    There were a couple of regressions here that were never caught,
    but my patch set that this is a preparation to will fix them.

    This is the third attempt to land this patch.

    Differential Revision: https://reviews.llvm.org/D61150 (detail)
    by shawnl
  108. Add a clarifying comment about branching on poison

    I recently got this wrong (again), and I'm sure I'm not the only one.  Put a comment in the logical place someone would look to "fix" the obvious "missed optimization" which arrises based on the common misunderstanding.  Hopefully, this will save others time.  :) (detail)
    by reames
  109. Revert "[NFC][CodeGen] Add unary fneg tests to fp-fast.ll fp-fold.ll fp-in-intregs.ll fp-stack-compare-cmov.ll fp-stack-compare.ll fsxor-alignment.ll"

    This reverts commit 1d85a7518c6b660a85caabd580b632f9abd5a8ab. (detail)
    by mcinally
  110. Revert "[NFC][CodeGen] Add unary fneg tests to fmul-combines.ll fnabs.ll"

    This reverts commit 5c0114058126757ce21e546997121afffc8119cd. (detail)
    by mcinally
  111. Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma_patterns_wide.ll"

    This reverts commit f1b8c6ac4f9d31899a2bc128f8a37b5a1c3e1f77. (detail)
    by mcinally
  112. Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma_patterns.ll"

    This reverts commit 06de52674da73f30751f3ff19fdf457f87077c65. (detail)
    by mcinally
  113. Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma4-fneg-combine.ll"

    This reverts commit f288a0685f874d2b965db25a16b9c44f78c55b12. (detail)
    by mcinally
  114. Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-scalar-combine.ll"

    This reverts commit 3d2ee0053aa2576fd19cd169798c496199f0a29b. (detail)
    by mcinally
  115. Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-intrinsics-x86.ll"

    This reverts commit 169fc2b0209d5574fca0927a707706ea2d5f5a09. (detail)
    by mcinally
  116. Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma4-intrinsics-x86.ll"

    This reverts commit 66f286845cad73a280617a606e29c9009bb4da87. (detail)
    by mcinally
  117. Revert "[NFC][CodeGen] Add unary FNeg tests to some X86/ and XCore/ tests."

    This reverts commit 4f3cf3853e1145e3e08fb42ace79ba3e4e268540. (detail)
    by mcinally
  118. Revert "[NFC][CodeGen] Add unary FNeg tests to X86/fma-intrinsics-canonical.ll"

    This reverts commit ee5881a88cbe148bb64d14b8a5b31a314ee22343. (detail)
    by mcinally
  119. Revert "[NFC][CodeGen] Forgot 2 unary FNeg tests in X86/fma-intrinsics-canonical.ll"

    This reverts commit 5f39a3096f8e7b09bd1645f4e4ca66343066a6e1. (detail)
    by mcinally
  120. Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-fneg-combine.ll"

    This reverts commit 10c085554215e84831d272f2e6a93b7c70d143bf. (detail)
    by mcinally
  121. Revert "[NFC][CodeGen] Add unary FNeg tests to X86/combine-fcopysign.ll X86/dag-fmf-cse.ll X86/fast-isel-fneg.ll X86/fdiv.ll"

    This reverts commit e04c4b6af81d6142c4ff8dd9d00f44a27e9a66eb. (detail)
    by mcinally
  122. Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll X86/combine-fabs.ll"

    This reverts commit 6fe46ec25d849a9fd5be25acf0ee77e3c06c0786. (detail)
    by mcinally
  123. Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll"

    This reverts commit 2aa5ada267d268fec2b1e90efeae1ddee24617be. (detail)
    by mcinally
  124. Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll"

    This reverts commit 27a5db9de57d13d44c7a7704e06d8ba69ec8b4af. (detail)
    by mcinally
  125. Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll"

    This reverts commit 41e0b9f2803089155536bdec7cbea6b82680a727. (detail)
    by mcinally
  126. Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll"

    This reverts commit aeb89f8b33d8fca4e819ba41267093699a7e4885. (detail)
    by mcinally
  127. [AMDGPU] gfx1010 base changes for wave32

    Differential Revision: https://reviews.llvm.org/D63293 (detail)
    by rampitec
  128. [lit] Disable test on darwin when building shared libs.

    Summary:
    This test fails to link shared libraries because tries to run
    a copied version of clang-check to see if the mock version of libcxx
    in the same directory can be loaded dynamically.  Since the test is
    specifically designed not to look in the default just-built lib
    directory, it must be disabled when building with
    BUILD_SHARED_LIBS=ON.

    Currently only disabling it on Darwin and basing it on the
    enable_shared flag.

    Reviewed By: ilya-biryukov

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D61697 (detail)
    by dhinton
  129. [AMDGPU] gfx1010: small test change for wave32. NFC (detail)
    by rampitec
  130. [docs] Fix TableGen/LangRef typos

    This fixes:
    - `Pred` -> `Prep`
    - `IfDef` -> `Ifdef` (rst is case sensitive here) (detail)
    by rupprecht
  131. [LFTR] Rename variable to minimize confusion [NFC]

    As pointed out by Nikita in D62625, BackedgeTakenCount is generally used to refer to the backedge taken count of the loop.  A conditional backedge taken count - one which only applies if a particular exit is taken - is called a ExitCount in SCEV code, so be consistent here. (detail)
    by reames
  132. [LFTR] Stylistic cleanup as suggested in last review comment of D62939 [NFC] (detail)
    by reames
  133. [InstCombine] add test for failed libfunction prototype matching; NFC (detail)
    by spatel
  134. Fix a bug w/inbounds invalidation in LFTR

    This contains fixes for two cases where we might invalidate inbounds and leave it stale in the IR (a miscompile). Case 1 is when switching to an IV with no dynamically live uses, and case 2 is when doing pre-to-post conversion on the same pointer type IV.

    The basic scheme used is to prove that using the given IV (pre or post increment forms) would have to already trigger UB on the path to the test we're modifying.  As such, our potential UB triggering use does not change the semantics of the original program.

    As was pointed out in the review thread by Nikita, this is defending against a separate issue from the hasConcreteDef case. This is about poison, that's about undef. Unfortunately, the two are different, see Nikita's comment for a fuller explanation, he explains it well.

    (Note: I'm going to address Nikita's last style comment in a separate commit just to minimize chance of subtle bugs being introduced due to typos.)

    Differential Revision: https://reviews.llvm.org/D62939 (detail)
    by reames
  135. [clang][NewPM] Fix broken -O0 test from missing assumptions

    Add an AssumptionCache callback to the InlineFuntionInfo used for the
    AlwaysInlinerPass to match codegen of the AlwaysInlinerLegacyPass to generate
    llvm.assume. This fixes CodeGen/builtin-movdir.c when new PM is enabled by
    default.

    Differential Revision: https://reviews.llvm.org/D63170 (detail)
    by leonardchan
  136. [InstCombine] auto-generate complete test checks; NFC (detail)
    by spatel
  137. [NFC] Updated testcase for D54411/rL363284 (detail)
    by xbolva00
  138. [Codegen] Merge tail blocks with no successors after block placement

    Summary:
    I found the following case having tail blocks with no successors merging opportunities after block placement.

    Before block placement:

    bb0:
        ...
        bne a0, 0, bb2:

    bb1:
        mv a0, 1
        ret

    bb2:
        ...

    bb3:
        mv a0, 1
        ret

    bb4:
        mv a0, -1
        ret

    The conditional branch bne in bb0 is opposite to beq.

    After block placement:

    bb0:
        ...
        beq a0, 0, bb1

    bb2:
        ...

    bb4:
        mv a0, -1
        ret

    bb1:
        mv a0, 1
        ret

    bb3:
        mv a0, 1
        ret

    After block placement, that appears new tail merging opportunity, bb1 and bb3 can be merged as one block. So the conditional constraint for merging tail blocks with no successors should be removed. In my experiment for RISC-V, it decreases code size.


    Author of original patch: Jim Lin

    Reviewers: haicheng, aheejin, craig.topper, rnk, RKSimon, Jim, dmgreen

    Reviewed By: Jim, dmgreen

    Subscribers: xbolva00, dschuff, javed.absar, sbc100, jgravelle-google, aheejin, kito-cheng, dmgreen, PkmX, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D54411 (detail)
    by xbolva00
  139. [AMDGPU] ImmArg and SourceOfDivergence for permlane/dpp

    Added missing ImmArg and SourceOfDivergence to the crosslane
    intrinsics.

    Differential Revision: https://reviews.llvm.org/D63216 (detail)
    by rampitec
  140. [NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll

    Patch 2 of n. (detail)
    by mcinally
  141. [EarlyCSE] Ensure equal keys have the same hash value

    Summary:
    The logic in EarlyCSE that looks through 'not' operations in the
    predicate recognizes e.g. that `select (not (cmp sgt X, Y)), X, Y` is
    equivalent to `select (cmp sgt X, Y), Y, X`.  Without this change,
    however, only the latter is recognized as a form of `smin X, Y`, so the
    two expressions receive different hash codes.  This leads to missed
    optimization opportunities when the quadratic probing for the two hashes
    doesn't happen to collide, and assertion failures when probing doesn't
    collide on insertion but does collide on a subsequent table grow
    operation.

    This change inverts the order of some of the pattern matching, checking
    first for the optional `not` and then for the min/max/abs patterns, so
    that e.g. both expressions above are recognized as a form of `smin X, Y`.

    It also adds an assertion to isEqual verifying that it implies equal
    hash codes; this fires when there's a collision during insertion, not
    just grow, and so will make it easier to notice if these functions fall
    out of sync again.  A new flag --earlycse-debug-hash is added which can
    be used when changing the hash function; it forces hash collisions so
    that any pair of values inserted which compare as equal but hash
    differently will be caught by the isEqual assertion.

    Reviewers: spatel, nikic

    Reviewed By: spatel, nikic

    Subscribers: lebedev.ri, arsenm, craig.topper, efriedma, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62644 (detail)
    by josepht
  142. Fix GCC compiler warning. NFC. (detail)
    by hliao
  143. [X86] Use fresh MemOps when emitting VAARG64

    Previously it copied over MachineMemOperands verbatim which caused MOV32rm to have store flags set, and MOV32mr to have load flags set. This fixes some assertions being thrown with EXPENSIVE_CHECKS on.

    Committed on behalf of @luke (Luke Lau)

    Differential Revision: https://reviews.llvm.org/D62726 (detail)
    by rksimon
  144. Remove ';' after namespace's closing bracket [NFC] (detail)
    by dstenb
  145. [docs][llvm-symbolizer] Fix formatting issue with --functions

    Reviewed by: rupprecht

    Differential Revision: https://reviews.llvm.org/D63195 (detail)
    by jhenderson
  146. [FIX] Forces shrink wrapping to consider any memory access as aliasing with the stack

    Summary:
    Relate bug: https://bugs.llvm.org/show_bug.cgi?id=37472

    The shrink wrapping pass prematurally restores the stack, at a point where the stack might still be accessed.
    Taking an exception can cause the stack to be corrupted.

    As a first approach, this patch is overly conservative, assuming that any instruction that may load or store could access
    the stack.

    Reviewers: dmgreen, qcolombet

    Reviewed By: qcolombet

    Subscribers: simpal01, efriedma, eli.friedman, javed.absar, llvm-commits, eugenis, chill, carwil, thegameg

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63152 (detail)
    by dnsampaio
  147. [docs][llvm-dwarfdump] Add missing options and behaviour to documentation

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

    llvm-dwarfdump's documentation was missing a number of options and other
    behaviours. This change tries to fix up the documentation by adding
    these missing items.

    Reviewed by: JDevlieghere

    Differential Revision: https://reviews.llvm.org/D63217 (detail)
    by jhenderson
  148. Extra error checking to ARMAttributeParser

    The patch checks for subsection length as discussed in D63191 (detail)
    by evgeny777
  149. [NFC] Sink a function call into LiveDebugValues::process

    This was requested in D62904, which I successfully missed. This is just
    a refactor and shouldn't change any behaviour. (detail)
    by jmorse
  150. [ARM] Set up infrastructure for MVE vector instructions.

    This commit prepares the way to start adding the main collection of
    MVE instructions, which operate on the 128-bit vector registers.

    The most obvious thing that's needed, and the simplest, is to add the
    MQPR register class, which is like the existing QPR except that it has
    fewer registers in it.

    The more complicated part: MVE defines a system of vector predication,
    in which instructions operating on 128-bit vector registers can be
    constrained to operate on only a subset of the lanes, using a system
    of prefix instructions similar to the existing Thumb IT, in that you
    have one prefix instruction which designates up to 4 following
    instructions as subject to predication, and within that sequence, the
    predicate can be inverted by means of T/E suffixes ('Then' / 'Else').

    To support instructions of this type, we've added two new Tablegen
    classes `vpred_n` and `vpred_r` for standard clusters of MC operands
    to add to a predicated instruction. Both include a flag indicating how
    the instruction is predicated at all (options are T, E and 'not
    predicated'), and an input register field for the register controlling
    the set of active lanes. They differ from each other in that `vpred_r`
    also includes an input operand for the previous value of the output
    register, for instructions that leave inactive lanes unchanged.
    `vpred_n` lacks that extra operand; it will be used for instructions
    that don't preserve inactive lanes in their output register (either
    because inactive lanes are zeroed, as the MVE load instructions do, or
    because the output register isn't a vector at all).

    This commit also adds the family of prefix instructions themselves
    (VPT / VPST), and all the machinery needed to work with them in
    assembly and disassembly (e.g. generating the 't' and 'e' mnemonic
    suffixes on disassembled instructions within a predicated block)

    I've added a couple of demo instructions that derive from the new
    Tablegen base classes and use those two operand clusters. The bulk of
    the vector instructions will come in followup commits small enough to
    be manageable. (One exception is that I've added the full version of
    `isMnemonicVPTPredicable` in the AsmParser, because it seemed
    pointless to carefully split it up.)

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

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62669 (detail)
    by statham
  151. [CodeGen] Add getMachineMemOperand + MachineMemOperand::Flags allocator helper wrapper. NFCI.

    Pre-commit for D62726 on behalf of @luke (Luke Lau) (detail)
    by rksimon
  152. [DebugInfo] Honour variable fragments in LiveDebugValues

    This patch makes the LiveDebugValues pass consider fragments when propagating
    DBG_VALUE insts between blocks, fixing PR41979. Fragment info for a variable
    location is added to the open-ranges key, which allows distinct fragments to be
    tracked separately. To handle overlapping fragments things become slightly
    funkier. To avoid excessive searching for overlaps in the data-flow part of
    LiveDebugValues, this patch:
    * Pre-computes pairings of fragments that overlap, for each DILocalVariable
    * During data-flow, whenever something happens that causes an open range to
       be terminated (via erase), any fragments pre-determined to overlap are
       also terminated.

    The effect of which is that when encountering a DBG_VALUE fragment that
    overlaps others, the overlapped fragments do not get propagated to other
    blocks. We still rely on later location-list building to correctly handle
    overlapping fragments within blocks.

    It's unclear whether a mixture of DBG_VALUEs with and without fragmented
    expressions are legitimate. To avoid suprises, this patch interprets a
    DBG_VALUE with no fragment as overlapping any DBG_VALUE _with_ a fragment.

    Differential Revision: https://reviews.llvm.org/D62904 (detail)
    by jmorse
  153. [AMDGPU][MC] Enabled constant expressions as operands of s_getreg/s_setreg

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

    Reviewers: artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D61125 (detail)
    by dpreobra
  154. [ThinLTO][Bitcode] Add 'entrycount' to FS_COMBINED_PROFILE. NFC

    Differential revision: https://reviews.llvm.org/D63078 (detail)
    by evgeny777
  155. [X86][AVX] Add broadcast(v4f64 hadd) test (detail)
    by rksimon
  156. [X86][SSE] Avoid assert for broadcast(horiz-op()) cases for non-f64 cases.

    Based on fuzz test from @craig.topper (detail)
    by rksimon
  157. [X86][SSE] Add tests for underaligned nt stores

    Test both 'unaligned' (which we should scalarize) and 'subvector aligned' (which we should split) (detail)
    by rksimon
  158. [llvm-nm] Additional lit tests for command line options

        Differential Revision: https://reviews.llvm.org/D62955 (detail)
    by chrisj
  159. [X86][SSE] Add SSE4A nt store tests on X86 as well as X64

    We should be able to use MOVNTSD (f64) instead of MOVNTI (i32) to reduce the number of ops 32-bit targets

    Pulled out of D63246 (detail)
    by rksimon
  160. [DebugInfo] Move Value struct out of DebugLocEntry as DbgValueLoc (NFC)

    Since the DebugLocEntry::Value is used as part of DwarfDebug and
    DebugLocEntry make it as the separate class.

    Reviewers: aprantl, dstenb

    Reviewed By: aprantl

    Differential Revision: https://reviews.llvm.org/D63213 (detail)
    by nikolaprica
  161. [DebugInfo] Use FrameDestroy to extend stack locations to end-of-function

    We aim to ignore changes in variable locations during the prologue and
    epilogue of functions, to avoid using space documenting location changes
    that aren't visible. However in D61940 / r362951 this got ripped out as
    the previous implementation was unsound.

    Instead, use the FrameDestroy flag to identify when we're in the epilogue
    of a function, and ignore variable location changes accordingly. This fits
    in with existing code that examines the FrameSetup flag.

    Some variable locations get shuffled in modified tests as they now cover
    greater ranges, which is what would be expected. Some additional
    single-location variables are generated too. Two tests are un-xfailed,
    they were only xfailed due to r362951 deleting functionality they depended
    on.

    Apparently some out-of-tree backends don't accurately maintain FrameDestroy
    flags -- if you're an out-of-tree maintainer and see changes in variable
    locations disappear due to a faulty FrameDestroy flag, it's safe to back
    this change out. The impact is just slightly more debug info than necessary.

    Differential Revision: https://reviews.llvm.org/D62314 (detail)
    by jmorse
  162. [ARM] Refactor handling of IT mask operands.

    During assembly, the mask operand to an IT instruction (storing the
    sequence of T/E for 'Then' and 'Else') is parsed out of the mnemonic
    into a representation that encodes 'Then' and 'Else' in the same way
    regardless of the condition code. At some point during encoding it has
    to be converted into the instruction encoding used in the
    architecture, in which the mask encodes a sequence of replacement
    low-order bits for the condition code, so that which bit value means
    'then' and which 'else' depends on whether the original condition code
    had its low bit set.

    Previously, that transformation was done by processInstruction(), half
    way through assembly. So an MCOperand storing an IT mask would
    sometimes store it in one format, and sometimes in the other,
    depending on where in the assembly pipeline you were. You can see this
    in diagnostics from `llvm-mc -debug -triple=thumbv8a -show-inst`, for
    example: if you give it an instruction such as `itete eq`, you'd see
    an `<MCOperand Imm:5>` in a diagnostic become `<MCOperand Imm:11>` in
    the final output.

    Having the same data structure store values with time-dependent
    semantics is confusing already, and it will get more confusing when we
    introduce the MVE VPT instruction which reuses the Then/Else bitmask
    idea in a different context. So I'm refactoring: now, all `ARMOperand`
    and `MCOperand` representations of an IT mask work exactly the same
    way, namely, 0 means 'Then' and 1 means 'Else', regardless of what
    original predicate is being referred to. The architectural encoding of
    IT that depends on the original condition is now constructed at the
    point when we turn the `MCOperand` into the final instruction bit
    pattern, and decoded similarly in the disassembler.

    The previous condition-independent parse-time format used 0 for Else
    and 1 for Then. I've taken the opportunity to flip the sense of it
    while I'm changing all of this anyway, because it seems to me more
    natural to use 0 for 'leave the starting condition unchanged' and 1
    for 'invert it', as if those bits were an XOR mask.

    Reviewers: ostannard

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63219 (detail)
    by statham
  163. [llvm-objcopy] Implement IHEX reader

    This is the final part of IHEX format support in llvm-objcopy
    Differential revision: https://reviews.llvm.org/D62583 (detail)
    by evgeny777
  164. Improve reduction intrinsics by overloading result value.

    This patch uses the mechanism from D62995 to strengthen the
    definitions of the reduction intrinsics by letting the scalar
    result/accumulator type be overloaded from the vector element type.

    For example:

      ; The LLVM LangRef specifies that the scalar result must equal the
      ; vector element type, but this is not checked/enforced by LLVM.
      declare i32 @llvm.experimental.vector.reduce.or.i32.v4i32(<4 x i32> %a)

    This patch changes that into:

      declare i32 @llvm.experimental.vector.reduce.or.v4i32(<4 x i32> %a)

    Which has the type-constraint more explicit and causes LLVM to check
    the result type with the vector element type.

    Reviewers: RKSimon, arsenm, rnk, greened, aemerson

    Reviewed By: arsenm

    Differential Revision: https://reviews.llvm.org/D62996 (detail)
    by s.desmalen
  165. Revert [llvm-ar][test] Add to MRI test coverage

    This reverts 363232 due to mru-utf8.test buildbot test failure

    Differential Revision: https://reviews.llvm.org/D63197 (detail)
    by gbreynoo
  166. [NFC] Simplify Call query

    Use getIntrinsicID() directly from IntrinsicInst. (detail)
    by sam_parker
  167. [ARM][TTI] Scan for existing loop intrinsics

    TTI should report that it's not profitable to generate a hardware loop
    if it, or one of its child loops, has already been converted.

    Differential Revision: https://reviews.llvm.org/D63212 (detail)
    by sam_parker
  168. [IntrinsicEmitter] Extend argument overloading with forward references.

    Extend the mechanism to overload intrinsic arguments by using either
    backward or forward references to the overloadable arguments.

    In for example:

      def int_something : Intrinsic<[LLVMPointerToElt<0>],
                                    [llvm_anyvector_ty], []>;

    LLVMPointerToElt<0> is a forward reference to the overloadable operand
    of type 'llvm_anyvector_ty' and would allow intrinsics such as:

      declare i32* @llvm.something.v4i32(<4 x i32>);
      declare i64* @llvm.something.v2i64(<2 x i64>);

    where the result pointer type is deduced from the element type of the
    first argument.

    If the returned pointer is not a pointer to the element type, LLVM will
    give an error:

      Intrinsic has incorrect return type!
      i64* (<4 x i32>)* @llvm.something.v4i32

    Reviewers: RKSimon, arsenm, rnk, greened

    Reviewed By: arsenm

    Differential Revision: https://reviews.llvm.org/D62995 (detail)
    by s.desmalen
  169. [llvm-ar][test] Add to MRI test coverage

    This change adds tests to cover existing MRI script functionality.

    Differential Revision: https://reviews.llvm.org/D63197 (detail)
    by gbreynoo
  170. [X86] Correct instruction operands in evex-to-vex-compress.mir to be closer to real instructions.

    $noreg was being used way more than it should have. We also had
    xmm registers in addressing modes.

    Mostly found by hacking the machine verifier to do some stricter
    checking that happened to work for this test, but not sure if
    generally applicable for other tests or other targets. (detail)
    by ctopper
  171. [SimplifyCFG] reverting preliminary Switch patches again

    This reverts 363226 and 363227, both NFC intended

    I swear I fixed the test case that is failing, and ran
    the tests, but I will look into it again. (detail)
    by shawnl
  172. [SimpligyCFG] NFC intended, remove GCD that was only used for powers of two

    and replace with an equilivent countTrailingZeros.

    GCD is much more expensive than this, with repeated division.

    This depends on D60823

    Differential Revision: https://reviews.llvm.org/D61151 (detail)
    by shawnl
  173. [SimplifyCFG] NFC, update Switch tests to better examine successive patches

    Also add baseline tests to show effect of later patches.

    There were a couple of regressions here that were never caught,
    but my patch set that this is a preparation to will fix them.

    Differential Revision: https://reviews.llvm.org/D61150 (detail)
    by shawnl
  174. [X86] Add tests for some the special cases in EVEX to VEX to the evex-to-vex-compress.mir test. (detail)
    by ctopper
  175. [SimplifyCFG] revert the last commit.

    I ran ALL the test suite locally, so I will look into this... (detail)
    by shawnl
  176. [SimplifyCFG] NFC, update Switch tests to HEAD so I can

    see if my changes change anything

    Also add baseline tests to show effect of later patches.

    Differential Revision: https://reviews.llvm.org/D61150 (detail)
    by shawnl
  177. X86: Clean up pass initialization

    Summary:
    - Remove redundant initializations from pass constructors that were
      already being initialized by LLVMInitializeX86Target().

    - Add initialization function for the FPS pass.

    Reviewers: craig.topper

    Reviewed By: craig.topper

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63218 (detail)
    by tstellar
  178. Revert r361811: 'Re-commit r357452 (take 2): "SimplifyCFG SinkCommonCodeFromPredecessors ...'

    We have observed some failures with internal builds with this revision.

    - Performance regressions:
      - llvm's SingleSource/Misc evalloop shows performance regressions (although these may be red herrings).
      - Benchmarks for Abseil's SwissTable.
    - Correctness:
      - Failures for particular libicu tests when building the Google AppEngine SDK (for PHP).

    hwennborg has already been notified, and is aware of reproducer failures. (detail)
    by dlj
  179. [SLP] Update propagate_ir_flags.ll test to check that we do retain the common subset, NFC. (detail)
    by dinar
  180. [Tests] Highlight impact of multiple exit LFTR (D62625) as requested by reviewer (detail)
    by reames
  181. [NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll

    Patch 1 of n. (detail)
    by mcinally
  182. [llvm] Expose DWARFDebugLine::LineTable::getFileNameEntry

    Summary:
    This is useful for scenarios where Prologue was directly used and DWARF
    5 awareness is required. The current alternative would be to either
    duplicate the logic in getFileNameEntry, or to use getFileNameByIndex.
    The latter isn't quite an in-place replacement - it performs some
    processing, and it produces a string instead of a StringRef, meaning
    the caller needs to handle its lifetime.

    Reviewers: tamur, dblaikie, JDevlieghere

    Reviewed By: tamur, JDevlieghere

    Subscribers: aprantl, llvm-commits

    Tags: #llvm, #debug-info

    Differential Revision: https://reviews.llvm.org/D63228 (detail)
    by mtrofin
  183. [x86] add tests for vector shifts; NFC (detail)
    by spatel
  184. Sanitize llvm-extract -help output

    Filter out irrelevant options

    New output:

        OVERVIEW: llvm extractor

        USAGE: llvm-extract [options] <input bitcode file>

        OPTIONS:

        Generic Options:

          --help              - Display available options (--help-hidden for more)
          --help-list         - Display list of available options (--help-list-hidden for more)
          --version           - Display the version of this program

        llvm-extract Options:

          --alias=<alias>     - Specify alias to extract
          --bb=<function:bb>  - Specify <function, basic block> pairs to extract
          --delete            - Delete specified Globals from Module
          -f                  - Enable binary output on terminals
          --func=<function>   - Specify function to extract
          --glob=<global>     - Specify global to extract
          -o=<filename>       - Specify output filename
          --ralias=<ralias>   - Specify alias(es) to extract using a regular expression
          --recursive         - Recursively extract all called functions
          --rfunc=<rfunction> - Specify function(s) to extract using a regular expression
          --rglob=<rglobal>   - Specify global(s) to extract using a regular expression

    Differential Revision: https://reviews.llvm.org/D62511 (detail)
    by serge_sans_paille
  185. [NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll

    Patch 3 of 3 for X86/avx512vl-intrinsics-fast-isel.ll (detail)
    by mcinally
  186. [llvm-readobj] Fix output interleaving issue caused by using multiple streams at the same time.

    Summary:
    Use llvm::fouts() as the default stream for outputing. No new stream
    should be constructed to output at the same time.

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

    Reviewers: jhenderson, grimar, MaskRay, phosek, rupprecht

    Reviewed By: rupprecht

    Subscribers: llvm-commits

    Tags: #llvm

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

    Patch by Yuanfang Chen! (detail)
    by rupprecht
  187. [IndVars] Extend diagnostic -replexitval flag w/ability to bypass hard use hueristic

    Note: This does mean that "always" is now more powerful than it was. (detail)
    by reames
  188. [NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll

    Patch 2 of 3 for X86/avx512vl-intrinsics-fast-isel.ll (detail)
    by mcinally
  189. [Tests] Autogen RLEV test and add tests for a future enhancement (detail)
    by reames
  190. [Tests] Add tests to highlight sibling loop optimization order issue for exit rewriting

    The issue addressed in r363180 is more broadly relevant.  For the moment, we don't actually get any of these cases because we a) restrict SCEV formation due to SCEExpander needing to preserve LCSSA, and b) don't iterate between loops. (detail)
    by reames
  191. [AMDGPU] more gfx1010 tests. NFC. (detail)
    by rampitec
  192. [llvm-ar][test] Relax lit directory assumptions in thin-archive.test

    Summary: thin-archive.test assumes the Output/<testname> structure that lit creates. Rewrite the test in a way that still tests the same thing (creating via relative path and adding via absolute path) but doesn't assume this specific lit structure, making it possible to run in a lit emulator.

    Reviewers: gbreynoo

    Reviewed By: gbreynoo

    Subscribers: llvm-commits, bkramer

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62930 (detail)
    by rupprecht
  193. [AMDGPU] gfx1010 dpp16 and dpp8

    Differential Revision: https://reviews.llvm.org/D63203 (detail)
    by rampitec
  194. [AMDGPU] gfx1010 premlane instructions

    Differential Revision: https://reviews.llvm.org/D63202 (detail)
    by rampitec
  195. [Mips] Add s.d instruction alias for Mips1

    Add support for s.d instruction for Mips1 which expands into two swc1
    instructions.

    Patch by Mirko Brkusanin.

    Differential Revision: https://reviews.llvm.org/D63199 (detail)
    by atanasyan
  196. [llvm-lipo] Update llvm-lipo docs for -archs flag

    The information for -archs flag is added to llvm-lipo.rst.

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

    Differential Revision: https://reviews.llvm.org/D63100 (detail)
    by smeenai
  197. [X86][SSE] Avoid unnecessary stack codegen in NT merge-consecutive-stores codegen tests. (detail)
    by rksimon
  198. [SCEV] Teach computeSCEVAtScope benefit from one-input Phi. PR39673

    SCEV does not propagate arguments through one-input Phis so as to make it easy for the SCEV expander (and related code) to preserve LCSSA.  It's not entirely clear this restriction is neccessary, but for the moment it exists.   For this reason, we don't analyze single-entry phi inputs.  However it is possible that when an this input leaves the loop through LCSSA Phi, it is a provable constant.  Missing that results in an order of optimization issue in loop exit value rewriting where we miss some oppurtunities based on order in which we visit sibling loops.

    This patch teaches computeSCEVAtScope about this case. We can generalize it later, but so far we can only replace LCSSA Phis with their constant loop-exiting values.  We should probably also add similiar logic directly in the SCEV construction path itself.

    Patch by: mkazantsev (with revised commit message by me)
    Differential Revision: https://reviews.llvm.org/D58113 (detail)
    by reames
  199. [TargetLowering] Add MachineMemOperand::Flags to allowsMemoryAccess tests (PR42123)

    As discussed on D62910, we need to check whether particular types of memory access are allowed, not just their alignment/address-space.

    This NFC patch adds a MachineMemOperand::Flags argument to allowsMemoryAccess and allowsMisalignedMemoryAccesses, and wires up calls to pass the relevant flags to them.

    If people are happy with this approach I can then update X86TargetLowering::allowsMisalignedMemoryAccesses to handle misaligned NT load/stores.

    Differential Revision: https://reviews.llvm.org/D63075 (detail)
    by rksimon
  200. [X86][AVX] Fold concat(vpermilps(x,c),vpermilps(y,c)) -> vpermilps(concat(x,y),c)

    Handles PSHUFD/PSHUFLW/PSHUFHW (AVX2) + VPERMILPS (AVX1).

    An extra AVX1 PSHUFD->VPERMILPS combine will be added in a future commit. (detail)
    by rksimon
  201. [InstCombine] add tests for fmin/fmax libcalls; NFC (detail)
    by spatel
  202. Revert rL363156.

    The patch was to fix buildbots, but rL363157 should now be fixing it
    in a cleaner way. (detail)
    by sam_parker
  203. [NFC[ Updated tests for D54411 (detail)
    by xbolva00
  204. gn build: Add SystemZ target (detail)
    by nico
  205. StackProtector: Use PointerMayBeCaptured

    This was using its own, outdated list of possible captures. This was
    at minimum not catching cmpxchg and addrspacecast captures.

    One change is now any volatile access is treated as capturing. The
    test coverage for this pass is quite inadequate, but this required
    removing volatile in the lifetime capture test.

    Also fixes some infrastructure issues to allow running just the IR
    pass.

    Fixes bug 42238. (detail)
    by arsenm
  206. AMDGPU/GlobalISel: Fix using illegal situations in tests

    These were using illegal copies as the side effecting use, so make
    them legal. (detail)
    by arsenm
  207. [ARM] Fix compiler warning

    Without this fix clang 3.6 complains with:

    ../lib/Target/ARM/ARMAsmPrinter.cpp:1473:18: error: variable 'BranchTarget' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
          } else if (MI->getOperand(1).isSymbol()) {
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../lib/Target/ARM/ARMAsmPrinter.cpp:1479:22: note: uninitialized use occurs here
          MCInst.addExpr(BranchTarget);
                         ^~~~~~~~~~~~
    ../lib/Target/ARM/ARMAsmPrinter.cpp:1473:14: note: remove the 'if' if its condition is always true
          } else if (MI->getOperand(1).isSymbol()) {
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../lib/Target/ARM/ARMAsmPrinter.cpp:1465:33: note: initialize the variable 'BranchTarget' to silence this warning
          const MCExpr *BranchTarget;
                                    ^
                                     = nullptr
    1 error generated.

    Discussed here:
    http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190610/661417.html (detail)
    by uabelho
  208. LoopVersioning: Respect convergent

    This changes the standalone pass only. Arguably the utility class
    itself should assert there are no convergent calls. However, a target
    pass with additional context may still be able to version a loop if
    all of the dynamic conditions are sufficiently uniform. (detail)
    by arsenm
  209. [MIR] Skip hoisting to basic block which may throw exception or return

    Summary:
    Fix hoisting to basic block which are not legal for hoisting cause
    it can be terminated by exception or it is return block.

    Reviewers: john.brawn, RKSimon, MatzeB

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63148 (detail)
    by anton-afanasyev
  210. [InstCombine] add tests for fcmp+select with FMF (minnum/maxnum); NFC (detail)
    by spatel
  211. LoopLoadElim: Respect convergent (detail)
    by arsenm
  212. [DebugInfo] Add a test that fell out of an earlier commit

    r362951 was supposed to contain this test, however it didn't get committed
    due to operator error. This was originally part of D59431. (detail)
    by jmorse
  213. LoopDistribute/LAA: Respect convergent

    This case is slightly tricky, because loop distribution should be
    allowed in some cases, and not others. As long as runtime dependency
    checks don't need to be introduced, this should be OK. This is further
    complicated by the fact that LoopDistribute partially ignores if LAA
    says that vectorization is safe, and then does its own runtime pointer
    legality checks.

    Note this pass still does not handle noduplicate correctly, as this
    should always be forbidden with it. I'm not going to bother trying to
    fix it, as it would require more effort and I think noduplicate should
    be removed.

    https://reviews.llvm.org/D62607 (detail)
    by arsenm
  214. gn build: Add Mips target (detail)
    by nico
  215. LoopDistribute/LAA: Add tests to catch regressions

    I broke 2 of these with a patch, but were not covered by existing
    tests.

    https://reviews.llvm.org/D63035 (detail)
    by arsenm
  216. [NFC] Add HardwareLoops lit.local.cfg file

    Set Transforms/HardwareLoops/ARM/ tests as unsupported if there isn't
    an arm target. (detail)
    by sam_parker
  217. Attempt to fix non-Arm buildbots

    Adding REQUIRES: arm to failing tests (detail)
    by sam_parker
  218. Fix a Wunused-lambda-capture warning.

    The capture was added in the first commit of https://reviews.llvm.org/D61934
    when it was used. In the reland, the use was removed but the capture
    wasn't removed. (detail)
    by nico
  219. gn build: add RISCV target

    Patch from David L. Jones <dlj@google.com>, with minor tweaks by me.

    Differential Revision: https://reviews.llvm.org/D61821 (detail)
    by nico
  220. [X86][AVX] Tests showing missing concat(shuffle,shuffle) -> shuffle(concat) folds. NFCI. (detail)
    by rksimon
  221. gn build: Merge r363122 (detail)
    by nico
  222. [Legacy LTO] Fix build bots: r363140: Fix export name (detail)
    by bd1976llvm
  223. [ARM] Implement TTI::isHardwareLoopProfitable
       
    Implement the backend target hook to drive the HardwareLoops pass.
    The low-overhead branch extension for Arm M-class cores is flexible
    enough that we don't have to ensure correctness at this point, except
    checking that the loop counter variable can be stored in LR - a
    32-bit register. For it to be profitable, we want to avoid loops that
    contain function calls, or any other instruction that alters the PC.
       
    This implementation uses TargetLoweringInfo, to query type and
    operation actions, looks at intrinsic calls and also performs some
    manual checks for remainder/division and FP operations.
       
    I think this should be a good base to start and extra details can be
    filled out later.

    Differential Revision: https://reviews.llvm.org/D62907 (detail)
    by sam_parker
  224. [bindings/go][NFC] Format code with go fmt

    Run go fmt (version 1.12) over the Go bindings. This cleans up lots of
    inconsistencies in the code, it does not change the code in a functional
    way.

    Differential Revision: https://reviews.llvm.org/D63057 (detail)
    by aykevl
  225. [NFC][SCEV] Add NoWrapFlag argument to InsertBinOp

    'Use wrap flags in InsertBinop' (rL362687) was reverted due to
    miscompiles. This patch introduces the previous change to pass
    no-wrap flags but now only FlagAnyWrap is passed.

    Differential Revision: https://reviews.llvm.org/D61934 (detail)
    by sam_parker
  226. [docs][llvm-symbolizer] Fix typo and grammar error (detail)
    by jhenderson
  227. Share /machine: handling code with llvm-cvtres too

    r363016 let lld-link and llvm-lib share the /machine: parsing code.
    This lets llvm-cvtres share it as well.

    Making llvm-cvtres depend on llvm-lib seemed a bit strange (it doesn't
    need llvm-lib's dependencies on BinaryFormat and BitReader) and I
    couldn't find a good place to put this code. Since it's just a few
    lines, put it in lib/Object for now.

    Differential Revision: https://reviews.llvm.org/D63120 (detail)
    by nico
  228. [DOC] Fix `load` instructions' syntax, function definition.

    Summary: In this patch, I updated `load` instruction syntax and fixed function definition. Besides, I re-named some variables to make them obey SSA rule.

    Reviewers: MaskRay

    Reviewed By: MaskRay

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63186 (detail)
    by Xing
  229. [XCore] CombineSTORE - Use allowsMemoryAccess wrapper. NFCI.

    Noticed in D63075 - there was a allowsMisalignedMemoryAccesses call to check for unaligned loads and a check for aligned legal type loads - which is exactly what allowsMemoryAccess does. (detail)
    by rksimon
  230. [ThinLTO]LTO]Legacy] Fix dependent libraries support by adding querying of the IRSymtab

    Dependent libraries support for the legacy api was committed in a
    broken state (see: https://reviews.llvm.org/D60274). This was missed
    due to the painful nature of having to integrate the changes into a
    linker in order to test. This change implements support for dependent
    libraries in the legacy LTO api:

    - I have removed the current api function, which returns a single
    string, and   added functions to access each dependent library
    specifier individually.

    - To reduce the testing pain, I have made the api functions as thin as
    possible to   maximize coverage from llvm-lto.

    - When doing ThinLTO the system linker will load the modules lazily
    when scanning   the input files. Unfortunately, when modules are
    lazily loaded there is no access   to module level named metadata. To
    fix this I have added api functions that allow   querying the IRSymtab
    for the dependent libraries. I hope to expand the api in the   future
    so that, eventually, all the information needed by a client linker
    during   scan can be retrieved from the IRSymtab.

    Differential Revision: https://reviews.llvm.org/D62935 (detail)
    by bd1976llvm
  231. [docs] Fix typo (detail)
    by jhenderson
  232. [XCore] LowerLOAD/LowerSTORE - Use allowsMemoryAccess wrapper. NFCI.

    Noticed in D63075 - there was a allowsMisalignedMemoryAccesses call to check for unaligned loads and a check for aligned legal type loads - which is exactly what allowsMemoryAccess does. (detail)
    by rksimon
  233. [llvm-nm] Fix docs and help text for --print-size

    The --print-size help text and documentation claimed that the size was
    printed instead of the address, but this is incorrect. It is printed as
    well as the address. This patch fixes this issue.

    Reviewed by: MaskRay, mtrent, ruiu

    Differential Revision: https://reviews.llvm.org/D63142 (detail)
    by jhenderson
  234. Revert "[DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion"

    This reverts commit 1a0f7a2077b70c9864faa476e15b048686cf1ca7.
    See phabricator thread for D60831. (detail)
    by orlandoch
  235. [AVR] Fix the 'avr-tiny.ll' and 'avr25.ll' subtarget feature tests

    When these tests were originally written, the middle end would introduce
    an unnecessary copy from r24:r23->GPR16->r24:r23, and these tests
    mistakenly relied on it.

    The most optimal codegen for the functions in the test cases before this patch
    would be NOPs. This is because the first i16 argument always gets the same register
    allocation as an i16 return value in the AVR calling convention.

    These tests broke in r362963 when the codegen was improved and the
    redundant copy was eliminated. After this, the test functions
    were lowered to their optimal form - a 'ret' and nothing else.

    This patch prepends an extra i16 operand to each of the test functions
    so that a 16-bit copy must be inserted for the program to be correct. (detail)
    by dylanmckay
  236. [AArch64] Merge globals when optimising for size

    Extern global merging is good for code-size. There's definitely potential for
    performance too, but there's one regression in a benchmark that needs
    investigating, so that's why we enable it only when we optimise for size for
    now.

    Patch by Ramakota Reddy and Sjoerd Meijer.

    Differential Revision: https://reviews.llvm.org/D61947 (detail)
    by sjoerdmeijer
  237. gitignore: Ignore Qt Creator project configuration files. NFC (detail)
    by nik
  238. [X86] Add VCMPSSZrr_Intk and VCMPSDZrr_Intk to isNonFoldablePartialRegisterLoad.

    The non-masked versions are already in there. I'm having some
    trouble coming up with a way to test this right now. Most load
    folding should happen during isel so I'm not sure how to get
    peephole pass to do it. (detail)
    by ctopper
  239. [RISCV] Fix inline-asm.ll test by adding nounwind attribute

    This test failed since CFI directive support was added in r361320. (detail)
    by asb
  240. [RISCV] Add CFI directives for RISCV prologue/epilog.

    In order to generate correct debug frame information, it needs to
    generate CFI information in prologue and epilog.

    Differential Revision: https://reviews.llvm.org/D61773 (detail)
    by hsiangkai
  241. [NFC] Correct comments in RegisterCoalescer.

    Differential Revision: https://reviews.llvm.org/D63124 (detail)
    by hsiangkai
  242. [PowerPC][NFC] Added test for sext/shl combination after isel. (detail)
    by lkail
  243. [NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll X86/combine-fabs.ll

    X86/avx512vl-intrinsics-fast-isel.ll is only partially complete. (detail)
    by mcinally
  244. Fix a bug in getSCEVAtScope w.r.t. non-canonical loops

    The issue is that if we have a loop with multiple predecessors outside the loop, the code was expecting to merge them and only return if equal, but instead returned the first one seen.

    I have no idea if this actually tripped anywhere.  I noticed it by accident when reading the code and have no idea how to go about constructing a test case. (detail)
    by reames
  245. Generalize icmp matching in IndVars' eliminateTrunc

    We were only matching RHS being a loop invariant value, not the inverse. Since there's nothing which appears to canonicalize loop invariant values to RHS, this means we missed cases.

    Differential Revision: https://reviews.llvm.org/D63112 (detail)
    by reames
  246. [Analysis] add isSplatValue() for vectors in IR

    We have the related getSplatValue() already in IR (see code just above the proposed addition).
    But sometimes we only need to know that the value is a splat rather than capture the splatted
    scalar value. Also, we have an isSplatValue() function already in SDAG.

    Motivation - recent bugs that would potentially benefit from improved splat analysis in IR:
    https://bugs.llvm.org/show_bug.cgi?id=37428
    https://bugs.llvm.org/show_bug.cgi?id=42174

    Differential Revision: https://reviews.llvm.org/D63138 (detail)
    by spatel
  247. [PowerPC][NFC]Remove sms-simple.ll test temporarily.

    Looks like a MachinePipeliner algorithm problem found by
    sanitizer-x86_64-linux-fast.
    I will backout this test first while investigating the problem to
    unblock buildbot.

    ==49637==ERROR: AddressSanitizer: heap-buffer-overflow on address
    0x614000002e08 at pc 0x000004364350 bp 0x7ffe228a3bd0 sp 0x7ffe228a3bc8
    READ of size 4 at 0x614000002e08 thread T0
        #0 0x436434f in
    llvm::SwingSchedulerDAG::checkValidNodeOrder(llvm::SmallVector<llvm::NodeSet,
    8u> const&) const
    /b/sanitizer-x86_64-linux-fast/build/llvm/lib/CodeGen/MachinePipeliner.cpp:3736:11
        #1 0x4342cd0 in llvm::SwingSchedulerDAG::schedule()
    /b/sanitizer-x86_64-linux-fast/build/llvm/lib/CodeGen/MachinePipeliner.cpp:486:3
        #2 0x434042d in
    llvm::MachinePipeliner::swingModuloScheduler(llvm::MachineLoop&)
    /b/sanitizer-x86_64-linux-fast/build/llvm/lib/CodeGen/MachinePipeliner.cpp:385:7
        #3 0x433eb90 in
    llvm::MachinePipeliner::runOnMachineFunction(llvm::MachineFunction&)
    /b/sanitizer-x86_64-linux-fast/build/llvm/lib/CodeGen/MachinePipeliner.cpp:207:5
        #4 0x428b7ea in
    llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
    /b/sanitizer-x86_64-linux-fast/build/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
        #5 0x4d1a913 in llvm::FPPassManager::runOnFunction(llvm::Function&)
    /b/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/LegacyPassManager.cpp:1648:27
        #6 0x4d1b192 in llvm::FPPassManager::runOnModule(llvm::Module&)
    /b/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/LegacyPassManager.cpp:1685:16
        #7 0x4d1c06d in runOnModule
    /b/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/LegacyPassManager.cpp:1752:27
        #8 0x4d1c06d in llvm::legacy::PassManagerImpl::run(llvm::Module&)
    /b/sanitizer-x86_64-linux-fast/build/llvm/lib/IR/LegacyPassManager.cpp:1865
        #9 0xa48ca3 in compileModule(char**, llvm::LLVMContext&)
    /b/sanitizer-x86_64-linux-fast/build/llvm/tools/llc/llc.cpp:611:8
        #10 0xa4270f in main
    /b/sanitizer-x86_64-linux-fast/build/llvm/tools/llc/llc.cpp:365:22
        #11 0x7fec902572e0 in __libc_start_main
    (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
        #12 0x971b69 in _start
    (/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/llc+0x971b69) (detail)
    by jsji
  248. [docs] Add "GNU binutils Replacements" section to command guide

    Summary:
    This splits out a section in the command guide for llvm tools that can be used as replacements for GNU tools. For pages that didn't exist, I added stub pages that can be individually filled in by followup patches.

    Tested by running `ninja docs-llvm-html` and inspecting locally.

    Reviewers: jhenderson, MaskRay, grimar, alexshap

    Reviewed By: jhenderson, MaskRay, grimar

    Subscribers: smeenai, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63014 (detail)
    by rupprecht
  249. [GlobalISel] Add a G_JUMP_TABLE opcode.

    This opcode generates a pointer to the address of the jump table
    specified by the source operand, which is a jump table index.

    It will be used in conjunction with an upcoming G_BRJT opcode to support
    jump table codegen with GlobalISel.

    Differential Revision: https://reviews.llvm.org/D63111 (detail)
    by aemerson
  250. [MemorySSA] When applying updates, clean unnecessary Phis.

    Summary: After applying a set of insert updates, there may be trivial Phis left over. Clean them up.

    Reviewers: george.burgess.iv

    Subscribers: jlebar, Prazek, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63033 (detail)
    by asbirlea
  251. [NFC][CodeGen] Add unary FNeg tests to X86/combine-fcopysign.ll X86/dag-fmf-cse.ll X86/fast-isel-fneg.ll X86/fdiv.ll (detail)
    by mcinally
  252. Only passes that preserve MemorySSA must mark it as preserved.

    Summary:
    The method `getLoopPassPreservedAnalyses` should not mark MemorySSA as
    preserved, because it's being called in a lot of passes that do not
    preserve MemorySSA.
    Instead, mark the MemorySSA analysis as preserved by each pass that does
    preserve it.
    These changes only affect the new pass mananger.

    Reviewers: chandlerc

    Subscribers: mehdi_amini, jlebar, Prazek, george.burgess.iv, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62536 (detail)
    by asbirlea
  253. Deduplicate S_CONSTANTs in LLD.

    Summary: Deduplicate S_CONSTANTS when linking, if they have the same value.

    Reviewers: rnk

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63151 (detail)
    by akhuang
  254. [PowerPC] Enable MachinePipeliner for P9 with -ppc-enable-pipeliner

    Implement necessary target hooks to enable MachinePipeliner for P9 only.
    The pass is off by default, can be enabled with -ppc-enable-pipeliner for P9.

    Differential Revision: https://reviews.llvm.org/D62164 (detail)
    by jsji
  255. [NFC][CodeGen] Add unary fneg tests to X86/fma-fneg-combine.ll (detail)
    by mcinally
  256. [Path] Set FD to -1 in moved-from TempFile

    When moving a temp file, explicitly set the file descriptor to -1 so we
    can never accidentally close the moved-from TempFile.

    Differential revision: https://reviews.llvm.org/D63087 (detail)
    by Jonas Devlieghere
  257. [InstCombine] Handle -(X-Y) --> (Y-X) for unary fneg when NSZ

    Differential Revision: https://reviews.llvm.org/D62612 (detail)
    by mcinally
  258. [docs][llvm-nm] Add darwin as --format option (detail)
    by jhenderson
  259. [InstCombine] Update fptrunc (fneg x)) -> (fneg (fptrunc x) for unary FNeg

    Differential Revision: https://reviews.llvm.org/D62629 (detail)
    by mcinally
  260. Fix docs build issue introduced by r363035

    Replacing '.. code-block:: llvm' by '::' is a quick fix to the
    build warning/error: Could not lex literal_block as "llvm". (detail)
    by s.desmalen
  261. lld-link: Reject more than one resource .obj file

    Users are exepcted to pass all .res files to the linker, which then
    merges all the resource in all .res files into a tree structure and then
    converts the final tree structure to a .obj file with .rsrc$01 and
    .rsrc$02 sections and then links that.

    If the user instead passes several .obj files containing such resources,
    the correct thing to do would be to have custom code to merge the trees
    in the resource sections instead of doing normal section merging -- but
    link.exe rejects if multiple resource obj files are passed in with
    LNK4078, so let lld-link do that too instead of silently writing broken
    .rsrc sections in that case.

    The only real way to run into this is if users manually convert .res
    files to .obj files by running cvtres and then handing the resulting
    .obj files to lld-link instead, which in practice likely never happens.

    (lld-link is slightly stricter than link.exe now: If link.exe is passed
    one .obj file created by cvtres, and a .res file, for some reason it
    just emits a warning instead of an error and outputs strange looking
    data. lld-link now errors out on mixed input like this.)

    One way users could accidentally run into this is the following
    scenario: If a .res file is passed to lib.exe, then lib.exe calls
    cvtres.exe on the .res file before putting it in the output .lib.
    (llvm-lib currently doesn't do this.)
    link.exe's /wholearchive seems to only add obj files referenced from the
    static library index, but lld-link current really adds all files in the
    archive. So if lld-link /wholearchive is used with .lib files produced
    by lib.exe and .res files were among the files handed to lib.exe, we
    previously silently produced invalid output, but now we error out.

    link.exe's /wholearchive semantics on the other hand mean that it
    wouldn't load the resource object files from the .lib file at all.
    Since this scenario is probably still an unlikely corner case,
    the difference in behavior here seems fine -- and lld-link might have to
    change to use link.exe's /wholearchive semantics in the future anyways.

    Vaguely related to PR42180.

    Differential Revision: https://reviews.llvm.org/D63109 (detail)
    by nico
  262. [X86] Regenerate CmpISel test for future patch (detail)
    by rksimon
  263. [docs][llvm-nm] Make --help help text consistent with other options (detail)
    by jhenderson
  264. [llvm-dwarfdump] Simplify --ignore-case help text and documentation

    There was a typo in the --ignore-case help text that was copied into the
    llvm-dwarfdump command-guide. Additionally, this patch simplifies the
    wording, since it was unnecessarily verbose: the switch applies for
    searching in general and doesn't need explicitly stating different
    search modes (which might go out-of-date as options are added or
    removed).

    Reviwed by: JDevlieghere

    Differential Revision: https://reviews.llvm.org/D63133 (detail)
    by jhenderson
  265. [docs][llvm-nm] Fix documentation regarding llvm-nm reading stdin

    llvm-nm reads a.out NOT stdin when no input file is specified. This
    patch fixes the doc accordingly, and rephrases the surrounding sentence
    slightly.

    Reviewed by: grimar

    Differential Revision: https://reviews.llvm.org/D63135 (detail)
    by jhenderson
  266. [ARM] Fix a typo in the test from r363039 (detail)
    by ibiryukov
  267. [RISCV] Add lowering of addressing sequences for PIC

    This patch allows lowering of PIC addresses by using PC-relative
    addressing for DSO-local symbols and accessing the address through the
    global offset table for non-DSO-local symbols.

    Differential Revision: https://reviews.llvm.org/D55303 (detail)
    by lewis-revill
  268. [RISCV][NFC] Add missing test file for D54093 (detail)
    by lewis-revill
  269. [RISCV] Lower inline asm constraints I, J & K for RISC-V

    This validates and lowers arguments to inline asm nodes which have the
    constraints I, J & K, with the following semantics (equivalent to GCC):

    I: Any 12-bit signed immediate.
    J: Immediate integer zero only.
    K: Any 5-bit unsigned immediate.

    Differential Revision: https://reviews.llvm.org/D54093 (detail)
    by lewis-revill
  270. [ARM] First MVE instructions: scalar shifts.

    This introduces a new decoding table for MVE instructions, and starts
    by adding the family of scalar shift instructions that are part of the
    MVE architecture extension: saturating shifts within a single GPR, and
    long shifts across a pair of GPRs (both saturating and normal).

    Some of these shift instructions have only 3-bit register fields in
    the encoding, with the low bit fixed. So they can only address an odd
    or even numbered GPR (depending on the operand), and therefore I add
    two new register classes, GPREven and GPROdd.

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

    Change-Id: Iad95d5f83d26aef70c674027a184a6b1e0098d33 (detail)
    by miyuki
  271. Let writeWindowsResourceCOFF() take a TimeStamp parameter

    For lld, pass in Config->Timestamp (which is set based on lld's
    /timestamp: and /Brepro flags). Since the writeWindowsResourceCOFF()
    data is only used in-memory by LLD and the obj's timestamp isn't used
    for anything in the output, this doesn't change behavior.

    For llvm-cvtres, add an optional /timestamp: parameter, and use the
    current behavior of calling time() if the parameter is not passed in.

    This doesn't really change observable behavior (unless someone passes
    /timestamp: to llvm-cvtres, which wasn't possible before), but it
    removes the last unqualified call to time() from llvm/lib, which seems
    like a good thing.

    Differential Revision: https://reviews.llvm.org/D63116 (detail)
    by nico
  272. [NFC] Fixed arm/aarch64 test (detail)
    by xbolva00
  273. [TargetLowering] Add allowsMemoryAccess(MachineMemOperand) helper wrapper. NFCI.

    As suggested by @arsenm on D63075 - this adds a TargetLowering::allowsMemoryAccess wrapper that takes a Load/Store node's MachineMemOperand to handle the AddressSpace/Alignment arguments and will also implicitly handle the MachineMemOperand::Flags change in D63075. (detail)
    by rksimon
  274. [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion

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

    The bug reports that a vectorized loop is stepped through 4 times and each step through the loop seemed to show a different path. I found two problems here:

    A) An incorrect line number on a preheader block (for.body.preheader) instruction causes a step into the loop before it begins.
    B) Instructions in the middle block have different line numbers which give the impression of another iteration.

    In this patch I give all of the middle block instructions the line number of the scalar loop latch terminator branch. This seems to provide the smoothest debugging experience because the vectorized loops will always end on this line before dropping into the scalar loop. To solve problem A I have altered llvm::SplitBlockPredecessors to accommodate loop header blocks.

    I have set up a separate review D61933 for a fix which is required for this patch.

    Reviewers: samsonov, vsk, aprantl, probinson, anemet, hfinkel, jmorse

    Reviewed By: hfinkel, jmorse

    Subscribers: jmorse, javed.absar, eraman, kcc, bjope, jmellorcrummey, hfinkel, gbedwell, hiraditya, zzheng, llvm-commits

    Tags: #llvm, #debug-info

    Differential Revision: https://reviews.llvm.org/D60831 (detail)
    by orlandoch
  275. [llvm-readobj] - Do not use precompiled binary in elf-broken-dynsym-link.test

    Now we can remove the "TODO" since https://bugs.llvm.org/show_bug.cgi?id=42216
    was fixed. (detail)
    by grimar
  276. [llvm-dwarfdump] Add -o to help text and remove --out-file from doc

    -o is in the documentation, but not in the llvm-dwarfdump help text.
    This patch adds it by inverting the -o and --out-file aliasing. It also
    removes --out-file from the documentation, since we don't really want
    people to be using this switch in practice.

    Reviewed by: aprantl, JDevlieghere, dblaikie

    Differential Revision: https://reviews.llvm.org/D63013 (detail)
    by jhenderson
  277. [ARM] Fix unused-variable warning in rL363039.

    The variable `OffsetMask` is currently only used in an assertion, so
    if assertions are compiled out and -Werror is enabled, it becomes a
    build failure. (detail)
    by statham
  278. [yaml2elf] - Check we are able to set custom sh_link for .symtab/.dynsym

    Allow using both custom numeric and string values for Link field of the
    dynamic and regular symbol tables.

    Differential revision: https://reviews.llvm.org/D63077 (detail)
    by grimar
  279. [DAGCombine] GetNegatedExpression - constant float vector support (PR42105)

    Add support for negation of constant build vectors.

    Differential Revision: https://reviews.llvm.org/D62963 (detail)
    by rksimon
  280. [ARM] Add the non-MVE instructions in Arm v8.1-M.

    This adds support for the new family of conditional selection /
    increment / negation instructions; the low-overhead branch
    instructions (e.g. BF, WLS, DLS); the CLRM instruction to zero a whole
    list of registers at once; the new VMRS/VMSR and VLDR/VSTR
    instructions to get data in and out of 8.1-M system registers,
    particularly including the new VPR register used by MVE vector
    predication.

    To support this, we also add a register name 'zr' (used by the CSEL
    family to force one of the inputs to the constant 0), and operand
    types for lists of registers that are also allowed to include APSR or
    VPR (used by CLRM). The VLDR/VSTR instructions also need a new
    addressing mode.

    The low-overhead branch instructions exist in their own separate
    architecture extension, which we treat as enabled by default, but you
    can say -mattr=-lob or equivalent to turn it off.

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

    Reviewed By: samparker

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62667 (detail)
    by statham
  281. Change semantics of fadd/fmul vector reductions.

    This patch changes how LLVM handles the accumulator/start value
    in the reduction, by never ignoring it regardless of the presence of
    fast-math flags on callsites. This change introduces the following
    new intrinsics to replace the existing ones:

      llvm.experimental.vector.reduce.fadd -> llvm.experimental.vector.reduce.v2.fadd
      llvm.experimental.vector.reduce.fmul -> llvm.experimental.vector.reduce.v2.fmul

    and adds functionality to auto-upgrade existing LLVM IR and bitcode.

    Reviewers: RKSimon, greened, dmgreen, nikic, simoll, aemerson

    Reviewed By: nikic

    Differential Revision: https://reviews.llvm.org/D60261 (detail)
    by s.desmalen
  282. [X86] Add load folding isel patterns to scalar_math_patterns and AVX512_scalar_math_fp_patterns.

    Also add a FIXME for the peephole pass not being able to handle this. (detail)
    by ctopper
  283. Revert CMake: Make most target symbols hidden by default

    This reverts r362990 (git commit 374571301dc8e9bc9fdd1d70f86015de198673bd)

    This was causing linker warnings on Darwin:

    ld: warning: direct access in function 'llvm::initializeEvexToVexInstPassPass(llvm::PassRegistry&)'
    from file '../../lib/libLLVMX86CodeGen.a(X86EvexToVex.cpp.o)' to global weak symbol
    'void std::__1::__call_once_proxy<std::__1::tuple<void* (&)(llvm::PassRegistry&),
    std::__1::reference_wrapper<llvm::PassRegistry>&&> >(void*)' from file '../../lib/libLLVMCore.a(Verifier.cpp.o)'
    means the weak symbol cannot be overridden at runtime. This was likely caused by different translation
    units being compiled with different visibility settings. (detail)
    by tstellar
  284. Symbolize: Make DWPName a symbolizer option instead of an argument to symbolize{,Inlined}Code.

    This makes the interface simpler and more consistent with the interface for
    .dSYM files and fixes a bug where llvm-symbolizer would not read the dwp if
    it was asked to symbolize data before symbolizing code.

    Differential Revision: https://reviews.llvm.org/D63114 (detail)
    by pcc
  285. Symbolize: Replace the Options constructor with in-class initialization. NFCI.

    This is not only less code but also clearer at the use site.

    Differential Revision: https://reviews.llvm.org/D63113 (detail)
    by pcc
  286. AtomicExpand: Don't crash on non-0 alloca

    This now produces garbage on AMDGPU with a call to an nonexistent,
    anonymous libcall but won't assert. (detail)
    by arsenm
  287. AMDGPU: Expand < 32-bit atomics

    Also fix AtomicExpand asserting on atomicrmw fadd/fsub. (detail)
    by arsenm
  288. gn build: Merge r362939 (detail)
    by nico
  289. gn build: Merge r362972 (detail)
    by nico
  290. llvm-lib: Implement /machine: argument

    And share some code with lld-link.

    While here, also add a FIXME about PR42180 and merge r360150 to llvm-lib.

    Differential Revision: https://reviews.llvm.org/D63021 (detail)
    by nico
  291. Setup testing target dependencies for default runtimes

    Summary: The default runtimes targets aren't getting their dependencies configured correctly which results in check-runtimes failing when built from a clean build.

    Reviewers: phosek, compnerd

    Reviewed By: phosek

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63107 (detail)
    by cbieneman
  292. [AArch64] Add more CPUs to host detection

    Returns "cortex-a73" for 3rd and 4th gen Kryo; not precisely correct,
    but close enough.

    Differential Revision: https://reviews.llvm.org/D63099 (detail)
    by kongyi
  293. [MIR-Canon] Fixing non-determinism that was breaking bots (NFC).

    An earlier fix of a subtle iterator invalidation bug had uncovered a
    nondeterminism that was present in the MultiUsers bag. Problem was that
    MultiUsers was being looked up using pointers.

    This patch is an NFC change that numbers each multiuser and processes each in
    numbered order. This fixes the test failure on netbsd and will likely fix the
    green-dragon bot too. (detail)
    by zer0
  294. Break a couple more false dependencies on target libraries

    Summary: Repeat r361567 for a few more tools.

    Reviewers: bogner

    Reviewed By: bogner

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62438 (detail)
    by dsanders
  295. [dsymutil] Remove stale comment (NFC)

    The comment was no longer relevant after r362621. (detail)
    by Jonas Devlieghere
  296. [Support] Explicitly detect recursive response files

    Previous detection relied upon an arbitrary hard coded limit of 21
    response files, which some code bases were running up against.

    The new detection maintains a stack of processing response files and
    explicitly checks if a newly encountered file is in the current stack.
    Some bookkeeping data is necessary in order to detect when to pop the
    stack.

    Patch by Chris Glover.

    Differential Revision: https://reviews.llvm.org/D62798 (detail)
    by smeenai
  297. [PGO] Fix the buildbot failure in r362995

    Fixed one unused variable warning. (detail)
    by xur
  298. [Tests] Adjust LFTR dead-iv tests to bypass undef cases

    As pointed out by Nikita in review, undef and poison need to be handled separately.  Since we're no longer expecting any test improvements - just fixes for miscompiles - update the tests to bypass the existing undef check. (detail)
    by reames
  299. [NFC][CodeGen] Forgot 2 unary FNeg tests in X86/fma-intrinsics-canonical.ll

    Follow-up to r362999. (detail)
    by mcinally
  300. [NFC][CodeGen] Add unary FNeg tests to X86/fma-intrinsics-canonical.ll (detail)
    by mcinally
  301. Fix typo from r362990 to fix Windows builds (detail)
    by tstellar
  302. [PGO] Handle cases of non-instrument BBs

    As shown in PR41279, some basic blocks (such as catchswitch) cannot be
    instrumented. This patch filters out these BBs in PGO instrumentation.
    It also sets the profile count to the fail-to-instrument edge, so that we
    can propagate the counts in the CFG.

    Differential Revision: https://reviews.llvm.org/D62700 (detail)
    by xur
  303. [Tests] Split an LFTR dead-iv case

    There are two interesting sub-cases here.  1) Switching IVs is legal, but only in pre-increment form.  and 2) Switching IVs is legal, and so is post-increment form. (detail)
    by reames
  304. CMake: Make most target symbols hidden by default

    Summary:
    For builds with LLVM_BUILD_LLVM_DYLIB=ON and BUILD_SHARED_LIBS=OFF
    this change makes all symbols in the target specific libraries hidden
    by default.

    A new macro called LLVM_EXTERNAL_VISIBILITY has been added to mark symbols in these
    libraries public, which is mainly needed for the definitions of the
    LLVMInitialize* functions.

    This patch reduces the number of public symbols in libLLVM.so by about
    25%.  This should improve load times for the dynamic library and also
    make abi checker tools, like abidiff require less memory when analyzing
    libLLVM.so

    One side-effect of this change is that for builds with
    LLVM_BUILD_LLVM_DYLIB=ON and LLVM_LINK_LLVM_DYLIB=ON some unittests that
    access symbols that are no longer public will need to be statically linked.

    Before and after public symbol counts (using gcc 8.2.1, ld.bfd 2.31.1):
    nm before/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
    36221
    nm after/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
    26278

    Reviewers: chandlerc, beanz, mgorny, rnk, hans

    Reviewed By: rnk, hans

    Subscribers: Jim, hiraditya, michaelplatings, chapuni, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, mgrang, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, kristina, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D54439 (detail)
    by tstellar
  305. [GlobalISel] Translate memset/memmove/memcpy from undef ptrs into nops

    If the source is undef, then just don't do anything.

    This matches SelectionDAG's behaviour in SelectionDAG.cpp.

    Also add a test showing that we do the right thing here.
    (irtranslator-memfunc-undef.ll)

    Differential Revision: https://reviews.llvm.org/D63095 (detail)
    by paquette
  306. [NFC][CodeGen] Add unary FNeg tests to some X86/ and XCore/ tests. (detail)
    by mcinally
Revision: 362564
Changes
  1. [Clang] Harmonize Split DWARF options with llc

    Summary:
    With Split DWARF the resulting object file (then called skeleton CU)
    contains the file name of another ("DWO") file with the debug info.
    This can be a problem for remote compilation, as it will contain the
    name of the file on the compilation server, not on the client.

    To use Split DWARF with remote compilation, one needs to either

    * make sure only relative paths are used, and mirror the build directory
      structure of the client on the server,
    * inject the desired file name on the client directly.

    Since llc already supports the latter solution, we're just copying that
    over. We allow setting the actual output filename separately from the
    value of the DW_AT_[GNU_]dwo_name attribute in the skeleton CU.

    Fixes PR40276.

    Reviewers: dblaikie, echristo, tejohnson

    Reviewed By: dblaikie

    Differential Revision: https://reviews.llvm.org/D59673 (detail)
    by aaronpuchert
  2. [Clang] Rename -split-dwarf-file to -split-dwarf-output

    Summary:
    This is the first in a series of changes trying to align clang -cc1
    flags for Split DWARF with those of llc. The unfortunate side effect of
    having -split-dwarf-output for single file Split DWARF will disappear
    again in a subsequent change.

    The change is the result of a discussion in D59673.

    Reviewers: dblaikie, echristo

    Reviewed By: dblaikie

    Differential Revision: https://reviews.llvm.org/D63130 (detail)
    by aaronpuchert
  3. [clang] Add storage for APValue in ConstantExpr

    Summary:
    When using ConstantExpr we often need the result of the expression to be kept in the AST. Currently this is done on a by the node that needs the result and has been done multiple times for enumerator, for constexpr variables... . This patch adds to ConstantExpr the ability to store the result of evaluating the expression. no functional changes expected.

    Changes:
    - Add trailling object to ConstantExpr that can hold an APValue or an uint64_t. the uint64_t is here because most ConstantExpr yield integral values so there is an optimized layout for integral values.
    - Add basic* serialization support for the trailing result.
    - Move conversion functions from an enum to a fltSemantics from clang::FloatingLiteral to llvm::APFloatBase. this change is to make it usable for serializing APValues.
    - Add basic* Import support for the trailing result.
    - ConstantExpr created in CheckConvertedConstantExpression now stores the result in the ConstantExpr Node.
    - Adapt AST dump to print the result when present.

    basic* : None, Indeterminate, Int, Float, FixedPoint, ComplexInt, ComplexFloat,
    the result is not yet used anywhere but for -ast-dump.

    Reviewers: rsmith, martong, shafik

    Reviewed By: rsmith

    Subscribers: rnkovacs, hiraditya, dexonsmith, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D62399 (detail)
    by tyker
  4. [analyzer] ReturnVisitor: Bypass everything to see inlined calls

    Summary:
    When we traversed backwards on ExplodedNodes to see where processed the
    given statement we `break` too early. With the current approach we do not
    miss the CallExitEnd ProgramPoint which stands for an inlined call.

    Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

    Reviewed By: NoQ

    Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy,
                 dkrupp, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62926 (detail)
    by charusso
  5. [clang] perform semantic checking in constant context

    Summary:
    Since the addition of __builtin_is_constant_evaluated the result of an expression can change based on whether it is evaluated in constant context. a lot of semantic checking performs evaluations with out specifying context. which can lead to wrong diagnostics.
    for example:
    ```
    constexpr int i0 = (long long)__builtin_is_constant_evaluated() * (1ll << 33); //#1
    constexpr int i1 = (long long)!__builtin_is_constant_evaluated() * (1ll << 33); //#2
    ```
    before the patch, #2 was diagnosed incorrectly and #1 wasn't diagnosed.
    after the patch #1 is diagnosed as it should and #2 isn't.

    Changes:
    - add a flag to Sema to passe in constant context mode.
    - in SemaChecking.cpp calls to Expr::Evaluate* are now done in constant context when they should.
    - in SemaChecking.cpp diagnostics for UB are not checked for in constant context because an error will be emitted by the constant evaluator.
    - in SemaChecking.cpp diagnostics for construct that cannot appear in constant context are not checked for in constant context.
    - in SemaChecking.cpp diagnostics on constant expression are always emitted because constant expression are always evaluated.
    - semantic checking for initialization of constexpr variables is now done in constant context.
    - adapt test that were depending on warning changes.
    - add test.

    Reviewers: rsmith

    Reviewed By: rsmith

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62009 (detail)
    by tyker
  6. Fixed the --print-supported-cpus test

    Add constraints for the test that require specific backend targets
    to be registered.

    Remove trailing whitespace in the doc.

    Differential Revision: https://reviews.llvm.org/D63105 (detail)
    by ziangwan725
  7. [X86] Add checks that immediate for reducesd/ss fits in 8-bits. (detail)
    by ctopper
  8. [CodeGen][ObjC] Annotate retain-agnostic ObjC globals with attribute
    'objc_arc_inert'

    The attribute enables the ARC optimizer to delete ObjC ARC runtime calls
    on the annotated globals (see https://reviews.llvm.org/D62433). We
    currently only annotate global variables for string literals and global
    blocks with the attribute.

    rdar://problem/49839633

    Differential Revision: https://reviews.llvm.org/D62831 (detail)
    by ahatanak
  9. Add --print-supported-cpus flag for clang.

    This patch allows clang users to print out a list of supported CPU models using
    clang [--target=<target triple>] --print-supported-cpus

    Then, users can select the CPU model to compile to using
    clang --target=<triple> -mcpu=<model> a.c

    It is a handy feature to help cross compilation. (detail)
    by ziangwan725
  10. [Remarks][NFC] Improve testing and documentation of -foptimization-record-passes

    This adds:

    * documentation to the user manual
    * nicer error message
    * test for the error case
    * test for the gold plugin (detail)
    by thegameg
  11. [OpenMP] Add target task alloc function with device ID

    Summary: Add a new call to Clang to perform task allocation for the target.

    Reviewers: ABataev, AlexEichenberger, caomhin

    Reviewed By: ABataev, AlexEichenberger

    Subscribers: openmp-commits, Hahnfeld, guansong, jdoerfert, cfe-commits

    Tags: #clang, #openmp

    Differential Revision: https://reviews.llvm.org/D63009 (detail)
    by gbercea
  12. Use unsigned for bitfields to avoid sign extension (detail)
    by rnk
  13. PR42071: Reject weird names for non-type template parameters.

    Also reject default arguments appearing in invalid locations. (detail)
    by rsmith
  14. Use getOperatorSpelling to get the spelling of an overloaded operator
    rather than duplicating operator name tables in multiple places. (detail)
    by rsmith
  15. [OpenMP] Avoid emitting maps for target link variables when unified memory is used

    Summary: This patch avoids the emission of maps for target link variables when unified memory is present.

    Reviewers: ABataev, caomhin

    Reviewed By: ABataev

    Subscribers: guansong, jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D60883 (detail)
    by gbercea
  16. Remove unused SK_LValueToRValue initialization step.

    In addition to being unused and duplicating code, this was also wrong
    (it didn't properly mark the operand as being potentially not odr-used).

    This reinstates r363340, reverted in r363352. (detail)
    by rsmith
  17. PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type
    nullptr_t does not access memory.

    We now reuse CK_NullToPointer to represent a conversion from a glvalue
    of type nullptr_t to a prvalue of nullptr_t where necessary.

    This reinstates r363337, reverted in r363352. (detail)
    by rsmith
  18. C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression.

    Summary:
    When a variable is named in a context where we can't directly emit a
    reference to it (because we don't know for sure that it's going to be
    defined, or it's from an enclosing function and not captured, or the
    reference might not "work" for some reason), we emit a copy of the
    variable as a global and use that for the known-to-be-read-only access.

    This reinstates r363295, reverted in r363352, with a fix for PR42276:
    we now produce a proper name for a non-odr-use reference to a static
    constexpr data member. The name <mangled-name>.const is used in that
    case; such names are reserved to the implementation for cases such as
    this and should demangle nicely.

    Reviewers: rjmccall

    Subscribers: jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63157 (detail)
    by rsmith
  19. Reland: [Remarks] Refactor optimization remarks setup

    * Add a common function to setup opt-remarks
    * Rename common options to the same names
    * Add error types to distinguish between file errors and regex errors (detail)
    by thegameg
  20. [AMDGPU] Enable the implicit arguments for HIP (CLANG)

    Enable 48-bytes of implicit arguments for HIP as well. Earlier it was enabled for OpenCL. This code is specific to AMDGPU target.

    Differential Revision: https://reviews.llvm.org/D62244 (detail)
    by yaxunl
  21. AMDGPU: Use AMDGPU toolchain for other OSes

    This would need more work to actually support them, but this is less
    wrong than the default. (detail)
    by arsenm
  22. Revert r363298 "[lit] Disable test on darwin when building shared libs."

    It broke running check-lld on mac, see https://reviews.llvm.org/D61697 (detail)
    by nico
  23. Revert "[OpenCL] Move OpenCLBuiltins.td and remove unused include"

    This reverts commit r363242 as it broke some builds with

      make[2]: *** No rule to make target 'ClangOpenCLBuiltinsImpl', needed by
      'tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaLookup.cpp.o'. (detail)
    by svenvh
  24. add a missing parenthese in the clang doc (detail)
    by sylvestre
  25. [C++20] add Basic consteval specifier

    Summary:
    this revision adds Lexing, Parsing and Basic Semantic for the consteval specifier as specified by http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1073r3.html

    with this patch, the consteval specifier is treated as constexpr but can only be applied to function declaration.

    Changes:
    - add the consteval keyword.
    - add parsing of consteval specifier for normal declarations and lambdas expressions.
    - add the whether a declaration is constexpr is now represented by and enum everywhere except for variable because they can't be consteval.
    - adapt diagnostic about constexpr to print constexpr or consteval depending on the case.
    - add tests for basic semantic.

    Reviewers: rsmith, martong, shafik

    Reviewed By: rsmith

    Subscribers: eraman, efriedma, rnkovacs, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D61790 (detail)
    by tyker
  26. [clang] Fixing incorrect implicit deduction guides (PR41549)

    Summary:
    [[ https://bugs.llvm.org/show_bug.cgi?id=41549 | bug report ]]

    Before this patch, implicit deduction guides were generated from the first declaration found by lookup.
    With this patch implicit deduction guides are generated from the definition of the class template.
    Also added test that was previously failing.

    Reviewers: rsmith

    Reviewed By: rsmith

    Subscribers: cfe-commits, Quuxplusone

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63072 (detail)
    by tyker
  27. [clang] Don't segfault on incorrect using directive (PR41400)

    Summary:
    this is a bugfixe for [[ https://bugs.llvm.org/show_bug.cgi?id=41400 | PR41400 ]]

    added nullptr check at the relevent place and test

    Reviewers: rsmith, riccibruno

    Reviewed By: rsmith

    Subscribers: jkooker, jkorous, riccibruno, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D60523 (detail)
    by tyker
  28. Revert 363295, it caused PR42276. Also revert follow-ups 363337, 363340.

    Revert 363340 "Remove unused SK_LValueToRValue initialization step."
    Revert 363337 "PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type"
    Revert 363295 "C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression." (detail)
    by nico
  29. [Targets] Move soft-float-abi filtering to `initFeatureMap`

    ARM has a special target feature called soft-float-abi. This feature is
    special, since we get it passed to us explicitly in the frontend, but
    filter it out before it can land in any target feature strings in LLVM
    IR.

    __attribute__((target(""))) doesn't quite filter these features out
    properly, so today, we get warnings about soft-float-abi being an
    unknown feature from the backend.

    This CL has us filter soft-float-abi out at a slightly different point,
    so we don't end up passing these invalid features to the backend.

    Differential Revision: https://reviews.llvm.org/D61750 (detail)
    by George Burgess IV
  30. [AMDGPU] gfx1011/gfx1012 clang support

    Differential Revision: https://reviews.llvm.org/D63308 (detail)
    by rampitec
  31. Revert "[Remarks] Refactor optimization remarks setup"

    This reverts commit 6e6e3af55bb97e1a4c97375c15a2b0099120c5a7.

    This breaks greendragon. (detail)
    by thegameg
  32. [AMDGPU] gfx1010 wave32 clang support

    Differential Revision: https://reviews.llvm.org/D63209 (detail)
    by rampitec
  33. Remove unused SK_LValueToRValue initialization step.

    In addition to being unused and duplicating code, this was also wrong
    (it didn't properly mark the operand as being potentially not odr-used). (detail)
    by rsmith
  34. PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type
    nullptr_t does not access memory.

    We now reuse CK_NullToPointer to represent a conversion from a glvalue
    of type nullptr_t to a prvalue of nullptr_t where necessary.

    This reinstates r345562, reverted in r346065, now that CodeGen's
    handling of non-odr-used variables has been fixed. (detail)
    by rsmith
  35. Use fully qualified name when printing S_CONSTANT records

    Summary:
    Before it was using the fully qualified name only for static data members.
    Now it does for all variable names to match MSVC.

    Reviewers: rnk

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D63012 (detail)
    by akhuang
  36. [Remarks] Refactor optimization remarks setup

    * Add a common function to setup opt-remarks
    * Rename common options to the same names
    * Add error types to distinguish between file errors and regex errors (detail)
    by thegameg
  37. [lit] Disable test on darwin when building shared libs.

    Summary:
    This test fails to link shared libraries because tries to run
    a copied version of clang-check to see if the mock version of libcxx
    in the same directory can be loaded dynamically.  Since the test is
    specifically designed not to look in the default just-built lib
    directory, it must be disabled when building with
    BUILD_SHARED_LIBS=ON.

    Currently only disabling it on Darwin and basing it on the
    enable_shared flag.

    Reviewed By: ilya-biryukov

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D61697 (detail)
    by dhinton
  38. C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue conversion applied to a member access or similar not-quite-trivial lvalue expression.

    Summary:
    When a variable is named in a context where we can't directly emit a
    reference to it (because we don't know for sure that it's going to be
    defined, or it's from an enclosing function and not captured, or the
    reference might not "work" for some reason), we emit a copy of the
    variable as a global and use that for the known-to-be-read-only access.

    Reviewers: rjmccall

    Subscribers: jdoerfert, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63157 (detail)
    by rsmith
  39. PR42182: Allow thread-local to use __cxa_thread_atexit when
    -fno-use-cxx-atexit is used

    This matches the GCC behavior, __cxa_thread_atexit should be permissible
    even though cxa_atexit is disabled.

    Differential Revision: https://reviews.llvm.org/D63283/ (detail)
    by erichkeane
  40. [clang][NewPM] Fix broken -O0 test from missing assumptions

    Add an AssumptionCache callback to the InlineFuntionInfo used for the
    AlwaysInlinerPass to match codegen of the AlwaysInlinerLegacyPass to generate
    llvm.assume. This fixes CodeGen/builtin-movdir.c when new PM is enabled by
    default.

    Differential Revision: https://reviews.llvm.org/D63170 (detail)
    by leonardchan
  41. [clang][NewPM] Fix split debug test

    This contains the part of D62225 which fixes CodeGen/split-debug-single-file.c
    by not placing .dwo sections when using -enable-split-dwarf=split.

    Differential Revision: https://reviews.llvm.org/D63168 (detail)
    by leonardchan
  42. [clang][NewPM] Fix broken profile test

    This contains the part of D62225 which fixes Profile/gcc-flag-compatibility.c
    by adding the pass that allows default profile generation to work under the new
    PM. It seems that ./default.profraw was not being generated with new PM enabled.

    Differential Revision: https://reviews.llvm.org/D63155 (detail)
    by leonardchan
  43. [clang][NewPM] Fix broken -O0 test from the AlwaysInliner

    This contains the part of D62225 which prevents insertion of lifetime
    intrinsics when creating the AlwaysInliner. This fixes the following tests
    when the new PM is enabled by default:

    Clang :: CodeGen/aarch64-neon-across.c
    Clang :: CodeGen/aarch64-neon-fcvt-intrinsics.c
    Clang :: CodeGen/aarch64-neon-fma.c
    Clang :: CodeGen/aarch64-neon-perm.c
    Clang :: CodeGen/aarch64-neon-tbl.c
    Clang :: CodeGen/aarch64-poly128.c
    Clang :: CodeGen/aarch64-v8.2a-neon-intrinsics.c
    Clang :: CodeGen/arm-neon-fma.c
    Clang :: CodeGen/arm-neon-numeric-maxmin.c
    Clang :: CodeGen/arm-neon-vcvtX.c
    Clang :: CodeGen/avx-builtins.c
    Clang :: CodeGen/builtins-ppc-p9vector.c
    Clang :: CodeGen/builtins-ppc-vsx.c
    Clang :: CodeGen/lifetime.c
    Clang :: CodeGen/sse-builtins.c
    Clang :: CodeGen/sse2-builtins.c

    Differential Revision: https://reviews.llvm.org/D63153 (detail)
    by leonardchan
  44. Added AST matcher for ignoring elidable constructors

    Summary: Added AST matcher for ignoring elidable move constructors

    Reviewers: hokein, gribozavr

    Reviewed By: hokein, gribozavr

    Subscribers: cfe-commits

    Tags: #clang

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

    Patch by Johan Vikström. (detail)
    by gribozavr
  45. [OpenCL] Move OpenCLBuiltins.td and remove unused include

    Patch by Pierre Gondois.

    Differential revision: https://reviews.llvm.org/D62849 (detail)
    by svenvh
  46. [WebAssembly] Modernize include path handling

    Move include path construction from
    InitHeaderSearch::AddDefaultIncludePaths in the Driver which appears
    to be the more modern/correct way of doing things.

    Differential Revision: https://reviews.llvm.org/D63030 (detail)
    by sbc
  47. [clang-scan-deps] Fix -DBUILD_SHARED_LIBS=ON build

    The -DBUILD_SHARED_LIBS=ON build was broken in rL363204

    Differential Revision: https://reviews.llvm.org/D63245 (detail)
    by sbc
  48. clang-format extension: Widen the supported versions range

    So that it covers also the latest VS 2019 version.

    By Antonio Maiorano! (detail)
    by hans
  49. Revert r361811: 'Re-commit r357452 (take 2): "SimplifyCFG SinkCommonCodeFromPredecessors ...'

    We have observed some failures with internal builds with this revision.

    - Performance regressions:
      - llvm's SingleSource/Misc evalloop shows performance regressions (although these may be red herrings).
      - Benchmarks for Abseil's SwissTable.
    - Correctness:
      - Failures for particular libicu tests when building the Google AppEngine SDK (for PHP).

    hwennborg has already been notified, and is aware of reproducer failures. (detail)
    by dlj
  50. [clang-scan-deps] Include <mutex> in ClangScanDeps.cpp to ensure it
    builds on all platforms (detail)
    by arphaman
  51. NFC, Update the ClangScanDeps.cpp file's license comment

    The file ClangScanDeps.cpp from r363204 had the old outdated LLVM
    license comment at the top of the file that I committed by accident. (detail)
    by arphaman
  52. NFC, fixup indentation in CMakeLists.txt from r363204 as requested
    in the review.

    I missed that review comment from https://reviews.llvm.org/D60233 in the original
    commit. (detail)
    by arphaman
  53. [clang-scan-deps] initial outline of the tool that runs preprocessor to find
    dependencies over a JSON compilation database

    This commit introduces an outline for the clang-scan-deps tool that will be
    used to implement fast dependency discovery phase using implicit modules for
    explicit module builds.

    The initial version of the tool works by computing non-modular header dependencies
    for files in the compilation database without any optimizations
    (i.e. without source minimization from r362459).
    The tool spawns a number of worker threads to run the clang compiler workers in parallel.

    The immediate goal for clang-scan-deps is to create a ClangScanDeps library
    which will be used to build up this tool to use the source minimization and
    caching multi-threaded filesystem to implement the optimized non-incremental
    dependency scanning phase for a non-modular build. This will allow us to do
    benchmarks and comparisons for performance that the minimization and caching give us

    Differential Revision: https://reviews.llvm.org/D60233 (detail)
    by arphaman
  54. [test] Reinstate the assignment to the diagnostic log in the unittest
    from r363009

    The diagnostic log is now set to "-" which forces it to use STDERR
    instead of the filesystem. A new comment is added to explain why
    the assignment is needed in the test. (detail)
    by arphaman
  55. Add comment to r363191 code as requested in code review (detail)
    by rnk
  56. [MS] Pretend constexpr variable template specializations are inline

    Fixes link errors with clang and the latest Visual C++ 14.21.27702
    headers, which was reported as PR42027.

    I chose to intentionally make these things linkonce_odr, i.e.
    discardable, so that we don't emit definitions of these things in every
    translation unit that includes STL headers.

    Note that this is *not* what MSVC does: MSVC has not yet implemented C++
    DR2387, so they emit fully specialized constexpr variable templates with
    static / internal linkage.

    Reviewers: rsmith

    Differential Revision: https://reviews.llvm.org/D63175 (detail)
    by rnk
  57. PR42220: take into account the possibility of aggregates with base
    classes when checking an InitListExpr for lifetime extension. (detail)
    by rsmith
  58. [analyzer] ProgramPoint: more explicit printJson()

    Summary: Now we print out every possible kinds of ProgramPoints.

    Reviewers: NoQ, xazax.hun, ravikandhadai, baloghadamsoftware, Szelethus

    Reviewed By: NoQ

    Subscribers: szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy,
                 dkrupp, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62946 (detail)
    by charusso
  59. [NFC] Test commit (detail)
    by nik
  60. [PowerPC] [Clang] Port SSE2 intrinsics to PowerPC

    Port emmintrin.h which include Intel SSE2 intrinsics implementation to PowerPC platform (using Altivec).

    The new headers containing those implemenations are located into a directory named ppc_wrappers
    which has higher priority when the platform is PowerPC on Linux. They are mainly developed by Steven Munroe,
    with contributions from Paul Clarke, Bill Schmidt, Jinsong Ji and Zixuan Wu.

    It's a follow-up patch of D62121.

    Patched by: Qiu Chaofan <qiucf@cn.ibm.com>

    Differential Revision: https://reviews.llvm.org/D62569 (detail)
    by wuzish
  61. [X86] [ABI] Fix i386 ABI "__m64" type bug

    According to System V i386 ABI: the  __m64 type paramater and return
    value are passed by MMX registers. But current implementation treats
    __m64 as i64 which results in parameter passing by stack and returning
    by EDX and EAX.

    This patch fixes the bug (https://bugs.llvm.org/show_bug.cgi?id=41029)
    for Linux and NetBSD.

    Patch by Wei Xiao (wxiao3)

    Differential Revision: https://reviews.llvm.org/D59744 (detail)
    by pengfei
  62. Mark declarations as referenced by a default argument in a
    potentially-evaluated context.

    This applies even if the use of the default argument is within an
    unevaluated context. (detail)
    by rsmith
  63. Remove redundant check for whether a DeclRefExpr that names a capture
    constitutes an odr-use.

    We now track this accurately on the DeclRefExpr. (detail)
    by rsmith
  64. For DR712: store on a MemberExpr whether it constitutes an odr-use. (detail)
    by rsmith
  65. For DR712: store on a DeclRefExpr whether it constitutes an odr-use.

    Begin restructuring to support the forms of non-odr-use reference
    permitted by DR712. (detail)
    by rsmith
  66. Revert r344630 Disable code object version 3 for HIP toolchain.

    Remove the workaround so that by default code object v3 is enabled. (detail)
    by yaxunl
  67. Fix for r42230, MSVC test failure in DependencyDirectivesSourceMinimizerTest.cpp

    r362459 introduced DependencyDirectivesSourceMinimizerTest.cpp, which
    hits an MSVC bug:
    developercommunity.visualstudio.com/content/problem/67300/stringifying-raw-string-literal.html

    This only happens when the parameter to a macro is stringified in the
    macro.  This patch removes the string from the assert so that the
    warning no longer happens. (detail)
    by erichkeane
  68. [NFC][PowerPC] Header-dependent test requires "native"

    Two recently added tests mention complications for cross-compile, but
    they do not actually enforce native compilation. This patch makes them
    require native compilation to avoid the complications they mention. (detail)
    by hubert.reinterpretcast
  69. Reapply r362994 & co "[analyzer][tests] Add normalize_plist to replace diff_plist"

    Following r363007, which reverted r362998, r362996, and r362994,
    reapply with adjustments for the CRLF differences encountered with
    Windows. Namely, the `-b` option of `diff` is employed, and the `grep`
    patterns have `$` replaced with `[[:space:]]*$`. (detail)
    by hubert.reinterpretcast
  70. [libclang] Allow skipping warnings from all included files

    Depending on the included files and the used warning flags, e.g. -
    Weverything, a huge number of warnings can be reported for included
    files. As processing that many diagnostics comes with a performance
    impact and not all clients are interested in those diagnostics, add a
    flag to skip them.

    Differential Revision: https://reviews.llvm.org/D48116 (detail)
    by nik
  71. [ASTImporter] Fix unhandled cases in ASTImporterLookupTable

    Summary:
    In most cases the FriendDecl contains the declaration of the befriended
    class as a child node, so it is discovered during the recursive
    visitation. However, there are cases when the befriended class is not a
    child, thus it must be fetched explicitly from the FriendDecl, and only
    then can we add it to the lookup table.
    (Note, this does affect only CTU and does not affect LLDB, because we
    cannot and do not use the ASTImporterLookupTable in LLDB.)

    Reviewers: a_sidorin, a.sidorin, shafik

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62064 (detail)
    by martong
  72. [RISCV][NFC] Add missing test files for D54091 (detail)
    by lewis-revill
  73. [RISCV] Add inline asm constraints I, J & K for RISC-V

    This allows the constraints I, J & K to be used in inline asm for
    RISC-V, with the following semantics (equivalent to GCC):

    I: Any 12-bit signed immediate.
    J: Integer zero only.
    K: Any 5-bit unsigned immediate.

    See the GCC definitions here:
    https://gcc.gnu.org/onlinedocs/gccint/Machine-Constraints.html

    Differential Revision: https://reviews.llvm.org/D54091 (detail)
    by lewis-revill
  74. Make sure a test from r363036 does not write into a working directory

    It breaks if build directory is not writable. This change is required
    to fix our integrate.

    Also add a flush() call, otherwise time trace option does not produce
    the full output. (detail)
    by ibiryukov
  75. [Frontend] Avoid creating auxilary files during a unit test. NFC

    A test added in r363009 logs diagnostics into a file inside current
    working directory. This breaks when the directory is not writable.

    This looks like a debugging output in the first place, the test passes
    without it anyway. (detail)
    by ibiryukov
  76. [Support][Test] Time profiler: add regression test

    Summary:
    Add output to `llvm::errs()` when `-ftime-trace` option is enabled,
    add regression test checking this option works as expected.

    Reviewers: thakis, aganea

    Subscribers: cfe-commits, llvm-commits

    Tags: #clang, #llvm

    This is recommit of r362821

    Differential Revision: https://reviews.llvm.org/D61914 (detail)
    by anton-afanasyev
  77. [X86] Enable intrinsics that convert float and bf16 data to each other

    Scalar version :
    _mm_cvtsbh_ss , _mm_cvtness_sbh

    Vector version:
    _mm512_cvtpbh_ps , _mm256_cvtpbh_ps
    _mm512_maskz_cvtpbh_ps , _mm256_maskz_cvtpbh_ps
    _mm512_mask_cvtpbh_ps , _mm256_mask_cvtpbh_ps

    Patch by Shengchen Kan (skan)

    Differential Revision: https://reviews.llvm.org/D62363 (detail)
    by pengfei
  78. [Frontend] SetUpDiagnosticLog should handle unowned diagnostic consumer
    in the compiler

    The function SetUpDiagnosticLog that was called from createDiagnostics didn't
    handle the case where the diagnostics engine didn't own the diagnostics consumer.
    This is a potential problem for a clang tool, in particular some of the follow-up
    patches for clang-scan-deps will need this fix.

    Differential Revision: https://reviews.llvm.org/D63101 (detail)
    by arphaman
  79. Revert r362994 & co "[analyzer][tests] Add normalize_plist to replace diff_plist"

    Reverts r362998, r362996, and r362994 because the tests do not pass on
    Windows due to CRLF changes. Adding back `-w` to diff is not enough, the
    new grep substitution doesn't work on Windows, and fixing it is
    non-trivial. (detail)
    by rnk
  80. Require stdcall etc parameters to be complete on ODR use

    Functions using stdcall, fastcall, or vectorcall with C linkage mangle
    in the size of the parameter pack. Calculating the size of the pack
    requires the parameter types to complete, which may require template
    instantiation.

    Previously, we would crash during IRgen when requesting the size of
    incomplete or uninstantiated types, as in this reduced example:
      struct Foo;
      void __fastcall bar(struct Foo o);
      void (__fastcall *fp)(struct Foo) = &bar;

    Reported in Chromium here: https://crbug.com/971245

    Differential Revision: https://reviews.llvm.org/D62975 (detail)
    by rnk
  81. [analyzer][tests] Use normalize_plist in place of diff_plist (`tail` cases)

    Summary:
    The `%diff_plist` lit substitution invokes `diff` with a non-portable
    `-I` option. The intended effect can be achieved by normalizing the
    inputs to `diff` beforehand. Such normalization can be done with
    `grep -Ev`, which is also used by other tests.

    This patch applies the change (adjusted for review comments) described
    in http://lists.llvm.org/pipermail/cfe-dev/2019-April/061904.html
    mechanically to the cases where the output file is piped to
    `%diff_plist` via `tail`. `%diff_plist` is then, being unused, removed.

    The changes were applied via a script.

    Reviewers: NoQ, sfertile, xingxue, jasonliu, daltenty

    Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, jsji, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62951 (detail)
    by hubert.reinterpretcast
  82. [analyzer][tests] Use normalize_plist in place of diff_plist (`cat` cases)

    Summary:
    The `%diff_plist` lit substitution invokes `diff` with a non-portable
    `-I` option. The intended effect can be achieved by normalizing the
    inputs to `diff` beforehand. Such normalization can be done with
    `grep -Ev`, which is also used by other tests.

    This patch applies the change (adjusted for review comments) described
    in http://lists.llvm.org/pipermail/cfe-dev/2019-April/061904.html
    mechanically to the cases where the output file is piped to
    `%diff_plist` via `cat`.

    The changes were applied via a script, except that
    `clang/test/Analysis/NewDelete-path-notes.cpp` and
    `clang/test/Analysis/plist-macros-with-expansion.cpp` were each adjusted
    for the line-continuation on the relevant `RUN` step.

    Reviewers: NoQ, sfertile, xingxue, jasonliu, daltenty

    Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, jsji, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62950 (detail)
    by hubert.reinterpretcast
  83. [analyzer][tests] Add normalize_plist to replace diff_plist

    Summary:
    The `%diff_plist` lit substitution invokes `diff` with a non-portable
    `-I` option. The intended effect can be achieved by normalizing the
    inputs to `diff` beforehand. Such normalization can be done with
    `grep -Ev`, which is also used by other tests.

    This patch applies the change (adjusted for review comments) described
    in http://lists.llvm.org/pipermail/cfe-dev/2019-April/061904.html to the
    specific case shown in the list message. Mechanical changes to the other
    affected files will follow in later patches.

    Reviewers: NoQ, sfertile, xingxue, jasonliu, daltenty

    Reviewed By: NoQ

    Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, jsji, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62949 (detail)
    by hubert.reinterpretcast
  84. [PlistSupport] Produce a newline to end plist output files

    Summary:
    As suggested in the review of D62949, this patch updates the plist
    output to have a newline at the end of the file. This makes it so that
    the plist output file qualifies as a POSIX text file, which increases
    the consumability of the generated plist file in relation to various
    tools.

    Reviewers: NoQ, sfertile, xingxue, jasonliu, daltenty

    Reviewed By: NoQ, xingxue

    Subscribers: jsji, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63041 (detail)
    by hubert.reinterpretcast
  85. [CUDA] Fix grep pattern in cuda-types.cu

    Summary:
    vertical-line is not a BRE special character.

    POSIX.1-2017 XBD Section 9.3.2 indicates that the interpretation of `\|`
    is undefined. This patch uses EREs instead.

    Additionally, the pattern is further fixed so that `SIZEOF` and `WIDTH`
    macros are checked.

    Reviewers: jlebar, daltenty, xingxue, jasonliu, tra

    Reviewed By: tra

    Subscribers: jfb, jsji, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63029 (detail)
    by hubert.reinterpretcast
Revision: 362564
Changes
  1. [clangd] Index API and implementations for relations

    Summary:
    This builds on the relations support added in D59407, D62459,
    and D62471 to expose relations in SymbolIndex and its
    implementations.

    Reviewers: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62839 (detail)
    by nridge
  2. [clangd] Bump vscode-clangd v0.0.14

    CHANGELOG:
    - use the vscode-buildin feature to detect language (rather than using
      file extensions), this fixes the extension not working on
      non-standard C++ files (e.g. via files.associations) (detail)
    by hokein
  3. [clangd] Don't maintain a list of c-family extensions in vscode extension.

    Summary:
    There is no need to maintain this list by ourself, vscode already
    provides this feature.

    Reviewers: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63323 (detail)
    by hokein
  4. Test commit (detail)
    by sureyeaah
  5. [clang-tidy] Make ClangTidyCheck::OptionsView public.

    Summary: The `OptionsView` class is currently protected. This constraint prevents tidies from passing the OptionsView to, for example, a helper function. Similarly, TransformerClangTidyCheck cannot pass the `OptionsView` object to functions that generate `tooling::RewriteRule`s.  The latter is needed to allow the definition of such rules to depend on the clang-tidy options, as demonstrated in the child revision.

    Reviewers: gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63287 (detail)
    by ymandel
  6. [clang-tidy] Made abseil-faster-strsplit-delimiter tests pass on C++17

    Reviewers: hokein, gribozavr

    Reviewed By: hokein, gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

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

    Patch by Johan Vikström. (detail)
    by gribozavr
  7. [clang-tidy] Fixed abseil-time-subtraction to work on C++17

    Summary: Fixed abseil-time-subtraction to work on C++17

    Reviewers: hokein, gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

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

    Patch by Johan Vikström. (detail)
    by gribozavr
  8. [clang-tidy] Made abseil-upgrade-duration-conversions tests pass on c++17

    Summary: Made abseil-upgrade-duration-conversions tests pass on c++17

    Reviewers: hokein, gribozavr

    Reviewed By: gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

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

    Patch by Johan Vikström. (detail)
    by gribozavr
  9. [clang-tidy] Fixed abseil-duration-unnecessary-conversion tests for c++17

    Summary: Fixed abseil-duration-unnecessary-conversion tests for c++17

    Reviewers: hokein, gribozavr

    Reviewed By: gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

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

    Patch by Johan Vikström. (detail)
    by gribozavr
  10. [Clangd] Fixed clangd diagnostics priority

    Summary:
    - Fixed diagnostics where zero width inserted ranges were being used instead of the whole token
    - Added unit tests

    Patch by @SureYeaah !

    Reviewers: sammccall, kadircet

    Reviewed By: kadircet

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

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D63222 (detail)
    by kadircet
  11. [clangd] Treat lambdas as functions when preparing hover response

    Reviewers: sammccall, ilya-biryukov

    Subscribers: MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D62814 (detail)
    by kadircet
  12. [clangd] Return TextEdits from ClangdServer::applyTweak

    Summary:
    Instead of `tooling::Replacements`. So that embedders do not need to store
    the contents of the file.

    This also aligns better with `ClangdServer::rename`.

    Reviewers: kadircet, hokein

    Reviewed By: hokein

    Subscribers: MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63140 (detail)
    by ibiryukov
  13. [clangd] Fix typo in GUARDED_BY()

    Reviewers: ilya-biryukov, kadircet, sammccall

    Subscribers: javed.absar, MaskRay, jkorous, arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63193 (detail)
    by nik
  14. Fixed a crash in misc-redundant-expression ClangTidy checker

    Summary: It was trying to pass a dependent expression into constant evaluator.

    Reviewers: ilya-biryukov

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D63188 (detail)
    by gribozavr
  15. [clang-tidy] Fix invalid read on destruction

    ...in case the clang tidy plugin is linked into the clang binary.

    Valgrind's memcheck reports:

    8949== Invalid read ==8866== Invalid read of size 4
    8866== at 0x164D248B: fetch_sub (atomic_base.h:524)
    8866== by 0x164D248B: llvm::ThreadSafeRefCountedBase<clang::ast_matchers::internal::DynMatcherInterface>::Release() const (IntrusiveRefCntPtr.h:98)
    8866== by 0x164CE16C: llvm::IntrusiveRefCntPtrInfo<clang::ast_matchers::internal::DynMatcherInterface>::release(clang::ast_matchers::internal::DynMatcherInterface*) (IntrusiveRefCntPtr.h:127)
    8866== by 0x164C8D5C: llvm::IntrusiveRefCntPtr<clang::ast_matchers::internal::DynMatcherInterface>::release() (IntrusiveRefCntPtr.h:190)
    8866== by 0x164C3B87: llvm::IntrusiveRefCntPtr<clang::ast_matchers::internal::DynMatcherInterface>::~IntrusiveRefCntPtr() (IntrusiveRefCntPtr.h:157)
    8866== by 0x164BB4F1: clang::ast_matchers::internal::DynTypedMatcher::~DynTypedMatcher() (ASTMatchersInternal.h:341)
    8866== by 0x164BB529: clang::ast_matchers::internal::Matcher<clang::QualType>::~Matcher() (ASTMatchersInternal.h:496)
    8866== by 0xD7AE614: __cxa_finalize (cxa_finalize.c:83)
    8866== by 0x164B3082: ??? (in /d2/llvm/8/qtc/builds/DebugShared/lib/libclangTidyModernizeModule.so.8)
    8866== by 0x4010B72: _dl_fini (dl-fini.c:138)
    8866== by 0xD7AE040: __run_exit_handlers (exit.c:108)
    8866== by 0xD7AE139: exit (exit.c:139)
    8866== by 0xD78CB9D: (below main) (libc-start.c:344)
    8866== Address 0x19dd9bc8 is 8 bytes inside a block of size 16 free'd
    8866== at 0x4C3123B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    8866== by 0x1469BB99: clang::ast_matchers::internal::(anonymous namespace)::TrueMatcherImpl::~TrueMatcherImpl() (ASTMatchersInternal.cpp:126)
    8866== by 0x1469BBC5: llvm::object_deleter<clang::ast_matchers::internal::(anonymous namespace)::TrueMatcherImpl>::call(void*) (ManagedStatic.h:30)
    8866== by 0x9ABFF26: llvm::ManagedStaticBase::destroy() const (ManagedStatic.cpp:72)
    8866== by 0x9ABFF94: llvm::llvm_shutdown() (ManagedStatic.cpp:84)
    8866== by 0x9A65232: llvm::InitLLVM::~InitLLVM() (InitLLVM.cpp:52)
    8866== by 0x14B0C8: main (driver.cpp:323)
    8866== Block was alloc'd at
    8866== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    8866== by 0x1469BB36: llvm::object_creator<clang::ast_matchers::internal::(anonymous namespace)::TrueMatcherImpl>::call() (ManagedStatic.h:24)
    8866== by 0x9ABFD99: llvm::ManagedStaticBase::RegisterManagedStatic(void* (*)(), void (*)(void*)) const (ManagedStatic.cpp:42)
    8866== by 0x1469B5DF: llvm::ManagedStatic<clang::ast_matchers::internal::(anonymous namespace)::TrueMatcherImpl, llvm::object_creator<clang::ast_matchers::internal::(anonymous namespace)::TrueMatcherImpl>, llvm::object_deleter<clang::ast_matchers::internal::(anonymous namespace)::TrueMatcherImpl> >::operator*() (ManagedStatic.h:67)
    8866== by 0x14698F9D: clang::ast_matchers::internal::DynTypedMatcher::trueMatcher(clang::ast_type_traits::ASTNodeKind) (ASTMatchersInternal.cpp:195)
    8866== by 0x164C9D3B: _ZNK5clang12ast_matchers8internal11TrueMatchercvNS1_7MatcherIT_EEINS_8QualTypeEEEv (ASTMatchersInternal.h:1247)
    8866== by 0x16501458: __static_initialization_and_destruction_0(int, int) (LoopConvertCheck.cpp:48)
    8866== by 0x16501976: _GLOBAL__sub_I_LoopConvertCheck.cpp (LoopConvertCheck.cpp:920)
    8866== by 0x4010732: call_init (dl-init.c:72)
    8866== by 0x4010732: _dl_init (dl-init.c:119)
    8866== by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)

    Differential Revision: https://reviews.llvm.org/D63129 (detail)
    by nik
  16. [clang-tidy] Fix typo in bugprone-string-constructor.

    s/bigger then/bigger than/ (detail)
    by courbet
  17. Fixed google-readability-casting test to work in c++17

    Summary: Fixed google-readability-casting.cpp to get tests working in c++17

    Reviewers: gribozavr, hokein

    Reviewed By: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

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

    Patch by Shaurya Gupta. (detail)
    by gribozavr
  18. [clangd] Add missing header guard. (detail)
    by hokein
  19. [clangd] Fix gcc warning by removing extra ";" (detail)
    by uabelho
Revision: 362564
Changes
  1. [compiler-rt] Respect CMAKE_NM

    The default nm executable may not be able to handle the architecture
    we're building the sanitizers for. Respect CMAKE_NM if it's set to
    ensure we're using the correct nm tool. Preserve the existing NM
    environment variable override to not break its users.

    Differential Revision: https://reviews.llvm.org/D63368 (detail)
    by smeenai
  2. Improve error message when '=' is missing in  {ASAN,...}_OPTIONS.

    Summary:
    It's handling isses as described here:
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89832

    Patch by Martin Liška.

    Reviewers: kcc, vitalybuka

    Reviewed By: vitalybuka

    Subscribers: cryptoad, kubamracek

    Differential Revision: https://reviews.llvm.org/D59876 (detail)
    by Vitaly Buka
  3. [libFuzzer] in autofocus mode, give more weight to functions with DFT (detail)
    by kcc
  4. [libFuzzer] implement a better queue for the fork mode. Add an internal flag -stop_file to allow graceful shutdown of fuzzing. Enhance the logging in the fork mode (detail)
    by kcc
  5. [libFuzzer] fix -Werror build (detail)
    by kcc
  6. [libFuzzer] simplify the DFT trace collection using the new faster DFSan mode that traces up to 16 labels at a time and never runs out of labels. Second attempt. This time with a fix for windows (putenv instead of setenv)) (detail)
    by kcc
  7. [libFuzzer] Disable len_control by default if LLVMFuzzerCustomMutator is used.

    Summary:
    Some custom mutators may not peform well when size restriction is
    enforced by len_control. Because of that, it's safer to disable len_control
    by default in such cases, but still allow users to enable it manually.
    Bug example: https://bugs.chromium.org/p/chromium/issues/detail?id=919530.

    Tested manually with LPM-based and regular fuzz targets.

    Reviewers: kcc, vitalybuka, metzman

    Reviewed By: kcc, metzman

    Subscribers: delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D63334 (detail)
    by dor1s
  8. Revert r363326 "[libFuzzer] simplify the DFT trace collection using the new faster DFSan mode that traces up to 16 labels at a time and never runs out of labels."

    It broke the Windows build:

    C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\lib\fuzzer\FuzzerDataFlowTrace.cpp(243): error C3861: 'setenv': identifier not found

    This also reverts the follow-up r363327. (detail)
    by hans
  9. fix whitespaces (detail)
    by kcc
  10. [libFuzzer] simplify the DFT trace collection using the new faster DFSan mode that traces up to 16 labels at a time and never runs out of labels. (detail)
    by kcc
  11. [dfsan] Introduce dfsan_flush().

    Summary:
    dfsan_flush() allows to restart tain tracking from scratch in the same process.
    The primary purpose right now is to allow more efficient data flow tracing
    for DFT fuzzing: https://github.com/google/oss-fuzz/issues/1632

    Reviewers: pcc

    Reviewed By: pcc

    Subscribers: delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D63037 (detail)
    by kcc
  12. [compiler-rt] Fix name_to_handle_at.cc test on Overlay2 (for Docker)

    This patch aims to fix the test case, name_to_handle_at.cc that fails on Docker.

    Overlay2 on Docker does not support the current check for the name_to_handle_at()
    function call of the test case. The proposed fix is to check for /dev/null in
    the test instead, as this check is supported. Checking for /dev/null has been
    utilized in the past for other test cases, as well.

    Differential Revision: https://reviews.llvm.org/D63094 (detail)
    by amyk
  13. Revert r362676 "[Profile]: Add runtime interface to specify file handle for profile data."

    This caused instrumented Clang to become crashy. See llvm-commits thread
    for repro steps.

    This also reverts follow-up r362716 which added test cases.

    > Author: Sajjad Mirza
    >
    > Differential Revision: http://reviews.llvm.org/D62541 (detail)
    by hans
  14. [Sanitizers] Add case MACOS_VERSION_CATALINA

    Reviewed By: delcypher

    Differential Revision: https://reviews.llvm.org/D63096 (detail)
    by yln
  15. [scudo][standalone] Unmap memory in tests

    Summary:
    The more tests are added, the more we are limited by the size of the
    address space on 32-bit. Implement `unmapTestOnly` all around (like it
    is in sanitzer_common) to be able to free up some memory.
    This is not intended to be a proper "destructor" for an allocator, but
    allows us to not fail due to having no memory left.

    Reviewers: morehouse, vitalybuka, eugenis, hctim

    Reviewed By: morehouse

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

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D63146 (detail)
    by cryptoad
  16. Add FuzzedDataProvider helper class / single header library.

    Summary:
    This class is useful for writing fuzz target that have multiple inputs.

    Current CL imports the existing `FuzzedDataProvider` from Chromium
    without any modifications. Feel free to review it thoroughly, if you're
    interested, but I'd prefer changing the class in a follow up CL.

    The CL also introduces an exhaustive test for the library, as the behavior
    of `FuzzedDataProvider` must not change over time.

    In follow up CLs I'm planning on changing some implementation details
    (I can share a doc with some comments to be addressed). After that, we
    will document how `FuzzedDataProvider` should be used.

    I have tested this on Linux, Windows and Mac platforms.

    Reviewers: morehouse, metzman, kcc

    Reviewed By: morehouse

    Subscribers: metzman, thakis, rnk, mgorny, ormris, delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D62733 (detail)
    by dor1s
  17. [compiler-rt] Update comments in asan header to doxygen format; NFC.

    Add description to undocumented functions.
    Improve spelling, grammar and formatting.

    Patch by: Craig Flores, Filipe Cabecinhas, Pierre Gousseau

    Reviewed By: Johannes Doerfert

    Differential Revision: https://reviews.llvm.org/D62245 (detail)
    by pgousseau
Revision: 362564
Changes
  1. attempt to unbreak buildbots (detail)
    by ericwf
  2. [libcxx] Add XFAIL for facet test when back-deploying to older macOS (detail)
    by Louis Dionne
  3. [libc++] Keep __regex_word in sync with ctype_base

    Summary:
    The class ctype_base in the header <__locale> contains masks for
    character classification functions, which are kept in sync with
    platform's C library, hence it contains many special cases.
    The value of the bit mask __regex_word in the header <regex> must not
    clash with those bit masks.

    Currently the default case (i.e. unknown platform/C library) is
    handled incorrectly: the __regex_word clashes with ctype_base::punct.

    To avoid replicating the whole list of platforms in <regex> this patch
    defines __regex_word in <__locale>, so that it is always kept in sync
    with other masks.

    Reviewers: ldionne, mclow.lists, EricWF

    Reviewed By: ldionne

    Subscribers: krytarowski, christof, dexonsmith, pbarrio, simon_tatham, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D63284 (detail)
    by miyuki
  4. [libc++] Fix build with gcc 4.8

    gcc 4.8.4 (but not 5.4.0 or 7.3.0) has trouble initializing errc with {}, giving
    the error in [1]. This CL switches to explicitly using errc(0), which gcc 4.8
    accepts.

    [1] https://bugs.chromium.org/p/chromium/issues/detail?id=973723

    Differential Revision: https://reviews.llvm.org/D63296 (detail)
    by thomasanderson
  5. [libc++] Add missing #include in <cwchar> tests

    Thanks to Mikhail Maltsev for the patch.
    Differential Revision: https://reviews.llvm.org/D63289 (detail)
    by Louis Dionne
  6. Make GCC in C++03 Unsupported

    Summary:
    This patch make G++03 explicitly unsupported with libc++, as discussed on the mailing lists.


    Below is the rational for this decision.
    ----------------------------------------------------------------------------------------------------

    libc++ claims to support GCC with C++03 ("G++03"), and this is a problem for our users.

    Our C++03 users are all using Clang. They must be.  Less than 9% of the C++03 tests pass with GCC [1][2]. No non-trivial C++ program could work.

    Attempting to support G++03 impacts our QoI considerably. Unlike Clang, G++03 offers almost no C++11 extensions. If we could remove all the fallbacks for G++03, it would mean libc++ could::

    * Improve Correctness:

    Every `#ifdef _LIBCPP_HAS_NO_<C++11-feature>` is a bug manifest. It exists to admit for deviant semantics.

    * Achieve ABI stability between C++03 and C++11

    Differences between our C++03 and C++Rest branches contain ABI bugs. For example `std::nullptr_t` and `std::function::operator()(...)` are currently incompatible between C++11 and C++03, but could be fixed.

    * Decrease Compile Times and Memory Usage:

    Writing efficient SFINAE requires C++11. Using alias templates, libc++ could reduce the number of instantiations it produces substantially.

    * Decrease Binary Size

    Similar to the last point, G++03 forces metaprogramming techniques that emit more debug information [3] [4]. Compared to libstdc++, debug information size increases of +10% are not uncommon.

    Reviewers: ldionne, mclow.lists, EricWF

    Reviewed By: ldionne, EricWF

    Subscribers: zoecarver, aprantl, dexonsmith, arphaman, libcxx-commits, #libc

    Differential Revision: https://reviews.llvm.org/D63154 (detail)
    by ericwf
  7. [libcxx] XFAIL set/multiset CTAD tests on Apple Clang 10 (detail)
    by Louis Dionne
  8. [libcxx] XFAIL some CTAD tests on AppleClang 10

    AppleClang 10 doesn't contain some changes that are required for this
    test to give the right error message. (detail)
    by Louis Dionne
  9. Apply [[nodebug]] to typedefs throughout the STL.

    When applied to a typedef or alias template, the [[nodebug]] attribute
    makes the typedef transparent to the debugger, so instead of seeing
    `std::__function::__alloc_func<remove_reference<void(&)()>::type,
    allocator<remove_reference<void(&)()>, void()>::_Target` you see
    `void(&)()` as the type of the variable in your debugger.

    Removing all this SFINAE noise from debug info has huge binary size
    wins, in addition to improving the readability.

    For now this change is on by default. Users can override it by
    specifying -D_LIBCPP_NODEBUG_TYPE= (detail)
    by ericwf
  10. Move libc++ specific tests for std::function out of the std directory (detail)
    by ericwf
  11. Add documentation and tests for Clangs C++11 extensions in C++03.

    As we gear up to drop support for GCC in C++03, we should make clear
    what our C++03 mode is, the C++11 extensions it provides,
    and the C++11 extensions it depends on.

    The section of this document discussing user-facing extensions has
    been left blank while the community discusses new directions. For now
    it's just a warning to users.

    Additionally, the document contains examples of how these extensions
    should be used and why. For example, using alias templates over class
    templates. (detail)
    by ericwf
  12. [libcxx] Mark CTAD tests for set and multiset as unsupported on older Apple Clangs

    Those fail on Green Dragon. (detail)
    by Louis Dionne
  13. Mark CTAD fail tests for set/multiset as XFAIL for older compilers that give different error messages (detail)
    by marshall
  14. XFAIL a couple of tests on apple-clang-9.1, which is a compiler that I didn't know existed (detail)
    by marshall
  15. Check in test that demonstrates ABI break for std::function.

    Our C++03 and C++11 implementations of function are not ABI
    compatible. I've added a "test" that demonstrates this. (detail)
    by ericwf
  16. [libc++] Implement deduction guides for <set>

    This is part of C++17's P0433.

    Thanks to Arthur O'Dwyer for the patch.

    Differential Revision: https://reviews.llvm.org/D58582 (detail)
    by Louis Dionne
  17. [libcxx] Make std::tuple<> trivially constructible

    Summary:
    This is not mandated by the Standard, but it's nonetheless a nice
    property to have, especially since it's so easy to implement. It
    also shrinks our bug list!

    PR41714

    Reviewers: mclow.lists, EricWF

    Subscribers: christof, jkorous, dexonsmith, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D62618 (detail)
    by Louis Dionne
  18. [libcxx] Slightly improved policy for handling experimental features

    Summary:
    Following the discussion on the libcxx-dev mailing list
    (http://lists.llvm.org/pipermail/libcxx-dev/2019-May/000358.html),
    this implements the new policy for handling experimental features and
    their deprecation. We basically add a deprecation warning for
    std::experimental::filesystem, and we remove a bunch of <experimental/*>
    headers that were now empty.

    Reviewers: mclow.lists, EricWF

    Subscribers: mgorny, christof, jkorous, dexonsmith, arphaman, libcxx-commits, jfb

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D62428 (detail)
    by Louis Dionne
  19. Add a test for is_base_of and incomplete types. Because this trait uses a compiler intrinsic which was broken in many clangs, have lots of XFAILs. (detail)
    by marshall
  20. XFAIL a couple of CTAD tests on clang-6; it gives different error messages than clang 7/8/9 (detail)
    by marshall
  21. Recommit r362649, which was reverted in r262680 because of bugs in std::to_chars (which have now been fixed). Speedup to_string and to_wstring for integers using stack buffer and SSO (detail)
    by marshall
  22. Implement deduction guides for map/multimap. Reviewed as https://reviews.llvm.org/D58587. Thanks to Quuxplusone for the submission. (detail)
    by marshall

Started by upstream project relay-test-suite-verify-machineinstrs build number 5433
originally caused by:

This run spent:

  • 5.7 sec waiting;
  • 19 min build duration;
  • 19 min total from scheduled to completion.