collapse
20%
WDescription%
Build stability: 4 out of the last 5 builds failed.20
Build History
x
#5545
(pending—Already running 1 builds across all nodes)
 
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems

Changes

#5544 (Oct 16, 2019 2:28:18 AM)

  1. [HardwareLoops] Optimisation remarks

    This adds the initial plumbing to support optimisation remarks in
    the IR hardware-loop pass.

    I have left a todo in a comment where we can improve the reporting,
    and will iterate on that now that we have this initial support in.

    Differential Revision: https://reviews.llvm.org/D68579 — sjoerdmeijer / ViewSVN
  2. [NFC] Replace a linked list in LiveDebugVariables pass with a DenseMap

    In LiveDebugVariables.cpp:
    Prior to this patch, UserValues were grouped into linked list chains. Each
    chain was the union of two sets: { A: Matching Source variable } or
    { B: Matching virtual register }. A ptr to the heads (or 'leaders')
    of each of these chains were kept in a map with the { Source variable } used
    as the key (set A predicate) and another with { Virtual register } as key
    (set B predicate).

    There was a search through the chains in the function getUserValue looking for
    UserValues with matching { Source variable, Complex expression, Inlined-at
    location }. Essentially searching for a subset of A through two interleaved
    linked lists of set A and B. Importantly, by design, the subset will only
    contain one or zero elements here. That is to say a UserValue can be uniquely
    identified by the tuple { Source variable, Complex expression, Inlined-at
    location } if it exists.

    This patch removes the linked list and instead uses a DenseMap to map
    the tuple { Source variable, Complex expression, Inlined-at location }
    to UserValue ptrs so that the getUserValue search predicate is this map key.
    The virtual register map now maps a vreg to a SmallVector<UserVal *> so that
    set B is still available for quick searches.

    Reviewers: aprantl, probinson, vsk, dblaikie

    Reviewed By: aprantl

    Subscribers: russell.gallop, gbedwell, bjope, hiraditya, llvm-commits

    Tags: #debug-info, #llvm

    Differential Revision: https://reviews.llvm.org/D68816 — orlandoch / ViewSVN
  3. [CMake] Disable building all Darwin libraries (except builtins) for macOS i386 when the SDK is >= 10.15.

    Summary:
    In the macOS 10.15 SDK the ability to link i386 binaries was removed and
    in the corresponding OS it is not possible to run macOS i386 binaries.

    The consequence of these changes meant that targets like `check-asan`
    would fail because:

    * Unit tests could not be linked for i386
    * Lit tests for i386 would fail due to not being able to execute
      compiled binaries.

    The simplest fix to this is to simply disable building for i386 for
    macOS when using the 10.15 SDK (or newer). This disables building the
    i386 slice for most compiler-rt libraries and consequently disables the
    unit and lit tests for macOS i386.

    Note that because the `DARWIN_osx_ARCHS` CMake variable is a cache
    variable this patch will have no affect on existing builds unless
    the existing cache variable is deleted. The simplest way to deal with
    this is delete existing builds and just do a fresh configure.

    Note this should not affect the builtins which are managed with
    the `DARWIN_osx_BUILTIN_ARCHS` CMake cache variable.

    For those who wish to force using a particular set of architectures when
    using newer SDKs passing `-DDARWIN_osx_ARCHS=i386;x86_64;x86_64h` to
    CMake should provide a usable (but completely unsupported) workaround.

    rdar://problem/55668535
    rdar://problem/47939978

    Reviewers: kubamracek, yln, azhar, kcc, dvyukov, vitalybuka, cryptoad, eugenis, thakis, phosek

    Subscribers: mgorny, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D68292 — delcypher / ViewSVN
  4. [LegalizeTypes] Don't use PromoteTargetBoolean in WidenVecOp_SETCC.

    Similar to r374970, but I don't have a test for this.

    PromoteTargetBoolean is intended to be use for legalizing an
    operand that needs to be promoted. It picks its type based on
    the return from getSetccResultType and is intended to be used
    when we have freedom to pick the new type. But the return type
    we need for WidenVecOp_SETCC is completely determined by the
    type of the input node. — ctopper / ViewSVN
  5. Fix failing mangle-concept.cpp test. — saar.raz / ViewSVN
  6. [LegalizeTypes] Don't call PromoteTargetBoolean from SplitVecOp_VSETCC.

    PromoteTargetBoolean calls getSetccResultType to get the return
    type. But we were passing it the setcc result type rather than the
    setcc input type. This causes an issue on X86 with avx512vl where
    the setcc result type for vXf16 vectors is vXi16 while the
    result type for vXi16 vectors is vXi1.

    There's really no guarantee that getSetccResultType is the type
    we need here. So now we just grab the extend type from
    getExtendForContent and extend to the original result VT of the
    node we're splitting. — ctopper / ViewSVN
  7. [Concepts] ConceptSpecializationExprs mangling

    Implement mangling for CSEs to match regular template-ids.
    Reviewed as part of D41569. — saar.raz / ViewSVN
  8. Revert "[ASan] Refine diagnoses messages"

    This reverts commit 4d1ecadda59ce82e5fa6e28dd15bf794eee88363. — yln / ViewSVN
  9. CodeExtractor: NFC: Use Range based loop

    Reviewers: vsk, tejohnson, fhahn

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68924 — hiraditya / ViewSVN
  10. [libTooling] Put all Transformer declarations in a single namespace.

    Summary:
    This revision introduces a new namespace, `clang::transformer`, to hold
    the declarations for the Transformer library.

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68876 — ymandel / ViewSVN
  11. Fix an unused variable introduced in rL374955 / rG21703543.

    Even though this is a unit test, it still may be run under optimization. — dlj / ViewSVN
  12. [ASan] Refine diagnoses messages

    The provided PC is not reliable in every case, so don't suggest
    something that does not make sense. — yln / ViewSVN
  13. [dsymutil] Support and relocate base address selection entries for debug_loc

    Since r374600 clang emits base address selection entries. Currently
    dsymutil does not support these entries and incorrectly interprets them
    as location list entries.

    This patch adds support for base address selection entries in dsymutil
    and makes sure they are relocated correctly.

    Thanks to Dave for coming up with the test case!

    Differential revision: https://reviews.llvm.org/D69005 — Jonas Devlieghere / ViewSVN
  14. [Reland][VirtualFileSystem] Support virtual working directory in the RedirectingFS

    Before this patch, changing the working directory of the RedirectingFS
    would just forward to its external file system. This prevented us from
    having a working directory that only existed in the VFS mapping.

    This patch adds support for a virtual working directory in the
    RedirectingFileSystem. It now keeps track of its own WD in addition to
    updating the WD of the external file system. This ensures that we can
    still fall through for relative paths.

    This change was originally motivated by the reproducer infrastructure in
    LLDB where we want to deal transparently with relative paths.

    Differential revision: https://reviews.llvm.org/D65677 — Jonas Devlieghere / ViewSVN
  15. PR43674: fix incorrect constant evaluation of 'switch' where no case
    label corresponds to the condition. — rsmith / ViewSVN
  16. Remove unnecessary and inappropriate forward-declaration of Sema from
    AST. — rsmith / ViewSVN
  17. [Orc] Add a method for ObjectLinkingLayer to return ownership of object buffers.

    RTDyldObjectLinkingLayer allowed clients to register a NotifyEmitted function to
    reclaim ownership of object buffers once they had been linked. This patch adds
    similar functionality to ObjectLinkingLayer: Clients can now optionally call the
    ObjectLinkingLayer::setReturnObjectBuffer method to register a function that
    will be called when discarding object buffers. If set, this function will be
    called to return ownership of the object regardless of whether the link
    succeeded or failed.

    Use cases for this function include debug dumping (it provides a way to dump
    all objects linked into JIT'd code) and object re-use (e.g. storing an
    object in a cache). — Lang Hames / ViewSVN
  18. [Docs] Updates sidebar links and sets max-width property for div.body

    Updates the sidebar links for Getting Started. Also sets max-width on div.body to 1000px. — dr87 / ViewSVN
  19. [JITLink] Switch to slab allocation for InProcessMemoryManager, re-enable test.

    InProcessMemoryManager used to make separate memory allocation calls for each
    permission level (RW, RX, RO), which could lead to target-out-of-range errors
    if data and code were placed too far apart (this was the source of failures in
    the JITLink/AArch64 testcase when it was first landed).

    This patch updates InProcessMemoryManager to allocate a single slab which is
    subdivided between text and data. This should guarantee that accesses remain
    in-range provided that individual object files do not exceed 1Mb in size.
    This patch also re-enables the JITLink/AArch64 testcase. — Lang Hames / ViewSVN
  20. [lit] Add back LitTestCase

    This essentially reverts a commit [1] that removed the adaptor for
    Python unittests.  The code has been slightly refactored to make it more
    additive: all code is contained in LitTestCase.py.

    Usage sites will require a small adaption:
    ```
    [old]
      import lit.discovery
      ...
      test_suite = lit.discovery.load_test_suite(...)

    [new]
      import lit.LitTestCase
      ...
      test_suite = lit.LitTestCase.load_test_suite(...)
    ```

    This was put back on request by Daniel Dunbar, since I wrongly assumed
    that the functionality is unused.  At least llbuild still uses this [2].

    [1] 70ca752ccf6a8f362aea25ccd3ee2bbceca93b20
    [2] https://github.com/apple/swift-llbuild/blob/master/utils/Xcode/LitXCTestAdaptor/LitTests.py#L16

    Reviewed By: ddunbar

    Differential Revision: https://reviews.llvm.org/D69002 — yln / ViewSVN
  21. [XCOFF]implement parsing relocation information for 32-bit xcoff object file

    Summary:
        Parsing the relocation entry information for 32-bit xcoff object file
    including deal with the relocation overflow.

    Reviewers: hubert.reinterpretcast, jasonliu, sfertile, xingxue.

    Subscribers: hiraditya, rupprecht, seiya

    Differential Revision: https://reviews.llvm.org/D67008 — diggerlin / ViewSVN
  22. [llvm-lipo] Add missing cast

    Add missing cast (to correctly sum 32-bit integers).

    Test plan: make check-all — alexshap / ViewSVN
  23. AMDGPU: Fix infinite searches in SIFixSGPRCopies

    Summary:
    Two conditions could lead to infinite loops when processing PHI nodes in
    SIFixSGPRCopies.

    The first condition involves a REG_SEQUENCE that uses registers defined by both
    a PHI and a COPY.

    The second condition arises when a physical register is copied to a virtual
    register which is then used in a PHI node. If the same virtual register is
    copied to the same physical register, the result is an endless loop.

    %0:sgpr_64 = COPY $sgpr0_sgpr1
    %2 = PHI %0, %bb.0, %1, %bb.1
    $sgpr0_sgpr1 = COPY %0

    Reviewers: alex-t, rampitec, arsenm

    Reviewed By: rampitec

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68970 — kerbowa / ViewSVN
  24. [OPENMP]Fix comments/params, NFC. — abataev / ViewSVN
  25. [OPENMP]Allow final clause in combined task-based directives.
    The condition of the final clause must be captured in the combined
    task-based directives, like 'parallel master taskloop' directive. — abataev / ViewSVN
  26. [llvm-readobj][xcoff] implement parsing overflow section header.

    SUMMARY:
    in the xcoff, if the number of relocation entries or line number entries is
    overflow(large than or equal 65535) , there will be overflow section for it.
    The interpret of overflow section is different with generic section header,
    the patch implement parsing the overflow section.

    Reviewers: hubert.reinterpretcast,sfertile,jasonliu
    Subscribers: rupprecht, seiya

    Differential Revision: https://reviews.llvm.org/D68575 — diggerlin / ViewSVN
  27. [Concept] Associated Constraints Infrastructure

    Add code to correctly calculate the associated constraints of a template (no enforcement yet).
    D41284 on Phabricator. — saar.raz / ViewSVN
  28. [Clang][OpenMP Offload] Move offload registration code to the wrapper

    The final list of OpenMP offload targets becomes known only at the link time and since offload registration code depends on the targets list it makes sense to delay offload registration code generation to the link time instead of adding it to the host part of every fat object. This patch moves offload registration code generation from clang to the offload wrapper tool.

    This is the last part of the OpenMP linker script elimination patch https://reviews.llvm.org/D64943

    Differential Revision: https://reviews.llvm.org/D68746 — sdmitriev / ViewSVN
  29. Fix as-w-option.c on Windows where no assembler exists — rnk / ViewSVN
  30. Revert "[VirtualFileSystem] Support virtual working directory in the  RedirectingFS"

    This reverts the original commit and the follow up:

    Revert "[VirtualFileSystem] Support virtual working directory in the  RedirectingFS"
    Revert "[test] Update YAML mapping in VirtualFileSystemTest" — Jonas Devlieghere / ViewSVN
  31. Added support for "#pragma clang section relro=<name>"

    Differential Revision: https://reviews.llvm.org/D68806 — dmikulin / ViewSVN
  32. [WebAssembly] Allow multivalue types in block signature operands

    Summary:
    Renames `ExprType` to the more apt `BlockType` and adds a variant for
    multivalue blocks. Currently non-void blocks are only generated at the
    end of functions where the block return type needs to agree with the
    function return type, and that remains true for multivalue
    blocks. That invariant means that the actual signature does not need
    to be stored in the block signature `MachineOperand` because it can be
    inferred by `WebAssemblyMCInstLower` from the return type of the
    parent function. `WebAssemblyMCInstLower` continues to lower block
    signature operands to immediates when possible but lowers multivalue
    signatures to function type symbols. The AsmParser and Disassembler
    are updated to handle multivalue block types as well.

    Reviewers: aheejin, dschuff, aardappel

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68889 — tlively / ViewSVN
  33. [clang] refactor -Wa,-W test cases.

    Remove REQUIRES and only keep the clang driver tests, since the
    assembler are already tested with -Wa,--no-warn. This way we could run
    the test on non-linux platforms and catch breaks on them. — jcai19 / ViewSVN
  34. [llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.

    Summary:
    When listing the index in `llvm-objdump -h`, use a zero-based counter instead of the actual section index (e.g. shdr->sh_index for ELF).

    While this is effectively a noop for now (except one unit test for XCOFF), the index values will change in a future patch that filters certain sections out (e.g. symbol tables). See D68669 for more context. Note: the test case in `test/tools/llvm-objdump/X86/section-index.s` already covers the case of incrementing the section index counter when sections are skipped.

    Reviewers: grimar, jhenderson, espindola

    Reviewed By: grimar

    Subscribers: emaste, sbc100, arichardson, aheejin, arphaman, seiya, llvm-commits, MaskRay

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68848 — rupprecht / ViewSVN
  35. [test] Update YAML mapping in VirtualFileSystemTest

    The 'bar' directory should be part of the root rather than the file
    itself. — Jonas Devlieghere / ViewSVN
  36. Fix Driver/working-directory.c test

    Accidentally committed debug print. — Jan Korous / ViewSVN
  37. [X86] combineX86ShufflesRecursively - split the getTargetShuffleInputs call from the resolveTargetShuffleAndZeroables call.

    Exposes an issue in getFauxShuffleMask where the OR(SHUFFLE,SHUFFLE) decode should always resolve zero/undef elements.

    Part of the fix for PR43024 where ideally we shouldn't call resolveTargetShuffleAndZeroables for Depth == 0 — rksimon / ViewSVN
  38. [llvm-profdata] Reinstate tools/llvm-profdata/malformed-ptr-to-counter-array.test

    I removed this test to unblock the ARM bots while looking into failures
    (r374915), and am reinstating it now with a fix.

    I believe the problem was that counter ptr address I used,
    '\0\0\6\0\1\0\0\1', set the high bits of the pointer, not the low bits
    like I wanted. On x86_64 this superficially looks like it tests r370826,
    but it doesn't, as it would have been caught before r370826. However, on
    ARM (or, 32-bit hosts more generally), I suspect the high bits were
    cleared, and you get a 'valid' profile.

    I verified that setting the *low* bits of the pointer does trigger the
    new condition:

    -// Note: The CounterPtr here is off-by-one. This should trigger a malformed profile error.
    -RUN: printf '\0\0\6\0\1\0\0\1' >> %t.profraw
    +// Note: The CounterPtr here is off-by-one.
    +//
    +// Octal '\11' is 9 in decimal: this should push CounterOffset to 1. As there are two counters,
    +// the profile reader should error out.
    +RUN: printf '\11\0\6\0\1\0\0\0' >> %t.profraw

    This reverts commit c7cf5b3e4b918c9769fd760f28485b8d943ed968. — Vedant Kumar / ViewSVN
  39. Reland [Driver] Fix -working-directory issues

    Don't change the default VFS in Driver, update tests & reland.

    This reverts commit 999f8a7416f8edc54ef92e715fd23c532bcc74d4. — Jan Korous / ViewSVN
  40. [XCOFF] Output object text section header and symbol entry for program code.

    This is remaining part of  rG41ca91f2995b: [AIX][XCOFF] Output XCOFF
    object text section header and symbol entry for rogram code.

    SUMMARY:
    Original form of this patch is provided by Stefan Pintillie.

    1. The patch try to output program code section header , symbol entry for
    program code (PR) and Instruction into the raw text section.
    2. The patch include how to alignment and layout the CSection in the text
    section.
    3. The patch also reorganize the code , put some codes into a function.
    (XCOFFObjectWriter::writeSymbolTableEntryForControlSection)

    Additional: We can not add raw data of text section test in the patch, If want
    to output raw text section data,it need a function description patch first.

    Reviewers: hubert.reinterpretcast, sfertile, jasonliu, xingxue.
    Subscribers: wuzish, nemanjai, hiraditya, MaskRay, jsjji.

    Differential Revision: https://reviews.llvm.org/D66969 — diggerlin / ViewSVN
  41. [X86] Make memcmp() use PTEST if possible and also enable AVX1 — davezarzycki / ViewSVN
  42. Add more information to JSON AST dumping of source locations.

    This adds information about the offset within the source file to the given source location as well as information about the include file a location is from. These pieces of information allow for more efficient post-processing of JSON AST dumps. — aaronballman / ViewSVN
  43. [NewGVN] Check that call has an access.

    Check that a call has an attached MemoryAccess before calling
    getClobbering on the instruction.
    If no access is attached, the instruction does not access memory.

    Resolves PR43441. — asbirlea / ViewSVN
  44. [MemorySSA] Update DomTree before applying MSSA updates.

    Update on the fix in rL374850. — asbirlea / ViewSVN
  45. [VirtualFileSystem] Support virtual working directory in the  RedirectingFS

    Before this patch, changing the working directory of the RedirectingFS
    would just forward to its external file system. This prevented us from
    having a working directory that only existed in the VFS mapping.

    This patch adds support for a virtual working directory in the
    RedirectingFileSystem. It now keeps track of its own WD in addition to
    updating the WD of the external file system. This ensures that we can
    still fall through for relative paths.

    This change was originally motivated by the reproducer infrastructure in
    LLDB where we want to deal transparently with relative paths.

    Differential revision: https://reviews.llvm.org/D65677 — Jonas Devlieghere / ViewSVN
  46. [llvm-profdata] Remove tools/llvm-profdata/malformed-ptr-to-counter-array.test

    This test is still failing on the ARM bots and I need time to
    investigate. — Vedant Kumar / ViewSVN
  47. [AIX][XCOFF] Output XCOFF object text section header and symbol entry for program code.

    SUMMARY
    Original form of this patch is provided by Stefan Pintillie.

    The patch try to output program code section header , symbol entry for program code (PR) and Instruction into the raw text section.
    The patch include how to alignment and layout the CSection in the text section.
    The patch also reorganize the code , put some codes into a function(XCOFFObjectWriter::writeSymbolTableEntryForControlSection)
    Additional: We can not add raw data of text section test in the patch, If want to output raw text section data,it need a function description patch first.

    Reviewers: hubert.reinterpretcast, sfertile, jasonliu, xingxue.
    Subscribers: wuzish, nemanjai, hiraditya, MaskRay, jsjji.

    Differential Revision: https://reviews.llvm.org/D66969 — diggerlin / ViewSVN
  48. [AMDGPU] Support mov dpp with 64 bit operands

    We define mov/update dpp intrinsics as overloaded but do not
    support i64, which is a practically useful type. Fix the
    selection and lowering.

    Differential Revision: https://reviews.llvm.org/D68673 — rampitec / ViewSVN
  49. CFI: wrong type passed to llvm.type.test with multiple inheritance devirtualization.

    Differential Revision: https://reviews.llvm.org/D67985 — dmikulin / ViewSVN
  50. [AMDGPU] Allow DPP combiner to work with REG_SEQUENCE

    Differential Revision: https://reviews.llvm.org/D68828 — rampitec / ViewSVN
  51. [Concepts] Remove unused and illegal Sema includes from ExprCXX.cpp

    Fixing accidental includes introduced in 374903 — saar.raz / ViewSVN
  52. gn build: Merge r374903 — gnsyncbot / ViewSVN
  53. [DAGCombiner] fold select-of-constants based on sign-bit test

    Examples:
      i32 X > -1 ? C1 : -1 --> (X >>s 31) | C1
      i8 X < 0 ? C1 : 0 --> (X >>s 7) & C1

    This is a small generalization of a fold requested in PR43650:
    https://bugs.llvm.org/show_bug.cgi?id=43650

    The sign-bit of the condition operand can be used as a mask for the true operand:
    https://rise4fun.com/Alive/paT

    Note that we already handle some of the patterns (isNegative + scalar) because
    there's an over-specialized, yet over-reaching fold for that in foldSelectCCToShiftAnd().
    It doesn't use any TLI hooks, so I can't easily rip out that code even though we're
    duplicating part of it here. This fold is guarded by TLI.convertSelectOfConstantsToMath(),
    so it should not cause problems for targets that prefer select over shift.

    Also worth noting: I thought we could generalize this further to include the case where
    the true operand of the select is not constant, but Alive says that may allow poison to
    pass through where it does not in the original select form of the code.

    Differential Revision: https://reviews.llvm.org/D68949 — spatel / ViewSVN

#5540 (Oct 14, 2019 7:02:05 AM)

  1. [RISCV] enable LTO support, pass some options to linker.

    Summary:
    1. enable LTO need to pass target feature and abi to LTO code generation
       RISCV backend need the target feature to decide which extension used in
       code generation.
    2. move getTargetFeatures to CommonArgs.h and add ForLTOPlugin flag
    3. add general tools::getTargetABI in CommonArgs.h because different target uses different
       way to get the target ABI.

    Patch by Kuan Hsu Chen (khchen)

    Reviewers: lenary, lewis-revill, asb, MaskRay

    Reviewed By: lenary

    Subscribers: hiraditya, dschuff, aheejin, fedor.sergeev, mehdi_amini, inglorion, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67409 — lenary / ViewSVN
  2. [Alignment][NFC] Move and type functions from MathExtras to Alignment

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68942 — gchatelet / ViewSVN
  3. [AArch64] Stackframe accesses to SVE objects.

    Materialize accesses to SVE frame objects from SP or FP, whichever is
    available and beneficial.

    This patch still assumes the objects are pre-allocated. The automatic
    layout of SVE objects within the stackframe will be added in a separate
    patch.

    Reviewers: greened, cameron.mcinally, efriedma, rengolin, thegameg, rovka

    Reviewed By: cameron.mcinally

    Differential Revision: https://reviews.llvm.org/D67749 — s.desmalen / ViewSVN
  4. [llvm-size] Tidy up error messages (PR42970)

    Clean up some formatting inconsistencies in the error messages and correctly exit with non-zero in all error cases.

    Differential Revision: https://reviews.llvm.org/D68906
    Patch by Alex Cameron — maskray / ViewSVN
  5. [DebugInfo] Fix truncation of call site immediates

    Summary:
    This addresses a bug in collectCallSiteParameters() where call site
    immediates would be truncated from int64_t to unsigned.

    This fixes PR43525.

    Reviewers: djtodoro, NikolaPrica, aprantl, vsk

    Reviewed By: aprantl

    Subscribers: hiraditya, llvm-commits

    Tags: #debug-info, #llvm

    Differential Revision: https://reviews.llvm.org/D68869 — dstenb / ViewSVN
  6. Revert "Add a pass to lower is.constant and objectsize intrinsics"

    This reverts commit r374743. It broke the build with Ocaml enabled:
    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19218 — gribozavr / ViewSVN
  7. [AMDGPU] Come back patch for the 'Assign register class for cross block values according to the divergence.'

      Detailed description:

        After https://reviews.llvm.org/D59990 submit several issues were discovered.
        Changes in common code were preserved but AMDGPU specific part was reverted to keep the backend working correctly.

        Discovered issues were addressed in the following commits:

        https://reviews.llvm.org/D67662
        https://reviews.llvm.org/D67101
        https://reviews.llvm.org/D63953
        https://reviews.llvm.org/D63731

        This change brings back AMDGPU specific changes.

      Reviewed by: rampitec, arsenm

      Differential Revision: https://reviews.llvm.org/D68635 — alex-t / ViewSVN

#5539 (Oct 14, 2019 4:57:14 AM)

  1. Fixing typo in llvm/IR/Intrinsics.td

    Fixing typo in comment line. — vhscampos / ViewSVN
  2. [X86][BtVer2] Improved latency and throughput of float/vector loads and stores.

    This patch introduces the following changes to the btver2 scheduling model:

    - The number of micro opcodes for YMM loads and stores is now 2 (it was
      incorrectly set to 1 for both aligned and misaligned loads/stores).

    - Increased the number of AGU resource cycles for YMM loads and stores
      to 2cy (instead of 1cy).

    - Removed JFPU01 and JFPX from the list of resources consumed by pure
      float/vector loads (no MMX).

    I verified with llvm-exegesis that pure XMM/YMM loads are no-pipe. Those
    are dispatched to the FPU but not really issues on JFPU01.

    Differential Revision: https://reviews.llvm.org/D68871 — adibiagio / ViewSVN

#5538 (Oct 14, 2019 3:19:27 AM)

  1. [NFC][TTI] Add Alignment for isLegalMasked[Load/Store]

    Add an extra parameter so the backend can take the alignment into
    consideration.

    Differential Revision: https://reviews.llvm.org/D68400 — sam_parker / ViewSVN
  2. Fix D68936 — gchatelet / ViewSVN
  3. build_llvm_package.bat: Run check-clang-tools and check-clangd tests. — hans / ViewSVN
  4. [Alignment][NFC] Support compile time constants

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68936 — gchatelet / ViewSVN

#5537 (Oct 14, 2019 1:17:47 AM)

  1. [docs] loop pragmas: options implying transformations

    Following our discussion on the cfe dev list:
    http://lists.llvm.org/pipermail/cfe-dev/2019-August/063054.html,
    I have added a paragraph that is explicit about loop pragmas, and
    transformation options implying the corresponding transformation.

    Differential Revision: https://reviews.llvm.org/D66199 — sjoerdmeijer / ViewSVN
  2. [X86] Teach EmitTest to handle ISD::SSUBO/USUBO in order to use the Z flag from the subtract directly during isel.

    This prevents isel from emitting a TEST instruction that
    optimizeCompareInstr will need to remove later.

    In some of the modified tests, the SUB gets duplicated due to
    the flags being needed in two places and being clobbered in
    between. optimizeCompareInstr was able to optimize away the TEST
    that was using the result of one of them, but optimizeCompareInstr
    doesn't know to turn SUB into CMP after removing the TEST. It
    only knows how to turn SUB into CMP if the result was already
    dead.

    With this change the TEST never exists, so optimizeCompareInstr
    doesn't have to remove it. Then it can just turn the SUB into
    CMP immediately.

    Fixes PR43649. — ctopper / ViewSVN

#5536 (Oct 13, 2019 11:24:23 PM)

  1. [clang] [clang-offload-bundler] Fix finding installed llvm-objcopy

    Allow finding installed llvm-objcopy in PATH if it's not present
    in the directory containing clang-offload-bundler.  This is the case
    if clang is being built stand-alone, and llvm-objcopy is already
    installed while the c-o-b tool is still present in build directory.

    This is consistent with how e.g. llvm-symbolizer is found in LLVM.
    However, most of similar searches in LLVM and Clang are performed
    without special-casing the program directory.

    Fixes r369955.

    Differential Revision: https://reviews.llvm.org/D68931 — mgorny / ViewSVN

#5534 (Oct 13, 2019 9:01:45 PM)

  1. clangd tests: use extended regex with sed

    The escaped parens seem to confuse the combination of lit, cygwin
    quoting, and cygwin's sed. unxutils sed in cmd.exe is fine with both
    forms, so use the extended regex form that doesn't need an escaped
    paren. — nico / ViewSVN

#5533 (Oct 13, 2019 7:37:29 PM)

  1. convert another test to unix line endings — nico / ViewSVN
  2. convert a test to unix line endings — nico / ViewSVN

#5532 (Oct 13, 2019 6:47:48 PM)

  1. fix typo in 374747 — nico / ViewSVN
  2. Prefer 'env not' over 'not env' in tests.

    That way, lit's builtin 'env' command can be used for the 'env' bit.

    Also it's clearer that way that the 'not' shouldn't cover 'env'
    failures. — nico / ViewSVN
  3. [X86] Autogenerate complete checks. NFC — ctopper / ViewSVN
  4. Make symbols.test pass on Windows.

    See commit message of r374746 for details.

    Hopefully final bit of PR43592. — nico / ViewSVN
  5. Make code-action-request.test and request-reply.test pass on Windows.

    clangd's test:// scheme expands to /clangd-test on non-Win and to
    C:/clang-test on Win, so it can't be mixed freely with
    file:///clangd-test since that's wrong on Windows. This makes both
    tests consistenly use the test:// scheme. (Alternatively, we could use
    the //INPUT_DIR pattern used in a few other tests.)

    Part of PR43592. — nico / ViewSVN

#5531 (Oct 13, 2019 5:48:14 PM)

  1. Don't run background-index.test on Windows.

    The test had a "UNSUPPORTED: win32" line, but the spelling of that
    changed in r339307 a year ago. Finally update this test too.

    Part of PR43592. — nico / ViewSVN
  2. [NewGVN] Use m_Br to simplify code a bit. (NFC) — fhahn / ViewSVN
  3. Add a pass to lower is.constant and objectsize intrinsics

    This pass lowers is.constant and objectsize intrinsics not simplified by
    earlier constant folding, i.e. if the object given is not constant or if
    not using the optimized pass chain. The result is recursively simplified
    and constant conditionals are pruned, so that dead blocks are removed
    even for -O0. This allows inline asm blocks with operand constraints to
    work all the time.

    The new pass replaces the existing lowering in the codegen-prepare pass
    and fallbacks in SDAG/GlobalISEL and FastISel. The latter now assert
    on the intrinsics.

    Differential Revision: https://reviews.llvm.org/D65280 — joerg / ViewSVN
  4. Improve __builtin_constant_p lowering

    __builtin_constant_p used to be short-cut evaluated to false when
    building with -O0. This is undesirable as it means that constant folding
    in the front-end can give different results than folding in the back-end.
    It can also create conditional branches on constant conditions that don't
    get folded away. With the pending improvements to the llvm.is.constant
    handling on the LLVM side, the short-cut is no longer useful.

    Adjust various codegen tests to not depend on the short-cut or the
    backend optimisations.

    Differential Revision: https://reviews.llvm.org/D67638 — joerg / ViewSVN
  5. merge-request.sh: Update 9.0 metabug for 9.0.1 — atanasyan / ViewSVN
  6. [Attributor] Shortcut no-return through will-return

    No-return and will-return are exclusive, assuming the latter is more
    prominent we can avoid updates of the former unless will-return is not
    known for sure. — jdoerfert / ViewSVN
  7. [Attributor][FIX] NullPointerIsDefined needs the pointer AS (AANonNull)

    Also includes a shortcut via AADereferenceable if possible. — jdoerfert / ViewSVN
  8. [Attributor][MemBehavior] Fallback to the function state for arguments

    Even if an argument is captured, we cannot have an effect the function
    does not have. This is fine except for the special case of `inalloca` as
    it does not behave by the rules.

    TODO: Maybe the special rule for `inalloca` is wrong after all. — jdoerfert / ViewSVN
  9. [Attributor][FIX] Use check prefix that is actually tested

    Summary:
    This changes "CHECK" check lines to "ATTRIBUTOR" check lines where
    necessary and also fixes the now exposed, mostly minor, problems.

    Reviewers: sstefan1, uenoku

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68929 — jdoerfert / ViewSVN
  10. [NFC][InstCombine] Some preparatory cleanup in dropRedundantMaskingOfLeftShiftInput() — lebedevri / ViewSVN
  11. [Docs] Moves Control Flow Document to User Guides

    Moves Control Flow document from Reference docs page to User guides page. — dr87 / ViewSVN
  12. [X86] getTargetShuffleInputs - Control KnownUndef mask element resolution as well as KnownZero.

    We were already controlling whether the KnownZero elements were being written to the target mask, this extends it to the KnownUndef elements as well so we can prevent the target shuffle mask being manipulated at all. — rksimon / ViewSVN
  13. [X86] Enable use of avx512 saturating truncate instructions in more cases.

    This enables use of the saturating truncate instructions when the
    result type is less than 128 bits. It also enables the use of
    saturating truncate instructions on KNL when the input is less
    than 512 bits. We can do this by widening the input and then
    extracting the result. — ctopper / ViewSVN

#5530 (Oct 13, 2019 10:54:07 AM)

  1. Add missing "REQUIRES: shell" to system-include-extractor.test

    Part of PR43592. — nico / ViewSVN
  2. [ConstantFold] fix inconsistent handling of extractelement with undef index (PR42689)

    Any constant other than zero was already folded to undef if the index is undef.
    https://bugs.llvm.org/show_bug.cgi?id=42689 — spatel / ViewSVN
  3. [InstCombine] don't assume 'inbounds' for bitcast deref or null pointer in non-default address space

    Follow-up to D68244 to account for a corner case discussed in:
    https://bugs.llvm.org/show_bug.cgi?id=43501

    Add one more restriction: if the pointer is deref-or-null and in a non-default
    (non-zero) address space, we can't assume inbounds.

    Differential Revision: https://reviews.llvm.org/D68706 — spatel / ViewSVN
  4. Make the last to clangd unit tests pass on Windows.

    (Some lit tests still fail.)

    See FIXME in diff for details.

    Part of PR43592. — nico / ViewSVN
  5. [NFC][InstCombine] More test for "sign bit test via shifts" pattern (PR43595)

    While that pattern is indirectly handled via
    reassociateShiftAmtsOfTwoSameDirectionShifts(),
    that incursme one-use restriction on truncation,
    which is pointless since we know that we'll produce a single instruction.

    Additionally, *if* we are only looking for sign bit,
    we don't need shifts to be identical,
    which isn't the case in general,
    and is the blocker for me in bug in question:

    https://bugs.llvm.org/show_bug.cgi?id=43595 — lebedevri / ViewSVN
  6. [X86] SimplifyMultipleUseDemandedBitsForTargetNode - use getTargetShuffleInputs with KnownUndef/Zero results. — rksimon / ViewSVN
  7. [X86] getTargetShuffleInputs - add KnownUndef/Zero output support

    Adjust SimplifyDemandedVectorEltsForTargetNode to use the known elts masks instead of recomputing it locally. — rksimon / ViewSVN
  8. [libc++][test] std::variant test cleanup

    * Add the conventional `return 0` to `main` in `variant.assign/conv.pass.cpp` and `variant.ctor/conv.pass.cpp`

    * Fix some MSVC signed-to-unsigned conversion warnings by replacing `int` literarls with `unsigned int` literals — caseycarter / ViewSVN
  9. [libc++][test] <=> now has a feature-test macro

    ...which `test/support/test_macros.h` can use to detect compiler support. — caseycarter / ViewSVN

#5529 (Oct 13, 2019 9:01:27 AM)

  1. gn build: (manually) merge r374720 — nico / ViewSVN
  2. [clang-format] Proposal for clang-format to give compiler style warnings

    relanding {D68554} with fixed lit tests, checked on Windows and MacOS — paulhoad / ViewSVN

#5528 (Oct 13, 2019 6:56:32 AM)

  1. [X86][AVX] Add i686 avx splat tests — rksimon / ViewSVN
  2. Make most clangd unittests pass on Windows

    The Windows triple currently turns on delayed template parsing, which
    confuses several unit tests that use templates.

    For now, just explicitly disable delayed template parsing. This isn't
    ideal, but:

    - the Windows triple will soon no longer use delayed template parsing
      by default

    - there's precedent for this in the clangd unit tests already

    - let's get the clangd tests pass on Windows first before making
      behavioral changes

    Part of PR43592. — nico / ViewSVN
  3. BlockInCriticalSectionChecker - silence static analyzer dyn_cast null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<> directly and if not assert will fire for us. — rksimon / ViewSVN
  4. IRTranslator - silence static analyzer null dereference warnings. NFCI.

    The CmpInst::getType() calls can be replaced by just using User::getType() that it was dyn_cast from, and we then need to assert that any default predicate cases came from the CmpInst. — rksimon / ViewSVN
  5. [clang-tidy] bugprone-not-null-terminated-result: checker adjustments 4 — charusso / ViewSVN
  6. [clang-tidy] bugprone-not-null-terminated-result: checker adjustments 3

    On Windows the signed/unsigned int conversions of APInt seems broken, so that
    two of the test files marked as unsupported on Windows, as a hotfix. — charusso / ViewSVN

#5527 (Oct 13, 2019 3:30:39 AM)

  1. [clang-tidy] bugprone-not-null-terminated-result: checker adjustments 2 — charusso / ViewSVN
  2. [clang-tidy] bugprone-not-null-terminated-result: checker adjustments — charusso / ViewSVN
  3. [clang-tidy] bugprone-not-null-terminated-result: Sphinx adjustments 2 — charusso / ViewSVN
  4. [clang-tidy] bugprone-not-null-terminated-result: Sphinx adjustments — charusso / ViewSVN
  5. gn build: Merge r374707 — gnsyncbot / ViewSVN
  6. [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

    Summary:
    New checker called bugprone-not-null-terminated-result. This checker finds
    function calls where it is possible to cause a not null-terminated result.
    Usually the proper length of a string is `strlen(src) + 1` or equal length
    of this expression, because the null terminator needs an extra space.
    Without the null terminator it can result in undefined behaviour when the
    string is read.

    The following and their respective `wchar_t` based functions are checked:

    `memcpy`, `memcpy_s`, `memchr`, `memmove`, `memmove_s`, `strerror_s`,
    `strncmp`, `strxfrm`

    The following is a real-world example where the programmer forgot to
    increase the passed third argument, which is `size_t length`.
    That is why the length of the allocated memory is not enough to hold the
    null terminator.

    ```
        static char *stringCpy(const std::string &str) {
          char *result = reinterpret_cast<char *>(malloc(str.size()));
          memcpy(result, str.data(), str.size());
          return result;
        }
    ```

    In addition to issuing warnings, fix-it rewrites all the necessary code.
    It also tries to adjust the capacity of the destination array:

    ```
        static char *stringCpy(const std::string &str) {
          char *result = reinterpret_cast<char *>(malloc(str.size() + 1));
          strcpy(result, str.data());
          return result;
        }
    ```

    Note: It cannot guarantee to rewrite every of the path-sensitive memory
    allocations.

    Reviewed By: JonasToth, aaron.ballman, whisperity, alexfh

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D45050 — charusso / ViewSVN

#5526 (Oct 13, 2019 12:24:39 AM)

  1. [X86] Add a one use check on the setcc to the min/max canonicalization code in combineSelect.

    This seems to improve std::midpoint code where we have a min and
    a max with the same condition. If we split the setcc we can end
    up with two compares if the one of the operands is a constant.
    Since we aggressively canonicalize compares with constants.
    For non-constants it can interfere with our ability to share
    control flow if we need to expand cmovs into control flow.

    I'm also not sure I understand this min/max canonicalization code.
    The motivating case talks about comparing with 0. But we don't
    check for 0 explicitly.

    Removes one instruction from the codegen for PR43658. — ctopper / ViewSVN
  2. [X86] Enable v4i32->v4i16 and v8i16->v8i8 saturating truncates to use pack instructions with avx512. — ctopper / ViewSVN
  3. [X86] Add v2i64->v2i32/v2i16/v2i8 test cases to the trunc packus/ssat/usat tests. NFC — ctopper / ViewSVN
  4. [Attributor][FIX] Avoid splitting blocks if possible

    Before, we eagerly split blocks even if it was not necessary, e.g., they
    had a single unreachable instruction and only a single predecessor. — jdoerfert / ViewSVN
  5. [Attributor][FIX] Remove leftover, now unused, variable — jdoerfert / ViewSVN
  6. [Attributor] Remove unused verification flag

    We use the verify max iteration now which is more reliable. — jdoerfert / ViewSVN
  7. [Attributor][NFC] Expose call site traversal without QueryingAA — jdoerfert / ViewSVN
  8. [Attributor][FIX] Ensure h2s doesn't trigger on escaped pointers

    We do not yet perform h2s because we know something is free'ed but we do
    it because we know the pointer does not escape. Storing the pointer
    allows it to escape so we have to prevent that. — jdoerfert / ViewSVN

#5525 (Oct 12, 2019 9:09:25 PM)

  1. [Attributor][FIX] Do not apply h2s for arbitrary mallocs

    H2S did apply to mallocs of non-constant sizes if the uses were OK. This
    is now forbidden through reording of the "good" and "bad" cases in the
    conditional. — jdoerfert / ViewSVN
  2. [Attributor][FIX] Add missing function declaration in test case — jdoerfert / ViewSVN
  3. [Attributor][FIX] Avoid modifying naked/optnone functions

    The check for naked/optnone was insufficient for different reasons. We
    now check before we initialize an abstract attribute and we do it for
    all abstract attributes. — jdoerfert / ViewSVN
  4. [SROA] Reuse existing lifetime markers if possible

    Summary:
    If the underlying alloca did not change, we do not necessarily need new
    lifetime markers. This patch adds a check and reuses the old ones if
    possible.

    Reviewers: reames, ssarda, t.p.northover, hfinkel

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68900 — jdoerfert / ViewSVN
  5. Revert r374663 "[clang-format] Proposal for clang-format to give compiler style warnings"

    The test fails on macOS and looks a bit wrong, see comments on the review.

    Also revert follow-up r374686. — nico / ViewSVN
  6. gn build: (manually) merge r374663 — nico / ViewSVN
  7. [libc++][test] Silence MSVC warning in std::optional test

    `make_optional<string>(4, 'X')` passes `4` (an `int`) as the first argument to `string`'s `(size_t, charT)` constructor, triggering a signed/unsigned mismatch warning when compiling with MSVC at `/W4`. The incredibly simple fix is to instead use an unsigned literal (`4u`). — caseycarter / ViewSVN
  8. Revert r374648: "Reland r374388: [lit] Make internal diff work in pipelines"

    This series of patches still breaks a Windows bot. — jdenny / ViewSVN
  9. Revert r374649: "Reland r374389: [lit] Clean up internal diff's encoding handling"

    This series of patches still breaks a Windows bot. — jdenny / ViewSVN
  10. Revert r374650: "Reland r374390: [lit] Extend internal diff to support `-` argument"

    This series of patches still breaks a Windows bot. — jdenny / ViewSVN
  11. Revert 374651: "Reland r374392: [lit] Extend internal diff to support -U"

    This series of patches still breaks a Windows bot. — jdenny / ViewSVN
  12. Revert r374652: "[lit] Fix internal diff's --strip-trailing-cr and use it"

    This series of patches still breaks a Windows bot. — jdenny / ViewSVN
  13. Revert r374653: "[lit] Fix a few oversights in r374651 that broke some bots"

    This series of patches still breaks a Windows bot. — jdenny / ViewSVN
  14. Revert r374665: "[lit] Try yet again to fix new tests that fail on Windows bots"

    This series of patches still breaks a Windows bot. — jdenny / ViewSVN
  15. Revert r374666: "[lit] Adjust error handling for decode introduced by r374665"

    This series of patches still breaks a Windows bot. — jdenny / ViewSVN
  16. Revert r374671: "[lit] Try errors="ignore" for decode introduced by r374665"

    This series of patches still breaks a Windows bot. — jdenny / ViewSVN
  17. [X86] scaleShuffleMask - use size_t Scale to avoid overflow warnings — rksimon / ViewSVN

#5524 (Oct 12, 2019 11:12:27 AM)

  1. SymbolRecord - consistently use explicit for single operand constructors — rksimon / ViewSVN
  2. SymbolRecord - fix uninitialized variable warnings. NFCI. — rksimon / ViewSVN
  3. [lit] Try errors="ignore" for decode introduced by r374665

    Still trying to fix the same error as in r374666. — jdenny / ViewSVN

#5523 (Oct 12, 2019 10:19:01 AM)

  1. [NFC][LoopIdiom] Adjust FIXME to be self-explanatory — lebedevri / ViewSVN
  2. Replace for-loop of SmallVector::push_back with SmallVector::append. NFCI. — rksimon / ViewSVN
  3. Fix cppcheck shadow variable name warnings. NFCI. — rksimon / ViewSVN
  4. [X86] Use any_of/all_of patterns in shuffle mask pattern recognisers. NFCI. — rksimon / ViewSVN
  5. [lit] Adjust error handling for decode introduced by r374665

    On that decode, Windows bots fail with:

    ```
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)
    ```

    That's the same error as before r374665 except it's now at the decode
    before the write to stdout. — jdenny / ViewSVN
  6. [lit] Try yet again to fix new tests that fail on Windows bots

    I seem to have misread the bot logs on my last attempt.  When lit's
    internal diff runs on Windows under Python 2.7, it's text diffs not
    binary diffs that need decoding to avoid this error when writing the
    diff to stdout:

    ```
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)
    ```

    There is no `decode` attribute in this case under Python 3.6.8 under
    Ubuntu, so this patch checks for the `decode` attribute before using
    it here.  Hopefully nothing else is needed when `decode` isn't
    available.

    It might take a couple more attempts to figure out what error
    handling, if any, is needed for this decoding. — jdenny / ViewSVN
  7. Revert r374657: "[lit] Try again to fix new tests that fail on Windows bots" — jdenny / ViewSVN

#5522 (Oct 12, 2019 8:42:20 AM)

  1. [clang-format] Proposal for clang-format to give compiler style warnings

    Summary:
    Related somewhat to {D29039}

    On seeing a quote on twitter by @invalidop

    > If it's not formatted with clang-format it's a build error.

    This made me want to change the way I use clang-format into a tool that could optionally show me where my source code violates clang-format syle.

    When I'm making a change to clang-format itself, one thing I like to do to test the change is to ensure I didn't cause a huge wave of changes, what I want to do is simply run this on a known formatted directory and see if any new differences arrive in a manner I'm used to.

    This started me thinking that we should allow build systems to run clang-format on a whole tree and emit compiler style warnings about files that fail clang-format in a form that would make them as a warning in most build systems and because those build systems range in their construction I don't think its unreasonable to NOT expect them to have to do the directory searching or parsing the output replacements themselves, but simply transform that into an error code when there are changes required.

    I am starting this by suggesing adding a -n or -dry-run command line argument which would emit a warning/error of the form

    Support for various common compiler command line argumuments like '-Werror' and '-ferror-limit' could make this very flexible to be integrated into build systems and CI systems.

    ```
    > $ /usr/bin/clang-format --dry-run ClangFormat.cpp -ferror-limit=3 -fcolor-diagnostics
    > ClangFormat.cpp:54:29: warning: code should be clang-formatted [-Wclang-format-violations]
    > static cl::list<std::string>
    >                             ^
    > ClangFormat.cpp:55:20: warning: code should be clang-formatted [-Wclang-format-violations]
    > LineRanges("lines", cl::desc("<start line>:<end line> - format a range of\n"
    >                    ^
    > ClangFormat.cpp:55:77: warning: code should be clang-formatted [-Wclang-format-violations]
    > LineRanges("lines", cl::desc("<start line>:<end line> - format a range of\n"
    >                                                                             ^
    ```

    Reviewers: mitchell-stellar, klimek, owenpan

    Reviewed By: klimek

    Subscribers: mgorny, cfe-commits

    Tags: #clang-format, #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D68554 — paulhoad / ViewSVN
  2. [LoopIdiomRecognize] Recommit: BCmp loop idiom recognition

    Summary:
    This is a recommit, this originally landed in rL370454 but was
    subsequently reverted in  rL370788 due to
    https://bugs.llvm.org/show_bug.cgi?id=43206
    The reduced testcase was added to bcmp-negative-tests.ll
    as @pr43206_different_loops - we must ensure that the SCEV's
    we got are both for the same loop we are currently investigating.

    Original commit message:

    @mclow.lists brought up this issue up in IRC.
    It is a reasonably common problem to compare some two values for equality.
    Those may be just some integers, strings or arrays of integers.

    In C, there is `memcmp()`, `bcmp()` functions.
    In C++, there exists `std::equal()` algorithm.
    One can also write that function manually.

    libstdc++'s `std::equal()` is specialized to directly call `memcmp()` for
    various types, but not `std::byte` from C++2a. https://godbolt.org/z/mx2ejJ

    libc++ does not do anything like that, it simply relies on simple C++'s
    `operator==()`. https://godbolt.org/z/er0Zwf (GOOD!)

    So likely, there exists a certain performance opportunities.
    Let's compare performance of naive `std::equal()` (no `memcmp()`) with one that
    is using `memcmp()` (in this case, compiled with modified compiler). {F8768213}

    ```
    #include <algorithm>
    #include <cmath>
    #include <cstdint>
    #include <iterator>
    #include <limits>
    #include <random>
    #include <type_traits>
    #include <utility>
    #include <vector>

    #include "benchmark/benchmark.h"

    template <class T>
    bool equal(T* a, T* a_end, T* b) noexcept {
      for (; a != a_end; ++a, ++b) {
        if (*a != *b) return false;
      }
      return true;
    }

    template <typename T>
    std::vector<T> getVectorOfRandomNumbers(size_t count) {
      std::random_device rd;
      std::mt19937 gen(rd());
      std::uniform_int_distribution<T> dis(std::numeric_limits<T>::min(),
                                           std::numeric_limits<T>::max());
      std::vector<T> v;
      v.reserve(count);
      std::generate_n(std::back_inserter(v), count,
                      [&dis, &gen]() { return dis(gen); });
      assert(v.size() == count);
      return v;
    }

    struct Identical {
      template <typename T>
      static std::pair<std::vector<T>, std::vector<T>> Gen(size_t count) {
        auto Tmp = getVectorOfRandomNumbers<T>(count);
        return std::make_pair(Tmp, std::move(Tmp));
      }
    };

    struct InequalHalfway {
      template <typename T>
      static std::pair<std::vector<T>, std::vector<T>> Gen(size_t count) {
        auto V0 = getVectorOfRandomNumbers<T>(count);
        auto V1 = V0;
        V1[V1.size() / size_t(2)]++;  // just change the value.
        return std::make_pair(std::move(V0), std::move(V1));
      }
    };

    template <class T, class Gen>
    void BM_bcmp(benchmark::State& state) {
      const size_t Length = state.range(0);

      const std::pair<std::vector<T>, std::vector<T>> Data =
          Gen::template Gen<T>(Length);
      const std::vector<T>& a = Data.first;
      const std::vector<T>& b = Data.second;
      assert(a.size() == Length && b.size() == a.size());

      benchmark::ClobberMemory();
      benchmark::DoNotOptimize(a);
      benchmark::DoNotOptimize(a.data());
      benchmark::DoNotOptimize(b);
      benchmark::DoNotOptimize(b.data());

      for (auto _ : state) {
        const bool is_equal = equal(a.data(), a.data() + a.size(), b.data());
        benchmark::DoNotOptimize(is_equal);
      }
      state.SetComplexityN(Length);
      state.counters["eltcnt"] =
          benchmark::Counter(Length, benchmark::Counter::kIsIterationInvariant);
      state.counters["eltcnt/sec"] =
          benchmark::Counter(Length, benchmark::Counter::kIsIterationInvariantRate);
      const size_t BytesRead = 2 * sizeof(T) * Length;
      state.counters["bytes_read/iteration"] =
          benchmark::Counter(BytesRead, benchmark::Counter::kDefaults,
                             benchmark::Counter::OneK::kIs1024);
      state.counters["bytes_read/sec"] = benchmark::Counter(
          BytesRead, benchmark::Counter::kIsIterationInvariantRate,
          benchmark::Counter::OneK::kIs1024);
    }

    template <typename T>
    static void CustomArguments(benchmark::internal::Benchmark* b) {
      const size_t L2SizeBytes = []() {
        for (const benchmark::CPUInfo::CacheInfo& I :
             benchmark::CPUInfo::Get().caches) {
          if (I.level == 2) return I.size;
        }
        return 0;
      }();
      // What is the largest range we can check to always fit within given L2 cache?
      const size_t MaxLen = L2SizeBytes / /*total bufs*/ 2 /
                            /*maximal elt size*/ sizeof(T) / /*safety margin*/ 2;
      b->RangeMultiplier(2)->Range(1, MaxLen)->Complexity(benchmark::oN);
    }

    BENCHMARK_TEMPLATE(BM_bcmp, uint8_t, Identical)
        ->Apply(CustomArguments<uint8_t>);
    BENCHMARK_TEMPLATE(BM_bcmp, uint16_t, Identical)
        ->Apply(CustomArguments<uint16_t>);
    BENCHMARK_TEMPLATE(BM_bcmp, uint32_t, Identical)
        ->Apply(CustomArguments<uint32_t>);
    BENCHMARK_TEMPLATE(BM_bcmp, uint64_t, Identical)
        ->Apply(CustomArguments<uint64_t>);

    BENCHMARK_TEMPLATE(BM_bcmp, uint8_t, InequalHalfway)
        ->Apply(CustomArguments<uint8_t>);
    BENCHMARK_TEMPLATE(BM_bcmp, uint16_t, InequalHalfway)
        ->Apply(CustomArguments<uint16_t>);
    BENCHMARK_TEMPLATE(BM_bcmp, uint32_t, InequalHalfway)
        ->Apply(CustomArguments<uint32_t>);
    BENCHMARK_TEMPLATE(BM_bcmp, uint64_t, InequalHalfway)
        ->Apply(CustomArguments<uint64_t>);
    ```
    {F8768210}
    ```
    $ ~/src/googlebenchmark/tools/compare.py --no-utest benchmarks build-{old,new}/test/llvm-bcmp-bench
    RUNNING: build-old/test/llvm-bcmp-bench --benchmark_out=/tmp/tmpb6PEUx
    2019-04-25 21:17:11
    Running build-old/test/llvm-bcmp-bench
    Run on (8 X 4000 MHz CPU s)
    CPU Caches:
      L1 Data 16K (x8)
      L1 Instruction 64K (x4)
      L2 Unified 2048K (x4)
      L3 Unified 8192K (x1)
    Load Average: 0.65, 3.90, 4.14
    ---------------------------------------------------------------------------------------------------
    Benchmark                                         Time             CPU   Iterations UserCounters...
    ---------------------------------------------------------------------------------------------------
    <...>
    BM_bcmp<uint8_t, Identical>/512000           432131 ns       432101 ns         1613 bytes_read/iteration=1000k bytes_read/sec=2.20706G/s eltcnt=825.856M eltcnt/sec=1.18491G/s
    BM_bcmp<uint8_t, Identical>_BigO               0.86 N          0.86 N
    BM_bcmp<uint8_t, Identical>_RMS                   8 %             8 %
    <...>
    BM_bcmp<uint16_t, Identical>/256000          161408 ns       161409 ns         4027 bytes_read/iteration=1000k bytes_read/sec=5.90843G/s eltcnt=1030.91M eltcnt/sec=1.58603G/s
    BM_bcmp<uint16_t, Identical>_BigO              0.67 N          0.67 N
    BM_bcmp<uint16_t, Identical>_RMS                 25 %            25 %
    <...>
    BM_bcmp<uint32_t, Identical>/128000           81497 ns        81488 ns         8415 bytes_read/iteration=1000k bytes_read/sec=11.7032G/s eltcnt=1077.12M eltcnt/sec=1.57078G/s
    BM_bcmp<uint32_t, Identical>_BigO              0.71 N          0.71 N
    BM_bcmp<uint32_t, Identical>_RMS                 42 %            42 %
    <...>
    BM_bcmp<uint64_t, Identical>/64000            50138 ns        50138 ns        10909 bytes_read/iteration=1000k bytes_read/sec=19.0209G/s eltcnt=698.176M eltcnt/sec=1.27647G/s
    BM_bcmp<uint64_t, Identical>_BigO              0.84 N          0.84 N
    BM_bcmp<uint64_t, Identical>_RMS                 27 %            27 %
    <...>
    BM_bcmp<uint8_t, InequalHalfway>/512000      192405 ns       192392 ns         3638 bytes_read/iteration=1000k bytes_read/sec=4.95694G/s eltcnt=1.86266G eltcnt/sec=2.66124G/s
    BM_bcmp<uint8_t, InequalHalfway>_BigO          0.38 N          0.38 N
    BM_bcmp<uint8_t, InequalHalfway>_RMS              3 %             3 %
    <...>
    BM_bcmp<uint16_t, InequalHalfway>/256000     127858 ns       127860 ns         5477 bytes_read/iteration=1000k bytes_read/sec=7.45873G/s eltcnt=1.40211G eltcnt/sec=2.00219G/s
    BM_bcmp<uint16_t, InequalHalfway>_BigO         0.50 N          0.50 N
    BM_bcmp<uint16_t, InequalHalfway>_RMS             0 %             0 %
    <...>
    BM_bcmp<uint32_t, InequalHalfway>/128000      49140 ns        49140 ns        14281 bytes_read/iteration=1000k bytes_read/sec=19.4072G/s eltcnt=1.82797G eltcnt/sec=2.60478G/s
    BM_bcmp<uint32_t, InequalHalfway>_BigO         0.40 N          0.40 N
    BM_bcmp<uint32_t, InequalHalfway>_RMS            18 %            18 %
    <...>
    BM_bcmp<uint64_t, InequalHalfway>/64000       32101 ns        32099 ns        21786 bytes_read/iteration=1000k bytes_read/sec=29.7101G/s eltcnt=1.3943G eltcnt/sec=1.99381G/s
    BM_bcmp<uint64_t, InequalHalfway>_BigO         0.50 N          0.50 N
    BM_bcmp<uint64_t, InequalHalfway>_RMS             1 %             1 %
    RUNNING: build-new/test/llvm-bcmp-bench --benchmark_out=/tmp/tmpQ46PP0
    2019-04-25 21:19:29
    Running build-new/test/llvm-bcmp-bench
    Run on (8 X 4000 MHz CPU s)
    CPU Caches:
      L1 Data 16K (x8)
      L1 Instruction 64K (x4)
      L2 Unified 2048K (x4)
      L3 Unified 8192K (x1)
    Load Average: 1.01, 2.85, 3.71
    ---------------------------------------------------------------------------------------------------
    Benchmark                                         Time             CPU   Iterations UserCounters...
    ---------------------------------------------------------------------------------------------------
    <...>
    BM_bcmp<uint8_t, Identical>/512000            18593 ns        18590 ns        37565 bytes_read/iteration=1000k bytes_read/sec=51.2991G/s eltcnt=19.2333G eltcnt/sec=27.541G/s
    BM_bcmp<uint8_t, Identical>_BigO               0.04 N          0.04 N
    BM_bcmp<uint8_t, Identical>_RMS                  37 %            37 %
    <...>
    BM_bcmp<uint16_t, Identical>/256000           18950 ns        18948 ns        37223 bytes_read/iteration=1000k bytes_read/sec=50.3324G/s eltcnt=9.52909G eltcnt/sec=13.511G/s
    BM_bcmp<uint16_t, Identical>_BigO              0.08 N          0.08 N
    BM_bcmp<uint16_t, Identical>_RMS                 34 %            34 %
    <...>
    BM_bcmp<uint32_t, Identical>/128000           18627 ns        18627 ns        37895 bytes_read/iteration=1000k bytes_read/sec=51.198G/s eltcnt=4.85056G eltcnt/sec=6.87168G/s
    BM_bcmp<uint32_t, Identical>_BigO              0.16 N          0.16 N
    BM_bcmp<uint32_t, Identical>_RMS                 35 %            35 %
    <...>
    BM_bcmp<uint64_t, Identical>/64000            18855 ns        18855 ns        37458 bytes_read/iteration=1000k bytes_read/sec=50.5791G/s eltcnt=2.39731G eltcnt/sec=3.3943G/s
    BM_bcmp<uint64_t, Identical>_BigO              0.32 N          0.32 N
    BM_bcmp<uint64_t, Identical>_RMS                 33 %            33 %
    <...>
    BM_bcmp<uint8_t, InequalHalfway>/512000        9570 ns         9569 ns        73500 bytes_read/iteration=1000k bytes_read/sec=99.6601G/s eltcnt=37.632G eltcnt/sec=53.5046G/s
    BM_bcmp<uint8_t, InequalHalfway>_BigO          0.02 N          0.02 N
    BM_bcmp<uint8_t, InequalHalfway>_RMS             29 %            29 %
    <...>
    BM_bcmp<uint16_t, InequalHalfway>/256000       9547 ns         9547 ns        74343 bytes_read/iteration=1000k bytes_read/sec=99.8971G/s eltcnt=19.0318G eltcnt/sec=26.8159G/s
    BM_bcmp<uint16_t, InequalHalfway>_BigO         0.04 N          0.04 N
    BM_bcmp<uint16_t, InequalHalfway>_RMS            29 %            29 %
    <...>
    BM_bcmp<uint32_t, InequalHalfway>/128000       9396 ns         9394 ns        73521 bytes_read/iteration=1000k bytes_read/sec=101.518G/s eltcnt=9.41069G eltcnt/sec=13.6255G/s
    BM_bcmp<uint32_t, InequalHalfway>_BigO         0.08 N          0.08 N
    BM_bcmp<uint32_t, InequalHalfway>_RMS            30 %            30 %
    <...>
    BM_bcmp<uint64_t, InequalHalfway>/64000        9499 ns         9498 ns        73802 bytes_read/iteration=1000k bytes_read/sec=100.405G/s eltcnt=4.72333G eltcnt/sec=6.73808G/s
    BM_bcmp<uint64_t, InequalHalfway>_BigO         0.16 N          0.16 N
    BM_bcmp<uint64_t, InequalHalfway>_RMS            28 %            28 %
    Comparing build-old/test/llvm-bcmp-bench to build-new/test/llvm-bcmp-bench
    Benchmark                                                  Time             CPU      Time Old      Time New       CPU Old       CPU New
    ---------------------------------------------------------------------------------------------------------------------------------------
    <...>
    BM_bcmp<uint8_t, Identical>/512000                      -0.9570         -0.9570        432131         18593        432101         18590
    <...>
    BM_bcmp<uint16_t, Identical>/256000                     -0.8826         -0.8826        161408         18950        161409         18948
    <...>
    BM_bcmp<uint32_t, Identical>/128000                     -0.7714         -0.7714         81497         18627         81488         18627
    <...>
    BM_bcmp<uint64_t, Identical>/64000                      -0.6239         -0.6239         50138         18855         50138         18855
    <...>
    BM_bcmp<uint8_t, InequalHalfway>/512000                 -0.9503         -0.9503        192405          9570        192392          9569
    <...>
    BM_bcmp<uint16_t, InequalHalfway>/256000                -0.9253         -0.9253        127858          9547        127860          9547
    <...>
    BM_bcmp<uint32_t, InequalHalfway>/128000                -0.8088         -0.8088         49140          9396         49140          9394
    <...>
    BM_bcmp<uint64_t, InequalHalfway>/64000                 -0.7041         -0.7041         32101          9499         32099          9498
    ```

    What can we tell from the benchmark?
    * Performance of naive equality check somewhat improves with element size,
      maxing out at eltcnt/sec=1.58603G/s for uint16_t, or bytes_read/sec=19.0209G/s
      for uint64_t. I think, that instability implies performance problems.
    * Performance of `memcmp()`-aware benchmark always maxes out at around
      bytes_read/sec=51.2991G/s for every type. That is 2.6x the throughput of the
      naive variant!
    * eltcnt/sec metric for the `memcmp()`-aware benchmark maxes out at
      eltcnt/sec=27.541G/s for uint8_t (was: eltcnt/sec=1.18491G/s, so 24x) and
      linearly decreases with element size.
      For uint64_t, it's ~4x+ the elements/second.
    * The call obvious is more pricey than the loop, with small element count.
      As it can be seen from the full output {F8768210}, the `memcmp()` is almost
      universally worse, independent of the element size (and thus buffer size) when
      element count is less than 8.

    So all in all, bcmp idiom does indeed pose untapped performance headroom.
    This diff does implement said idiom recognition. I think a reasonable test
    coverage is present, but do tell if there is anything obvious missing.

    Now, quality. This does succeed to build and pass the test-suite, at least
    without any non-bundled elements. {F8768216} {F8768217}
    This transform fires 91 times:
    ```
    $ /build/test-suite/utils/compare.py -m loop-idiom.NumBCmp result-new.json
    Tests: 1149
    Metric: loop-idiom.NumBCmp

    Program                                         result-new

    MultiSourc...Benchmarks/7zip/7zip-benchmark    79.00
    MultiSource/Applications/d/make_dparser         3.00
    SingleSource/UnitTests/vla                      2.00
    MultiSource/Applications/Burg/burg              1.00
    MultiSourc.../Applications/JM/lencod/lencod     1.00
    MultiSource/Applications/lemon/lemon            1.00
    MultiSource/Benchmarks/Bullet/bullet            1.00
    MultiSourc...e/Benchmarks/MallocBench/gs/gs     1.00
    MultiSourc...gs-C/TimberWolfMC/timberwolfmc     1.00
    MultiSourc...Prolangs-C/simulator/simulator     1.00
    ```
    The size changes are:
    I'm not sure what's going on with SingleSource/UnitTests/vla.test yet, did not look.
    ```
    $ /build/test-suite/utils/compare.py -m size..text result-{old,new}.json --filter-hash
    Tests: 1149
    Same hash: 907 (filtered out)
    Remaining: 242
    Metric: size..text

    Program                                        result-old result-new diff
    test-suite...ingleSource/UnitTests/vla.test   753.00     833.00     10.6%
    test-suite...marks/7zip/7zip-benchmark.test   1001697.00 966657.00  -3.5%
    test-suite...ngs-C/simulator/simulator.test   32369.00   32321.00   -0.1%
    test-suite...plications/d/make_dparser.test   89585.00   89505.00   -0.1%
    test-suite...ce/Applications/Burg/burg.test   40817.00   40785.00   -0.1%
    test-suite.../Applications/lemon/lemon.test   47281.00   47249.00   -0.1%
    test-suite...TimberWolfMC/timberwolfmc.test   250065.00  250113.00   0.0%
    test-suite...chmarks/MallocBench/gs/gs.test   149889.00  149873.00  -0.0%
    test-suite...ications/JM/lencod/lencod.test   769585.00  769569.00  -0.0%
    test-suite.../Benchmarks/Bullet/bullet.test   770049.00  770049.00   0.0%
    test-suite...HMARK_ANISTROPIC_DIFFUSION/128    NaN        NaN        nan%
    test-suite...HMARK_ANISTROPIC_DIFFUSION/256    NaN        NaN        nan%
    test-suite...CHMARK_ANISTROPIC_DIFFUSION/64    NaN        NaN        nan%
    test-suite...CHMARK_ANISTROPIC_DIFFUSION/32    NaN        NaN        nan%
    test-suite...ENCHMARK_BILATERAL_FILTER/64/4    NaN        NaN        nan%
    Geomean difference                                                   nan%
             result-old    result-new       diff
    count  1.000000e+01  10.00000      10.000000
    mean   3.152090e+05  311695.40000  0.006749
    std    3.790398e+05  372091.42232  0.036605
    min    7.530000e+02  833.00000    -0.034981
    25%    4.243300e+04  42401.00000  -0.000866
    50%    1.197370e+05  119689.00000 -0.000392
    75%    6.397050e+05  639705.00000 -0.000005
    max    1.001697e+06  966657.00000  0.106242
    ```

    I don't have timings though.

    And now to the code. The basic idea is to completely replace the whole loop.
    If we can't fully kill it, don't transform.
    I have left one or two comments in the code, so hopefully it can be understood.

    Also, there is a few TODO's that i have left for follow-ups:
    * widening of `memcmp()`/`bcmp()`
    * step smaller than the comparison size
    * Metadata propagation
    * more than two blocks as long as there is still a single backedge?
    * ???

    Reviewers: reames, fhahn, mkazantsev, chandlerc, craig.topper, courbet

    Reviewed By: courbet

    Subscribers: miyuki, hiraditya, xbolva00, nikic, jfb, gchatelet, courbet, llvm-commits, mclow.lists

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D61144 — lebedevri / ViewSVN
  3. [NFC][LoopIdiom] Add bcmp loop idiom miscompile test from PR43206.

    The transform forgot to check SCEV loop scopes.

    https://bugs.llvm.org/show_bug.cgi?id=43206 — lebedevri / ViewSVN
  4. [NFC][LoopIdiom] Move one bcmp test into the proper place — lebedevri / ViewSVN
  5. remove an useless allocation found by scan-build - the new Dead nested assignment check — sylvestre / ViewSVN
  6. [X86][SSE] Avoid unnecessary PMOVZX in v4i8 sum reduction

    This should go away once D66004 has landed and we can simplify shuffle chains using demanded elts. — rksimon / ViewSVN
  7. [lit] Try again to fix new tests that fail on Windows bots

    Based on the bot logs, when lit's internal diff runs on Windows, it
    looks like binary diffs must be decoded also for Python 2.7.
    Otherwise, writing the diff to stdout fails with:

    ```
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)
    ```

    I did not need to decode using Python 2.7.15 under Ubuntu.  When I do
    it anyway in that case, `errors="backslashreplace"` fails for me:

    ```
    TypeError: don't know how to handle UnicodeDecodeError in error callback
    ```

    However, `errors="ignore"` works, so this patch uses that, hoping
    it'll work on Windows as well.

    This patch leaves `errors="backslashreplace"` for Python >= 3.5 as
    there's no evidence yet that doesn't work and it produces more
    informative binary diffs.  This patch also adjusts some lit tests to
    succeed for either error handler.

    This patch adjusts changes introduced by D68664. — jdenny / ViewSVN
  8. Revert r374654: "[lit] Try to fix new tests that fail on Windows bots" — jdenny / ViewSVN
  9. [CostModel][X86] Improve sum reduction costs.

    I can't see any notable differences in costs between SSE2 and SSE42 arches for FADD/ADD reduction, so I've lowered the target to just SSE2.

    I've also added vXi8 sum reduction costs in line with the PSADBW codegen and discussions on PR42674. — rksimon / ViewSVN
  10. [lit] Try to fix new tests that fail on Windows bots — jdenny / ViewSVN
  11. [lit] Fix a few oversights in r374651 that broke some bots — jdenny / ViewSVN

#5519 (Oct 11, 2019 11:04:24 PM)

  1. Revert 374629 "[sancov] Accommodate sancov and coverage report server for use under Windows"

    http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/27650/steps/ninja%20check%201/logs/stdio
    http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759
    http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/15095
    http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/21075
    http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759 — Vitaly Buka / ViewSVN
  2. NFC: clang-format rL374420 and adjust comment wording

    The commit of rL374420 had various formatting issues, including lines
    that exceed 80 columns. This patch applies `git clang-format` on the
    changes from commit 13bd3ef40d8b1586f26a022e01b21e56c91e05bd.

    It further adjusts a comment to clarify the domain of inputs upon which
    a newly added function is meant to operate. The adjustment to the
    comment was suggested in a post-commit comment on D68721 and discussed
    off-list with @sfertile. — hubert.reinterpretcast / ViewSVN

#5518 (Oct 11, 2019 8:52:45 PM)

  1. recommit: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize

    In loop-vectorize, interleave count and vector factor depend on target register number. Currently, it does not
    estimate different register pressure for different register class separately(especially for scalar type,
    float type should not be on the same position with int type), so it's not accurate. Specifically,
    it causes too many times interleaving/unrolling, result in too many register spills in loop body and hurting performance.

    So we need classify the register classes in IR level, and importantly these are abstract register classes,
    and are not the target register class of backend provided in td file. It's used to establish the mapping between
    the types of IR values and the number of simultaneous live ranges to which we'd like to limit for some set of those types.

    For example, POWER target, register num is special when VSX is enabled. When VSX is enabled, the number of int scalar register is 32(GPR),
    float is 64(VSR), but for int and float vector register both are 64(VSR). So there should be 2 kinds of register class when vsx is enabled,
    and 3 kinds of register class when VSX is NOT enabled.

    It runs on POWER target, it makes big(+~30%) performance improvement in one specific bmk(503.bwaves_r) of spec2017 and no other obvious degressions.

    Differential revision: https://reviews.llvm.org/D67148 — wuzish / ViewSVN
  2. [clang][IFS] Updating tests to pass on -fvisibility=hidden builds (NFCi).

    Special thanks to JamesNagurne who got to the bottom of this; landing this on
    his behalf.

    Differential Revision: https://reviews.llvm.org/D68897 — zer0 / ViewSVN

#5517 (Oct 11, 2019 7:39:27 PM)

  1. [sancov] Accommodate sancov and coverage report server for use under Windows

    Summary:
    This patch makes the following changes to SanCov and its complementary Python script in order to resolve issues pertaining to non-UNIX file paths in JSON symbolization information:
    * Convert all paths to use forward slash.
    * Update `coverage-report-server.py` to correctly handle paths to sources which contain spaces.
    * Remove Linux platform restriction for all SanCov unit tests. All SanCov tests passed when ran on my local Windows machine.

    Patch by Douglas Gliner.

    Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman

    Reviewed By: vitalybuka

    Subscribers: vsk, Dor1s, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D51018 — Vitaly Buka / ViewSVN
  2. [sancov] Use LLVM Support library JSON writer in favor of individual implementation

    Summary:
    In this diff, I've replaced the individual implementation of `JSONWriter` with `json::OStream` provided by `llvm/Support/JSON.h`.

    Important Note: The output format of the JSON is considerably different compared to the original implementation. Important differences include:
    * New line for each entry in an array (should make diffs cleaner)
    * No space between keys and colon in attributed object entries.
    * Attributes with empty strings will now print the attribute name and a quote pair rather than excluding the attribute altogether

    Examples of these differences can be seen in the changes to the sancov tests which compare the JSON output.

    Patch by Douglas Gliner.

    Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman

    Subscribers: mehdi_amini, dexonsmith, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68752 — Vitaly Buka / ViewSVN
  3. Slightly relax restriction on exact order arguments must appear. — dyung / ViewSVN
  4. [asan] Return true from instrumentModule

    createSanitizerCtorAndInitFunctions always change the module. — Vitaly Buka / ViewSVN

#5516 (Oct 11, 2019 6:30:59 PM)

  1. DebugInfo: Fix msan use-of-uninitialized exposed by r374600 — dblaikie / ViewSVN
  2. [llvm-profdata] Make "malformed-ptr-to-counter-array.test" textual

    As pointed out in https://reviews.llvm.org/D66979 post-commit, making
    this test textual would make it more maintainable.

    Differential Revision: https://reviews.llvm.org/D68718 — Vedant Kumar / ViewSVN
  3. [X86] Fold a VTRUNCS/VTRUNCUS+store into a saturating truncating store.

    We already did this for VTRUNCUS with a specific combination of
    types. This extends this to VTRUNCS and handles any types where
    a truncating store is legal. — ctopper / ViewSVN
  4. [X86] Add test case showing missing opportunity to fold vmovsdb into a store after type legalization. NFC — ctopper / ViewSVN

#5515 (Oct 11, 2019 4:53:34 PM)

  1. DebugInfo: Reduce the scope of some variables related to debug_ranges emission

    Minor tidy up/NFC — dblaikie / ViewSVN
  2. [libFuzzer] Don't prefix absolute paths in fuchsia.

    The ExecuteCommand function in fuchsia used to prefix the
    getOutputFile for each command run with the artifact_prefix flag if
    it was available, because fuchsia components don't have a writable working
    directory. However, if a file with a global path is provided, fuchsia
    should honor that.

    An example of this is using the global /tmp directory to store stuff.
    In fuchsia it ended up being translated to data///tmp, whereas we want
    to make sure it is using /tmp (which is available to components using the
    isolated-temp feature).

    To test this I made the change, compiled fuchsia with this toolchain and
    ran a fuzzer with the -fork=1 flag (that mode makes use of the /tmp
    directory). I also tested that normal fuzzing workflow was not affected
    by this.

    Author: charco (Marco Vanotti)
    Differential Revision: https://reviews.llvm.org/D68774 — jakehehrlich / ViewSVN
  3. gn build: (manually) merge r374606 better — nico / ViewSVN
  4. gn build: Merge r235758 — gnsyncbot / ViewSVN
  5. gn build: Cmanually) merge r374590 — nico / ViewSVN

#5514 (Oct 11, 2019 3:56:04 PM)

  1. [AMDGPU] Use GCN prefix in dpp_combine.mir. NFC. — rampitec / ViewSVN
  2. [AMDGPU] link dpp pseudos and real instructions on gfx10

    This defaults to zero fi operand, but we do not expose it
    anyway. Should we expose it later it needs to be added to
    the pseudo.

    This enables dpp combining on gfx10.

    Differential Revision: https://reviews.llvm.org/D68888 — rampitec / ViewSVN

#5513 (Oct 11, 2019 2:56:16 PM)

  1. [lit] Small cleanups in main.py

    * Extract separate function for running tests from main
    * Push single-usage imports to point of usage
    * Remove unnecessary sys.exit(0) calls

    Reviewed By: rnk

    Differential Revision: https://reviews.llvm.org/D68836 — yln / ViewSVN
  2. [lit] Change regex filter to ignore case

    Make regex filter `--filter=REGEX` option more lenient via
    `re.IGNORECASE`.

    Reviewed By: yln

    Differential Revision: https://reviews.llvm.org/D68834 — yln / ViewSVN
  3. DebugInfo: Use base address selection entries for debug_loc

    Unify the range and loc emission (for both DWARFv4 and DWARFv5 style lists) and take advantage of that unification to use strategic base addresses for loclists.

    Differential Revision: https://reviews.llvm.org/D68620 — dblaikie / ViewSVN
  4. [mips] Remove unused local variables. NFC — atanasyan / ViewSVN
  5. [mips] Store 64-bit `li.d' operand as a single 8-byte value

    Now assembler generates two consecutive `.4byte` directives to store
    64-bit `li.d' operand. The first directive stores high 4-byte of the
    value. The second directive stores low 4-byte of the value. But on
    64-bit system we load this value at once and get wrong result if the
    system is little-endian.

    This patch fixes the bug. It stores the `li.d' operand as a single
    8-byte value.

    Differential Revision: https://reviews.llvm.org/D68778 — atanasyan / ViewSVN
  6. [mips] Use less instruction to load zero into FPR by li.s / li.d pseudos

    If `li.s` or `li.d` loads zero into a FPR, it's not necessary to load
    zero into `at` GPR register and then move its value into a floating
    point register. We can use as a source register the `zero / $0` one.

    Differential Revision: https://reviews.llvm.org/D68777 — atanasyan / ViewSVN
  7. [ObjC] Remove default parameter no caller was providing. NFC intended.

    Currently there is no need to make ObjCTypeParamType have a canonical type
    different from the one in corresponding ObjCTypeParamDecl. So remove the
    corresponding unused API. — vsapsai / ViewSVN
  8. [GISel][UnitTest] Fix a bunch of tests that were not doing anything

    After r368065, all the tests using GISelMITest must call setUp() before
    doing anything, otherwise the TargetMachine is not going to be set up.
    A few tests added after that commit were not doing that and ended up
    testing effectively nothing.

    Fix the setup of all the tests and fix the failing tests. — qcolombet / ViewSVN

#5512 (Oct 11, 2019 1:40:51 PM)

  1. Release notes: Add the option WarnForDeadNestedAssignments
    https://reviews.llvm.org/D66733 — sylvestre / ViewSVN
  2. Revert 374373: [Codegen] Alter the default promotion for saturating adds and subs

    This commit is not extending the promoted integers as it should. Reverting
    whilst I look into the details. — dmgreen / ViewSVN
  3. [Mips][llvm-exegesis] Add a Mips target

    The target does just enough to be able to run llvm-exegesis in latency
    mode for at least some opcodes.

    Patch by Miloš Stojanović.

    Differential Revision: https://reviews.llvm.org/D68649 — atanasyan / ViewSVN
  4. [GISel][CallLowering] Enable vector support in argument lowering

    The exciting code is actually already enough to handle the splitting
    of vector arguments but we were lacking a test case.

    This commit adds a test case for vector argument lowering involving
    splitting and enable the related support in call lowering. — qcolombet / ViewSVN
  5. [MachineIRBuilder] Fix an assertion failure with buildMerge

    Teach buildMerge how to deal with scalar to vector kind of requests.

    Prior to this patch, buildMerge would issue either a G_MERGE_VALUES
    when all the vregs are scalars or a G_CONCAT_VECTORS when the destination
    vreg is a vector.
    G_CONCAT_VECTORS was actually not the proper instruction when the source
    vregs were scalars and the compiler would assert that the sources must
    be vectors. Instead we want is to issue a G_BUILD_VECTOR when we are
    in this situation.

    This patch fixes that. — qcolombet / ViewSVN

#5511 (Oct 11, 2019 12:41:28 PM)

  1. llvm-dwarfdump: Add verbose printing for debug_loclists — dblaikie / ViewSVN
  2. [Stats] Convert some ad-hoc header search stats to ALWAYS_ENABLED_STATISTIC.

    rdar://problem/55715134

    Reviewers: dsanders, bogner, rtereshin

    Reviewed By: dsanders

    Subscribers: hiraditya, jkorous, dexonsmith, ributzka, cfe-commits, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68252 — vsapsai / ViewSVN
  3. Suppress false-positive -Wdeprecated-volatile warning from __is_*_assignable(volatile T&, U). — rsmith / ViewSVN
  4. [X86][SSE] Add support for v4i8 add reduction — rksimon / ViewSVN
  5. gn build: (manually) merge r374110 — nico / ViewSVN
  6. [clang][IFS] Fixing assert in clang interface stubs for enums, records, typedefs

    The clang IFS ASTConsumer was asserting on enums, records (struct definitions in
    C), and typedefs. All it needs to do is skip them because the stub just needs to
    expose global object instances and functions.

    Differential Revision: https://reviews.llvm.org/D68859 — zer0 / ViewSVN
  7. Update clang module map for new excluded .def file. — rsmith / ViewSVN
  8. Fix test failure with 374562 on Hexagon

    __builtin_assume_aligned takes a size_t which is a 32 bit int on
    hexagon.  Thus, the constant gets converted to a 32 bit value, resulting
    in 0 not being a power of 2.  This patch changes the constant being
    passed to 2**30 so that it fails, but doesnt exceed 30 bits. — erichkeane / ViewSVN
  9. [AArch64] add tests for (v)select-of-constants; NFC

    These are copied from existing test files in x86/PPC. — spatel / ViewSVN
  10. [AArch64][SVE] Implement sdot and udot (lane) intrinsics

    Summary:
    Implements the following arithmetic intrinsics:
      - int_aarch64_sve_sdot
      - int_aarch64_sve_sdot_lane
      - int_aarch64_sve_udot
      - int_aarch64_sve_udot_lane

    This patch includes tests for the Subdivide4Argument type added by D67549

    Reviewers: sdesmalen, SjoerdMeijer, greened, rengolin, rovka

    Reviewed By: sdesmalen

    Subscribers: tschuett, kristof.beyls, rkruppe, psnobl, cfe-commits, llvm-commits

    Differential Revision: https://reviews.llvm.org/D67551 — kmclaughlin / ViewSVN
  11. [VPlan] Add moveAfter to VPRecipeBase.

    This patch adds a moveAfter method to VPRecipeBase, which can be used to
    move elements after other elements, across VPBasicBlocks, if necessary.

    Reviewers: dcaballe, hsaito, rengolin, hfinkel

    Reviewed By: dcaballe

    Differential Revision: https://reviews.llvm.org/D46825 — fhahn / ViewSVN
  12. [AIX] Use .space instead of .zero in assembly

    Summary:
    The AIX system assembler does not understand .zero, so we should prefer
    emitting .space.

    Subscribers: nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68815 — daltenty / ViewSVN
  13. Reland r374450 with Richard Smith's comments and test fixed.

    The behavior from the original patch has changed, since we're no longer
    allowing LLVM to just ignore the alignment.  Instead, we're just
    assuming the maximum possible alignment.

    Differential Revision: https://reviews.llvm.org/D68824 — erichkeane / ViewSVN
  14. [AMDGPU][MC][GFX9][GFX10] Corrected number of src operands for ds_[read/write]_addtid_b32

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

    Reviewers: arsenm, rampitec

    Differential Revision: https://reviews.llvm.org/D68787 — dpreobra / ViewSVN
  15. gn build: Merge r374558 — gnsyncbot / ViewSVN
  16. [AMDGPU][MC][GFX6][GFX7][GFX10] Added instructions buffer_atomic_[fcmpswap/fmin/fmax]*

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

    Reviewers: arsenm, rampitec

    Differential Revision: https://reviews.llvm.org/D68788 — dpreobra / ViewSVN
  17. [libTooling] Move `RewriteRule` abstraction into its own header and impl.

    Summary: Move the `RewriteRule` class and related declarations into its own set
    of files (header, implementation). Only the `Transformer` class is left in the
    Transformer-named files. This change clarifies the distinction between the
    `RewriteRule` class, which is essential to the Transformer library, and the
    `Transformer` class, which is only one possible `RewriteRule` interpreter
    (compare to `TransformerClangTidyCheck`, a clang-tidy based interpreter).

    Reviewers: gribozavr

    Subscribers: jfb, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68795 — ymandel / ViewSVN
  18. [AMDGPU][MC][GFX10] Enabled null for 64-bit dst operands

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

    Reviewers: arsenm, rampitec

    Differential Revision: https://reviews.llvm.org/D68785 — dpreobra / ViewSVN
  19. [llvm] [ocaml] Support linking against dylib

    Support linking OCaml modules against LLVM dylib when requested,
    rather than against static libs that might not be installed at all.

    Differential Revision: https://reviews.llvm.org/D68452 — mgorny / ViewSVN
  20. [DAGCombiner] fold vselect-of-constants to shift

    The diffs suggest that we are missing some more basic
    analysis/transforms, but this keeps the vector path in
    sync with the scalar (rL374397). This is again a
    preliminary step for introducing the reverse transform
    in IR as proposed in D63382. — spatel / ViewSVN
  21. Fix compilation warnings. NFC. — hliao / ViewSVN
  22. [AMDGPU][MC] Corrected parsing of optional operands

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

    Reviewers: artem.tamazov, arsenm

    Differential Revision: https://reviews.llvm.org/D68350 — dpreobra / ViewSVN
  23. [libTooling] Change Stencil equality to use `toString()`

    Summary:
    Removes the `isEqual` method from StencilPartInterface and modifies equality to
    use the string representation returned by the `toString` method for comparison.

    This means the `run` and `selection` stencils return true by default, and
    clients should be cautious in relying on equality operator for comparison of
    stencils containing parts generated by these functions.

    It also means we no longer need the custom RTTI support (typeId() and
    down_cast()), so it has been removed.

    Patch by Harshal T. Lehri.

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68825 — ymandel / ViewSVN
  24. Updated add_new_check.py to create checker tests in the new directory — gribozavr / ViewSVN
  25. [ClangTidy] Separate tests for infrastructure and checkers, fixup

    Renamed a file that I missed in r374540. — gribozavr / ViewSVN
  26. [mips] Follow-up to r374544. Fix test case. — atanasyan / ViewSVN
  27. [Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj).

    The command `od -t x` is used to dump data in hex format.
    The LIT tests assumes that the hex characters are in lowercase.
    However, there are also platforms which use uppercase letter.

    To solve this issue the tests are updated to use the new
    `--ignore-case` option of FileCheck.

    Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson

    Differential Revision: https://reviews.llvm.org/D68693 — redstar / ViewSVN
  28. [mips] Fix loading "double" immediate into a GPR and FPR

    If a "double" (64-bit) value has zero low 32-bits, it's possible to load
    such value into a GP/FP registers as an instruction immediate. But now
    assembler loads only high 32-bits of the value.

    For example, if a target register is GPR the `li.d $4, 1.0` instruction
    converts into the `lui $4, 16368` one. As a result, we get `0x3FF00000`
    in the register. While a correct representation of the `1.0` value is
    `0x3FF0000000000000`. The patch fixes that.

    Differential Revision: https://reviews.llvm.org/D68776 — atanasyan / ViewSVN
  29. [MS ABI]: Fix mangling function arguments for template types to be compatible with MSVC

    MS name mangling supports cache for first 10 distinct function
    arguments.  The error was when non cached template type occurred twice
    (e.g. 11th and 12th).  For such case in code there is another cache
    table TemplateArgStrings (for performance reasons).  Then one '@'
    character at the end of the mangled name taken from this table was
    missing.  For other cases the missing '@' character was added in
    the call to mangleSourceName(TemplateMangling) in the cache miss code,
    but the cache hit code didn't add it.

    This fixes a regression from r362560.

    Patch by Adam Folwarczny <adamf88@gmail.com>!

    Differential Revision: https://reviews.llvm.org/D68099 — nico / ViewSVN
  30. [llvm-readobj] - Remove excessive fields when dumping "Version symbols".

    This removes a few fields that are not useful:
    "Section Name", "Address", "Offset" and "Link"
    (they duplicated the information available under
    the "Sections [" tag).

    Differential revision: https://reviews.llvm.org/D68704 — grimar / ViewSVN
  31. [ClangTidy] Separate tests for infrastructure and checkers

    Summary:
    This change moves tests for checkers and infrastructure into separate
    directories, making it easier to find infrastructure tests. Tests for
    checkers are already easy to find because they are named after the
    checker. Tests for infrastructure were difficult to find because they
    were outnumbered by tests for checkers. Now they are in a separate
    directory.

    Reviewers: jfb, jdoerfert, lebedev.ri

    Subscribers: srhines, nemanjai, aheejin, kbarton, christof, mgrang, arphaman, jfb, lebedev.ri, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68807 — gribozavr / ViewSVN
  32. Dead Virtual Function Elimination

    Currently, it is hard for the compiler to remove unused C++ virtual
    functions, because they are all referenced from vtables, which are referenced
    by constructors. This means that if the constructor is called from any live
    code, then we keep every virtual function in the final link, even if there
    are no call sites which can use it.

    This patch allows unused virtual functions to be removed during LTO (and
    regular compilation in limited circumstances) by using type metadata to match
    virtual function call sites to the vtable slots they might load from. This
    information can then be used in the global dead code elimination pass instead
    of the references from vtables to virtual functions, to more accurately
    determine which functions are reachable.

    To make this transformation safe, I have changed clang's code-generation to
    always load virtual function pointers using the llvm.type.checked.load
    intrinsic, instead of regular load instructions. I originally tried writing
    this using clang's existing code-generation, which uses the llvm.type.test
    and llvm.assume intrinsics after doing a normal load. However, it is possible
    for optimisations to obscure the relationship between the GEP, load and
    llvm.type.test, causing GlobalDCE to fail to find virtual function call
    sites.

    The existing linkage and visibility types don't accurately describe the scope
    in which a virtual call could be made which uses a given vtable. This is
    wider than the visibility of the type itself, because a virtual function call
    could be made using a more-visible base class. I've added a new
    !vcall_visibility metadata type to represent this, described in
    TypeMetadata.rst. The internalization pass and libLTO have been updated to
    change this metadata when linking is performed.

    This doesn't currently work with ThinLTO, because it needs to see every call
    to llvm.type.checked.load in the linkage unit. It might be possible to
    extend this optimisation to be able to use the ThinLTO summary, as was done
    for devirtualization, but until then that combination is rejected in the
    clang driver.

    To test this, I've written a fuzzer which generates random C++ programs with
    complex class inheritance graphs, and virtual functions called through object
    and function pointers of different types. The programs are spread across
    multiple translation units and DSOs to test the different visibility
    restrictions.

    I've also tried doing bootstrap builds of LLVM to test this. This isn't
    ideal, because only classes in anonymous namespaces can be optimised with
    -fvisibility=default, and some parts of LLVM (plugins and bugpoint) do not
    work correctly with -fvisibility=hidden. However, there are only 12 test
    failures when building with -fvisibility=hidden (and an unmodified compiler),
    and this change does not cause any new failures for either value of
    -fvisibility.

    On the 7 C++ sub-benchmarks of SPEC2006, this gives a geomean code-size
    reduction of ~6%, over a baseline compiled with "-O2 -flto
    -fvisibility=hidden -fwhole-program-vtables". The best cases are reductions
    of ~14% in 450.soplex and 483.xalancbmk, and there are no code size
    increases.

    I've also run this on a set of 8 mbed-os examples compiled for Armv7M, which
    show a geomean size reduction of ~3%, again with no size increases.

    I had hoped that this would have no effect on performance, which would allow
    it to awlays be enabled (when using -fwhole-program-vtables). However, the
    changes in clang to use the llvm.type.checked.load intrinsic are causing ~1%
    performance regression in the C++ parts of SPEC2006. It should be possible to
    recover some of this perf loss by teaching optimisations about the
    llvm.type.checked.load intrinsic, which would make it worth turning this on
    by default (though it's still dependent on -fwhole-program-vtables).

    Differential revision: https://reviews.llvm.org/D63932 — ostannard / ViewSVN
  33. [FileCheck] Implement --ignore-case option.

    The FileCheck utility is enhanced to support a `--ignore-case`
    option. This is useful in cases where the output of Unix tools
    differs in case (e.g. case not specified by Posix).

    Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson, MaskRay

    Differential Revision: https://reviews.llvm.org/D68146 — redstar / ViewSVN
  34. [SCEV] Add stricter verification option.

    Currently -verify-scev only fails if there is a constant difference
    between two BE counts. This misses a lot of cases.

    This patch adds a -verify-scev-strict options, which fails for any
    non-zero differences, if used together with -verify-scev.

    With the stricter checking, some unit tests fail because
    of mis-matches, especially around IndVarSimplify.

    If there is no reason I am missing for just checking constant deltas, I
    am planning on looking into the various failures.

    Reviewers: efriedma, sanjoy.google, reames, atrick

    Reviewed By: sanjoy.google

    Differential Revision: https://reviews.llvm.org/D68592 — fhahn / ViewSVN
  35. [X86] isFNEG - add recursion depth limit

    Now that its used by isNegatibleForFree we should try to avoid costly deep recursion — rksimon / ViewSVN
  36. [llvm-exegesis] Show noise cluster in analysis output.

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68780 — courbet / ViewSVN
  37. [Windows] Use information from the PE32 exceptions directory to construct unwind plans

    This patch adds an implementation of unwinding using PE EH info. It allows to
    get almost ideal call stacks on 64-bit Windows systems (except some epilogue
    cases, but I believe that they can be fixed with unwind plan disassembly
    augmentation in the future).

    To achieve the goal the CallFrameInfo abstraction was made. It is based on the
    DWARFCallFrameInfo class interface with a few changes to make it less
    DWARF-specific.

    To implement the new interface for PECOFF object files the class PECallFrameInfo
    was written. It uses the next helper classes:

    - UnwindCodesIterator helps to iterate through UnwindCode structures (and
      processes chained infos transparently);
    - EHProgramBuilder with the use of UnwindCodesIterator constructs EHProgram;
    - EHProgram is, by fact, a vector of EHInstructions. It creates an abstraction
      over the low-level unwind codes and simplifies work with them. It contains
      only the information that is relevant to unwinding in the unified form. Also
      the required unwind codes are read from the object file only once with it;
    - EHProgramRange allows to take a range of EHProgram and to build an unwind row
      for it.

    So, PECallFrameInfo builds the EHProgram with EHProgramBuilder, takes the ranges
    corresponding to every offset in prologue and builds the rows of the resulted
    unwind plan. The resulted plan covers the whole range of the function except the
    epilogue.

    Reviewers: jasonmolenda, asmith, amccarth, clayborg, JDevlieghere, stella.stamenova, labath, espindola

    Reviewed By: jasonmolenda

    Subscribers: leonid.mashinskiy, emaste, mgorny, aprantl, arichardson, MaskRay, lldb-commits, llvm-commits

    Tags: #lldb

    Differential Revision: https://reviews.llvm.org/D67347 — aleksandr.urakov / ViewSVN
  38. Insert module constructors in a module pass

    Summary:
    If we insert them from function pass some analysis may be missing or invalid.
    Fixes PR42877.

    Reviewers: eugenis, leonardchan

    Reviewed By: leonardchan

    Subscribers: hiraditya, cfe-commits, llvm-commits

    Tags: #clang, #llvm

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

    llvm-svn: 374481
    Signed-off-by: Vitaly Buka <vitalybuka@google.com> — Vitaly Buka / ViewSVN
  39. [TableGen] Fix a bug that MCSchedClassDesc is interfered between different SchedModel

    Assume that, ModelA has scheduling resource for InstA and ModelB has scheduling resource for InstB. This is what the llvm::MCSchedClassDesc looks like:

    llvm::MCSchedClassDesc ModelASchedClasses[] = {
    ...
    InstA, 0, ...
    InstB, -1,...
    };

    llvm::MCSchedClassDesc ModelBSchedClasses[] = {
    ...
    InstA, -1,...
    InstB, 0,...
    };
    The -1 means invalid num of macro ops, while it is valid if it is >=0. This is what we look like now:

    llvm::MCSchedClassDesc ModelASchedClasses[] = {
    ...
    InstA, 0, ...
    InstB, 0,...
    };

    llvm::MCSchedClassDesc ModelBSchedClasses[] = {
    ...
    InstA, 0,...
    InstB, 0,...
    };
    And compiler hit the assertion here because the SCDesc is valid now for both InstA and InstB.

    Differential Revision: https://reviews.llvm.org/D67950 — qshanz / ViewSVN
  40. [X86] Add v8i64->v8i8 ssat/usat/packus truncate tests to min-legal-vector-width.ll

    I wonder if we should split the v8i8 stores in order to form
    two v4i8 saturating truncating stores. This would remove the
    unpckl needed to concatenated the v4i8 results to make a
    single store. — ctopper / ViewSVN
  41. [ADT][Statistics] Fix test after rL374490 — kadircet / ViewSVN
  42. Fix modules build for r374337

    A modules build failed with the following error:
      call to function 'operator&' that is neither visible in the template definition nor found by argument-dependent lookup

    Fix that by declaring the appropriate operators in the llvm::minidump
    namespace. — labath / ViewSVN
  43. [X86] Always define the tzcnt intrinsics even when _MSC_VER is defined.

    These intrinsics use llvm.cttz intrinsics so are always available
    even without the bmi feature. We already don't check for the bmi
    feature on the intrinsics themselves. But we were blocking the
    include of the header file with _MSC_VER unless BMI was enabled
    on the command line.

    Fixes PR30506. — ctopper / ViewSVN
  44. [PowerPC] Remove assertion "Shouldn't overwrite a register before it is killed"

    The assertion is everzealous and fail tests like:

      renamable $x3 = LI8 0
      STD renamable $x3, 16, $x1
      renamable $x3 = LI8 0

    Remove the assertion since killed flag of $x3 is not mandentory.

    Differential Revision: https://reviews.llvm.org/D68344 — yi-hong.lyu / ViewSVN
  45. [NFC] run specific pass instead of whole -O3 pipeline for popcount recoginzation testcase. — shchenz / ViewSVN
  46. [InstCombine] recognize popcount.

      This patch recognizes popcount intrinsic according to algorithm from website
      http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel

    Differential Revision: https://reviews.llvm.org/D68189 — shchenz / ViewSVN
  47. [libc++] Fix linker script generation

    Handle the case when libc++abi and libunwind are being built together
    with libc++ in the runtimes build. This logic was used in the previous
    implementation but dropped in r374116.

    Differential Revision: https://reviews.llvm.org/D68791 — phosek / ViewSVN
  48. [X86] Add a DAG combine to turn v16i16->v16i8 VTRUNCUS+store into a saturating truncating store. — ctopper / ViewSVN
  49. [X86] Add test case for trunc_packus_v16i32_v16i8_store to min-legal-vector-width.ll

    We aren't folding the vpmovuswb into the store. — ctopper / ViewSVN
  50. [CVP] Remove a masking operation if range information implies it's a noop

    This is really a known bits style transformation, but known bits isn't context sensitive. The particular case which comes up happens to involve a range which allows range based reasoning to eliminate the mask pattern, so handle that case specifically in CVP.

    InstCombine likes to generate the mask-by-low-bits pattern when widening an arithmetic expression which includes a zext in the middle.

    Differential Revision: https://reviews.llvm.org/D68811 — reames / ViewSVN
  51. [X86] Add more packus/ssat/usat truncate tests from legal vectors to less than 128-bit vectors.

    Some of these have sub-optimal codegen for avx512 relative to avx2. — ctopper / ViewSVN
  52. Revert 374481 "[tsan,msan] Insert module constructors in a module pass"

    CodeGen/sanitizer-module-constructor.c fails on mac and windows, see e.g.
    http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/11424 — nico / ViewSVN
  53. [CUDA][HIP} Add a test for constexpr default ctor

    Differential Revision: https://reviews.llvm.org/D68753 — yaxunl / ViewSVN
  54. [JITLink] Disable the MachO/AArch64 testcase while investigating bot failures.

    The windows bots are failing due to a memory layout error. Temporarily disabling
    while I investigate whether this can be worked around, or whether the test
    should be disabled on Windows. — Lang Hames / ViewSVN
  55. [JITLink] Fix MachO/arm64 GOTPAGEOFF encoding.

    The original implementation failed to shift the immediate down.

    This should fix some of the bot failures due to r374476. — Lang Hames / ViewSVN
  56. [Attributor][FIX] Do not replace musstail calls with constant — jdoerfert / ViewSVN
  57. Fix assertion failure for a cv-qualified array as a non-type template
    parameter type.

    We were both failing to decay the array type to a pointer and failing to
    remove the top-level cv-qualifications. Fix this by decaying array
    parameters even if the parameter type is dependent. — rsmith / ViewSVN
  58. AMDGPU: Move SelectFlatOffset back into AMDGPUISelDAGToDAG — arsenm / ViewSVN
  59. Get ClangdXPC.framework building (barely) with CMake's Xcode generator

    The output directories for CMake's Xcode project generator are
    specific to the configuration, and so looking in
    CMAKE_LIBRARY_OUTPUT_DIRECTORY isn't going to work. Fortunately, CMake
    already provides generator expressions to find the output of a given
    target.

    I call this "barely" building because the built framework isn't going
    to respect the configuration; that is, I can't have both Debug and
    RelWithDebInfo variants of ClangdXPC.framework at the same time like I
    can with normal library or executable targets. To do that we'd have to
    put the framework in a configuration-specific output directory or use
    CMake's native support for frameworks instead.

    https://reviews.llvm.org/D68846 — jrose / ViewSVN
  60. [Stats] Add ALWAYS_ENABLED_STATISTIC enabled regardless of LLVM_ENABLE_STATS.

    The intended usage is to measure relatively expensive operations. So the
    cost of the statistic is negligible compared to the cost of a measured
    operation and can be enabled all the time without impairing the
    compilation time.

    rdar://problem/55715134

    Reviewers: dsanders, bogner, rtereshin

    Reviewed By: dsanders

    Subscribers: hiraditya, jkorous, dexonsmith, ributzka, cfe-commits, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68252 — vsapsai / ViewSVN
  61. Include whether the destructor is constexpr in -ast-dump output for a
    clss. — rsmith / ViewSVN
  62. [X86] Improve the AVX512 bailout in combineTruncateWithSat to allow pack instructions in more situations.

    If we don't have VLX we won't end up selecting a saturating
    truncate for 256-bit or smaller vectors so we should just use
    the pack lowering. — ctopper / ViewSVN
  63. [X86] Update trunc_packus_v32i32_v32i8 test in min-legal-vector-width.ll to use a load for the large type and add the min-legal-vector-width attribute.

    The attribute is needed to avoid zmm registers. Using memory
    avoids argument splitting for large vectors. — ctopper / ViewSVN
  64. Move most CXXRecordDecl::DefinitionData bit-fields out into a separate
    file.

    Reduces duplication and thereby reduces the risk that someone will
    forget to update one of these places, as I did when adding
    DefaultedDestructorIsConstexpr (though I've been unable to produce
    a testcase for which that matters so far). — rsmith / ViewSVN
  65. gn build: Merge r374476 — gnsyncbot / ViewSVN
  66. [tsan,msan] Insert module constructors in a module pass

    Summary:
    If we insert them from function pass some analysis may be missing or invalid.
    Fixes PR42877.

    Reviewers: eugenis, leonardchan

    Reviewed By: leonardchan

    Subscribers: hiraditya, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D68832 — Vitaly Buka / ViewSVN
  67. [msan, NFC] Move option parsing into constructor — Vitaly Buka / ViewSVN
  68. Fix compilation warning due to typo. — hliao / ViewSVN
  69. [tooling] Fix assertion on MacOSX. — hliao / ViewSVN
  70. [JITLink] Add an initial implementation of JITLink for MachO/AArch64.

    This implementation has support for all relocation types except TLV.

    Compact unwind sections are not yet supported, so exceptions/unwinding will not
    work. — Lang Hames / ViewSVN
  71. [JITLink] Move MachO/x86 got test further down in the data section.

    'named_data' should be the first symbol in the data section. — Lang Hames / ViewSVN
  72. docs/DeveloperPolicy: Add instructions for requesting GitHub commit access

    Subscribers: mehdi_amini, jtony, xbolva00, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66840 — tstellar / ViewSVN
  73. Fix check-interception link error in compiler-rt debug mode — rnk / ViewSVN
  74. [MemorySSA] Update Phi simplification.

    When simplifying a Phi to the unique value found incoming, check that
    there wasn't a Phi already created to break a cycle. If so, remove it.
    Resolves PR43541.

    Some additional nits included. — asbirlea / ViewSVN
  75. [tooling] Teach Tooling to understand compilation with offloading.

    Summary:
    - So far, we only recognize the host compilation with offloading and
      skip the offloading part.

    Reviewers: tra, yaxunl

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68660 — hliao / ViewSVN
  76. Fix help message for -ffp-contract

    Differential Revision: https://reviews.llvm.org/D68823 — yaxunl / ViewSVN
  77. PR43629: Fix crash evaluating constexpr placement new on a subobject of
    an out-of-lifetime object. — rsmith / ViewSVN
  78. [GISel] Simplifying return from else in function. NFC

    Forgot to integrate this little change in previous commit — mggm / ViewSVN
  79. [X86] Guard against leaving a dangling node in combineTruncateWithSat.

    When handling the packus pattern for i32->i8 we do a two step
    process using a packss to i16 followed by a packus to i8. If the
    final i8 step is a type with less than 64-bits the packus step
    will return SDValue(), but the i32->i16 step might have succeeded.
    This leaves the nodes from the middle step dangling.

    Guard against this by pre-checking that the number of elements is
    at least 8 before doing the middle step.

    With that check in place this should mean the only other
    case the middle step itself can fail is when SSE2 is disabled. So
    add an early SSE2 check then just assert that neither the middle
    or final step ever fail. — ctopper / ViewSVN
  80. [X86] Add test cases for packus/ssat/usat 32i32->v32i8 test cases. NFC — ctopper / ViewSVN
  81. [GISel] Allow getConstantVRegVal() to return G_FCONSTANT values.

    In GISel we have both G_CONSTANT and G_FCONSTANT, but because
    in GISel we don't really have a concept of Float vs Int value
    the only difference between the two is where the data originates
    from.

    What both G_CONSTANT and G_FCONSTANT return is just a bag of bits
    with the constant representation in it.

    By making getConstantVRegVal() return G_FCONSTANTs bit representation
    as well we allow ConstantFold and other things to operate with
    G_FCONSTANT.

    Adding tests that show ConstantFolding to work on mixed G_CONSTANT
    and G_FCONSTANT sources.

    Differential Revision: https://reviews.llvm.org/D68739 — mggm / ViewSVN
  82. Fix some errors in <arm_neon.h> tests that cause them to fail with lax
    vector conversions disabled. — rsmith / ViewSVN
  83. Revert 374450 "Fix __builtin_assume_aligned with too large values."

    The test fails on Windows, with

      error: 'warning' diagnostics expected but not seen:
        File builtin-assume-aligned.c Line 62: requested alignment
            must be 268435456 bytes or smaller; assumption ignored
      error: 'warning' diagnostics seen but not expected:
        File builtin-assume-aligned.c Line 62: requested alignment
            must be 8192 bytes or smaller; assumption ignored — nico / ViewSVN
  84. [AMDGPU] Handle undef old operand in DPP combine

    It was missing an undef flag.

    Differential Revision: https://reviews.llvm.org/D68813 — rampitec / ViewSVN
  85. [ValueTracking] Improve pointer offset computation for cases of same base

    This patch improves the handling of pointer offset in GEP expressions where
    one argument is the base pointer. isPointerOffset() is being used by memcpyopt
    where current code synthesizes consecutive 32 bytes stores to one store and
    two memset intrinsic calls. With this patch, we convert the stores to one
    memset intrinsic.

    Differential Revision: https://reviews.llvm.org/D67989 — xur / ViewSVN
  86. [InstCombine] Add test case for PR43617 (NFC)

    Also, refactor check in `LibCallSimplifier::optimizeLog()`. — evandro / ViewSVN
  87. [lit] Break main into smaller functions

    This change is purely mechanical.  I will do further cleanups of
    parameter usages.

    Reviewed By: rnk

    Differential Revision: https://reviews.llvm.org/D68830 — yln / ViewSVN
  88. Fix __builtin_assume_aligned with too large values.

    Code to handle __builtin_assume_aligned was allowing larger values, but
    would convert this to unsigned along the way. This patch removes the
    EmitAssumeAligned overloads that take unsigned to do away with this
    problem.

    Additionally, it adds a warning that values greater than 1 <<29 are
    ignored by LLVM.

    Differential Revision: https://reviews.llvm.org/D68824 — erichkeane / ViewSVN
  89. Add -fgnuc-version= to control __GNUC__ and other GCC macros

    I noticed that compiling on Windows with -fno-ms-compatibility had the
    side effect of defining __GNUC__, along with __GNUG__, __GXX_RTTI__, and
    a number of other macros for GCC compatibility. This is undesirable and
    causes Chromium to do things like mix __attribute__ and __declspec,
    which doesn't work. We should have a positive language option to enable
    GCC compatibility features so that we can experiment with
    -fno-ms-compatibility on Windows. This change adds -fgnuc-version= to be
    that option.

    My issue aside, users have, for a long time, reported that __GNUC__
    doesn't match their expectations in one way or another. We have
    encouraged users to migrate code away from this macro, but new code
    continues to be written assuming a GCC-only environment. There's really
    nothing we can do to stop that. By adding this flag, we can allow them
    to choose their own adventure with __GNUC__.

    This overlaps a bit with the "GNUMode" language option from -std=gnu*.
    The gnu language mode tends to enable non-conforming behaviors that we'd
    rather not enable by default, but the we want to set things like
    __GXX_RTTI__ by default, so I've kept these separate.

    Helps address PR42817

    Reviewed By: hans, nickdesaulniers, MaskRay

    Differential Revision: https://reviews.llvm.org/D68055 — rnk / ViewSVN
  90. Add a missing include in test.

    A fix for r373993. — eugenis / ViewSVN
  91. [MemorySSA] Additional handling of unreachable blocks.

    Summary:
    Whenever we get the previous definition, the assumption is that the
    recursion starts ina  reachable block.
    If the recursion starts in an unreachable block, we may recurse
    indefinitely. Handle this case by returning LoE if the block is
    unreachable.

    Resolves PR43426.

    Reviewers: george.burgess.iv

    Subscribers: Prazek, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68809 — asbirlea / ViewSVN
  92. [System Model] [TTI] Move default cache/prefetch implementations

    Move the default implementations of cache and prefetch queries to
    TargetTransformInfoImplBase and delete them from NoTIIImpl.  This brings these
    interfaces in line with how other TTI interfaces work.

    Differential Revision: https://reviews.llvm.org/D68804 — greened / ViewSVN
  93. Fix a documentation warning from GSYM commit. — gclayton / ViewSVN
  94. [MSVC] Automatically add atlmfc folder to include and libpath.

    Differential Revision: https://reviews.llvm.org/D68736 — zturner / ViewSVN
  95. [PDB] Fix bug when using multiple PCH header objects with the same name.

    A common pattern in Windows is to have all your precompiled headers
    use an object named stdafx.obj.  If you've got a project with many
    different static libs, you might use a separate PCH for each one of
    these.

    During the final link step, a file from A might reference the PCH
    object from A, but it will have the same name (stdafx.obj) as any
    other PCH from another project.  The only difference will be the
    path.  For example, A might be A/stdafx.obj while B is B/stdafx.obj.

    The existing algorithm checks only the filename that was passed on
    the command line (or stored in archive), but this is insufficient in
    the case where relative paths are used, because depending on the
    command line object file / library order, it might find the wrong
    PCH object first resulting in a signature mismatch.

    The fix here is to simply check whether the absolute path of the
    PCH object (which is stored in the input obj file for the file that
    references the PCH) *ends with* the full relative path of whatever
    is specified on the command line (or is in the archive).

    Differential Revision: https://reviews.llvm.org/D66431 — zturner / ViewSVN
  96. [lit] Add comment explaining the LIT_OPTS env var overrides command line options

    Normally, command line options override environment variables.  Add
    comment to state that we are doing the reverse on purpose. — yln / ViewSVN
  97. ADT: Save a word in every StringSet entry

    Add a specialization to StringMap (actually StringMapEntry) for a
    value type of NoneType (the type of llvm::None), and use it for
    StringSet. This'll save us a word from every entry in a StringSet,
    used for alignment with the size_t that stores the string length.

    I could have gone all the way to some kind of empty base class
    optimization, but that seemed like overkill. Someone can consider
    adding that in the future, though.

    https://reviews.llvm.org/D68586 — jrose / ViewSVN
  98. [ScanDeps] clang-format, 80 cols. — mspencer / ViewSVN
  99. [OPENMP]Update doc for supported constructs, NFC. — abataev / ViewSVN
  100. [OPENMP50]Support for 'master taskloop' directive.

    Added full support for master taskloop directive. — abataev / ViewSVN
  101. [x86] reduce duplicate test assertions; NFC — spatel / ViewSVN

#5510 (Oct 10, 2019 12:47:42 PM)

  1. [lit] Bring back `--threads` option alias

    Bring back `--threads` option which was lost in the move of the
    command line argument parsing code to cl_arguments.py.  Update docs
    since `--workers` is preferred. — yln / ViewSVN
  2. [X86] Use packusdw+vpmovuswb to implement v16i32->V16i8 that clamps signed inputs to be between 0 and 255 when zmm registers are disabled on SKX.

    If we've disable zmm registers, the v16i32 will need to be split. This split will propagate through min/max the truncate. This creates two sequences that need to be concatenated back to v16i8. We can instead use packusdw to do part of the clamping, truncating, and concatenating all at once. Then we can use a vpmovuswb to finish off the clamp.

    Differential Revision: https://reviews.llvm.org/D68763 — ctopper / ViewSVN
  3. Revert r374388: "[lit] Make internal diff work in pipelines"

    This breaks a Windows bot. — jdenny / ViewSVN
  4. [PowerPC][docs] Update IBM official docs in Compiler Writers Info page

    Summary:
    Just realized that most of the links in this page are deprecated.
    So update some important reference here:
    * adding PowerISA 3.0B/2.7B
    * adding P8/P9 User Manual
    * ELFv2 ABI and errata

    Move deprecated ones into "Other documents..".

    Reviewers: #powerpc, hfinkel, nemanjai

    Reviewed By: hfinkel

    Subscribers: shchenz, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68817 — jsji / ViewSVN
  5. Revert r374389: "[lit] Clean up internal diff's encoding handling"

    This breaks a Windows bot. — jdenny / ViewSVN
  6. Revert r374390: "[lit] Extend internal diff to support `-` argument"

    This breaks a Windows bot. — jdenny / ViewSVN
  7. Revert r374392: "[lit] Extend internal diff to support -U"

    This breaks a Windows bot. — jdenny / ViewSVN
  8. win: Move Parallel.h off concrt to cross-platform code

    r179397 added Parallel.h and implemented it terms of concrt in 2013.

    In 2015, a cross-platform implementation of the functions has appeared
    and is in use everywhere but on Windows (r232419).  r246219 hints that
    <thread> had issues in MSVC2013, but r296906 suggests they've been fixed
    now that we require 2015+.

    So remove the concrt code. It's less code, and it sounds like concrt has
    conceptual and performance issues, see PR41198.

    I built blink_core.dll in a debug component build with full symbols and
    in a release component build without any symbols.  I couldn't measure a
    performance difference for linking blink_core.dll before and after this
    patch.

    Differential Revision: https://reviews.llvm.org/D68820 — nico / ViewSVN
  9. [NFC][PowerPC]Clean up PPCAsmPrinter for TOC related pseudo opcode

    Add a helper function getMCSymbolForTOCPseudoMO to clean up PPCAsmPrinter
    a little bit.

    Differential Revision: https://reviews.llvm.org/D68721 — xiangling_liao / ViewSVN
  10. [ARM] Fix arm_neon.h with -flax-vector-conversions=none, part 2.

    Just running -fsyntax-only over arm_neon.h doesn't cover some intrinsics
    which are defined using macros.  Add more test coverage for that.

    arm-neon-header.c wasn't checking the full set of available NEON target
    features; change the target architecture of the test to account for
    that.

    Fix the generator for arm_neon.h to generate casts in more cases where
    they are necessary.

    Fix VFMLAL_LOW etc. to express their signatures differently, so the
    builtins have the expected type. Maybe the TableGen backend should
    detect intrinsics that are defined the wrong way, and produce an error.
    The rules here are sort of strange.

    Differential Revision: https://reviews.llvm.org/D68743 — efriedma / ViewSVN
  11. Fix one more clang test which didn't have \5C in it — rnk / ViewSVN
  12. Update clang tests for new LLVM IR backslash printing in r374415 — rnk / ViewSVN
  13. Print quoted backslashes in LLVM IR as \\ instead of \5C

    This improves readability of Windows path string literals in LLVM IR.
    The LLVM assembler has supported \\ in IR strings for a long time, but
    the lexer doesn't tolerate escaped quotes, so they have to be printed as
    \22 for now. — rnk / ViewSVN
  14. Fix Windows build after r374381 — nico / ViewSVN
  15. Remove strings.h include to fix GSYM Windows build

    Fifth time's the charm. — rnk / ViewSVN
  16. Unbreak buildbots. — gclayton / ViewSVN
  17. Fix buildbots by using memset instead of bzero. — gclayton / ViewSVN
  18. [libc++][test] Change IsSmallObject's calculation for std::any's small object buffer

    `sizeof(std::any) - sizeof(void*)` is correct for both libc++ and the MSVC standard library.

    Differential Revision: https://reviews.llvm.org/D68756 — caseycarter / ViewSVN
  19. Fix build by adding the missing dependency. — hliao / ViewSVN
  20. [lit] Leverage argparse features to remove some code

    Reviewed By: rnk, serge-sans-paille

    Differential Revision: https://reviews.llvm.org/D68589 — yln / ViewSVN
  21. Fix test to avoid check-not matching the temp file absolute path

    Fix for PR43636 — rnk / ViewSVN
  22. Re-land "Use -fdebug-compilation-dir to form absolute paths in coverage mappings"

    This reverts r374324 (git commit 62808631acceaa8b78f8ab9b407eb6b943ff5f77)

    I changed the test to not rely on finding the sequence "clang, test,
    CoverageMapping" in the CWD used to run the test. Instead it makes its
    own internal directory hierarchy of foo/bar/baz and looks for that. — rnk / ViewSVN
  23. [lit] Move argument parsing/validation to separate file

    Reviewed By: serge-sans-paille

    Differential Revision: https://reviews.llvm.org/D68529 — yln / ViewSVN
  24. [clang-format] throws an incorrect assertion in consumeToken() formatting the MSVC stl

    Summary:
    An incorrect assertion is thrown when clang-formatting MSVC's STL library

    ```
    Assertion failed: !Line.startsWith(tok::hash), file C:/llvm/llvm-project/clang/lib/Format/TokenAnnotator.cpp, line 847
    Stack dump:
    0.      Program arguments: C:\llvm\build\bin\clang-format.exe -i -n ./stl/inc/xkeycheck.h
    ```

    ```
    Enable warning C4005 to find the forbidden define.
    ```

    Reviewers: mitchell-stellar, STL_MSFT, klimek, krasimir

    Reviewed By: mitchell-stellar

    Subscribers: cfe-commits

    Tags: #clang-format, #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D68707 — paulhoad / ViewSVN
  25. Unbreak  llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast buildbot. — gclayton / ViewSVN
  26. [DAGCombiner] fold select-of-constants to shift

    This reverses the scalar canonicalization proposed in D63382.

    Pre: isPowerOf2(C1)
    %r = select i1 %cond, i32 C1, i32 0
    =>
    %z = zext i1 %cond to i32
    %r = shl i32 %z, log2(C1)

    https://rise4fun.com/Alive/Z50

    x86 already tries to fold this pattern, but it isn't done
    uniformly, so we still see a diff. AArch64 probably should
    enable the TLI hook to benefit too, but that's a follow-on. — spatel / ViewSVN
  27. Unbreak windows buildbots. — gclayton / ViewSVN
  28. gn build: restore tablegen restat optimization after r373664 — nico / ViewSVN
  29. [lit] Extend internal diff to support -U

    When using lit's internal shell, RUN lines like the following
    accidentally execute an external `diff` instead of lit's internal
    `diff`:

    ```
    # RUN: program | diff -U1 file -
    ```

    Such cases exist now, in `clang/test/Analysis` for example.  We are
    preparing patches to ensure lit's internal `diff` is called in such
    cases, which will then fail because lit's internal `diff` doesn't
    recognize `-U` as a command-line option.  This patch adds `-U`
    support.

    Reviewed By: rnk

    Differential Revision: https://reviews.llvm.org/D68668 — jdenny / ViewSVN
  30. gn build: merge r374381 more (effectively a no-op) — nico / ViewSVN
  31. [lit] Extend internal diff to support `-` argument

    When using lit's internal shell, RUN lines like the following
    accidentally execute an external `diff` instead of lit's internal
    `diff`:

    ```
    # RUN: program | diff file -
    ```

    Such cases exist now, in `clang/test/Analysis` for example.  We are
    preparing patches to ensure lit's internal `diff` is called in such
    cases, which will then fail because lit's internal `diff` doesn't
    recognize `-` as a command-line option.  This patch adds support for
    `-` to mean stdin.

    Reviewed By: probinson, rnk

    Differential Revision: https://reviews.llvm.org/D67643 — jdenny / ViewSVN
  32. [lit] Clean up internal diff's encoding handling

    As suggested by rnk at D67643#1673043, instead of reading files
    multiple times until an appropriate encoding is found, read them once
    as binary, and then try to decode what was read.

    For python >= 3.5, don't fail when attempting to decode the
    `diff_bytes` output in order to print it.

    Finally, add some tests for encoding handling.

    Reviewed By: rnk

    Differential Revision: https://reviews.llvm.org/D68664 — jdenny / ViewSVN
  33. [lit] Make internal diff work in pipelines

    When using lit's internal shell, RUN lines like the following
    accidentally execute an external `diff` instead of lit's internal
    `diff`:

    ```
    # RUN: program | diff file -
    # RUN: not diff file1 file2 | FileCheck %s
    ```

    Such cases exist now, in `clang/test/Analysis` for example.  We are
    preparing patches to ensure lit's internal `diff` is called in such
    cases, which will then fail because lit's internal `diff` cannot
    currently be used in pipelines and doesn't recognize `-` as a
    command-line option.

    To enable pipelines, this patch moves lit's `diff` implementation into
    an out-of-process script, similar to lit's `cat` implementation.  A
    follow-up patch will implement `-` to mean stdin.

    Reviewed By: probinson, stella.stamenova

    Differential Revision: https://reviews.llvm.org/D66574 — jdenny / ViewSVN
  34. [OPENMP50]Support for declare variant directive for NVPTX target.

    NVPTX does not support global aliases. Instead, we have to copy the full
    body of the variant function for the original function. — abataev / ViewSVN
  35. Reland "[ASan] Do not misrepresent high value address dereferences as null dereferences"

    Updated: Removed offending TODO comment.

    Dereferences with addresses above the 48-bit hardware addressable range
    produce "invalid instruction" (instead of "invalid access") hardware
    exceptions (there is no hardware address decoding logic for those bits),
    and the address provided by this exception is the address of the
    instruction (not the faulting address).  The kernel maps the "invalid
    instruction" to SEGV, but fails to provide the real fault address.

    Because of this ASan lies and says that those cases are null
    dereferences.  This downgrades the severity of a found bug in terms of
    security.  In the ASan signal handler, we can not provide the real
    faulting address, but at least we can try not to lie.

    rdar://50366151

    Reviewed By: vitalybuka

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

    llvm-svn: 374265 — yln / ViewSVN
  36. gn build: Merge r374381 — gnsyncbot / ViewSVN
  37. Add GsymCreator and GsymReader.

    This patch adds the ability to create GSYM files with GsymCreator, and read them with GsymReader. Full testing has been added for both new classes.

    This patch differs from the original patch https://reviews.llvm.org/D53379 in that is uses a StringTableBuilder class from llvm instead of a custom version. Support for big and little endian files has been added. If the endianness matches the current host, we use efficient extraction for the header, address table and address info offset tables.

    Differential Revision: https://reviews.llvm.org/D68744 — gclayton / ViewSVN
  38. [dsymutil] Move CommonSymbols.clear() in resetParserState.

    This seems like a more natural place to clear the vector, especially
    since this method is clearing other data structures as well. — Jonas Devlieghere / ViewSVN
  39. [ARM] VQSUB instruction

    Same as VQADD, VQSUB can be selected from llvm.ssub.sat intrinsics.

    Differential Revision: https://reviews.llvm.org/D68567 — dmgreen / ViewSVN
  40. [Codegen] Alter the default promotion for saturating adds and subs

    The default promotion for the add_sat/sub_sat nodes currently does:
       1. ANY_EXTEND iN to iM
       2. SHL by M-N
       3. [US][ADD|SUB]SAT
       4. L/ASHR by M-N
    If the promoted add_sat or sub_sat node is not legal, this can produce code
    that effectively does a lot of shifting (and requiring large constants to be
    materialised) just to use the overflow flag. It is simpler to just do the
    saturation manually, using the higher bitwidth addition and a min/max against
    the saturating bounds. That is what this patch attempts to do.

    Differential Revision: https://reviews.llvm.org/D68643 — dmgreen / ViewSVN
  41. Fix assertions disabled builds after rL374367 — kadircet / ViewSVN
  42. [DAGCombiner] reduce code duplication; NFC — spatel / ViewSVN
  43. [Alignment][NFC] Use llv::Align in GISelKnownBits

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68786 — gchatelet / ViewSVN
  44. [BPF] Remove relocation for patchable externs

    Previously, patchable extern relocations are introduced to patch
    external variables used for multi versioning in
    compile once, run everywhere use case. The load instruction
    will be converted into a move with an patchable immediate
    which can be changed by bpf loader on the host.

    The kernel verifier has evolved and is able to load
    and propagate constant values, so compiler relocation
    becomes unnecessary. This patch removed codes related to this.

    Differential Revision: https://reviews.llvm.org/D68760 — yhs / ViewSVN
  45. In openFileForRead don't cache erroneous entries if the error relates to them being directories. Add tests.

    Summary:
    It seems that when the CachingFileSystem is first given a file to open that is actually a directory, it incorrectly
    caches that path to be errenous and throws an error when subsequently a directory open call is made for the same
    path.
    This change makes it so that we do NOT cache a path if it turns out we asked for a file when its a directory.

    Reviewers: arphaman

    Subscribers: dexonsmith, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68193 — kousikk / ViewSVN
  46. [AMDGPU] Fixed dpp_combine.mir with expensive checks. NFC. — rampitec / ViewSVN
  47. Fix Wdocumentation warnings. NFCI. — rksimon / ViewSVN
  48. [OPENMP50]Register vendor name only once in vendor context selector.

    No need to store multiple copies of the same vendor names in the context
    selector, keep only single copy. — abataev / ViewSVN
  49. [MCA] Show aggregate over Average Wait times for the whole snippet (PR43219)

    Summary:
    As disscused in https://bugs.llvm.org/show_bug.cgi?id=43219,
    i believe it may be somewhat useful to show //some// aggregates
    over all the sea of statistics provided.

    Example:
    ```
    Average Wait times (based on the timeline view):
    [0]: Executions
    [1]: Average time spent waiting in a scheduler's queue
    [2]: Average time spent waiting in a scheduler's queue while ready
    [3]: Average time elapsed from WB until retire stage

          [0]    [1]    [2]    [3]
    0.     3     1.0    1.0    4.7       vmulps     %xmm0, %xmm1, %xmm2
    1.     3     2.7    0.0    2.3       vhaddps    %xmm2, %xmm2, %xmm3
    2.     3     6.0    0.0    0.0       vhaddps    %xmm3, %xmm3, %xmm4
           3     3.2    0.3    2.3       <total>
    ```
    I.e. we average the averages.

    Reviewers: andreadb, mattd, RKSimon

    Reviewed By: andreadb

    Subscribers: gbedwell, arphaman, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68714 — lebedevri / ViewSVN
  50. Revert "[FileCheck] Implement --ignore-case option."

    This reverts commit r374339. It broke tests:
    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19066 — gribozavr / ViewSVN
  51. Revert "[Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj)."

    This reverts commit r374343. It broke tests:
    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19066 — gribozavr / ViewSVN
  52. Revert "Fix OCaml/core.ml fneg check"

    This reverts commit r374346. It attempted to fix OCaml tests, but is
    does not actually fix them. — gribozavr / ViewSVN
  53. [X86] combineFMA - Convert to use isNegatibleForFree/GetNegatedExpression.

    Split off from D67557. — rksimon / ViewSVN
  54. Fix OCaml/core.ml fneg check (try 2) — rksimon / ViewSVN
  55. Revert "[IRBuilder] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator"

    This reverts commit r374240. It broke OCaml tests:
    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19014 — gribozavr / ViewSVN
  56. [X86] combineFMADDSUB - Convert to use isNegatibleForFree/GetNegatedExpression.

    Split off from D67557, fixes the compile time regression mentioned in rL372756 — rksimon / ViewSVN
  57. Revert "[test] Use system locale for mri-utf8.test"

    This reverts commit r374318 / b6f1d1fa0e3ee0e25f22414bf97c05276b934507. — thopre / ViewSVN
  58. Revert "[AMDGPU] Run `unreachable-mbb-elimination` after isel to clean up PHIs."

    Summary:
    This has been superseded by "[AMDGPU]: PHI Elimination hooks added for custom COPY insertion."

    This reverts the code changes from commit 53f967f2bdb6aa7b08596880c3689d1ecad6f0ff
    but keeps the test case.

    Reviewers: hliao, arsenm, tpr, dstuttard

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68769 — foad / ViewSVN
  59. Fix OCaml/core.ml fneg check — rksimon / ViewSVN
  60. [DAG][X86] Add isNegatibleForFree/GetNegatedExpression override placeholders. NFCI.

    Continuing to undo the rL372756 reversion.

    Differential Revision: https://reviews.llvm.org/D67557 — rksimon / ViewSVN
  61. [llvm-readelf] - Do not enter an infinite loop when printing histogram.

    This is similar to D68086.
    We are entering an infinite loop when dumping a histogram for a specially crafted
    .hash section with a loop in a chain.

    Differential revision: https://reviews.llvm.org/D68771 — grimar / ViewSVN
  62. [Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj).

    The command `od -t x` is used to dump data in hex format.
    The LIT tests assumes that the hex characters are in lowercase.
    However, there are also platforms which use uppercase letter.

    To solve this issue the tests are updated to use the new
    `--ignore-case` option of FileCheck.

    Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson

    Differential Revision: https://reviews.llvm.org/D68693 — redstar / ViewSVN
  63. [DAGCombine] Match more patterns for half word bswap

    Summary: It ensures that the bswap is generated even when a part of the subtree already matches a bswap transform.

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

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68250 — deadalnix / ViewSVN
  64. [FileCheck] Implement --ignore-case option.

    The FileCheck utility is enhanced to support a `--ignore-case`
    option. This is useful in cases where the output of Unix tools
    differs in case (e.g. case not specified by Posix).

    Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson, MaskRay

    Differential Revision: https://reviews.llvm.org/D68146 — redstar / ViewSVN
  65. [LV][NFC] Factor out calculation of "best" estimated trip count.

    This is just small refactoring to minimize changes in upcoming patch.
    In the next path I'm going to introduce changes into heuristic for vectorization of "tiny trip count" loops.

    Patch by Evgeniy Brevnov <evgueni.brevnov@gmail.com>

    Reviewers: hsaito, Ayal, fhahn, reames

    Reviewed By: hsaito

    Differential Revision: https://reviews.llvm.org/D67690 — fhahn / ViewSVN
  66. MinidumpYAML: Add support for the memory info list stream

    Summary:
    The implementation is fairly straight-forward and uses the same patterns
    as the existing streams. The yaml form does not attempt to preserve the
    data in the "gaps" that can be created by setting a larger-than-required
    header or entry size in the stream header, because the existing consumer
    (lldb) does not make use of the information in the gap in any way, and
    attempting to preserve that would make the implementation more
    complicated.

    Reviewers: amccarth, jhenderson, clayborg

    Subscribers: llvm-commits, lldb-commits, markmentovai, zturner, JosephTremoulet

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68645 — labath / ViewSVN
  67. [ARM] VQADD instructions

    This selects MVE VQADD from the vector llvm.sadd.sat or llvm.uadd.sat
    intrinsics.

    Differential Revision: https://reviews.llvm.org/D68566 — dmgreen / ViewSVN
  68. [AArch64][x86] add tests for (v)select bit magic; NFC — spatel / ViewSVN
  69. [Sanitizers] Fix getrandom test — David CARLIER / ViewSVN
  70. [Alignment][NFC] Make VectorUtils uas llvm::Align

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, rogfer01, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68784 — gchatelet / ViewSVN
  71. [AST] ASTReader::ReadSLocEntry(): move computation of FirstDecl into the branch where it's used

    The existing code is not defined, you are not allowed
    to produce non-null pointer from null pointer (F->FileSortedDecls here).
    That being said, i'm not really confident this is fix-enough, but we'll see.

    FAIL: Clang :: Modules/no-module-map.cpp (6879 of 16079)
    ******************** TEST 'Clang :: Modules/no-module-map.cpp' FAILED ********************
    Script:
    --
    : 'RUN: at line 1';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-name=ab -x c++-header /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map/a.h /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map/b.h -emit-header-module -o /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm
    : 'RUN: at line 2';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-file=/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map -verify
    : 'RUN: at line 3';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-file=/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map -verify -DA
    : 'RUN: at line 4';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-file=/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map -verify -DB
    : 'RUN: at line 5';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-file=/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map -verify -DA -DB
    : 'RUN: at line 7';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -E /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm -o - | /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp
    : 'RUN: at line 8';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -frewrite-imports -E /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm -o - | /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp
    --
    Exit Code: 2

    Command Output (stderr):
    --
    /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:1526:50: runtime error: applying non-zero offset 8 to null pointer
        #0 0x3a9bd0c in clang::ASTReader::ReadSLocEntry(int) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:1526:50
        #1 0x328b6f8 in clang::SourceManager::loadSLocEntry(unsigned int, bool*) const /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Basic/SourceManager.cpp:461:28
        #2 0x328b351 in clang::SourceManager::initializeForReplay(clang::SourceManager const&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Basic/SourceManager.cpp:399:11
        #3 0x3996c71 in clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Frontend/FrontendAction.cpp:581:27
        #4 0x394f341 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:956:13
        #5 0x3a8a92b in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:290:25
        #6 0xaf8d62 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/cc1_main.cpp:250:15
        #7 0xaf1602 in ExecuteCC1Tool /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/driver.cpp:309:12
        #8 0xaf1602 in main /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/driver.cpp:382:12
        #9 0x7f2c1eecc2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
        #10 0xad57f9 in _start (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang-10+0xad57f9)

    SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:1526:50 in — lebedevri / ViewSVN
  72. [ADR] ArrayRefTest: disable SizeTSizedOperations test - it's UB.

    This test is not defined.

    FAIL: LLVM-Unit :: ADT/./ADTTests/ArrayRefTest.SizeTSizedOperations (178 of 33926)
    ******************** TEST 'LLVM-Unit :: ADT/./ADTTests/ArrayRefTest.SizeTSizedOperations' FAILED ********************
    Note: Google Test filter = ArrayRefTest.SizeTSizedOperations
    [==========] Running 1 test from 1 test case.
    [----------] Global test environment set-up.
    [----------] 1 test from ArrayRefTest
    [ RUN      ] ArrayRefTest.SizeTSizedOperations
    /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:180:32: runtime error: applying non-zero offset 9223372036854775806 to null pointer
        #0 0x5ae8dc in llvm::ArrayRef<char>::slice(unsigned long, unsigned long) const /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:180:32
        #1 0x5ae44c in (anonymous namespace)::ArrayRefTest_SizeTSizedOperations_Test::TestBody() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/unittests/ADT/ArrayRefTest.cpp:85:3
        #2 0x928a96 in testing::Test::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2474:5
        #3 0x929793 in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2656:11
        #4 0x92a152 in testing::TestCase::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2774:28
        #5 0x9319d2 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4649:43
        #6 0x931416 in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4257:10
        #7 0x920ac3 in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:2233:46
        #8 0x920ac3 in main /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/UnitTestMain/TestMain.cpp:50:10
        #9 0x7f66135b72e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
        #10 0x472c19 in _start (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/unittests/ADT/ADTTests+0x472c19)

    SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:180:32 in — lebedevri / ViewSVN
  73. Fix -Wparentheses warning. NFCI. — rksimon / ViewSVN
  74. Revert "Use -fdebug-compilation-dir to form absolute paths in coverage mappings"

    This reverts commit f6777964bde28c349d3e289ea37ecf5f5eeedbc4.

    Because the absolute path check relies on temporary path containing
    "clang", "test" and "CoverageMapping" as a subsequence, which is not
    necessarily true on all systems(breaks internal integrates). Wanted to
    fix it by checking for a leading "/" instead, but then noticed that it
    would break windows tests, so leaving it to the author instead. — kadircet / ViewSVN
  75. Fix sanitizer lint check after r374315 — russell_gallop / ViewSVN
  76. [Mips] Fix 374055

    EXPENSIVE_CHECKS build was failing on new test.
    This is fixed by marking $ra register as undef.
    Test now has -verify-machineinstrs to check for operand flags. — mbrkusanin / ViewSVN
  77. [test] Use system locale for mri-utf8.test

    Summary:
    llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be
    installed for its last RUN line to work. If not installed, the unicode
    string gets encoded (interpreted) as ascii which fails since the most
    significant byte is non zero. This commit changes the test to only rely
    on the system being able to encode the pound sign in its default
    encoding (e.g. UTF-16 for Microsoft Windows) by always opening the file
    via input/output redirection. This avoids forcing a given locale to be
    present and supported. A Byte Order Mark is also added to help
    recognizing the encoding of the file and its endianness.

    Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb

    Subscribers: dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68472 — thopre / ViewSVN
  78. [UBSan] Appease linter — lebedevri / ViewSVN
  79. [Sanitizers] Porting getrandom/getentropy interceptors to FreeBSD

    - Available from 12.x branch, by the time it lands next year in FreeBSD tree, the 11.x's might be EOL.
    - Intentionally changed the getrandom test to C code as with 12.0 (might be fixed in CURRENT since), there is a linkage issue in C++ context.

    Reviewers: emaste, dim, vitalybuka

    Reviewed-By: vitalybuka

    Differential Revision: https://reviews.llvm.org/D68451 — David CARLIER / ViewSVN
  80. [UBSan] Split nullptr-and-nonzero-offset-variable.c in another direction — lebedevri / ViewSVN
  81. Revert "[ASan] Do not misrepresent high value address dereferences as null dereferences"

    As it was breaking bots running sanitizer lint check

    This reverts r374265 (git b577efe4567f1f6a711ad36e1d17280dd1c4f009) — russell_gallop / ViewSVN
  82. [UBSan] Split nullptr-and-nonzero-offset-variable.cpp into C and C++ variants

    I do not understand the BB failire, it fully passes locally. — lebedevri / ViewSVN
  83. [IfCvt][ARM] Optimise diamond if-conversion for code size

    Currently, the heuristics the if-conversion pass uses for diamond if-conversion
    are based on execution time, with no consideration for code size. This adds a
    new set of heuristics to be used when optimising for code size.

    This is mostly target-independent, because the if-conversion pass can
    see the code size of the instructions which it is removing. For thumb,
    there are a few passes (insertion of IT instructions, selection of
    narrow branches, and selection of CBZ instructions) which are run after
    if conversion and affect these heuristics, so I've added target hooks to
    better predict the code-size effect of a proposed if-conversion.

    Differential revision: https://reviews.llvm.org/D67350 — ostannard / ViewSVN
  84. [UBSan] Revisit nullptr-and-nonzero-offset-variable.cpp test to hopefully make it pass on sanitizer-windows BB — lebedevri / ViewSVN
  85. Remove rest of time-trace message as it is inconsistent style

    Other options which create output files don't produce output messages.
    Improve documentation to help find trace file.

    Differential Revision: https://reviews.llvm.org/D68710 — russell_gallop / ViewSVN
  86. [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

    Summary:
    Quote from http://eel.is/c++draft/expr.add#4:
    ```
    4     When an expression J that has integral type is added to or subtracted
          from an expression P of pointer type, the result has the type of P.
    (4.1) If P evaluates to a null pointer value and J evaluates to 0,
          the result is a null pointer value.
    (4.2) Otherwise, if P points to an array element i of an array object x with n
          elements ([dcl.array]), the expressions P + J and J + P
          (where J has the value j) point to the (possibly-hypothetical) array
          element i+j of x if 0≤i+j≤n and the expression P - J points to the
          (possibly-hypothetical) array element i−j of x if 0≤i−j≤n.
    (4.3) Otherwise, the behavior is undefined.
    ```

    Therefore, as per the standard, applying non-zero offset to `nullptr`
    (or making non-`nullptr` a `nullptr`, by subtracting pointer's integral value
    from the pointer itself) is undefined behavior. (*if* `nullptr` is not defined,
    i.e. e.g. `-fno-delete-null-pointer-checks` was *not* specified.)

    To make things more fun, in C (6.5.6p8), applying *any* offset to null pointer
    is undefined, although Clang front-end pessimizes the code by not lowering
    that info, so this UB is "harmless".

    Since rL369789 (D66608 `[InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P, null`)
    LLVM middle-end uses those guarantees for transformations.
    If the source contains such UB's, said code may now be miscompiled.
    Such miscompilations were already observed:
    * https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190826/687838.html
    * https://github.com/google/filament/pull/1566

    Surprisingly, UBSan does not catch those issues
    ... until now. This diff teaches UBSan about these UB's.

    `getelementpointer inbounds` is a pretty frequent instruction,
    so this does have a measurable impact on performance;
    I've addressed most of the obvious missing folds (and thus decreased the performance impact by ~5%),
    and then re-performed some performance measurements using my [[ https://github.com/darktable-org/rawspeed | RawSpeed ]] benchmark:
    (all measurements done with LLVM ToT, the sanitizer never fired.)
    * no sanitization vs. existing check: average `+21.62%` slowdown
    * existing check vs. check after this patch: average `22.04%` slowdown
    * no sanitization vs. this patch: average `48.42%` slowdown

    Reviewers: vsk, filcab, rsmith, aaron.ballman, vitalybuka, rjmccall, #sanitizers

    Reviewed By: rsmith

    Subscribers: kristof.beyls, nickdesaulniers, nikic, ychen, dtzWill, xbolva00, dberris, arphaman, rupprecht, reames, regehr, llvm-commits, cfe-commits

    Tags: #clang, #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67122 — lebedevri / ViewSVN
  87. Recommit "[Clang] Pragma vectorize_width() implies vectorize(enable)"

    This was further discussed at the llvm dev list:

    http://lists.llvm.org/pipermail/llvm-dev/2019-October/135602.html

    I think the brief summary of that is that this change is an improvement,
    this is the behaviour that we expect and promise in ours docs, and also
    as a result there are cases where we now emit diagnostics whereas before
    pragmas were silently ignored. Two areas where we can improve: 1) the
    diagnostic message itself, and 2) and in some cases (e.g. -Os and -Oz)
    the vectoriser is (quite understandably) not triggering.

    Original commit message:

    Specifying the vectorization width was supposed to implicitly enable
    vectorization, except that it wasn't really doing this. It was only
    setting the vectorize.width metadata, but not vectorize.enable.

    This should fix PR27643. — sjoerdmeijer / ViewSVN
  88. [update_cc_test_checks] Support 'clang | opt | FileCheck'

    Some clang lit tests use a pipeline of the form

    // RUN: %clang [args] -O0 %s | opt [specific optimizations] | FileCheck %s

    to make the expected test output depend on as few optimization phases
    as possible, for stability. But when you write a RUN line of this
    form, you lose the ability to use update_cc_test_checks.py to
    automatically generate the expected output, because it only supports
    two-stage pipelines consisting of '%clang | FileCheck' (or %clang_cc1).

    This change extends the set of supported RUN lines so that pipelines
    with an invocation of `opt` in the middle can still be automatically
    handled.

    To implement it, I've adjusted `get_function_body()` so that it can
    cope with an arbitrary sequence of intermediate pipeline commands. But
    the code that decides which RUN lines to consider is more
    conservative: it only adds clang | opt | FileCheck to the set of
    supported lines, because I didn't want to accidentally include some
    other kind of line that doesn't output IR at all.

    (Also in this commit is the minimal change to make this script work at
    all, after r373912 added an extra parameter to `add_ir_checks`.)

    Reviewers: MaskRay, xbolva00

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68406 — statham / ViewSVN
  89. [clang] prevent crash for nonnull attribut in constant context (Bug 43601)

    Summary:

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

    Reviewers: rnk

    Reviewed By: rnk

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68716 — tyker / ViewSVN
  90. AMDGPU: Use SGPR_128 instead of SReg_128 for vregs

    SGPR_128 only includes the real allocatable SGPRs, and SReg_128 adds
    the additional non-allocatable TTMP registers. There's no point in
    allocating SReg_128 vregs. This shrinks the size of the classes
    regalloc needs to consider, which is usually good. — arsenm / ViewSVN
  91. [X86] Add test case for trunc_packus_v16i32_v16i8 with avx512vl+avx512bw and prefer-vector-width=256 and min-legal-vector-width=256. NFC — ctopper / ViewSVN
  92. [Attributor][NFC] clang format — jdoerfert / ViewSVN
  93. [Attributor] Handle `null` differently in capture and alias logic

    Summary:
    `null` in the default address space (=AS 0) cannot be captured nor can
    it alias anything. We make this clear now as it can be important for
    callbacks and other cases later on. In addition, this patch improves the
    debug output for noalias deduction.

    Reviewers: sstefan1, uenoku

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68624 — jdoerfert / ViewSVN
  94. gn build: Merge r374277 — gnsyncbot / ViewSVN
  95. Reland "[TextAPI] Introduce TBDv4"

    Original Patch broke for compilations w/ gcc and exposed asan fail.
    This reland repairs those bugs.

    Differential Revision: https://reviews.llvm.org/D67529 — cishida / ViewSVN
  96. [ast] Fix indentation. NFC. — hliao / ViewSVN
  97. [sema] Revise `getCurrentMangleNumberContext` interface. NFC.

    - Prefer returning mulitple values using a tuple instead of
      additional pointers/references. — hliao / ViewSVN
  98. [PowerPC] add testcase for ppc loop instr form prep - NFC — shchenz / ViewSVN
  99. gn build: (manually) merge r374271 — nico / ViewSVN
  100. [libTooling] Move Transformer files to their own directory/library.

    Summary:
    The Transformer library has been growing inside of
    lib/Tooling/Refactoring. However, it's not really related to anything else in
    that directory. This revision moves all Transformer-related files into their own
    include & lib directories.  A followup revision will (temporarily) add
    forwarding headers to help any users migrate their code to the new location.

    Reviewers: gribozavr

    Subscribers: mgorny, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68637 — ymandel / ViewSVN
  101. Re-land [mangle] Fix mangling where an extra mangle context is required.

    This reverts r374268 (git commit c34385d07c7d59447bf836b740f032235391d121)

    I think I reverted this by mistake, so I'm relanding it. While my bisect
    found this revision, I think the crashes I'm seeing locally must be
    environmental. Maybe the version of clang I'm using miscompiles tot
    clang. — rnk / ViewSVN
  102. Revert [mangle] Fix mangling where an extra mangle context is required.

    This reverts r374200 (git commit fd18e94697c987d5f24e25aa4e27adaffff3cce4)

    Causes crashes just compiling `int main() {}` on my machine. — rnk / ViewSVN
  103. [codeview] Try to avoid emitting .cv_loc with line zero

    Summary:
    Visual Studio doesn't like it while stepping. It kicks you out of the
    source view of the file being stepped through and tries to fall back to
    the disassembly view.

    Fixes PR43530

    The fix is incomplete, because it's possible to have a basic block with
    no source locations at all. In this case, we don't emit a .cv_loc, but
    that will result in wrong stepping behavior in the debugger if the
    layout predecessor of the location-less BB has an unrelated source
    location. We could try harder to find a valid location that dominates or
    post-dominates the current BB, but in general it's a dataflow problem,
    and one still might not exist. I left a FIXME about this.

    As an alternative, we might want to consider having the middle-end check
    if its emitting codeview and get it to stop using line zero.

    Reviewers: akhuang

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68747 — rnk / ViewSVN
  104. Use -fdebug-compilation-dir to form absolute paths in coverage mappings

    This allows users to explicitly request relative paths with
    `-fdebug-compilation-dir .`.

    Fixes PR43614

    Reviewers: vsk, arphaman

    Differential Revision: https://reviews.llvm.org/D68733 — rnk / ViewSVN
  105. [ASan] Do not misrepresent high value address dereferences as null dereferences

    Dereferences with addresses above the 48-bit hardware addressable range
    produce "invalid instruction" (instead of "invalid access") hardware
    exceptions (there is no hardware address decoding logic for those bits),
    and the address provided by this exception is the address of the
    instruction (not the faulting address).  The kernel maps the "invalid
    instruction" to SEGV, but fails to provide the real fault address.

    Because of this ASan lies and says that those cases are null
    dereferences.  This downgrades the severity of a found bug in terms of
    security.  In the ASan signal handler, we can not provide the real
    faulting address, but at least we can try not to lie.

    rdar://50366151

    Reviewed By: vitalybuka

    Differential Revision: https://reviews.llvm.org/D68676 — yln / ViewSVN

#5509 (Oct 9, 2019 4:58:47 PM)

  1. [CUDA][HIP] Fix host/device check with -fopenmp

    CUDA/HIP program may be compiled with -fopenmp. In this case, -fopenmp is only passed to host compilation
    to take advantages of multi-threads computation.

    CUDA/HIP and OpenMP both use Sema::DeviceCallGraph to store functions to be analyzed and remove them
    once they decide the function is sure to be emitted. CUDA/HIP and OpenMP have different functions to determine
    if a function is sure to be emitted.

    To check host/device correctly for CUDA/HIP when -fopenmp is enabled, there needs a unified logic to determine
    whether a function is to be emitted. The logic needs to be aware of both CUDA and OpenMP logic.

    Differential Revision: https://reviews.llvm.org/D67837 — yaxunl / ViewSVN
  2. Conservatively add volatility and atomic checks in a few places

    As background, starting in D66309, I'm working on support unordered atomics analogous to volatile flags on normal LoadSDNode/StoreSDNodes for X86.

    As part of that, I spent some time going through usages of LoadSDNode and StoreSDNode looking for cases where we might have missed a volatility check or need an atomic check. I couldn't find any cases that clearly miscompile - i.e. no test cases - but a couple of pieces in code loop suspicious though I can't figure out how to exercise them.

    This patch adds defensive checks and asserts in the places my manual audit found. If anyone has any ideas on how to either a) disprove any of the checks, or b) hit the bug they might be fixing, I welcome suggestions.

    Differential Revision: https://reviews.llvm.org/D68419 — reames / ViewSVN
  3. gn build: Merge r374245 — gnsyncbot / ViewSVN
  4. [WebAssembly] Fix tests missed in rL374235 — tlively / ViewSVN
  5. [sanitizer_common] Remove OnPrint from Go build.

    Summary: Go now uses __sanitizer_on_print instead.

    Reviewers: vitalybuka, dvyukov

    Reviewed By: vitalybuka

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68621 — morehouse / ViewSVN
  6. AMDGPU: Don't fold copies to physregs

    In a future patch, this will help cleanup m0 handling.

    The register coalescer handles copies from a register that
    materializes an immediate, but doesn't handle move immediates
    itself. The virtual register uses will often be allocated to the same
    register, so there end up being no real copy. — arsenm / ViewSVN
  7. AMDGPU/GlobalISel: Fix crash on wide constant load with VGPR pointer

    This was ignoring the register bank of the input pointer, and
    isUniformMMO seems overly aggressive.

    This will now conservatively assume a VGPR in cases where the incoming
    bank hasn't been determined yet (i.e. is from a loop phi). — arsenm / ViewSVN
  8. AMDGPU: Relax register classes used — arsenm / ViewSVN
  9. AMDGPU: Fix typos — arsenm / ViewSVN
  10. GlobalISel: Implement fewerElementsVector for G_BUILD_VECTOR

    Turn it into a G_CONCAT_VECTORS of G_BUILD_VECTOR. — arsenm / ViewSVN
  11. gn build: (manually) merge r374219 — nico / ViewSVN
  12. [libc++][test] Miscellaneous MSVC cleanups

    * Silence unused-local-typedef warnings: `map.cons/assign_initializer_list.pass.cpp` (and the `set.cons` variant) uses a local typedef only within `LIBCPP_ASSERT`s, so clang diagnoses it as unused when testing non-libc++.
    * Add missing include: `c.math/abs.pass.cpp` uses `std::numeric_limits` but failed to `#include <limits>`.
    * Don't test non-type: A "recent" change to `meta.trans.other/underlying_type.pass.cpp` unconditionally tests the type `F` which is conditionally defined.
    * Use `hash<long long>` instead of `hash<short>` with `int` in `unordered_meow` deduction guide tests to avoid truncation warnings.
    * Convert `3.14` explicitly in `midpoint.float.pass` since MSVC incorrectly diagnoses `float meow = 3.14;` as truncating.

    Differential Revision: https://reviews.llvm.org/D68681 — caseycarter / ViewSVN
  13. [GISel] Refactor and split PatternMatchTest. NFC

    Split the ConstantFold part into a separate file and
    make it use the fixture GISelMITest. — mggm / ViewSVN
  14. [InstCombine] Fix PR43617

    Check for `nullptr` before inspecting composite function. — evandro / ViewSVN
  15. [AMDGPU] Fixed dpp combine of VOP1

    If original instruction did not have source modifiers they were
    not added to the new DPP instruction as well, even if needed.

    Differential Revision: https://reviews.llvm.org/D68729 — rampitec / ViewSVN
  16. [IRBuilder] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator

    Also update Clang to call Builder.CreateFNeg(...) for UnaryMinus.

    Differential Revision: https://reviews.llvm.org/D61675 — mcinally / ViewSVN
  17. [WebAssembly] Make returns variadic

    Summary:
    This is necessary and sufficient to get simple cases of multiple
    return working with multivalue enabled. More complex cases will
    require block and loop signatures to be generalized to potentially be
    type indices as well.

    Reviewers: aheejin, dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68684 — tlively / ViewSVN
  18. [SampleFDO] Add indexing for function profiles so they can be loaded on demand
    in ExtBinary format

    Currently for Text, Binary and ExtBinary format profiles, when we compile a
    module with samplefdo, even if there is no function showing up in the profile,
    we have to load all the function profiles from the profile input. That is a
    waste of compile time.

    CompactBinary format profile has already had the support of loading function
    profiles on demand. In this patch, we add the support to load profile on
    demand for ExtBinary format. It will work no matter the sections in ExtBinary
    format profile are compressed or not. Experiment shows it reduces the time to
    compile a server benchmark by 30%.

    When profile remapping and loading function profiles on demand are both used,
    extra work needs to be done so that the loading on demand process will take
    the name remapping into consideration. It will be addressed in a follow-up
    patch.

    Differential Revision: https://reviews.llvm.org/D68601 — wmi / ViewSVN
  19. llvm-dwarfdump: Support multiple debug_loclists contributions

    Also fixing the incorrect "offset" field being computed/printed for each
    location list. — dblaikie / ViewSVN
  20. [Docs] Adds section for Additional Topics on Reference page

    Adds a new section for Additional Topics on the Reference documentation page. Also moves Support Library topic to User Guides page. — dr87 / ViewSVN
  21. [libFuzzer] Fix Alarm callback in fuchsia.

    This patch adds an #if macro to skip the InFuzzingThread() comparison
    for fuchsia, similar to what it is done for Windows and NetBSD.

    In fuchsia, the alarm callback runs in a separate thread[0], making it fail
    the comparison InFuzzingThread(), breaking the -timeout flag.

    [0]:
    https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp#L323

    Author: charco (aka Marco  Vanotti)
    Differential Revision: https://reviews.llvm.org/D68166 — jakehehrlich / ViewSVN
  22. [OPENMP50]Fix scoring of contexts with and without user provided scores.

    The context selector with user provided score must have higher score
    than the context selector without user provided score. — abataev / ViewSVN
  23. [sanitizer, NFC] Fix grammar in comment — Vitaly Buka / ViewSVN
  24. [System Model] [TTI] Define AMDGPUTTIImpl::getST and AMDGPUTTIImpl::getTLI

    To fix "infinite recursion" warning. — Vitaly Buka / ViewSVN
  25. [System Model] [TTI] Fix virtual destructor warning — Vitaly Buka / ViewSVN
  26. [sanitizer] Disable signal_trap_handler on s390 — Vitaly Buka / ViewSVN
  27. [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries

    This patch removes the remaining part of the OpenMP offload linker scripts which was used for inserting device binaries into the output linked binary. Device binaries are now inserted into the host binary with a help of the wrapper bit-code file which contains device binaries as data. Wrapper bit-code file is dynamically created by the clang driver with a help of new tool clang-offload-wrapper which takes device binaries as input and produces bit-code file with required contents. Wrapper bit-code is then compiled to an object and resulting object is appended to the host linking by the clang driver.

    This is the second part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943).

    Differential Revision: https://reviews.llvm.org/D68166 — sdmitriev / ViewSVN
  28. [Docs] Adds Documentation links to sidebar

    Adds links to Getting Started/Tutorials, User Guides, and Reference documentation pages to sidebar. Also adds a new section for LLVM IR on the Reference documentation page. — dr87 / ViewSVN
  29. [sanitizer] Make signal_name a C test — Vitaly Buka / ViewSVN
  30. [sanitizer] Use raise() in test and cover more signals — Vitaly Buka / ViewSVN
  31. [ConstProp] add tests for extractelement with undef index; NFC — spatel / ViewSVN
  32. [AMDGPU] Use math constants defined in MathExtras (NFC)

    Use the the new math constants in `MathExtras.h`.

    Differential revision: https://reviews.llvm.org/D68285 — evandro / ViewSVN
  33. [Support] Add mathematical constants

    Add own version of the mathematical constants from the upcoming C++20 `std::numbers`.

    Differential revision: https://reviews.llvm.org/D68257 — evandro / ViewSVN
  34. [System Model] [TTI] Update cache and prefetch TTI interfaces

    Re-apply 9fdfb045ae8b/r365676 with fixes for PPC and Hexagon.  This involved
    moving defaults from TargetTransformInfoImplBase to MCSubtargetInfo.

    Rework the TTI cache and software prefetching APIs to prepare for the
    introduction of a general system model.  Changes include:

    - Marking existing interfaces const and/or override as appropriate
    - Adding comments
    - Adding BasicTTIImpl interfaces that delegate to a subtarget
      implementation
    - Moving the default TargetTransformInfoImplBase implementation to a default
      MCSubtarget implementation

    Only a handful of targets use these interfaces currently: AArch64, Hexagon, PPC
    and SystemZ.  AArch64 already has a custom subtarget implementation, so its
    custom TTI implementation is migrated to use the new facilities in BasicTTIImpl
    to invoke its custom subtarget implementation.  The custom TTI implementations
    continue to exist for the other targets with this change.  They are not moved
    over to subtarget-based implementations.

    The end goal is to have the default subtarget implementation defer to the system
    model defined by the target.  With this change, the default MCSubtargetInfo
    implementation essentially returns the defaults TargetTransformInfoImplBase used
    to return.  Existing users of TTI defaults will hit the defaults now in
    MCSubtargetInfo.  Targets that define their own custom TTI implementations won't
    use the BasicTTIImpl implementations that route to the subtarget.

    Once system models are in place for the targets that use these interfaces, their
    custom TTI implementations can be removed.

    Differential Revision: https://reviews.llvm.org/D63614 — greened / ViewSVN
  35. [ObjC generics] Fix not inheriting type bounds in categories/extensions.

    When a category/extension doesn't repeat a type bound, corresponding
    type parameter is substituted with `id` when used as a type argument. As
    a result, in the added test case it was causing errors like

    > type argument 'T' (aka 'id') does not satisfy the bound ('id<NSCopying>') of type parameter 'T'

    We are already checking that type parameters should be consistent
    everywhere (see `checkTypeParamListConsistency`) and update
    `ObjCTypeParamDecl` to have correct underlying type. And when we use the
    type parameter as a method return type or a method parameter type, it is
    substituted to the bounded type. But when we use the type parameter as a
    type argument, we check `ObjCTypeParamType` that ignores the updated
    underlying type and remains `id`.

    Fix by desugaring `ObjCTypeParamType` to the underlying type, the same
    way we are doing with `TypedefType`.

    rdar://problem/54329242

    Reviewers: erik.pilkington, ahatanak

    Reviewed By: erik.pilkington

    Subscribers: jkorous, dexonsmith, ributzka, cfe-commits

    Differential Revision: https://reviews.llvm.org/D66696 — vsapsai / ViewSVN
  36. [mangle] Fix mangling where an extra mangle context is required.

    Summary:
    - [Itanium C++ ABI][1], for certain contexts like default parameter and
      etc., mangling numbering will be local to the particular argument in
      which it appears.
    - However, for these cases, the mangle numbering context is allocated per
      expression evaluation stack entry. That causes, for example, two
      lambdas defined/used understand the same default parameter are
      numbered as the same value and, in turn, one of them is not generated
      at all.
    - In this patch, an extra mangle numbering context map is maintained in
      the AST context to map taht extra declaration context to its numbering
      context. So that, 2 different lambdas defined/used in the same default
      parameter are numbered differently.

    [1]: https://itanium-cxx-abi.github.io/cxx-abi/abi.html

    Reviewers: rsmith, eli.friedman

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68715 — hliao / ViewSVN
  37. [HIP] Fix -save-temps

    Currently clang does not save some of the intermediate file generated during device compilation for HIP when -save-temps is specified.

    This patch fixes that.

    Differential Revision: https://reviews.llvm.org/D68665 — yaxunl / ViewSVN
  38. DebugInfo: Shot in the dark attempt to fix ubsan error from r374122

    (specifying an underlying type for the enum might also be suitable - but
    this seems better/as good, since there's a clear expectation this can
    contain values other than the actual enumerators of this enum) — dblaikie / ViewSVN
  39. [lit] Refactor ProgressDisplay

    Move progress display to separate file.  Simplify some code paths.
    Decouple from other components via progress callback.  Remove unused
    `_Display` class.

    Reviewed By: serge-sans-paille

    Differential Revision: https://reviews.llvm.org/D68525 — yln / ViewSVN
  40. [ARM] Fix arm_neon.h with -flax-vector-conversions=none

    Really, we were already 99% of the way there; just needed a couple minor
    fixes that affected 64-bit-only builtins.  Based on D61717.

    Note that the change to builtin_str changes the type of a few
    __builtin_neon_* intrinsics that had the "wrong" type.

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

    Differential Revision: https://reviews.llvm.org/D68683 — efriedma / ViewSVN
  41. [InstCombine] add another test for gep inbounds; NFC — spatel / ViewSVN
  42. [WebAssembly] Add builtin and intrinsic for v8x16.swizzle

    Summary:
    This clang builtin and corresponding LLVM intrinsic are necessary to
    expose the exact semantics of the underlying WebAssembly instruction
    to users. LLVM produces a poison value if the dynamic swizzle indices
    are greater than the vector size, but the WebAssembly instruction sets
    the corresponding output lane to zero. Users who depend on this
    behavior can safely use this builtin.

    Depends on D68527.

    Reviewers: aheejin, dschuff

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

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D68531 — tlively / ViewSVN
  43. [WebAssembly] v8x16.swizzle and rewrite BUILD_VECTOR lowering

    Summary:
    Adds the new v8x16.swizzle SIMD instruction as specified at
    https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#swizzling-using-variable-indices.
    In addition to adding swizzles as a candidate lowering in
    LowerBUILD_VECTOR, also rewrites and simplifies the lowering to
    minimize the number of replace_lanes necessary rather than trying to
    minimize code size. This leads to more uses of v128.const instead of
    splats, which is expected to increase performance.

    The new code will be easier to tune once V8 implements all the vector
    construction operations, and it will also be easier to add new
    candidate instructions in the future if necessary.

    Reviewers: aheejin, dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68527 — tlively / ViewSVN
  44. [FPEnv][NFC] Change test to conform to strictfp attribute rules.

    In particular, the function definition is not marked strictfp despite
    containing a function marked strictfp. Also, if any function call is marked
    strictfp then all function calls in that function must be marked.

    This change to move the one strictfp call to a new properly marked function
    meets all the new rules.

    Tested with a stricter version of D68233.

    Reviewed by: spatel
    Approved by: spatel
    Differential Revision: https://reviews.llvm.org/D68713 — kpn / ViewSVN
  45. [SLP] respect target register width for GEP vectorization (PR43578)

    We failed to account for the target register width (max vector factor)
    when vectorizing starting from GEPs. This causes vectorization to
    proceed to obviously illegal widths as in:
    https://bugs.llvm.org/show_bug.cgi?id=43578

    For x86, this also means that SLP can produce rogue AVX or AVX512
    code even when the user specifies a narrower vector width.

    The AArch64 test in ext-trunc.ll appears to be better using the
    narrower width. I'm not exactly sure what getelementptr.ll is trying
    to do, but it's testing with "-slp-threshold=-18", so I'm not worried
    about those diffs. The x86 test is an over-reduction from SPEC h264;
    this patch appears to restore the perf loss caused by SLP when using
    -march=haswell.

    Differential Revision: https://reviews.llvm.org/D68667 — spatel / ViewSVN
  46. [AArch64] Ensure no tagged memory is left in the unallocated portion of the
    stack

    This patch makes sure that if we tag some memory, we untag that memory before
    the function returns/throws via any exit, reachable from the tag operation. For
    that we place the untag operation either at:

      a) the lifetime end call for the alloca, if that call post-dominates the
         lifetime start call (where the tag operation is placed), or it (the
         lifetime end call) dominates all reachable exits, otherwise
      b) at the reachable exits

    Differential Revision: https://reviews.llvm.org/D68469 — chill / ViewSVN
  47. [NFC] Remove files got accidentally upload in llvm-svn 374179 — jasonliu / ViewSVN
  48. [AIX][XCOFF][NFC] Change the SectionLen field name of CSect Auxiliary entry to SectionOrLength.

    Summary:
    According the the XCOFF document,
    If
    Then
    XTY_SD
    x_scnlen contains the csect length.
    XTY_LD
    x_scnlen contains the symbol table index of the containing csect.
    XTY_CM
    x_scnlen contains the csect length.
    XTY_ER
    x_scnlen contains 0.

    Change the SectionLen member name to SectionOrLength is more reasonable.

    Authored By: DiggerLin

    Reviewed By: hubert.reinterpretcast

    Differential Revision: https://reviews.llvm.org/D68650 — jasonliu / ViewSVN
  49. Re-land "[dsymutil] Fix handling of common symbols in multiple object files."

    The original patch got reverted because it hit a long-standing legacy
    issue on Windows that prevents files from being named `com`. Thanks
    Kristina & Jeremy for pointing this out. — Jonas Devlieghere / ViewSVN
  50. [MemorySSA] Make the use of moveAllAfterMergeBlocks consistent.

    Summary:
    The rule for the moveAllAfterMergeBlocks API si for all instructions
    from `From` to have been moved to `To`, while keeping the CFG edges (and
    block terminators) unchanged.
    Update all the callsites for moveAllAfterMergeBlocks to follow this.

    Pending follow-up: since the same behavior is needed everytime, merge
    all callsites into one. The common denominator may be the call to
    `MergeBlockIntoPredecessor`.

    Resolves PR43569.

    Reviewers: george.burgess.iv

    Subscribers: Prazek, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68659 — asbirlea / ViewSVN
  51. [NFC] Reverting changes from test commit.
    llvm commit access test succeeded. — mitchell / ViewSVN
  52. [NFC] Test commit.
    Testing llvm commit access only. — mitchell / ViewSVN
  53. [scudo][standalone] Get statistics in a char buffer

    Summary:
    Following up on D68471, this CL introduces some `getStats` APIs to
    gather statistics in char buffers (`ScopedString` really) instead of
    printing them out right away. Ultimately `printStats` will just
    output the buffer, but that allows us to potentially do some work
    on the intermediate buffer, and can be used for a `mallocz` type
    of functionality. This allows us to pretty much get rid of all the
    `Printf` calls around, but I am keeping the function in for
    debugging purposes.

    This changes the existing tests to use the new APIs when required.

    I will add new tests as suggested in D68471 in another CL.

    Reviewers: morehouse, hctim, vitalybuka, eugenis, cferris

    Reviewed By: morehouse

    Subscribers: delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D68653 — cryptoad / ViewSVN
  54. [clang-format] Update noexcept reference qualifiers detection

    Summary:
    r373165 fixed an issue where a templated noexcept member function with a
    reference qualifier would be indented more than expected:
    ```
    // Formatting produced with LLVM style with AlwaysBreakTemplateDeclarations: Yes

    // before r373165:
    struct f {
      template <class T>
          void bar() && noexcept {}
    };

    // after:
    struct f {
      template <class T>
      void bar() && noexcept {}
    };

    ```
    The way this is done is that in the AnnotatingParser in
    `lib/FormatTokenAnnotator.cpp` the determination of the usage of a `&` or `&&`
    (the line in determineTokenType

    ```
    Current.Type = determineStarAmpUsage(...
    ```
    is not performed in some cases anymore, combining with a few additional related
    checks afterwards. The net effect of these checks results in the `&` or `&&`
    token to start being classified as `TT_Unknown` in cases where before `r373165`
    it would be classified as `TT_UnaryOperator` or `TT_PointerOrReference` by
    `determineStarAmpUsage`.

    This inadvertently caused 2 classes of regressions I'm aware of:

    - The address-of `&` after a function assignment would be classified as
      `TT_Unknown`, causing spaces to surround it, disregarding style options:
    ```
    // before r373165:
    void (*fun_ptr)(void) = &fun;

    // after:
    void (*fun_ptr)(void) = & fun;
    ```

    - In cases where there is a function declaration list -- looking macro between
      a template line and the start of the function declaration, an `&` as part of
      the return type would be classified as `TT_Unknown`, causing spaces to
      surround it:
    ```
    // before r373165:
    template <class T>
    DEPRECATED("lala")
    Type& foo();

    // after:
    template <class T>
    DEPRECATED("lala")
    Type & foo();
    ```

    In these cases the problems are rooted in the skipping of the classification of
    a `&` (and similarly `&&`) by determineStarAmpUsage which effects the formatting
    decisions later in the pipeline.

    I've looked into the goal of r373165 and noticed that replacing `noexcept` with
    `const` in the given example produces no extra indentation with the old code:
    ```
    // before r373165:
    struct f {
      template <class T>
      int foo() & const {}
    };

    struct f {
      template <class T>
          int foo() & noexcept {}
    };
    ```

    I investigated how clang-format annotated these two examples differently to
    determine the places where the processing of both diverges in the pipeline.
    There were two places where the processing diverges, causing the extra indent in
    the `noexcept` case:
    1. The `const` is annotated as a `TT_TrailingAnnotation`, whereas `noexcept`
       is annotated as `TT_Unknown`. I've updated the `determineTokenType` function
       to account for this by adding a missing `tok:kw_noexcept` to the clause that
       marks a token as `TT_TrailingAnnotation`.
    2. The `&` in the second example is wrongly identified as `TT_BinaryOperator`
       in `determineStarAmpUsage`. This is the reason for the extra indentation --
       clang-format gets confused and thinks this is an expression.
       I've updated `determineStarAmpUsage` to check for `tok:kw_noexcept`.

    With these two updates in place, the additional parsing introduced by r373165
    becomes unnecessary and all added tests pass (with updates, as now clang-format
    respects the style configuration for spaces around the `&` in the test
    examples).
    I've removed these additions and added regression tests for the cases above.

    Reviewers: AndWass, MyDeveloperDay

    Reviewed By: MyDeveloperDay

    Subscribers: cfe-commits

    Tags: #clang, #clang-format

    Differential Revision: https://reviews.llvm.org/D68695 — krasimir / ViewSVN
  55. Fix Wdocumentation unknown parameter warning. NFCI. — rksimon / ViewSVN
  56. [llvm-exegesis] Ensure that ExecutableFunction are aligned.

    Summary: Experiments show that this is the alignment we get (for ELF+Linux), but let's ensure that we have it.

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68703 — courbet / ViewSVN
  57. Add and adjust saturating tests. NFC

    This adds some extra testing to the existing [su][add/sub]_sat X86 and AArch64
    tests and adds equivalent tests for ARM. — dmgreen / ViewSVN
  58. [clangd] Make sure ReplyCallbacks are destroyed before RequestCancelersMutex

    Summary:
    After rL374163, replycallbacks might have a cancellable context, which
    will try to access RequestCancellers on destruction. See
    http://45.33.8.238/mac/1245/step_7.txt for a sample failure.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68702 — kadircet / ViewSVN
  59. [clang-offload-bundler] Support `.cui` and `.d`.

    Reviewers: tra, yaxunl

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68663 — hliao / ViewSVN
  60. [LV] Emitting SCEV checks with OptForSize

    When optimising for size and SCEV runtime checks need to be emitted to check
    overflow behaviour, the loop vectorizer can run in this assert:

      LoopVectorize.cpp:2699: void llvm::InnerLoopVectorizer::emitSCEVChecks(
      llvm::Loop *, llvm::BasicBlock *): Assertion `!BB->getParent()->hasOptSize()
      && "Cannot SCEV check stride or overflow when opt

    We should not generate predicates while optimising for size because
    code will be generated for predicates such as these SCEV overflow runtime
    checks.

    This should fix PR43371.

    Differential Revision: https://reviews.llvm.org/D68082 — sjoerdmeijer / ViewSVN
  61. [mips] Rename local variable. NFC — atanasyan / ViewSVN
  62. [mips] Split expandLoadImmReal into multiple methods. NFC

    The `expandLoadImmReal` handles four different and almost non-overlapping
    cases: loading a "single" float immediate into a GPR, loading a "single"
    float immediate into a FPR, and the same couple for a "double" float
    immediate.

    It's better to move each `else if` branch into separate methods. — atanasyan / ViewSVN
  63. [clangd] Propagate context into reply handlers — kadircet / ViewSVN
  64. [llvm-exegesis] Fix r374158

    Some bots complain about missing 'class':

    LlvmState.h:70:40: error: declaration of ‘std::unique_ptr<const llvm::TargetMachine> llvm::exegesis::LLVMState::TargetMachine’ [-fpermissive]
       std::unique_ptr<const TargetMachine> TargetMachine; — courbet / ViewSVN
  65. [CostModel][X86] Add tests for insertelement to non-immediate vector element indices — rksimon / ViewSVN
  66. [CostModel][X86] Add tests for extractelement from non-immediate vector element indices — rksimon / ViewSVN
  67. [ARM] Add saturating arithmetic tests for MVE. NFC — dmgreen / ViewSVN
  68. [llvm-exegesis][NFC] Remove extra `llvm::` qualifications.

    Summary: Second patch: in the lib.

    Reviewers: gchatelet

    Subscribers: nemanjai, tschuett, MaskRay, mgrang, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68692 — courbet / ViewSVN
  69. [llvm-exegesis][NFC] Remove extra `llvm::` qualifications.

    Summary: First patch: in unit tests.

    Subscribers: nemanjai, tschuett, MaskRay, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68687 — courbet / ViewSVN
  70. [mips] Set default float ABI to "soft" on FreeBSD

    Initial patch by Kyle Evans.

    Fix PR43596 — atanasyan / ViewSVN
  71. [DebugInfo] Enable call site debug info for ARM and AArch64

    ARM and AArch64 SelectionDAG support for tacking parameter forwarding
    register is implemented so we can allow clang invocations for those two
    targets.
    Beside that restrict debug entry value support to be emitted for
    LimitedDebugInfo info and FullDebugInfo. Other types of debug info do
    not have functions nor variables debug info.

    Reviewers: aprantl, probinson, dstenb, vsk

    Reviewed By: vsk

    Differential Revision: https://reviews.llvm.org/D67004 — nikolaprica / ViewSVN
  72. [Sema] Emit diagnostics for uncorrected delayed typos at the end of TU

    Summary:
    Instead of asserting all typos are corrected in the sema destructor.

    The sema destructor is not run in the common case of running the compiler
    with the -disable-free cc1 flag (which is the default in the driver).

    Having this assertion led to crashes in libclang and clangd, which are not
    reproducible when running the compiler.

    Asserting at the end of the TU could be an option, but finding all
    missing typo correction cases is hard and having worse diagnostics instead
    of a failing assertion is a better trade-off.

    For more discussion on this, see:
    https://lists.llvm.org/pipermail/cfe-dev/2019-July/062872.html

    Reviewers: sammccall, rsmith

    Reviewed By: rsmith

    Subscribers: usaxena95, dgoldman, jkorous, vsapsai, rnk, kadircet, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64799 — ibiryukov / ViewSVN
  73. Revert r374006: Reland 'Add VFS support for sanitizers' blacklist'

    Also revert follow-up changes to the test.
    Reason: the patch breaks our internal clang-tidy integration.

    It's also unclear why we should use getRealPath instead of plumbing the
    VFS to SanitizerBlacklist, see original commit thread of cfe-commits for
    a discussion. — ibiryukov / ViewSVN
  74. [TableGen] Fix crash when using HwModes in CodeEmitterGen

    When an instruction has an encoding definition for only a subset of
    the available HwModes, ensure we just avoid generating an encoding
    rather than crash. — jamesm / ViewSVN
  75. [llvm-exegesis] Add missing std::move in rL374146.

    This was breaking some bots:

    /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/include/llvm/Support/Error.h:483:5:   required from ‘llvm::Expected<T>::Expected(OtherT&&, typename std::enable_if<std::is_convertible<_Rep2, _Rep>::value>::type*) [with OtherT = std::vector<llvm::exegesis::CodeTemplate>&; T = std::vector<llvm::exegesis::CodeTemplate>; typename std::enable_if<std::is_convertible<_Rep2, _Rep>::value>::type = void]’
    /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/tools/llvm-exegesis/lib/X86/Target.cpp:238:20:   required from here
    /usr/include/c++/6/bits/stl_construct.h:75:7: error: use of deleted function ‘llvm::exegesis::CodeTemplate::CodeTemplate(const llvm::exegesis::CodeTemplate&)’
         { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ — courbet / ViewSVN
  76. Unify the two CRC implementations

    David added the JamCRC implementation in r246590. More recently, Eugene
    added a CRC-32 implementation in r357901, which falls back to zlib's
    crc32 function if present.

    These checksums are essentially the same, so having multiple
    implementations seems unnecessary. This replaces the CRC-32
    implementation with the simpler one from JamCRC, and implements the
    JamCRC interface in terms of CRC-32 since this means it can use zlib's
    implementation when available, saving a few bytes and potentially making
    it faster.

    JamCRC took an ArrayRef<char> argument, and CRC-32 took a StringRef.
    This patch changes it to ArrayRef<uint8_t> which I think is the best
    choice, and simplifies a few of the callers nicely.

    Differential revision: https://reviews.llvm.org/D68570 — hans / ViewSVN
  77. [llvm-exegesis][NFC] Fix rL374146.

    Remove extra semicolon: Target.cpp:187:2: warning: extra ‘;’ [-Wpedantic] — courbet / ViewSVN
  78. [llvm-exegesis] Explore LEA addressing modes.

    Summary:
    This will help for PR32326.

    This shows the well-known issue with `RBP` and `R13` as base registers.

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits, RKSimon, andreadb

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68646 — courbet / ViewSVN
  79. Revert r374139, "[dsymutil] Fix handling of common symbols in multiple object files."

    The added test files ("com", "com1.o", "com2.o") are reserved names on
    Windows, and makes 'git checkout' fail with a filesystem error. — jmorse / ViewSVN
  80. [llvm-exegesis][NFC] Remove unecessary `using llvm::` directives.

    We've been in namespace llvm for at least a year. — courbet / ViewSVN

#5508 (Oct 8, 2019 10:28:25 PM)

  1. [dsymutil] Fix handling of common symbols in multiple object files.

    For common symbols the linker emits only a single symbol entry in the
    debug map. This caused dsymutil to not relocate common symbols when
    linking DWARF coming form object files that did not have this entry.
    This patch fixes that by keeping track of common symbols in the object
    files and synthesizing a debug map entry for them using the address from
    the main binary.

    Differential revision: https://reviews.llvm.org/D68680 — Jonas Devlieghere / ViewSVN
  2. [TypeSize] Fix module builds (cassert)

    TypeSize.h uses `assert` statements without including
    the <cassert> header first which leads to failures
    in modular builds. — Kristina Brooks / ViewSVN
  3. Optimize operator=(const basic_string&) for tail call.

    Patch by Martijn Vels (mvels@google.com)
    Reviewed as https://reviews.llvm.org/D68276

    This is a non trivial win for externally templated assignment operator.

    x86 without tail call (current libc++)

    0000000000000000 <std::string::operator=(std::string const&)>:
       0:   55                      push   %rbp
       1:   48 89 e5                mov    %rsp,%rbp
       4:   53                      push   %rbx
       5:   50                      push   %rax
       6:   48 89 fb                mov    %rdi,%rbx
       9:   48 39 f7                cmp    %rsi,%rdi
       c:   74 17                   je     25 <std::string::operator=(std::string const&)+0x25>
       e:   0f b6 56 17             movzbl 0x17(%rsi),%edx
      12:   84 d2                   test   %dl,%dl
      14:   79 07                   jns    1d <std::string::operator=(std::string const&)+0x1d>
      16:   48 8b 56 08             mov    0x8(%rsi),%rdx
      1a:   48 8b 36                mov    (%rsi),%rsi
      1d:   48 89 df                mov    %rbx,%rdi
      20:   e8 00 00 00 00          callq  25 <std::string::operator=(std::string const&)+0x25>
      25:   48 89 d8                mov    %rbx,%rax
      28:   48 83 c4 08             add    $0x8,%rsp
      2c:   5b                      pop    %rbx
      2d:   5d                      pop    %rbp
      2e:   c3                      retq

    After:

    0000000000000000 <std::string::operator=(std::string const&)>:
       0:   48 39 f7                cmp    %rsi,%rdi
       3:   74 14                   je     19 <std::string::operator=(std::string const&)+0x19>
       5:   0f b6 56 17             movzbl 0x17(%rsi),%edx
       9:   84 d2                   test   %dl,%dl
       b:   79 07                   jns    14 <std::string::operator=(std::string const&)+0x14>
       d:   48 8b 56 08             mov    0x8(%rsi),%rdx
      11:   48 8b 36                mov    (%rsi),%rsi
      14:   e9 00 00 00 00          jmpq   19 <std::string::operator=(std::string const&)+0x19>
      19:   48 89 f8                mov    %rdi,%rax
      1c:   c3                      retq

    Benchmark (pending per https://reviews.llvm.org/D67667)

    ```
    BM_StringAssignStr_Empty_Opaque                     6.23ns ± 0%             5.19ns ± 0%  -16.70%          (p=0.016 n=5+4)
    BM_StringAssignStr_Empty_Transparent                5.86ns ± 0%             5.14ns ± 0%  -12.24%          (p=0.008 n=5+5)
    BM_StringAssignStr_Small_Opaque                     8.79ns ± 1%             7.69ns ± 0%  -12.53%          (p=0.008 n=5+5)
    BM_StringAssignStr_Small_Transparent                9.44ns ± 0%             8.00ns ± 0%  -15.26%          (p=0.008 n=5+5)
    BM_StringAssignStr_Large_Opaque                     25.2ns ± 0%             24.3ns ± 0%   -3.50%          (p=0.008 n=5+5)
    BM_StringAssignStr_Large_Transparent                23.6ns ± 0%             22.5ns ± 0%   -4.76%          (p=0.008 n=5+5)
    BM_StringAssignStr_Huge_Opaque                       319ns ± 5%              317ns ± 5%     ~             (p=0.690 n=5+5)
    BM_StringAssignStr_Huge_Transparent                  319ns ± 5%              317ns ± 5%     ~             (p=0.421 n=5+5)
    BM_StringAssignAsciiz_Empty_Opaque                  7.41ns ± 0%             7.77ns ± 0%   +4.89%          (p=0.008 n=5+5)
    BM_StringAssignAsciiz_Empty_Transparent             7.54ns ± 3%             7.30ns ± 0%   -3.24%          (p=0.008 n=5+5)
    BM_StringAssignAsciiz_Small_Opaque                  9.87ns ± 0%            10.24ns ± 1%   +3.76%          (p=0.008 n=5+5)
    BM_StringAssignAsciiz_Small_Transparent             10.4ns ± 1%              9.8ns ± 2%   -5.78%          (p=0.008 n=5+5)
    BM_StringAssignAsciiz_Large_Opaque                  30.1ns ± 0%             30.1ns ± 0%     ~             (p=0.167 n=5+5)
    BM_StringAssignAsciiz_Large_Transparent             27.1ns ± 0%             27.4ns ± 0%   +0.92%          (p=0.016 n=4+5)
    BM_StringAssignAsciiz_Huge_Opaque                    383ns ± 4%              382ns ± 4%     ~             (p=0.548 n=5+5)
    BM_StringAssignAsciiz_Huge_Transparent               375ns ± 0%              380ns ± 0%   +1.37%          (p=0.029 n=4+4)
    BM_StringAssignAsciizMix_Opaque                     14.0ns ± 0%             14.0ns ± 0%     ~             (p=0.881 n=5+5)
    BM_StringAssignAsciizMix_Transparent                13.7ns ± 1%             13.8ns ± 0%     ~             (p=0.056 n=5+5)
    ``` — ericwf / ViewSVN
  4. [c++20] P1152R4: warn on any simple-assignment to a volatile lvalue
    whose value is not ignored.

    We don't warn on all the cases that are deprecated: specifically, we
    choose to not warn for now if there are parentheses around the
    assignment but its value is not actually used. This seems like a more
    defensible rule, particularly for cases like sizeof(v = a), where the
    parens are part of the operand rather than the sizeof syntax. — rsmith / ViewSVN
  5. [c++20] Implement most of P1152R4.

    Diagnose some now-deprecated uses of volatile types:
    * as function parameter types and return types
    * as the type of a structured binding declaration
    * as the type of the lvalue operand of an increment / decrement /
       compound assignment operator

    This does not implement a check for the deprecation of simple
    assignments whose results are used; that check requires somewhat
    more complexity and will be addressed separately. — rsmith / ViewSVN
  6. [cxx_status] Note that Clang has supported std::source_location since
    version 9. — rsmith / ViewSVN
  7. Factor out some duplication. NFC. — rsmith / ViewSVN
  8. gn build: unbreak libcxx build after r374116 by restoring gen_link_script.py for gn — nico / ViewSVN
  9. [Docs] Fixes broken sphinx build - undefined label

    Removes label ref pointing to non-existent subsystem docs page. — dr87 / ViewSVN
  10. [clang-scan-deps] Improve string/character literal skipping

    The existing string/character literal skipping code in the
    dependency directives source minimizer has two issues:

    - It doesn't stop the scanning when a newline is reached before the terminating character,
    unlike the lexer which considers the token to be done (even if it's invalid) at the end of the line.

    - It doesn't support whitespace between '\' and the newline when looking if the '\' is used as a line continuation character.

    This commit fixes both issues.

    Differential Revision: https://reviews.llvm.org/D68436 — arphaman / ViewSVN
  11. [IRGen] Emit lifetime markers for temporary struct allocas

    When passing arguments using temporary allocas, we need to add the
    appropriate lifetime markers so that the stack coloring passes can
    re-use the stack space.

    This patch keeps track of all the lifetime.start calls emited before the
    codegened call, and adds the corresponding lifetime.end calls after the
    call.

    Differential Revision: https://reviews.llvm.org/D68611 — thegameg / ViewSVN
  12. [sanitizer] Fix crypt.cpp on Android again — Vitaly Buka / ViewSVN
  13. [IA] Add tests for a few other edge cases

    Test with the last eight bits within the range [7F, FF] and with
    lower-case hex letters. — void / ViewSVN
  14. [dsymutil] Improve verbose output (NFC)

    The verbose output for finding relocations assumed that we'd always dump
    the DIE after (which starts with a newline) and therefore didn't include
    one itself. However, this isn't always true, leading to garbled output.

    This patch adds a newline to the verbose output and adds a line that
    says that the DIE is being kept (which isn't obvious otherwise). It also
    adds a 0x prefix to the relocations. — Jonas Devlieghere / ViewSVN
  15. DebugInfo: Move LLE enum handling to .def to match RLE handling — dblaikie / ViewSVN
  16. [libc++] Workaround old versions of CMake that don't understand list(JOIN) — Louis Dionne / ViewSVN
  17. Fix crash or wrong code bug if a lifetime-extended temporary contains a
    "non-constant" value.

    If the constant evaluator evaluates part of a variable initializer,
    including the initializer for some lifetime-extended temporary, but
    fails to fully evaluate the initializer, it can leave behind wrong
    values for temporaries encountered in that initialization. Don't try to
    emit those from CodeGen! Instead, look at the values that constant
    evaluation produced if (and only if) it actually succeeds and we're
    emitting the lifetime-extending declaration's initializer as a constant. — rsmith / ViewSVN
  18. [libc++] Move the linker script generation step to CMake

    Summary:
    This allows the linker script generation to query CMake properties
    (specifically the dependencies of libc++.so) instead of having to
    carry these dependencies around manually in global variables. Notice
    the removal of the LIBCXX_INTERFACE_LIBRARIES global variable.

    Reviewers: phosek, EricWF

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

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D68343 — Louis Dionne / ViewSVN
  19. [sanitizer] Fix crypt.cpp test on Darwin — Vitaly Buka / ViewSVN
  20. [clang] enable_trivial_var_init_zero should not be Joined<>

    Reviewers: rnk

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68610 — Vitaly Buka / ViewSVN
  21. [CVP} Replace SExt with ZExt if the input is known-non-negative

    Summary:
    zero-extension is far more friendly for further analysis.
    While this doesn't directly help with the shift-by-signext problem, this is not unrelated.

    This has the following effect on test-suite (numbers collected after the finish of middle-end module pass manager):
    | Statistic                            |     old |     new | delta | percent change |
    | correlated-value-propagation.NumSExt |       0 |    6026 |  6026 |   +100.00%     |
    | instcount.NumAddInst                 |  272860 |  271283 | -1577 |     -0.58%     |
    | instcount.NumAllocaInst              |   27227 |   27226 | -1    |      0.00%     |
    | instcount.NumAndInst                 |   63502 |   63320 | -182  |     -0.29%     |
    | instcount.NumAShrInst                |   13498 |   13407 | -91   |     -0.67%     |
    | instcount.NumAtomicCmpXchgInst       |    1159 |    1159 |  0    |      0.00%     |
    | instcount.NumAtomicRMWInst           |    5036 |    5036 |  0    |      0.00%     |
    | instcount.NumBitCastInst             |  672482 |  672353 | -129  |     -0.02%     |
    | instcount.NumBrInst                  |  702768 |  702195 | -573  |     -0.08%     |
    | instcount.NumCallInst                |  518285 |  518205 | -80   |     -0.02%     |
    | instcount.NumExtractElementInst      |   18481 |   18482 |  1    |      0.01%     |
    | instcount.NumExtractValueInst        |   18290 |   18288 | -2    |     -0.01%     |
    | instcount.NumFAddInst                |  139035 |  138963 | -72   |     -0.05%     |
    | instcount.NumFCmpInst                |   10358 |   10348 | -10   |     -0.10%     |
    | instcount.NumFDivInst                |   30310 |   30302 | -8    |     -0.03%     |
    | instcount.NumFenceInst               |     387 |     387 |  0    |      0.00%     |
    | instcount.NumFMulInst                |   93873 |   93806 | -67   |     -0.07%     |
    | instcount.NumFPExtInst               |    7148 |    7144 | -4    |     -0.06%     |
    | instcount.NumFPToSIInst              |    2823 |    2838 |  15   |      0.53%     |
    | instcount.NumFPToUIInst              |    1251 |    1251 |  0    |      0.00%     |
    | instcount.NumFPTruncInst             |    2195 |    2191 | -4    |     -0.18%     |
    | instcount.NumFSubInst                |   92109 |   92103 | -6    |     -0.01%     |
    | instcount.NumGetElementPtrInst       | 1221423 | 1219157 | -2266 |     -0.19%     |
    | instcount.NumICmpInst                |  479140 |  478929 | -211  |     -0.04%     |
    | instcount.NumIndirectBrInst          |       2 |       2 |  0    |      0.00%     |
    | instcount.NumInsertElementInst       |   66089 |   66094 |  5    |      0.01%     |
    | instcount.NumInsertValueInst         |    2032 |    2030 | -2    |     -0.10%     |
    | instcount.NumIntToPtrInst            |   19641 |   19641 |  0    |      0.00%     |
    | instcount.NumInvokeInst              |   21789 |   21788 | -1    |      0.00%     |
    | instcount.NumLandingPadInst          |   12051 |   12051 |  0    |      0.00%     |
    | instcount.NumLoadInst                |  880079 |  878673 | -1406 |     -0.16%     |
    | instcount.NumLShrInst                |   25919 |   25921 |  2    |      0.01%     |
    | instcount.NumMulInst                 |   42416 |   42417 |  1    |      0.00%     |
    | instcount.NumOrInst                  |  100826 |  100576 | -250  |     -0.25%     |
    | instcount.NumPHIInst                 |  315118 |  314092 | -1026 |     -0.33%     |
    | instcount.NumPtrToIntInst            |   15933 |   15939 |  6    |      0.04%     |
    | instcount.NumResumeInst              |    2156 |    2156 |  0    |      0.00%     |
    | instcount.NumRetInst                 |   84485 |   84484 | -1    |      0.00%     |
    | instcount.NumSDivInst                |    8599 |    8597 | -2    |     -0.02%     |
    | instcount.NumSelectInst              |   45577 |   45913 |  336  |      0.74%     |
    | instcount.NumSExtInst                |   84026 |   78278 | -5748 |     -6.84%     |
    | instcount.NumShlInst                 |   39796 |   39726 | -70   |     -0.18%     |
    | instcount.NumShuffleVectorInst       |  100272 |  100292 |  20   |      0.02%     |
    | instcount.NumSIToFPInst              |   29131 |   29113 | -18   |     -0.06%     |
    | instcount.NumSRemInst                |    1543 |    1543 |  0    |      0.00%     |
    | instcount.NumStoreInst               |  805394 |  804351 | -1043 |     -0.13%     |
    | instcount.NumSubInst                 |   61337 |   61414 |  77   |      0.13%     |
    | instcount.NumSwitchInst              |    8527 |    8524 | -3    |     -0.04%     |
    | instcount.NumTruncInst               |   60523 |   60484 | -39   |     -0.06%     |
    | instcount.NumUDivInst                |    2381 |    2381 |  0    |      0.00%     |
    | instcount.NumUIToFPInst              |    5549 |    5549 |  0    |      0.00%     |
    | instcount.NumUnreachableInst         |    9855 |    9855 |  0    |      0.00%     |
    | instcount.NumURemInst                |    1305 |    1305 |  0    |      0.00%     |
    | instcount.NumXorInst                 |   10230 |   10081 | -149  |     -1.46%     |
    | instcount.NumZExtInst                |   60353 |   66840 |  6487 |     10.75%     |
    | instcount.TotalBlocks                |  829582 |  829004 | -578  |     -0.07%     |
    | instcount.TotalFuncs                 |   83818 |   83817 | -1    |      0.00%     |
    | instcount.TotalInsts                 | 7316574 | 7308483 | -8091 |     -0.11%     |

    TLDR: we produce -0.11% less instructions, -6.84% less `sext`, +10.75% more `zext`.
    To be noted, clearly, not all new `zext`'s are produced by this fold.

    (And now i guess it might have been interesting to measure this for D68103 :S)

    Reviewers: nikic, spatel, reames, dberlin

    Reviewed By: nikic

    Subscribers: hiraditya, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68654 — lebedevri / ViewSVN
  22. [CVP][NFC] Revisit sext vs. zext test — lebedevri / ViewSVN
  23. [clang] Add llvm-ifs in test deps — Vitaly Buka / ViewSVN
  24. Fix `compiler_rt_logbf_test.c` test failure for Builtins-i386-darwin test suite.

    Summary:
    It seems that compiler-rt's implementation and Darwin
    libm's implementation of `logbf()` differ when given a NaN
    with raised sign bit. Strangely this behaviour only happens with
    i386 Darwin libm. For x86_64 and x86_64h the existing compiler-rt
    implementation matched Darwin libm.

    To workaround this the `compiler_rt_logbf_test.c` has been modified
    to do a comparison on the `fp_t` type and if that fails check if both
    values are NaN. If both values are NaN they are equivalent and no
    error needs to be raised.

    rdar://problem/55565503

    Reviewers: rupprecht, scanon, compnerd, echristo
    Subscribers: #sanitizers, llvm-commits
    Tags: #llvm, #sanitizers
    Differential Revision: https://reviews.llvm.org/D67999 — delcypher / ViewSVN
  25. [OPENMP50]Multiple vendors in vendor context must be treated as logical
    and of vendors, not or.

    If several vendors are provided in the same vendor context trait, the
    context shall match only if all vendors are matching, not one of them.
    This is per OpenMP 5.0, 2.3.3 Matching and Scoring Context Selectors,
    all selectors in the construct, device, and implementation sets of the
    context selector appear in the corresponding trait set of the OpenMP
    context. — abataev / ViewSVN
  26. Try to get ubsan-blacklist-vfs.c pass more on Windows — nico / ViewSVN
  27. Try to get readability-deleted-default.cpp to pass on Windows.

    In MS compatibility mode, "extern inline void g()" is not a redundant
    declaration for "inline void g()", because of redeclForcesDefMSVC()
    (see PR19264, r205485).

    To fix, run the test with -fms-compatiblity forced on and off
    and explicit check for the differing behavior for extern inline.

    Final bit of PR43593.

    Differential Revision: https://reviews.llvm.org/D68640 — nico / ViewSVN
  28. Mark several PointerIntPair methods as lvalue-only

    No point in mutating 'this' if it's just going to be thrown away.

    https://reviews.llvm.org/D63945 — jrose / ViewSVN
  29. [tblgen] Add getOperatorAsDef() to Record

    Summary:
    While working with DagInit's, it's often the case that you expect the
    operator to be a reference to a def. This patch adds a wrapper for this
    common case to reduce the amount of boilerplate callers need to duplicate
    repeatedly.

    getOperatorAsDef() returns the record if the DagInit has an operator that is
    a DefInit. Otherwise, it prints a fatal error.

    There's only a few pre-existing examples in LLVM at the moment and I've
    left a few instances of the code this simplifies as they had more specific
    error messages than the generic one this produces. I'm going to be using
    this a fair bit in my subsequent patches.

    Reviewers: bogner, volkan, nhaehnle

    Reviewed By: nhaehnle

    Subscribers: nhaehnle, hiraditya, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, lenary, s.egerton, pzheng, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68424 — dsanders / ViewSVN
  30. [BPF] do compile-once run-everywhere relocation for bitfields

    A bpf specific clang intrinsic is introduced:
       u32 __builtin_preserve_field_info(member_access, info_kind)
    Depending on info_kind, different information will
    be returned to the program. A relocation is also
    recorded for this builtin so that bpf loader can
    patch the instruction on the target host.
    This clang intrinsic is used to get certain information
    to facilitate struct/union member relocations.

    The offset relocation is extended by 4 bytes to
    include relocation kind.
    Currently supported relocation kinds are
    enum {
        FIELD_BYTE_OFFSET = 0,
        FIELD_BYTE_SIZE,
        FIELD_EXISTENCE,
        FIELD_SIGNEDNESS,
        FIELD_LSHIFT_U64,
        FIELD_RSHIFT_U64,
    };
    for __builtin_preserve_field_info. The old
    access offset relocation is covered by
        FIELD_BYTE_OFFSET = 0.

    An example:
    struct s {
        int a;
        int b1:9;
        int b2:4;
    };
    enum {
        FIELD_BYTE_OFFSET = 0,
        FIELD_BYTE_SIZE,
        FIELD_EXISTENCE,
        FIELD_SIGNEDNESS,
        FIELD_LSHIFT_U64,
        FIELD_RSHIFT_U64,
    };

    void bpf_probe_read(void *, unsigned, const void *);
    int field_read(struct s *arg) {
      unsigned long long ull = 0;
      unsigned offset = __builtin_preserve_field_info(arg->b2, FIELD_BYTE_OFFSET);
      unsigned size = __builtin_preserve_field_info(arg->b2, FIELD_BYTE_SIZE);
    #ifdef USE_PROBE_READ
      bpf_probe_read(&ull, size, (const void *)arg + offset);
      unsigned lshift = __builtin_preserve_field_info(arg->b2, FIELD_LSHIFT_U64);
    #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
      lshift = lshift + (size << 3) - 64;
    #endif
    #else
      switch(size) {
      case 1:
        ull = *(unsigned char *)((void *)arg + offset); break;
      case 2:
        ull = *(unsigned short *)((void *)arg + offset); break;
      case 4:
        ull = *(unsigned int *)((void *)arg + offset); break;
      case 8:
        ull = *(unsigned long long *)((void *)arg + offset); break;
      }
      unsigned lshift = __builtin_preserve_field_info(arg->b2, FIELD_LSHIFT_U64);
    #endif
      ull <<= lshift;
      if (__builtin_preserve_field_info(arg->b2, FIELD_SIGNEDNESS))
        return (long long)ull >> __builtin_preserve_field_info(arg->b2, FIELD_RSHIFT_U64);
      return ull >> __builtin_preserve_field_info(arg->b2, FIELD_RSHIFT_U64);
    }

    There is a minor overhead for bpf_probe_read() on big endian.

    The code and relocation generated for field_read where bpf_probe_read() is
    used to access argument data on little endian mode:
            r3 = r1
            r1 = 0
            r1 = 4  <=== relocation (FIELD_BYTE_OFFSET)
            r3 += r1
            r1 = r10
            r1 += -8
            r2 = 4  <=== relocation (FIELD_BYTE_SIZE)
            call bpf_probe_read
            r2 = 51 <=== relocation (FIELD_LSHIFT_U64)
            r1 = *(u64 *)(r10 - 8)
            r1 <<= r2
            r2 = 60 <=== relocation (FIELD_RSHIFT_U64)
            r0 = r1
            r0 >>= r2
            r3 = 1  <=== relocation (FIELD_SIGNEDNESS)
            if r3 == 0 goto LBB0_2
            r1 s>>= r2
            r0 = r1
    LBB0_2:
            exit

    Compare to the above code between relocations FIELD_LSHIFT_U64 and
    FIELD_LSHIFT_U64, the code with big endian mode has four more
    instructions.
            r1 = 41   <=== relocation (FIELD_LSHIFT_U64)
            r6 += r1
            r6 += -64
            r6 <<= 32
            r6 >>= 32
            r1 = *(u64 *)(r10 - 8)
            r1 <<= r6
            r2 = 60   <=== relocation (FIELD_RSHIFT_U64)

    The code and relocation generated when using direct load.
            r2 = 0
            r3 = 4
            r4 = 4
            if r4 s> 3 goto LBB0_3
            if r4 == 1 goto LBB0_5
            if r4 == 2 goto LBB0_6
            goto LBB0_9
    LBB0_6:                                 # %sw.bb1
            r1 += r3
            r2 = *(u16 *)(r1 + 0)
            goto LBB0_9
    LBB0_3:                                 # %entry
            if r4 == 4 goto LBB0_7
            if r4 == 8 goto LBB0_8
            goto LBB0_9
    LBB0_8:                                 # %sw.bb9
            r1 += r3
            r2 = *(u64 *)(r1 + 0)
            goto LBB0_9
    LBB0_5:                                 # %sw.bb
            r1 += r3
            r2 = *(u8 *)(r1 + 0)
            goto LBB0_9
    LBB0_7:                                 # %sw.bb5
            r1 += r3
            r2 = *(u32 *)(r1 + 0)
    LBB0_9:                                 # %sw.epilog
            r1 = 51
            r2 <<= r1
            r1 = 60
            r0 = r2
            r0 >>= r1
            r3 = 1
            if r3 == 0 goto LBB0_11
            r2 s>>= r1
            r0 = r2
    LBB0_11:                                # %sw.epilog
            exit

    Considering verifier is able to do limited constant
    propogation following branches. The following is the
    code actually traversed.
            r2 = 0
            r3 = 4   <=== relocation
            r4 = 4   <=== relocation
            if r4 s> 3 goto LBB0_3
    LBB0_3:                                 # %entry
            if r4 == 4 goto LBB0_7
    LBB0_7:                                 # %sw.bb5
            r1 += r3
            r2 = *(u32 *)(r1 + 0)
    LBB0_9:                                 # %sw.epilog
            r1 = 51   <=== relocation
            r2 <<= r1
            r1 = 60   <=== relocation
            r0 = r2
            r0 >>= r1
            r3 = 1
            if r3 == 0 goto LBB0_11
            r2 s>>= r1
            r0 = r2
    LBB0_11:                                # %sw.epilog
            exit

    For native load case, the load size is calculated to be the
    same as the size of load width LLVM otherwise used to load
    the value which is then used to extract the bitfield value.

    Differential Revision: https://reviews.llvm.org/D67980 — yhs / ViewSVN
  31. [NFC] Attempt to make ubsan-blacklist-vfs test pass on Windows

    Previously disabled in d0c2d5daa3e — Jan Korous / ViewSVN
  32. [driver][hip] Skip bundler if host action is nothing.

    Reviewers: sfantao, tra, yaxunl

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68652 — hliao / ViewSVN
  33. [OPENMP50]Do not allow multiple same context traits in the same context
    selector.

    According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each
    trait-selector-name can only be specified once. Added check for this
    restriction. — abataev / ViewSVN
  34. AMDGPU: Fix i16 arithmetic pattern redundancy

    There were 2 problems here. First, these patterns were duplicated to
    handle the inverted shift operands instead of using the commuted
    PatFrags.

    Second, the point of the zext folding patterns don't apply to the
    non-0ing high subtargets. They should be skipped instead of inserting
    the extension. The zeroing high code would be emitted when necessary
    anyway. This was also emitting unnecessary zexts in cases where the
    high bits were undefined. — arsenm / ViewSVN
  35. Revert "[LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize"

    Also Revert "[LoopVectorize] Fix non-debug builds after rL374017"

    This reverts commit 9f41deccc0e648a006c9f38e11919f181b6c7e0a.
    This reverts commit 18b6fe07bcf44294f200bd2b526cb737ed275c04.

    The patch is breaking PowerPC internal build, checked with author, reverting
    on behalf of him for now due to timezone. — jsji / ViewSVN
  36. [SLP] add test with prefer-vector-width function attribute; NFC (PR43578) — spatel / ViewSVN
  37. [CodeExtractor] Factor out and reuse shrinkwrap analysis

    Factor out CodeExtractor's analysis of allocas (for shrinkwrapping
    purposes), and allow the analysis to be reused.

    This resolves a quadratic compile-time bug observed when compiling
    AMDGPUDisassembler.cpp.o.

    Pre-patch (Release + LTO clang):

    ```
       ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
      176.5278 ( 57.8%)   0.4915 ( 18.5%)  177.0192 ( 57.4%)  177.4112 ( 57.3%)  Hot Cold Splitting
    ```

    Post-patch (ReleaseAsserts clang):

    ```
       ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
      1.4051 (  3.3%)   0.0079 (  0.3%)   1.4129 (  3.2%)   1.4129 (  3.2%)  Hot Cold Splitting
    ```

    Testing: check-llvm, and comparing the AMDGPUDisassembler.cpp.o binary
    pre- vs. post-patch.

    An alternate approach is to hide CodeExtractorAnalysisCache from clients
    of CodeExtractor, and to recompute the analysis from scratch inside of
    CodeExtractor::extractCodeRegion(). This eliminates some redundant work
    in the shrinkwrapping legality check. However, some clients continue to
    exhibit O(n^2) compile time behavior as computing the analysis is O(n).

    rdar://55912966

    Differential Revision: https://reviews.llvm.org/D68616 — Vedant Kumar / ViewSVN
  38. [sanitizer] Disable crypt*.cpp tests on Android — Vitaly Buka / ViewSVN
  39. AMDGPU: Add offsets to MMO when lowering buffer intrinsics

    Summary:
    Without offsets on the MachineMemOperands (MMOs),
    MachineInstr::mayAlias() will return true for all reads and writes to the
    same resource descriptor.  This leads to O(N^2) complexity in the MachineScheduler
    when analyzing dependencies of buffer loads and stores.  It also limits
    the SILoadStoreOptimizer from merging more instructions.

    This patch reduces the compile time of one pathological compute shader
    from 12 seconds to 1 second.

    Reviewers: arsenm, nhaehnle

    Reviewed By: arsenm

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65097 — tstellar / ViewSVN
  40. [Attributor][Fix] Temporary fix for windows build bot failure

    D65402 causes test failure related to attributor-max-iterations.
    This commit removes attributor-max-iterations-verify for now.
    I'll examine the factor and the flag should be reverted. — uenoku / ViewSVN
  41. CodeGenPrepare - silence static analyzer dyn_cast<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use cast<> directly and if not assert will fire for us. — rksimon / ViewSVN
  42. [AMDGPU] Disable unused gfx10 dpp instructions

    Inhibit generation of unused real dpp instructions on gfx10 just
    like it is done on other subtargets. This does not change anything
    because these are illegal anyway and not accepted, but it does
    reduce the number of instruction definitions generated.

    Differential Revision: https://reviews.llvm.org/D68607 — rampitec / ViewSVN
  43. [libc++] Make sure we link all system libraries into the benchmarks

    It turns out that r374056 broke _some_ build bots again, specifically
    the ones using sanitizers. Instead of trying to link the right system
    libraries to the benchmarks bit-by-bit, let's just link exactly the
    system libraries that libc++ itself needs. — Louis Dionne / ViewSVN
  44. [UpdateCCTestChecks] Detect function mangled name on separate line

    Sometimes functions with large comment blocks in front of them have their
    declarations output on several lines by c-index-test.  Hence the one-line
    function name/line/mangled pattern will not work to detect them.  Break the
    pattern up into two patterns and keep state after seeing the name/line
    information until we finally see the mangled name.

    Differential Revision: https://reviews.llvm.org/D68272 — greened / ViewSVN
  45. [NFC][CVP] Add tests where we can replace sext with zext

    If the sign bit of the value that is being sign-extended is not set,
    i.e. the value is non-negative (s>= 0), then zero-extension will suffice,
    and is better for analysis: https://rise4fun.com/Alive/a8PD — lebedevri / ViewSVN
  46. (Re)generate various tests. NFC — deadalnix / ViewSVN
  47. [WebAssembly] Fix a bug in 'try' placement

    Summary:
    When searching for local expression tree created by stackified
    registers, for 'block' placement, we start the search from the previous
    instruction of a BB's terminator. But in 'try''s case, we should start
    from the previous instruction of a call that can throw, or a EH_LABEL
    that precedes the call, because the return values of the call's previous
    instructions can be stackified and consumed by the throwing call.

    For example,
    ```
      i32.call @foo
      call @bar         ; may throw
      br $label0
    ```
    In this case, if we start the search from the previous instruction of
    the terminator (`br` here), we end up stopping at `call @bar` and place
    a 'try' between `i32.call @foo` and `call @bar`, because `call @bar`
    does not have a return value so it is not a local expression tree of
    `br`.

    But in this case, unlike when placing 'block's, we should start the
    search from `call @bar`, because the return value of `i32.call @foo` is
    stackified and used by `call @bar`.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68619 — aheejin / ViewSVN
  48. [OPENMP50]Prohibit multiple context selector sets in context selectors.

    According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each
    trait-set-selector-name can only be specified once. Added check to
    implement this restriction. — abataev / ViewSVN
  49. [builtins] Unbreak build on FreeBSD armv7 after D60351

    headers include reordering.

    Reviewers: phosek, echristo

    Reviewed-By: phosek

    Differential Revsion: https://reviews.llvm.org/D68045 — David CARLIER / ViewSVN
  50. [DebugInfo][If-Converter] Update call site info during the optimization

    During the If-Converter optimization pay attention when copying or
    deleting call instructions in order to keep call site information in
    valid state.

    Reviewers: aprantl, vsk, efriedma

    Reviewed By: vsk, efriedma

    Differential Revision: https://reviews.llvm.org/D66955 — nikolaprica / ViewSVN
  51. gn build: Merge r374062 — gnsyncbot / ViewSVN
  52. gn build: Merge r374061 — gnsyncbot / ViewSVN
  53. [Attributor][MustExec] Deduce dereferenceable and nonnull attribute using MustBeExecutedContextExplorer

    Summary:
    In D65186 and related patches, MustBeExecutedContextExplorer is introduced. This enables us to traverse instructions guaranteed to execute from function entry. If we can know the argument is used as `dereferenceable` or `nonnull` in these instructions, we can mark `dereferenceable` or `nonnull` in the argument definition:

    1. Memory instruction (similar to D64258)
    Trace memory instruction pointer operand. Currently, only inbounds GEPs are traced.
    ```
    define i64* @f(i64* %a) {
    entry:
      %add.ptr = getelementptr inbounds i64, i64* %a, i64 1
    ; (because of inbounds GEP we can know that %a is at least dereferenceable(16))
      store i64 1, i64* %add.ptr, align 8
      ret i64* %add.ptr ; dereferenceable 8 (because above instruction stores into it)
    }
    ```

    2. Propagation from callsite (similar to D27855)
    If `deref` or `nonnull` are known in call site parameter attributes we can also say that argument also that attribute.

    ```
    declare void @use3(i8* %x, i8* %y, i8* %z);
    declare void @use3nonnull(i8* nonnull %x, i8* nonnull %y, i8* nonnull %z);

    define void @parent1(i8* %a, i8* %b, i8* %c) {
      call void @use3nonnull(i8* %b, i8* %c, i8* %a)
    ; Above instruction is always executed so we can say that@parent1(i8* nonnnull %a, i8* nonnull %b, i8* nonnull %c)
      call void @use3(i8* %c, i8* %a, i8* %b)
      ret void
    }
    ```

    Reviewers: jdoerfert, sstefan1, spatel, reames

    Reviewed By: jdoerfert

    Subscribers: xbolva00, hiraditya, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65402 — uenoku / ViewSVN
  54. Revert [TextAPI] Introduce TBDv4

    This reverts r374058 (git commit 5d566c5a46aeaa1fa0e5c0b823c9d5f84036dc9a) — cishida / ViewSVN
  55. [clang][ifs] Clang Interface Stubs ToolChain plumbing.

    Second Landing Attempt:

    This patch enables end to end support for generating ELF interface stubs
    directly from clang. Now the following:

    clang -emit-interface-stubs -o libfoo.so a.cpp b.cpp c.cpp

    will product an ELF binary with visible symbols populated. Visibility attributes
    and -fvisibility can be used to control what gets populated.

    * Adding ToolChain support for clang Driver IFS Merge Phase
    * Implementing a default InterfaceStubs Merge clang Tool, used by ToolChain
    * Adds support for the clang Driver to involve llvm-ifs on ifs files.
    * Adds -emit-merged-ifs flag, to tell llvm-ifs to emit a merged ifs text file
      instead of the final object format (normally ELF)


    Differential Revision: https://reviews.llvm.org/D63978 — zer0 / ViewSVN
  56. [Attributor] Add helper class to compose two structured deduction.

    Summary: This patch introduces a generic way to compose two structured deductions.  This will be used for composing generic deduction with `MustBeExecutedExplorer` and other existing generic deduction.

    Reviewers: jdoerfert, sstefan1

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66645 — uenoku / ViewSVN
  57. gn build: Merge r374058 — gnsyncbot / ViewSVN
  58. [TextAPI] Introduce TBDv4

    Summary:
    This format introduces new features and platforms
    The motivation for this format is to support more than 1 platform since previous versions only supported additional architectures and 1 platform,
    for example ios + ios-simulator and macCatalyst.

    Reviewers: ributzka, steven_wu

    Reviewed By: ributzka

    Subscribers: mgorny, hiraditya, mgrang, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67529 — cishida / ViewSVN
  59. [OPENMP50]Allow functions in declare variant directive to have different
    C linkage.

    After some discussion with OpenMP developers, it was decided that the
    functions with the different C linkage can be used in declare variant
    directive. — abataev / ViewSVN
  60. [libc++] TAKE 2: Make system libraries PRIVATE dependencies of libc++

    We tried doing that previously (in r373487) and failed (reverted in
    r373506) because the benchmarks needed to link against system libraries
    and relied on libc++'s dependencies being propagated. Now that this has
    been fixed (in r374053), this commit marks the system libraries as
    PRIVATE dependencies of libc++. — Louis Dionne / ViewSVN
  61. [Mips] Emit proper ABI for _mcount calls

    When -pg option is present than a call to _mcount is inserted into every
    function. However since the proper ABI was not followed then the generated
    gmon.out did not give proper results. By inserting needed instructions
    before every _mcount we can fix this.

    Differential Revision: https://reviews.llvm.org/D68390 — mbrkusanin / ViewSVN
  62. [llvm-exegesis] Add options to SnippetGenerator.

    Summary:
    This adds a `-max-configs-per-opcode` option to limit the number of
    configs per opcode.

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68642 — courbet / ViewSVN
  63. [libc++] Add missing link-time dependencies to the benchmarks

    Since the benchmarks build with -nostdlib, they need to manually link
    against some system libraries that are used by the benchmarks and the
    GoogleBenchmark library itself.

    Previously, we'd rely on the fact that these libraries were linked
    through the PUBLIC dependencies of cxx_shared/cxx_static. However,
    if we were to make these dependencies PRIVATE (as they should be
    because they are implementation details of libc++), the benchmarks
    would fail to link. This commit remediates that. — Louis Dionne / ViewSVN
  64. Object/minidump: Add support for the MemoryInfoList stream

    Summary:
    This patch adds the definitions of the constants and structures
    necessary to interpret the MemoryInfoList minidump stream, as well as
    the object::MinidumpFile interface to access the stream.

    While the code is fairly simple, there is one important deviation from
    the other minidump streams, which is worth calling out explicitly.
    Unlike other "List" streams, the size of the records inside
    MemoryInfoList stream is not known statically. Instead it is described
    in the stream header. This makes it impossible to return
    ArrayRef<MemoryInfo> from the accessor method, as it is done with other
    streams. Instead, I create an iterator class, which can be parameterized
    by the runtime size of the structure, and return
    iterator_range<iterator> instead.

    Reviewers: amccarth, jhenderson, clayborg

    Subscribers: JosephTremoulet, zturner, markmentovai, lldb-commits, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68210 — labath / ViewSVN
  65. [libc++] Use PRIVATE to link benchmark dependencies

    It's better style to use PRIVATE when linking libraries to executables,
    and it doesn't make a difference since executables don't need to propagate
    their link-time dependencies anyway. — Louis Dionne / ViewSVN
  66. Nope, I'm wrong. It looks like someone else removed these on purpose and
    it just happened to break the bot right when I did my push. So I'm undoing
    this mornings incorrect push. I've also kicked off an email to hopefully
    get the bot fixed the correct way. — kpn / ViewSVN
  67. [clangd] Disable expand auto on decltype(auto)

    Summary: Applying it produces incorrect code at the moment.

    Reviewers: sammccall

    Reviewed By: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68630 — ibiryukov / ViewSVN
  68. [clangd] Bump timeouts in speculative completion tests — kadircet / ViewSVN
  69. Restore documentation that 'svn update' unexpectedly yanked out from under me. — kpn / ViewSVN
  70. fix fmls fp16

    Tim Northover remarked that the added patterns for fmls fp16
    produce wrong code in case the fsub instruction has a
    multiplication as its first operand, i.e., all the patterns FMLSv*_OP1:

    > define <8 x half> @test_FMLSv8f16_OP1(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
    > ; CHECK-LABEL: test_FMLSv8f16_OP1:
    > ; CHECK: fmls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
    > entry:
    >
    >   %mul = fmul fast <8 x half> %c, %b
    >   %sub = fsub fast <8 x half> %mul, %a
    >   ret <8 x half> %sub
    > }
    >
    > This doesn't look right to me. The exact instruction produced is "fmls
    > v0.8h, v2.8h, v1.8h", which I think calculates "v0 - v2*v1", but the
    > IR is calculating "v2*v1-v0". The equivalent <4 x float> code also
    > doesn't emit an fmls.

    This patch generates an fmla and negates the value of the operand2 of the fsub.

    Inspecting the pattern match, I found that there was another mistake in the
    opcode to be selected: matching FMULv4*16 should generate FMLSv4*16
    and not FMLSv2*32.

    Tested on aarch64-linux with make check-all.

    Differential Revision: https://reviews.llvm.org/D67990 — spop / ViewSVN
  71. Add test for rotating truncated vectors. NFC — deadalnix / ViewSVN
  72. [SVE][IR] Scalable Vector size queries and IR instruction support

    * Adds a TypeSize struct to represent the known minimum size of a type
      along with a flag to indicate that the runtime size is a integer multiple
      of that size
    * Converts existing size query functions from Type.h and DataLayout.h to
      return a TypeSize result
    * Adds convenience methods (including a transparent conversion operator
      to uint64_t) so that most existing code 'just works' as if the return
      values were still scalars.
    * Uses the new size queries along with ElementCount to ensure that all
      supported instructions used with scalable vectors can be constructed
      in IR.

    Reviewers: hfinkel, lattner, rkruppe, greened, rovka, rengolin, sdesmalen

    Reviewed By: rovka, sdesmalen

    Differential Revision: https://reviews.llvm.org/D53137 — huntergr / ViewSVN
  73. AMDGPU: Propagate undef flag during pre-RA exec mask optimizations

    Summary: Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204

    Reviewers: arsenm, rampitec

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68184 — nha / ViewSVN
  74. MachineSSAUpdater: insert IMPLICIT_DEF at top of basic block

    Summary:
    When getValueInMiddleOfBlock happens to be called for a basic block
    that has no incoming value at all, an IMPLICIT_DEF is inserted in that
    block via GetValueAtEndOfBlockInternal. This IMPLICIT_DEF must be at
    the top of its basic block or it will likely not reach the use that
    the caller intends to insert.

    Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204

    Reviewers: arsenm, rampitec

    Subscribers: jvesely, wdng, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68183 — nha / ViewSVN
  75. [SLP] add test with prefer-vector-width function attribute; NFC — spatel / ViewSVN
  76. [LoopRotate] Unconditionally get DomTree.

    LoopRotate is a loop pass and the DomTree should always be available.

    Similar to a70c5261436322a53187d67b8bdc0445d0463a9a — fhahn / ViewSVN
  77. [Diagnostics] Silence -Wsizeof-array-div for character buffers

    Summary:
    Character buffers are sometimes used to represent a pool of memory that
    contains non-character objects, due to them being synonymous with a stream of
    bytes on almost all modern architectures. Often, when interacting with hardware
    devices, byte buffers are therefore used as an intermediary and so we can end
    Character buffers are sometimes used to represent a pool of memory that
    contains non-character objects, due to them being synonymous with a stream of
    bytes on almost all modern architectures. Often, when interacting with hardware
    devices, byte buffers are therefore used as an intermediary and so we can end
    up generating lots of false-positives.

    Moreover, due to the ability of character pointers to alias non-character
    pointers, the strict aliasing violations that would generally be implied by the
    calculations caught by the warning (if the calculation itself is in fact
    correct) do not apply here, and so although the length calculation may be
    wrong, that is the only possible issue.

    Reviewers: rsmith, xbolva00, thakis

    Reviewed By: xbolva00, thakis

    Subscribers: thakis, lebedev.ri, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68526 — jrtc27 / ViewSVN
  78. [MCA][LSUnit] Track loads and stores until retirement.

    Before this patch, loads and stores were only tracked by their corresponding
    queues in the LSUnit from dispatch until execute stage. In practice we should be
    more conservative and assume that memory opcodes leave their queues at
    retirement stage.

    Basically, loads should leave the load queue only when they have completed and
    delivered their data. We conservatively assume that a load is completed when it
    is retired. Stores should be tracked by the store queue from dispatch until
    retirement. In practice, stores can only leave the store queue if their data can
    be written to the data cache.

    This is mostly a mechanical change. With this patch, the retire stage notifies
    the LSUnit when a memory instruction is retired. That would triggers the release
    of LDQ/STQ entries.  The only visible change is in memory tests for the bdver2
    model. That is because bdver2 is the only model that defines the load/store
    queue size.

    This patch partially addresses PR39830.

    Differential Revision: https://reviews.llvm.org/D68266 — adibiagio / ViewSVN
  79. [ISEL][ARM][AARCH64] Tracking simple parameter forwarding registers

    Support for tracking registers that forward function parameters into the
    following function frame. For now we only support cases when parameter
    is forwarded through single register.

    Reviewers: aprantl, vsk, t.p.northover

    Reviewed By: vsk

    Differential Revision: https://reviews.llvm.org/D66953 — nikolaprica / ViewSVN
  80. Remove an useless allocation (from by clang-analyzer/scan-build)
    https://llvm.org/reports/scan-build/report-TargetInfo.cpp-detectFPCCEligibleStruct-9-1.html#EndPath — sylvestre / ViewSVN
  81. [llvm-exegesis] Finish plumbing the `Config` field.

    Summary:
    Right now there are no snippet generators that emit the `Config` Field,
    but I plan to add it to investigate LEA operands for PR32326.

    What was broken was:
    - `Config` Was not propagated up until the BenchmarkResult::Key.
    - Clustering should really consider different configs as measuring
    different things, so we should stabilize on (Opcode, Config) instead of
    just Opcode.

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits, lebedev.ri

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68629 — courbet / ViewSVN
  82. [llvm-readobj/llvm-readelf] - Add checks for GNU-style to "all.test" test case.

    We do not check the GNU-style output when -all is given.
    This patch does that.

    Differential revision: https://reviews.llvm.org/D68462 — grimar / ViewSVN
  83. [NFC] Add REQUIRES for r374017 in testcase — wuzish / ViewSVN
  84. [LoopRotate] Unconditionally get ScalarEvolution.

    Summary: LoopRotate is a loop pass and SE should always be available.

    Reviewers: anemet, asbirlea

    Reviewed By: asbirlea

    Differential Revision: https://reviews.llvm.org/D68573 — fhahn / ViewSVN
  85. [ARM] Generate vcmp instead of vcmpe

    Based on the discussion in
    http://lists.llvm.org/pipermail/llvm-dev/2019-October/135574.html, the
    conclusion was reached that the ARM backend should produce vcmp instead
    of vcmpe instructions by default, i.e. not be producing an Invalid
    Operation exception when either arguments in a floating point compare
    are quiet NaNs.

    In the future, after constrained floating point intrinsics for floating
    point compare have been introduced, vcmpe instructions probably should
    be produced for those intrinsics - depending on the exact semantics
    they'll be defined to have.

    This patch logically consists of the following parts:
    - Revert http://llvm.org/viewvc/llvm-project?rev=294945&view=rev and
      http://llvm.org/viewvc/llvm-project?rev=294968&view=rev, which
      implemented fine-tuning for when to produce vcmpe (i.e. not do it for
      equality comparisons). The complexity introduced by those patches
      isn't needed anymore if we just always produce vcmp instead. Maybe
      these patches need to be reintroduced again once support is needed to
      map potential LLVM-IR constrained floating point compare intrinsics to
      the ARM instruction set.
    - Simply select vcmp, instead of vcmpe, see simple changes in
      lib/Target/ARM/ARMInstrVFP.td
    - Adapt lots of tests that tested for vcmpe (instead of vcmp). For all
      of these test, the intent of what is tested for isn't related to
      whether the vcmp should produce an Invalid Operation exception or not.

    Fixes PR43374.

    Differential Revision: https://reviews.llvm.org/D68463 — kbeyls / ViewSVN
  86. [Tools] Mark output of tools as text if it is text

    Several LLVM tools write text files/streams without using OF_Text.
    This can cause problems on platforms which distinguish between
    text and binary output. This PR adds the OF_Text flag for the
    following tools:

    - llvm-dis
    - llvm-dwarfdump
    - llvm-mca
    - llvm-mc (assembler files only)
    - opt (assembler files only)
    - RemarkStreamer (used e.g. by opt)

    Reviewers: rnk, vivekvpandya, Bigcheese, andreadb

    Differential Revision: https://reviews.llvm.org/D67696 — redstar / ViewSVN
  87. [LoopVectorize] Fix non-debug builds after rL374017 — kadircet / ViewSVN
  88. [llvm-exegesis] Add stabilization test with config

    In preparation for D68629. — courbet / ViewSVN

#5507 (Oct 8, 2019 12:06:15 AM)

  1. [IA] Recognize hexadecimal escape sequences

    Summary:
    Implement support for hexadecimal escape sequences to match how GNU 'as'
    handles them. I.e., read all hexadecimal characters and truncate to the
    lower 16 bits.

    Reviewers: nickdesaulniers, jcai19

    Subscribers: llvm-commits, hiraditya

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68598 — void / ViewSVN
  2. [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize

    In loop-vectorize, interleave count and vector factor depend on target register number. Currently, it does not
    estimate different register pressure for different register class separately(especially for scalar type,
    float type should not be on the same position with int type), so it's not accurate. Specifically,
    it causes too many times interleaving/unrolling, result in too many register spills in loop body and hurting performance.

    So we need classify the register classes in IR level, and importantly these are abstract register classes,
    and are not the target register class of backend provided in td file. It's used to establish the mapping between
    the types of IR values and the number of simultaneous live ranges to which we'd like to limit for some set of those types.

    For example, POWER target, register num is special when VSX is enabled. When VSX is enabled, the number of int scalar register is 32(GPR),
    float is 64(VSR), but for int and float vector register both are 64(VSR). So there should be 2 kinds of register class when vsx is enabled,
    and 3 kinds of register class when VSX is NOT enabled.

    It runs on POWER target, it makes big(+~30%) performance improvement in one specific bmk(503.bwaves_r) of spec2017 and no other obvious degressions.

    Differential revision: https://reviews.llvm.org/D67148 — wuzish / ViewSVN
  3. [ConstantRange] [NFC] replace addWithNoSignedWrap with addWithNoWrap. — shchenz / ViewSVN
  4. [WebAssembly] Add REQUIRES: asserts to cfg-stackify-eh.ll

    This was missing in D68552. — aheejin / ViewSVN
  5. [ItaniumMangle] Fix mangling of GNU __null in an expression to match GCC

    Reviewers: rsmith

    Reviewed By: rsmith

    Subscribers: erik.pilkington, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68368 — jrtc27 / ViewSVN
  6. [NFC] Fix ubsan-blacklist test

    Restored original test and marked tests for VFS as unsupported on Windows. — Jan Korous / ViewSVN
  7. [sanitizer] Fix signal_trap_handler.cpp on android — Vitaly Buka / ViewSVN
  8. [LitConfig] Silenced notes/warnings on quiet.

    Lit has a "quiet" option, -q, which is documented to "suppress no
    error output". Previously, LitConfig displayed notes and warnings when
    the quiet option was specified. The result was that it was not
    possible to get only pertinent file/line information to be used by an
    editor to jump to the location where checks were failing without
    passing a number of unhelpful locations first. Here, the
    implementations of LitConfig.note and LitConfig.warning are modified
    to account for the quiet flag and avoid displaying if the flag has
    indeed been set.

    Patch by Nate Chandler

    Reviewed by yln

    Differential Revision: https://reviews.llvm.org/D68044 — atrick / ViewSVN
  9. Reland 'Add VFS support for sanitizers' blacklist'

    The original patch broke the test for Windows.
    Trying to fix as per Reid's suggestions outlined here:
    https://reviews.llvm.org/rC371663

    Differential Revision: https://reviews.llvm.org/D67742 — Jan Korous / ViewSVN
  10. Revert "Add VFS support for sanitizers' blacklist"

    Fix tests on Windows for now.

    This reverts commit 96ac97a4213287003f08636d0c372b3f71e9cfca. — Jan Korous / ViewSVN
  11. [msan] Add interceptors: crypt, crypt_r.

    Reviewers: vitalybuka

    Subscribers: srhines, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68431 — eugenis / ViewSVN
  12. [clang] Accept -ftrivial-auto-var-init in clang-cl

    Reviewers: eugenis, rnk

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68608 — Vitaly Buka / ViewSVN
  13. AMDGPU/GlobalISel: Clamp G_SITOFP/G_UITOFP sources — arsenm / ViewSVN
  14. [Attributor][NFC] Add debug output — jdoerfert / ViewSVN
  15. [Attributor][FIX] Remove initialize calls and add undefs

    The initialization logic has become part of the Attributor but the
    patches that introduced these calls here were in development when the
    transition happened.

    We also now clean up (undefine) the macros used to create attributes. — jdoerfert / ViewSVN
  16. [Attributor] Use local linkage instead of internal

    Local linkage is internal or private, and private is a specialization of
    internal, so either is fine for all our "local linkage" queries. — jdoerfert / ViewSVN
  17. [Attributor] Use abstract call sites for call site callback

    Summary:
    When we iterate over uses of functions and expect them to be call sites,
    we now use abstract call sites to allow callback calls.

    Reviewers: sstefan1, uenoku

    Subscribers: hiraditya, bollu, hfinkel, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67871 — jdoerfert / ViewSVN
  18. [tsan, go] fix Go windows build

    Summary:
    Don't use weak exports when building tsan into a shared library for Go. gcc can't handle the pragmas used to make the weak references.

    Include files that have been added since the last update to build.bat. (We should really find a better way to list all the files needed.)

    Add windows version defines (WINVER and _WIN32_WINNT) to get AcquireSRWLockExclusive and ReleaseSRWLockExclusive defined.

    Define GetProcessMemoryInfo to use the kernel32 version. This is kind of a hack, the windows header files should do this translation for us. I think we're not in the right family partition (we're using Desktop, but that translation only happens for App and System partitions???), but hacking the family partition seems equally gross and I have no idea what the consequences of that might be.

    Patch by Keith Randall.

    Reviewers: dvyukov, vitalybuka

    Reviewed By: vitalybuka

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

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D68599 — Vitaly Buka / ViewSVN
  19. [tsan, go] break commands into multiple lines

    Summary: Patch by Keith Randall.

    Reviewers: dvyukov, vitalybuka

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

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D68596 — Vitaly Buka / ViewSVN
  20. [X86] Shrink zero extends of gather indices from type less than i32 to types larger than i32.

    Gather instructions can use i32 or i64 elements for indices. If
    the index is zero extended from a type smaller than i32 to i64, we
    can shrink the extend to just extend to i32. — ctopper / ViewSVN
  21. [X86] Add test cases for zero extending a gather index from less than i32 to i64.

    We should be able to use a smaller zero extend. — ctopper / ViewSVN
  22. Fix the spelling of my name. — joerg / ViewSVN
  23. [sanitizer] Print SIGTRAP for corresponding signal

    Reviewers: eugenis, jfb

    Subscribers: #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68603 — Vitaly Buka / ViewSVN
  24. [tsan] Don't delay SIGTRAP handler

    Reviewers: eugenis, jfb

    Subscribers: #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68604 — Vitaly Buka / ViewSVN
  25. Add VFS support for sanitizers' blacklist

    Differential Revision: https://reviews.llvm.org/D67742 — Jan Korous / ViewSVN
  26. [X86] Add new calling convention that guarantees tail call optimization

    When the target option GuaranteedTailCallOpt is specified, calls with
    the fastcc calling convention will be transformed into tail calls if
    they are in tail position. This diff adds a new calling convention,
    tailcc, currently supported only on X86, which behaves the same way as
    fastcc, except that the GuaranteedTailCallOpt flag does not need to
    enabled in order to enable tail call optimization.

    Patch by Dwight Guth <dwight.guth@runtimeverification.com>!

    Reviewed By: lebedev.ri, paquette, rnk

    Differential Revision: https://reviews.llvm.org/D67855 — rnk / ViewSVN
  27. [WebAssembly] Fix unwind mismatch stat computation

    Summary:
    There was a bug when computing the number of unwind destination
    mismatches in CFGStackify. When there are many mismatched calls that
    share the same (original) destination BB, they have to be counted
    separately.

    This also fixes a typo and runs `fixUnwindMismatches` only when the wasm
    exception handling is enabled. This is to prevent unnecessary
    computations and does not change behavior.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68552 — aheejin / ViewSVN
  28. [llvm-lipo] Add TextAPI to LINK_COMPONENTS

    Summary:
    D68319 uses `MachO::getCPUTypeFromArchitecture` and without this builds
    with `-DBUILD_SHARED_LIBS=ON` fail.

    Reviewers: alexshap

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68594 — aheejin / ViewSVN
  29. [Diagnostics] Emit better -Wbool-operation's warning message if we known that the result is always true — xbolva00 / ViewSVN
  30. [Attributor][FIX] Remove assertion wrong for on invalid IRPositions — jdoerfert / ViewSVN
  31. [libc++] Remove C++03 variadics in shared_ptr (v2)

        Summary: In my last patch (D67675) I forgot a few variadics. This patch removes the remaining make_shared and allocate_shared C++03 variadics.

        Reviewers: ldionne, EricWF, mclow.lists

        Subscribers: christof, dexonsmith, libcxx-commits

        Tags: #libc

        Differential Revision: https://reviews.llvm.org/D68000 — zoecarver / ViewSVN
  32. [llvm-c] Add UnaryOperator to LLVM_FOR_EACH_VALUE_SUBCLASS macro

    Note that we are not sure where the tests for these functions lives. This was discussed in the Phab Diff.

    Differential Revision: https://reviews.llvm.org/D68588 — mcinally / ViewSVN
  33. [WebAssembly] Add memory intrinsics handling to mayThrow()

    Summary:
    Previously, `WebAssembly::mayThrow()` assumed all inputs are global
    addresses. But when intrinsics, such as `memcpy`, `memmove`, or `memset`
    are lowered to external symbols in instruction selection and later
    emitted as library calls. And these functions don't throw.

    This patch adds handling to those memory intrinsics to `mayThrow`
    function. But while most of libcalls don't throw, we can't guarantee all
    of them don't throw, so currently we conservatively return true for all
    other external symbols.

    I think a better way to solve this problem is to embed 'nounwind' info
    in `TargetLowering::CallLoweringInfo`, so that we can access the info
    from the backend. This will also enable transferring 'nounwind'
    properties of LLVM IR instructions. Currently we don't transfer that
    info and we can only access properties of callee functions, if the
    callees are within the module. Other targets don't need this info in the
    backend because they do all the processing before isel, but it will help
    us because that info will reduce code size increase in fixing unwind
    destination mismatches in CFGStackify.

    But for now we return false for these memory intrinsics and true for all
    other libcalls conservatively.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68553 — aheejin / ViewSVN
  34. [llvm-lipo] Relax the check of the specified input file architecture

    cctools lipo only compares the cputypes when it verifies that
    the specified (via -arch) input file and the architecture match.
    This diff adjusts the behavior of llvm-lipo accordingly.

    Differential revision: https://reviews.llvm.org/D68319

    Test plan: make check-all — alexshap / ViewSVN
  35. [Attributor] Deduce memory behavior of functions and arguments

    Deduce the memory behavior, aka "read-none", "read-only", or
    "write-only", for functions and arguments.

    Reviewers: sstefan1, uenoku

    Subscribers: hiraditya, bollu, jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67384 — jdoerfert / ViewSVN
  36. [InstCombine] Fold conditional sign-extend of high-bit-extract into high-bit-extract-with-signext (PR42389)

    This can come up in Bit Stream abstractions.

    The pattern looks big/scary, but it can't be simplified any further.
    It only is so simple because a number of my preparatory folds had
    happened already (shift amount reassociation / shift amount
    reassociation in bit test, sign bit test detection).

    Highlights:
    * There are two main flavors: https://rise4fun.com/Alive/zWi
      The difference is add vs. sub, and left-shift of -1 vs. 1
    * Since we only change the shift opcode,
      we can preserve the exact-ness: https://rise4fun.com/Alive/4u4
    * There can be truncation after high-bit-extraction:
      https://rise4fun.com/Alive/slHc1   (the main pattern i'm after!)
      Which means that we need to ignore zext of shift amounts and of NBits.
    * The sign-extending magic can be extended itself (in add pattern
      via sext, in sub pattern via zext. not the other way around!)
      https://rise4fun.com/Alive/NhG
      (or those sext/zext can be sinked into `select`!)
      Which again means we should pay attention when matching NBits.
    * We can have both truncation of extraction and widening of magic:
      https://rise4fun.com/Alive/XTw
      In other words, i don't believe we need to have any checks on
      bitwidths of any of these constructs.

    This is worsened in general by the fact that we may have `sext` instead
    of `zext` for shift amounts, and we don't yet canonicalize to `zext`,
    although we should. I have not done anything about that here.

    Also, we really should have something to weed out `sub` like these,
    by folding them into `add` variant.

    https://bugs.llvm.org/show_bug.cgi?id=42389 — lebedevri / ViewSVN
  37. [InstCombine][NFC] Tests for "conditional sign-extend of high-bit-extract" pattern (PR42389)

    https://bugs.llvm.org/show_bug.cgi?id=42389 — lebedevri / ViewSVN
  38. [InstCombine] Move isSignBitCheck(), handle rest of the predicates

    True, no test coverage is being added here. But those non-canonical
    predicates that are already handled here already have no test coverage
    as far as i can tell. I tried to add tests for them, but all the patterns
    already get handled elsewhere. — lebedevri / ViewSVN
  39. [InstCombine][NFC] dropRedundantMaskingOfLeftShiftInput(): change how we deal with mask

    Summary:
    Currently, we pre-check whether we need to produce a mask or not.
    This involves some rather magical constants.
    I'd like to extend this fold to also handle the situation
    when there's also a `trunc` before outer shift.
    That will require another set of magical constants.
    It's ugly.

    Instead, we can just compute the mask, and check
    whether mask is a pass-through (all-ones) or not.
    This way we don't need to have any magical numbers.

    This change is NFC other than the fact that we now compute
    the mask and then check if we need (and can!) apply it.

    Reviewers: spatel

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68470 — lebedevri / ViewSVN
  40. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): propagate undef shift amounts

    Summary:
    When we do `ConstantExpr::getZExt()`, that "extends" `undef` to `0`,
    which means that for patterns a/b we'd assume that we must not produce
    any bits for that channel, while in reality we simply didn't care
    about that channel - i.e. we don't need to mask it.

    Reviewers: spatel

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68239 — lebedevri / ViewSVN
  41. [Bitcode] Update naming of UNOP_NEG to UNOP_FNEG

    Differential Revision: https://reviews.llvm.org/D68588 — mcinally / ViewSVN
  42. [AccelTable] Remove stale comment (NFC)

    rdar://55857228 — Jonas Devlieghere / ViewSVN
  43. [OPENMP]Fix caonical->canonical, NFC.

    Fixed typo. — abataev / ViewSVN
  44. Attempt to fix a few clang-tidy tests on Windows, see PR43593. — nico / ViewSVN
  45. Fix for expanding __pragmas in macro arguments

    Summary:
    Avoid parsing __pragma into an annotation token when macro arguments are pre-expanded.
    This is what clang currently does when parsing _Pragmas.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=41128, where clang crashed
    when trying to get the length of an annotation token.

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68114 — akhuang / ViewSVN
  46. gn build: try to make system-libs.windows.test pass — nico / ViewSVN
  47. AMDGPU/GlobalISel: Handle more G_INSERT cases

    Start manually writing a table to get the subreg index. TableGen
    should probably generate this, but I'm not sure what it looks like in
    the arbitrary case where subregisters are allowed to not fully cover
    the super-registers. — arsenm / ViewSVN
  48. GlobalISel: Partially implement lower for G_INSERT — arsenm / ViewSVN
  49. AMDGPU/GlobalISel: Fix selection of 16-bit shifts — arsenm / ViewSVN
  50. AMDGPU/GlobalISel: Select VALU G_AMDGPU_FFBH_U32 — arsenm / ViewSVN
  51. AMDGPU/GlobalISel: Use S_MOV_B64 for inline constants

    This hides some defects in SIFoldOperands when the immediates are
    split. — arsenm / ViewSVN
  52. AMDGPU/GlobalISel: Widen 16-bit G_MERGE_VALUEs sources

    Continue making a mess of merge/unmerge legality. — arsenm / ViewSVN
  53. [OPENMP50]Treat range-based for as canonical loop.

    According to OpenMP 5.0, range-based for is also considered as a
    canonical form of loops. — abataev / ViewSVN
  54. AMDGPU/GlobalISel: Select more G_INSERT cases

    At minimum handle the s64 insert type, which are emitted in real cases
    during legalization.

    We really need TableGen to emit something to emit something like the
    inverse of composeSubRegIndices do determine the subreg index to use. — arsenm / ViewSVN
  55. GlobalISel: Add target pre-isel instructions

    Allows targets to introduce regbankselectable
    pseudo-instructions. Currently the closet feature to this is an
    intrinsic. However this requires creating a public intrinsic
    declaration. This litters the public intrinsic namespace with
    operations we don't necessarily want to expose to IR producers, and
    would rather leave as private to the backend.

    Use a new instruction bit. A previous attempt tried to keep using enum
    value ranges, but it turned into a mess. — arsenm / ViewSVN
  56. [clang] [cmake] Support LLVM_DISTRIBUTION_COMPONENTS in stand-alone build

    Differential Revision: https://reviews.llvm.org/D68412 — mgorny / ViewSVN
  57. Second attempt to add iterator_range::empty()

    Doing this makes MSVC complain that `empty(someRange)` could refer to
    either C++17's std::empty or LLVM's llvm::empty, which previously we
    avoided via SFINAE because std::empty is defined in terms of an empty
    member rather than begin and end. So, switch callers over to the new
    method as it is added.

    https://reviews.llvm.org/D68439 — jrose / ViewSVN
  58. Try to get clangd tests passing on Windows.

    Part of PR43592. See also r328645. — nico / ViewSVN
  59. [scudo][standalone] Correct releaseToOS behavior

    Summary:
    There was an issue in `releaseToOSMaybe`: one of the criteria to
    decide if we should proceed with the release was wrong. Namely:

    ```
    const uptr N = Sci->Stats.PoppedBlocks - Sci->Stats.PushedBlocks;
    if (N * BlockSize < PageSize)
      return; // No chance to release anything.
    ```

    I meant to check if the amount of bytes in the free list was lower
    than a page, but this actually checks if the amount of **in use** bytes
    was lower than a page.

    The correct code is:

    ```
    const uptr BytesInFreeList =
      Region->AllocatedUser -
      (Region->Stats.PoppedBlocks - Region->Stats.PushedBlocks) * BlockSize;
    if (BytesInFreeList < PageSize)
      return 0; // No chance to release anything.
    ```

    Consequences of the bug:
    - if a class size has less than a page worth of in-use bytes (allocated
      or in a cache), reclaiming would not occur, whatever the amount of
      blocks in the free list; in real world scenarios this is unlikely to
      happen and be impactful;
    - if a class size had less than a page worth of free bytes (and enough
      in-use bytes, etc), then reclaiming would be attempted, with likely
      no result. This means the reclaiming was overzealous at times.

    I didn't have a good way to test for this, so I changed the prototype
    of the function to return the number of bytes released, allowing to
    get the information needed. The test added fails with the initial
    criteria.

    Another issue is that `ReleaseToOsInterval` can actually be 0, meaning
    we always try to release (side note: it's terrible for performances).
    so change a `> 0` check to `>= 0`.

    Additionally, decrease the `CanRelease` threshold to `PageSize / 32`.
    I still have to make that configurable but I will do it at another time.

    Finally, rename some variables in `printStats`: I feel like "available"
    was too ambiguous, so change it to "total".

    Reviewers: morehouse, hctim, eugenis, vitalybuka, cferris

    Reviewed By: morehouse

    Subscribers: delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D68471 — cryptoad / ViewSVN
  60. Fix Calling Convention through aliases

    r369697 changed the behavior of stripPointerCasts to no longer include
    aliases.  However, the code in CGDeclCXX.cpp's createAtExitStub counted
    on the looking through aliases to properly set the calling convention of
    a call.

    The result of the change was that the calling convention mismatch of the
    call would be replaced with a llvm.trap, causing a runtime crash.

    Differential Revision: https://reviews.llvm.org/D68584 — erichkeane / ViewSVN
  61. [libTooling][NFC] Fix build break in r373916.

    r373916 used raw strings inside macro calls, which breaks some builds. — ymandel / ViewSVN
  62. [clangd] Fix raciness in code completion tests

    Reviewers: sammccall, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68273 — kadircet / ViewSVN
  63. [Remarks] Pass StringBlockValue as StringRef.

    After changing the remark serialization, we now pass StringRefs to the
    serializer. We should use StringRef for StringBlockVal, to avoid
    creating temporary objects, which then cause StringBlockVal.Value to
    point to invalid memory.

    Reviewers: thegameg, anemet

    Reviewed By: thegameg

    Differential Revision: https://reviews.llvm.org/D68571 — fhahn / ViewSVN
  64. [clang-format] [PR27004] omits leading space for noexcept when formatting operator delete()

    Summary:
    clang-format is incorrectly thinking the parameter parens are part of a cast operation, this is resulting in there sometimes being not space between the paren and the noexcept (and other keywords like volatile etc..)

    ```
    void operator++(int) noexcept;
    void operator++(int &) noexcept;
    void operator delete(void *, std::size_t, const std::nothrow_t &)noexcept;
    ```

    Reviewers: klimek, owenpan, mitchell-stellar

    Reviewed By: mitchell-stellar

    Subscribers: cfe-commits

    Tags: #clang-format, #clang

    Differential Revision: https://reviews.llvm.org/D68481 — paulhoad / ViewSVN
  65. [clang-format] [NFC] Ensure clang-format is itself clang-formatted.

    Summary:
    Before making a proposed change, ensure ClangFormat.cpp is fully clang-formatted,

    no functional change just clang-formatting using the in tree .clang-format.

    Reviewers: mitchell-stellar

    Reviewed By: mitchell-stellar

    Subscribers: Eugene.Zelenko, cfe-commits

    Tags: #clang-format, #clang

    Differential Revision: https://reviews.llvm.org/D68551 — paulhoad / ViewSVN
  66. Fix build errors caused by rL373914. — wmi / ViewSVN
  67. Codegen - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  68. [llvm-profdata] Minor format fix

    Summary: Minor format fix for output of "llvm-profdata -show"

    Reviewers: wmi

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68440 — wenlei / ViewSVN
  69. [libTooling] Add `toString` method to the Stencil class

    Summary:
    `toString` generates a string representation of the stencil.

    Patch by Harshal T. Lehri.

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68574 — ymandel / ViewSVN
  70. [X86][SSE] getTargetShuffleInputs - move VT.isSimple/isVector checks inside. NFCI.

    Stop all the callers from having to check the value type before calling getTargetShuffleInputs. — rksimon / ViewSVN
  71. [SampleFDO] Add compression support for any section in ExtBinary profile format

    Previously ExtBinary profile format only supports compression using zlib for
    profile symbol list. In this patch, we extend the compression support to any
    section. User can select some or all of the sections to compress. In an
    experiment, for a 45M profile in ExtBinary format, compressing name table
    reduced its size to 24M, and compressing all the sections reduced its size
    to 11M.

    Differential Revision: https://reviews.llvm.org/D68253 — wmi / ViewSVN
  72. [LoopVectorize] add test that asserted after cost model change (PR43582); NFC — spatel / ViewSVN
  73. Allow update_test_checks.py to not scrub names.

    Add a --preserve-names option to tell the script not to replace IR names.
    Sometimes tests want those names.  For example if a test is looking for a
    modification to an existing instruction we'll want to make the names.

    Differential Revision: https://reviews.llvm.org/D68081 — greened / ViewSVN
  74. Sema - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  75. [clang] Add test for FindNextToken in Lexer.

    Reviewers: ilya-biryukov

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68565 — usaxena95 / ViewSVN
  76. Fix another sphinx warning.

    Differential Revision: https://reviews.llvm.org/D64746 — kpn / ViewSVN
  77. Regenerate ptr-rotate.ll . NFC — deadalnix / ViewSVN
  78. [Mips] Always save RA when disabling frame pointer elimination

    This ensures that frame-based unwinding will continue to work when
    calling a noreturn function; there is not much use having the caller's
    frame pointer saved if you don't also have the caller's program counter.

    Patch by James Clarke.

    Differential Revision: https://reviews.llvm.org/D68542 — atanasyan / ViewSVN
  79. [Mips] Fix evaluating J-format branch targets

    J/JAL/JALX/JALS are absolute branches, but stay within the current
    256 MB-aligned region, so we must include the high bits of the
    instruction address when calculating the branch target.

    Patch by James Clarke.

    Differential Revision: https://reviews.llvm.org/D68548 — atanasyan / ViewSVN
  80. RewriteModernObjC - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  81. AST - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  82. [LLVM-C] Add bindings to create macro debug info

    Summary: The C API doesn't have the bindings to create macro debug information.

    Reviewers: whitequark, CodaFi, deadalnix

    Reviewed By: whitequark

    Subscribers: aprantl, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D58334 — whitequark / ViewSVN
  83. Fix sphinx warnings.

    Differential Revision: https://reviews.llvm.org/D64746 — kpn / ViewSVN
  84. Test commit

    Fix comment. — mbrkusanin / ViewSVN
  85. [FPEnv] Add constrained intrinsics for lrint and lround

    Earlier in the year intrinsics for lrint, llrint, lround and llround were
    added to llvm. The constrained versions are now implemented here.

    Reviewed by: andrew.w.kaylor, craig.topper, cameron.mcinally
    Approved by: craig.topper
    Differential Revision: https://reviews.llvm.org/D64746 — kpn / ViewSVN
  86. gn build: use better triple on windows

    The CMake build uses "x86_64-pc-windows-msvc". The "-msvc" suffix is
    important because e.g. clang/test/lit.cfg.py matches against the
    suffix "windows-msvc" to compute the presence of the "ms-sdk" and
    the absence of the "LP64" feature.

    Differential Revision: https://reviews.llvm.org/D68572 — nico / ViewSVN
  87. Revert r373888 "[IA] Recognize hexadecimal escape sequences"

    It broke MC/AsmParser/directive_ascii.s on all bots:

        Assertion failed: (Index < Length && "Invalid index!"), function operator[],
            file ../../llvm/include/llvm/ADT/StringRef.h, line 243. — nico / ViewSVN
  88. [clangd] Catch an unchecked "Expected<T>" in HeaderSourceSwitch.

    Summary: Also fixes a potential user-after-scope issue of "Path".

    Reviewers: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68564 — hokein / ViewSVN
  89. [ASTImporter][NFC] Enable disabled but passing test

    RedeclChainShouldBeCorrectAmongstNamespaces — martong / ViewSVN
  90. [ASTImporter][NFC] Update ASTImporter internals docs — martong / ViewSVN
  91. [ASTImporter][NFC] Fix typo in user docs — martong / ViewSVN
  92. [AMDGPU] Fix test checks

    The GFX10-DENORM-STRICT checks were only passing by accident. Fix them
    to make the test more robust in the face of scheduling or register
    allocation changes. — foad / ViewSVN

#5506 (Oct 7, 2019 3:44:27 AM)

  1. [clangd] If an undocumented definition exists, don't accept documentation from other forward decls.

    Summary:
    This fixes cases like:
      foo.h
        class Undocumented{}
      bar.h
        // break an include cycle. we should refactor this!
        class Undocumented;
    Where the comment doesn't describe the class.

    Note that a forward decl that is *visible to the definition* will still have
    its doc comment used, by SymbolCollector: Merge isn't involved here.

    Reviewers: ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68467 — sammccall / ViewSVN
  2. [llvm-readelf/llvm-objdump] - Improve/refactor the implementation of SHT_LLVM_ADDRSIG section dumping.

    This patch:

    * Adds a llvm-readobj/llvm-readelf test file for SHT_LLVM_ADDRSIG sections. (we do not have any)
    * Enables dumping of SHT_LLVM_ADDRSIG with --all.
    * Changes the logic to report a warning instead of an error when something goes wrong during dumping
      (allows to continue dumping SHT_LLVM_ADDRSIG and other sections on error).
    * Refactors a piece of logic to a new toULEB128Array helper which might be used for GNU-style
      dumping implementation.

    Differential revision: https://reviews.llvm.org/D68383 — grimar / ViewSVN
  3. [clangd] Collect missing macro references.

    Summary: Semantic highlghting is missing a few macro references.

    Reviewers: ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68458 — hokein / ViewSVN
  4. [IA] Recognize hexadecimal escape sequences

    Summary:
    Implement support for hexadecimal escape sequences to match how GNU 'as'
    handles them. I.e., read all hexadecimal characters and truncate to the
    lower 16 bits.

    Reviewers: nickdesaulniers

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68483 — void / ViewSVN
  5. clang-cl: Ignore the new /ZH options

    These were added to the MS docs in
    https://github.com/MicrosoftDocs/cpp-docs/commit/85b9b6967e58e485251450f7451673f6fc873e88
    and are supposedly available in VS 2019 16.4 (though my 2019 Preview,
    version 16.4.0-pre.1.0 don't seem to have them.) — hans / ViewSVN
  6. [TableGen] Pacify gcc-5.4 more

    Followup to a previous pacification, this performs the same workaround
    to the TableGen generated code for tuple automata. — jamesm / ViewSVN
  7. Revert "[SLP] avoid reduction transform on patterns that the backend can load-combine"

    This reverts SVN r373833, as it caused a failed assert "Non-zero loop
    cost expected" on building numerous projects, see PR43582 for details
    and reproduction samples. — mstorsjo / ViewSVN
  8. [llvm-locstats] Fix a typo in the documentation; NFC — djtodoro / ViewSVN
  9. [X86] Autogenerate checks in leaFixup32.mir and leaFixup64.mir. NFC — ctopper / ViewSVN
  10. [X86] Support LEA64_32r in processInstrForSlow3OpLEA and use INC/DEC when possible.

    Move the erasing and iterator updating inside to match the
    other slow LEA function.

    I've adapted code from optTwoAddrLEA and basically rebuilt the
    implementation here. We do lose the kill flags now just like
    optTwoAddrLEA. This runs late enough in the pipeline that
    shouldn't really be a problem. — ctopper / ViewSVN
  11. [NFC][CGP] Tests for making ICMP_EQ use CR result of ICMP_S(L|G)T dominators — yi-hong.lyu / ViewSVN
  12. [c++20] Check for a class-specific operator delete when deleting an
    object of class type with a virtual destructor. — rsmith / ViewSVN
  13. Fix behavior of __builtin_bit_cast when the From and To types are the
    same.

    We were missing the lvalue-to-rvalue conversion entirely in this case,
    and in fact still need the full CK_LValueToRValueBitCast conversion to
    perform a load with no TBAA. — rsmith / ViewSVN
  14. gn build: no-op style tweak in sync script — nico / ViewSVN
  15. [Docs] Removes Subsystem Documentation page

    Removes Subsystem Documentation page. Also moves existing topics on Subsystem Documentation page to User Guides and Reference pages. — dr87 / ViewSVN
  16. [X86][AVX] Access a scalar float/double as a free extract from a broadcast load (PR43217)

    If a fp scalar is loaded and then used as both a scalar and a vector broadcast, perform the load as a broadcast and then extract the scalar for 'free' from the 0th element.

    This involved switching the order of the X86ISD::BROADCAST combines so we only convert to X86ISD::BROADCAST_LOAD once all other canonicalizations have been attempted.

    Adds a DAGCombinerInfo::recursivelyDeleteUnusedNodes wrapper.

    Fixes PR43217

    Differential Revision: https://reviews.llvm.org/D68544 — rksimon / ViewSVN
  17. Fix signed/unsigned warning. NFCI — rksimon / ViewSVN
  18. [NFC][PowerPC] Reorganize CRNotPat multiclass patterns in PPCInstrInfo.td

    This is patch aims to group together the `CRNotPat` multi class instantiations
    within the `PPCInstrInfo.td` file.

    Integer instantiations of the multi class are grouped together into a section,
    and the floating point patterns are separated into its own section.

    Differential Revision: https://reviews.llvm.org/D67975 — amyk / ViewSVN
  19. [X86][SSE] Remove resolveTargetShuffleInputs and use getTargetShuffleInputs directly.

    Move the resolveTargetShuffleInputsAndMask call to after the shuffle mask combine before the undef/zero constant fold instead. — rksimon / ViewSVN
  20. [X86][SSE] Don't merge known undef/zero elements into target shuffle masks.

    Replaces setTargetShuffleZeroElements with getTargetShuffleAndZeroables which reports the Zeroable elements but doesn't merge them into the decoded target shuffle mask (the merging has been moved up into getTargetShuffleInputs until we can get rid of it entirely).

    This is part of the work to fix PR43024 and allow us to use SimplifyDemandedElts to simplify shuffle chains - we need to get to a point where the target shuffle mask isn't adjusted by its source inputs but instead we cache them in a parallel Zeroable mask. — rksimon / ViewSVN
  21. Implements CWG 1601 in [over.ics.rank/4.2]

    Summary:
    The overload resolution for enums with a fixed underlying type has changed in the C++14 standard. This patch implements the new rule.

    Patch by Mark de Wever!

    Reviewers: rsmith

    Reviewed By: rsmith

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D65695 — rsmith / ViewSVN
  22. [X86] Add custom type legalization for v16i64->v16i8 truncate and v8i64->v8i8 truncate when v8i64 isn't legal

    Summary:
    The default legalization for v16i64->v16i8 tries to create a multiple stage truncate concatenating after each stage and truncating again. But avx512 implements truncates with multiple uops. So it should be better to truncate all the way to the desired element size and then concatenate the pieces using unpckl instructions. This minimizes the number of 2 uop truncates. The unpcks are all single uop instructions.

    I tried to handle this by just custom splitting the v16i64->v16i8 shuffle. And hoped that the DAG combiner would leave the two halves in the state needed to make D68374 do the job for each half. This worked for the first half, but the second half got messed up. So I've implemented custom handling for v8i64->v8i8 when v8i64 needs to be split to produce the VTRUNCs directly.

    Reviewers: RKSimon, spatel

    Reviewed By: RKSimon

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68428 — ctopper / ViewSVN
  23. [LegalizeTypes][X86] When splitting a vselect for type legalization, don't split a setcc condition if the setcc input is legal and vXi1 conditions are supported

    Summary: The VSELECT splitting code tries to split a setcc input as well. But on avx512 where mask registers are well supported it should be better to just split the mask and use a single compare.

    Reviewers: RKSimon, spatel, efriedma

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68359 — ctopper / ViewSVN
  24. [Sema] Avoids an assertion failure when an invalid conversion declaration is used

    Summary:
    When using a user-defined conversion function template with a deduced return type the compiler gives a set of warnings:
    ```
    bug.cc:252:44: error: cannot specify any part of a return type in the declaration of a conversion function; use an alias template to declare a conversion to 'auto (Ts &&...) const'
      template <typename... Ts> operator auto()(Ts &&... xs) const;
                                               ^~~~~~~~~~~~~~~~~~~
    bug.cc:252:29: error: conversion function cannot convert to a function type
      template <typename... Ts> operator auto()(Ts &&... xs) const;
                                ^
    error: pointer to function type cannot have 'const' qualifier
    ```
    after which it triggers an assertion failure. It seems the last error is incorrect and doesn't have any location information. This patch stops the compilation after the second warning.

    Fixes bug 31422.

    Patch by Mark de Wever!

    Reviewers: rsmith

    Reviewed By: rsmith

    Subscribers: bbannier, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D64820 — rsmith / ViewSVN
  25. gn build: make windows build less broken — nico / ViewSVN
  26. [LOOPGUARD] Remove asserts in getLoopGuardBranch
    Summary: The assertion in getLoopGuardBranch can be a 'return nullptr'
    under if condition.
    Authored By: DTharun
    Reviewer: Whitney, fhahn
    Reviewed By: Whitney, fhahn
    Subscribers: fhahn, llvm-commits
    Tag: LLVM
    Differential Revision: https://reviews.llvm.org/D66084 — whitneyt / ViewSVN
  27. [Docs] Removes Programming Documentation page

    Removes Programming Documentation page. Also moves existing topics on Programming Documentation page to User Guides and Reference pages. — dr87 / ViewSVN

#5505 (Oct 6, 2019 8:45:48 AM)

  1. [X86][SSE] resolveTargetShuffleInputs - call getTargetShuffleInputs instead of using setTargetShuffleZeroElements directly. NFCI. — rksimon / ViewSVN
  2. [Docs] Adds new Getting Started/Tutorials page

    Adds a new page for Getting Started/Tutorials topics. Also updates existing topic categories on the User Guides and Reference pages. — dr87 / ViewSVN
  3. Revert [DAGCombine] Match more patterns for half word bswap

    This reverts r373850 (git commit 25ba49824d2d4f2347b4a7cb1623600a76ce9433)

    This patch appears to cause multiple codegen regression test failures - http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/10680 — spatel / ViewSVN
  4. [NFC] Replace 'isDarwin' with 'IsDarwin'

    Summary: Replace 'isDarwin' with 'IsDarwin' based on LLVM naming convention.

    Differential Revision: https://reviews.llvm.org/D68336 — xiangling_liao / ViewSVN
  5. [InstCombine] fold fneg disguised as select+fmul (PR43497)

    Extends rL373230 and solves the motivating bug (although in a narrow way):
    https://bugs.llvm.org/show_bug.cgi?id=43497 — spatel / ViewSVN
  6. [DAGCombine] Match more patterns for half word bswap

    Summary: It ensures that the bswap is generated even when a part of the subtree already matches a bswap transform.

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

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68250 — deadalnix / ViewSVN
  7. [X86][AVX] combineExtractSubvector - merge duplicate variables. NFCI. — rksimon / ViewSVN
  8. [InstCombine] add fast-math-flags for better test coverage; NFC — spatel / ViewSVN
  9. [InstCombine] don't assume 'inbounds' for bitcast pointer to GEP transform (PR43501)

    https://bugs.llvm.org/show_bug.cgi?id=43501
    We can't declare a GEP 'inbounds' in general. But we may salvage that information if
    we have known dereferenceable bytes on the source pointer.

    Differential Revision: https://reviews.llvm.org/D68244 — spatel / ViewSVN
  10. [X86][SSE] matchVectorShuffleAsBlend - use Zeroable element mask directly.

    We can make use of the Zeroable mask to indicate which elements we can safely set to zero instead of creating a target shuffle mask on the fly.

    This allows us to remove createTargetShuffleMask.

    This is part of the work to fix PR43024 and allow us to use SimplifyDemandedElts to simplify shuffle chains - we need to get to a point where the target shuffle masks isn't adjusted by its source inputs in setTargetShuffleZeroElements but instead we cache them in a parallel Zeroable mask. — rksimon / ViewSVN
  11. [X86] Enable AVX512BW for memcmp() — davezarzycki / ViewSVN
  12. [clang-format][docs] Fix the Google C++ and Chromium style guide URLs

    Summary: The Google C++ and Chromium style guides are broken in the clang-format docs. This patch updates them.

    Reviewers: djasper, MyDeveloperDay

    Reviewed By: MyDeveloperDay

    Subscribers: cfe-commits

    Tags: #clang

    Patch by: m4tx

    Differential Revision: https://reviews.llvm.org/D61256 — paulhoad / ViewSVN
  13. AMDGPU/GlobalISel: Fall back on weird G_EXTRACT offsets — arsenm / ViewSVN
  14. AMDGPU/GlobalISel: RegBankSelect mul24 intrinsics — arsenm / ViewSVN
  15. AMDGPU/GlobalISel: RegBankSelect DS GWS intrinsics — arsenm / ViewSVN
  16. AMDGPU/GlobalISel: Lower G_ATOMIC_CMPXCHG_WITH_SUCCESS — arsenm / ViewSVN
  17. GlobalISel: Partially implement lower for G_EXTRACT

    Turn into shift and truncate. Doesn't yet handle pointers. — arsenm / ViewSVN
  18. AMDGPU/GlobalISel: Fix RegBankSelect for sendmsg intrinsics

    This wasn't updated for the immarg handling change. — arsenm / ViewSVN
  19. [FastISel] Copy the inline assembly dialect to the INLINEASM instruction.

    Fixes PR43575. — ctopper / ViewSVN
  20. [X86][AVX] Push sign extensions of comparison bool results through bitops (PR42025)

    As discussed on PR42025, with more complex boolean math we can end up with many truncations/extensions of the comparison results through each bitop.

    This patch handles the cases introduced in combineBitcastvxi1 by pushing the sign extension through the AND/OR/XOR ops so its just the original SETCC ops that gets extended.

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

#5504 (Oct 5, 2019 1:37:54 PM)

  1. [SLP] avoid reduction transform on patterns that the backend can load-combine

    I don't see an ideal solution to these 2 related, potentially large, perf regressions:
    https://bugs.llvm.org/show_bug.cgi?id=42708
    https://bugs.llvm.org/show_bug.cgi?id=43146

    We decided that load combining was unsuitable for IR because it could obscure other
    optimizations in IR. So we removed the LoadCombiner pass and deferred to the backend.
    Therefore, preventing SLP from destroying load combine opportunities requires that it
    recognizes patterns that could be combined later, but not do the optimization itself (
    it's not a vector combine anyway, so it's probably out-of-scope for SLP).

    Here, we add a scalar cost model adjustment with a conservative pattern match and cost
    summation for a multi-instruction sequence that can probably be reduced later.
    This should prevent SLP from creating a vector reduction unless that sequence is
    extremely cheap.

    In the x86 tests shown (and discussed in more detail in the bug reports), SDAG combining
    will produce a single instruction on these tests like:

      movbe   rax, qword ptr [rdi]

    or:

      mov     rax, qword ptr [rdi]

    Not some (half) vector monstrosity as we currently do using SLP:

      vpmovzxbq       ymm0, dword ptr [rdi + 1] # ymm0 = mem[0],zero,zero,..
      vpsllvq ymm0, ymm0, ymmword ptr [rip + .LCPI0_0]
      movzx   eax, byte ptr [rdi]
      movzx   ecx, byte ptr [rdi + 5]
      shl     rcx, 40
      movzx   edx, byte ptr [rdi + 6]
      shl     rdx, 48
      or      rdx, rcx
      movzx   ecx, byte ptr [rdi + 7]
      shl     rcx, 56
      or      rcx, rdx
      or      rcx, rax
      vextracti128    xmm1, ymm0, 1
      vpor    xmm0, xmm0, xmm1
      vpshufd xmm1, xmm0, 78          # xmm1 = xmm0[2,3,0,1]
      vpor    xmm0, xmm0, xmm1
      vmovq   rax, xmm0
      or      rax, rcx
      vzeroupper
      ret

    Differential Revision: https://reviews.llvm.org/D67841 — spatel / ViewSVN
  2. [X86] lowerShuffleAsLanePermuteAndRepeatedMask - variable renames. NFCI.

    Rename some variables to match lowerShuffleAsRepeatedMaskAndLanePermute - prep work toward adding some equivalent sublane functionality. — rksimon / ViewSVN
  3. Try to fix sphinx indentation error — rksimon / ViewSVN
  4. [SelectionDAG] Add tests for LKK algorithm

    Added some tests testing urem and srem operations with a constant divisor.

    Patch by TG908 (Tim Gymnich)

    Differential Revision: https://reviews.llvm.org/D68421 — xbolva00 / ViewSVN
  5. RewriteObjC - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  6. [Diagnostics] Highlight expr's source range for -Wbool-operation

    Warning message looks better; and GCC adds it too. — xbolva00 / ViewSVN
  7. SemaTemplate - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  8. TreeTransform - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  9. Remove redundant !HasDependentValue check. NFCI.

    Fixes cppcheck warning. — rksimon / ViewSVN
  10. SemaStmt - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  11. BranchFolding - IsBetterFallthrough - assert non-null pointers. NFCI.

    Silences static analyzer null dereference warnings. — rksimon / ViewSVN
  12. [clang-format] SpacesInSquareBrackets should affect lambdas with parameters too

    Summary:
    This patch makes the `SpacesInSquareBrackets` setting also apply to C++ lambdas with parameters.

    Looking through the revision history, it appears support for only array brackets was added, and lambda brackets were ignored. Therefore, I am inclined to think it was simply an omission, rather than a deliberate choice.

    See https://bugs.llvm.org/show_bug.cgi?id=17887 and https://reviews.llvm.org/D4944.

    Reviewers: MyDeveloperDay, reuk, owenpan

    Reviewed By: MyDeveloperDay

    Subscribers: cfe-commits

    Patch by: mitchell-stellar

    Tags: #clang-format, #clang

    Differential Revision: https://reviews.llvm.org/D68473 — paulhoad / ViewSVN
  13. [UnitTests] Try and pacify gcc-5

    This looks like a defect in gcc-5 where it chooses a constexpr
    constructor from the initializer-list that it considers to be explicit.

    I've tried to reproduce but I can't install anything prior to gcc-6 easily
    on my system, and that doesn't have the error. So this is speculative
    pacification.

    Reported by Steven Wan. — jamesm / ViewSVN
  14. [NFCI] Slightly improve warning message — xbolva00 / ViewSVN
  15. [Diagnostics] Use Expr::isKnownToHaveBooleanValue() to check bitwise negation of bool in languages without a bool type

    Thanks for this advice, Richard Trieu! — xbolva00 / ViewSVN

#5503 (Oct 4, 2019 7:52:21 PM)

  1. Expose ProvidePositionalOption as a public API

    The motivation is to reuse the key value parsing logic here to
    parse instance specific pass options within the context of MLIR.
    The primary functionality exposed is the "," splitting for
    arrays and the logic for properly handling duplicate definitions
    of a single flag.

    Patch by: Parker Schuh <parkers@google.com>

    Differential Revision: https://reviews.llvm.org/D68294 — Mehdi Amini / ViewSVN
  2. Fix a *nasty* miscompile in experimental unordered atomic lowering

    This is an omission in rL371441.  Loads which happened to be unordered weren't being added to the PendingLoad set, and thus weren't be ordered w/respect to side effects which followed before the end of the block.

    Included test case is how I spotted this.  We had an atomic load being folded into a using instruction after a fence that load was supposed to be ordered with.  I'm sure it showed up a bunch of other ways as well.

    Spotted via manual inspecting of assembly differences in a corpus w/and w/o the new experimental mode.  Finding this with testing would have been "unpleasant". — reames / ViewSVN
  3. [Test] Add a test case fo a missed oppurtunity in implicit null checking — reames / ViewSVN
  4. [RISCV] Added missing ImmLeaf predicates

    simm9_lsb0 and simm12_lsb0 operand types were missing predicates. — apazos / ViewSVN
  5. Add a unittest to verify for assumption cache

    Reviewers: vsk, tejohnson

    Reviewed By: vsk

    Differential Revision: https://reviews.llvm.org/D68095 — hiraditya / ViewSVN
  6. [libc++] Guard cxx_experimental settings behind LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY

    If you explicitly set LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY to OFF, your
    project will fail to configure because the cxx_experimental target
    doesn't exist. — xiaobai / ViewSVN
  7. [libc++] Localize common build flags into a single CMake function

    Also, set those flags for the cxx_experimental target. Otherwise,
    cxx_experimental doesn't build properly when neither the static nor
    the shared library is compiled (yes, that is a weird setup). — Louis Dionne / ViewSVN
  8. Invalidate assumption cache before outlining.

    Subscribers: llvm-commits

    Tags: #llvm

    Reviewers: compnerd, vsk, sebpop, fhahn, tejohnson

    Reviewed by: vsk

    Differential Revision: https://reviews.llvm.org/D68478 — hiraditya / ViewSVN
  9. Revert [CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks

    This reverts r371177 (git commit f879c6875563c0a8cd838f1e13b14dd33558f1f8)

    It caused PR43566 by removing empty, address-taken MachineBasicBlocks.
    Such blocks may have references from blockaddress or other operands, and
    need more consideration to be removed.

    See the PR for a test case to use when relanding. — rnk / ViewSVN
  10. [InstCombine] Fold 'icmp eq/ne (?trunc (lshr/ashr %x, bitwidth(x)-1)), 0' -> 'icmp sge/slt %x, 0'

    We do indeed already get it right in some cases, but only transitively,
    with one-use restrictions. Since we only need to produce a single
    comparison, it makes sense to match the pattern directly:
      https://rise4fun.com/Alive/kPg — lebedevri / ViewSVN
  11. [InstCombine] Right-shift shift amount reassociation with truncation (PR43564, PR42391)

    Initially (D65380) i believed that if we have rightshift-trunc-rightshift,
    we can't do any folding. But as it usually happens, i was wrong.

    https://rise4fun.com/Alive/GEw
    https://rise4fun.com/Alive/gN2O

    In https://bugs.llvm.org/show_bug.cgi?id=43564 we happen to have
    this very sequence, of two right shifts separated by trunc.
    And "just" so that happens, we apparently can fold the pattern
    if the total shift amount is either 0, or it's equal to the bitwidth
    of the innermost widest shift - i.e. if we are left with only the
    original sign bit. Which is exactly what is wanted there. — lebedevri / ViewSVN
  12. [NFC][InstCombine] Autogenerate shift.ll test — lebedevri / ViewSVN
  13. [NFC][InstCombine] Autogenerate icmp-shr-lt-gt.ll test — lebedevri / ViewSVN
  14. [NFC][InstCombine] Tests for bit test via highest sign-bit extract (w/ trunc) (PR43564)

    https://rise4fun.com/Alive/x5IS — lebedevri / ViewSVN
  15. [NFC][InstCombine] Tests for right-shift shift amount reassociation (w/ trunc) (PR43564, PR42391)

    https://rise4fun.com/Alive/GEw — lebedevri / ViewSVN
  16. Add an off-by-default option to enable testing for gdb pretty printers.

    Summary:
    The current version of the pretty printers are not python3 compatible,
    so turn them off by default until sufficiently improved.

    Reviewers: MaskRay, tamur

    Subscribers: mgorny, christof, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68477 — saugustine / ViewSVN
  17. [lit] Use better name for "test in parallel" concept

    In the past, lit used threads to run tests in parallel. Today we use
    `multiprocessing.Pool`, which uses processes. Let's stay more abstract
    and use "worker" everywhere.

    Reviewed By: rnk

    Differential Revision: https://reviews.llvm.org/D68475 — yln / ViewSVN
  18. [clang] fix a typo from r372531

    Reviewers: xbolva00

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68482 — yuanfang / ViewSVN
  19. [MachineOutliner] Disable outlining from noreturn functions

    Outlining from noreturn functions doesn't do the correct thing right now. The
    outliner should respect that the caller is marked noreturn. In the event that
    we have a noreturn function, and the outlined code is in tail position, the
    outliner will not see that the outlined function should be tail called. As a
    result, you end up with a regular call containing a return.

    Fixing this requires that we check that all candidates live inside noreturn
    functions. So, for the sake of correctness, don't outline from noreturn
    functions right now.

    Add machine-outliner-noreturn.mir to test this. — paquette / ViewSVN
  20. [InstCombine] add tests for fneg disguised as fmul; NFC — spatel / ViewSVN
  21. [clang-tools-extra] [cmake] Link against libclang-cpp whenever possible

    Use clang_target_link_libraries() in order to support linking against
    libclang-cpp instead of static libraries.

    Differential Revision: https://reviews.llvm.org/D68448 — mgorny / ViewSVN
  22. [clang] [cmake] Use add_clang_tool() to install all tools

    Switch clang-check, clang-extdef-mapping and clang-offload-bundler
    to use add_clang_tool() rather than add_clang_executable() with a custom
    install rule.  This makes them LLVM_DISTRIBUTION_COMPONENTS-friendly.

    Differential Revision: https://reviews.llvm.org/D68429 — mgorny / ViewSVN
  23. [NFC] Add { } to silence compiler warning [-Wmissing-braces].

    ../llvm-project/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:355:48: warning: suggest braces around initialization of subobject [-Wmissing-braces]
          return addMappingFromTable<1>(MI, MRI, { 0 }, Table);
                                                   ^
                                                   {} — huihuiz / ViewSVN
  24. [ScheduleDAG] When a node is cloned, add an edge between the nodes.

    InstrEmitter's virtual register handling assumes that clones are emitted
    after the cloned node.  Make sure this assumption actually holds.

    Fixes a "Node emitted out of order - early" assertion on the testcase.

    This is probably a very rare case to actually hit in practice; even
    without the explicit edge, the scheduler will usually end up scheduling
    the nodes in the expected order due to other constraints.

    Differential Revision: https://reviews.llvm.org/D68068 — efriedma / ViewSVN
  25. [test] Remove another two unnecessary uses of REQUIRES: target-windows. NFC.

    Differential Revision: https://reviews.llvm.org/D68449 — mstorsjo / ViewSVN
  26. [JITLink] Silence GCC warnings. NFC.

    Use parentheses in an expression with mixed && and ||.

    Differential Revision: https://reviews.llvm.org/D68447 — mstorsjo / ViewSVN
  27. [Sema] Split out -Wformat-type-confusion from -Wformat-pedantic

    The warnings now in -Wformat-type-confusion don't align with how we interpret
    'pedantic' in clang, and don't belong in -pedantic.

    Differential revision: https://reviews.llvm.org/D67775 — epilk / ViewSVN
  28. [libc++] Make the modules-related flags PUBLIC instead of PRIVATE

    It appears that those need to be propagated to targets that use libc++
    as well, otherwise they don't build properly. — Louis Dionne / ViewSVN
  29. Add missing null pointer check in -ftime-trace code

    createOutputFile diagnoses the error for the caller already, so recover
    by not writing the output.

    Fixes PR43555

    No test, since I couldn't think of a good, portable, simple way to make
    the regular -o output file writable, but outputfile.json not writable. — rnk / ViewSVN
  30. [CMake] Clang: Don't use object libraries with Xcode

    Undoes some of the effects of r360946 when using the Xcode CMake
    generator---it doesn't handle object libraries correctly at all.
    Attempts to still honor BUILD_SHARED_LIBS for Xcode, but I didn't
    actually test it. Should have no effect on non-Xcode generators.

    https://reviews.llvm.org/D68430 — jrose / ViewSVN
  31. [libc++] Move more CMake flags to per-target definitions

    This daily refactoring tackles flags related to modules,
    exceptions and RTTI. — Louis Dionne / ViewSVN
  32. [X86] Remove isel patterns for mask vpcmpgt/vpcmpeq. Switch vpcmp to these based on the immediate in MCInstLower

    The immediate form of VPCMP can represent these completely. The
    vpcmpgt/eq are just shorter encodings.

    This patch removes the isel patterns and just swaps the opcodes
    and removes the immediate in MCInstLower. This matches where we do
    some other encodings tricks.

    Removes over 10K bytes from the isel table.

    Differential Revision: https://reviews.llvm.org/D68446 — ctopper / ViewSVN
  33. [X86] Add DAG combine to form saturating VTRUNCUS/VTRUNCS from VTRUNC

    We already do this for ISD::TRUNCATE, but we can do the same for X86ISD::VTRUNC

    Differential Revision: https://reviews.llvm.org/D68432 — ctopper / ViewSVN
  34. Add few docs and implementation of strcpy and strcat.

    Summary:
    This patch illustrates some of the features like modularity we want
    in the new libc. Few other ideas like different kinds of testing, redirectors
    etc are not yet present.

    Reviewers: dlj, hfinkel, theraven, jfb, alexshap, jdoerfert

    Subscribers: mgorny, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67867 — sivachandra / ViewSVN
  35. [Automaton] Fix invalid iterator reference

    Found by the expensive checks bot. — jamesm / ViewSVN
  36. [ModuloSchedule] Do not remap terminators

    This is a trivial point fix. Terminator instructions aren't scheduled, so
    we shouldn't expect to be able to remap them.

    This doesn't affect Hexagon and PPC because their terminators are always
    hardware loop backbranches that have no register operands. — jamesm / ViewSVN
  37. [FPEnv] Strict FP tests should use the requisite function attributes.

    A set of function attributes is required in any function that uses constrained
    floating point intrinsics. None of our tests use these attributes.

    This patch fixes this.

    These tests have been tested against the IR verifier changes in D68233.

    Reviewed by: andrew.w.kaylor, cameron.mcinally, uweigand
    Approved by: andrew.w.kaylor
    Differential Revision: https://reviews.llvm.org/D67925 — kpn / ViewSVN
  38. [utils] Fix incompatibility of bisect[-skip-count] with Python 3

    Summary:
    This change replaces the print statements with print function calls
    and also replaces the '/' operator (which is integer division in Py2,
    but becomes floating point division in Py3) with the '//' operator
    which has the same semantics in Py2 and Py3.

    Reviewers: greened, michaelplatings, gottesmm

    Reviewed By: greened

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68138 — miyuki / ViewSVN
  39. [OPENMP50]Suppport for multiple vendors in the same vendor context
    selector.

    According to OpenMP 5.0, multiple vendors could be specified in the
    vendor context selector via ',' as a separator. — abataev / ViewSVN
  40. [NFC] [FileCheck] Reapply fix init of objects in unit tests

    Summary:
    Fix initialization style of objects allocated on the stack and member
    objects in unit test to use the "Type Var(init list)" and
    "Type Member{init list}" convention. The latter fixes the buildbot
    breakage.

    Reviewers: jhenderson, probinson, arichardson, grimar, jdenny

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68425 — thopre / ViewSVN
  41. [scudo][standalone] Make malloc_info return a minimal XML

    Summary:
    Initially, our malloc_info was returning ENOTSUP, but Android would
    rather have it return successfully and write a barebone XML to the
    stream, so we will oblige.

    Add an associated test.

    Reviewers: cferris, morehouse, hctim, eugenis, vitalybuka

    Reviewed By: morehouse

    Subscribers: delcypher, #sanitizers, llvm-commits

    Tags: #llvm, #sanitizers

    Differential Revision: https://reviews.llvm.org/D68427 — cryptoad / ViewSVN
  42. SemaDeclAttr - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  43. CGBlocks - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  44. [clang-format] C++11 braced lists should respect the SpacesInParentheses setting

    Summary:
    According to the clang-format documentation, "Fundamentally, C++11 braced lists are formatted exactly like function calls would be formatted in their place. If the braced list follows a name (e.g. a type or variable name), clang-format formats as if the `{}` were the parentheses of a function call with that name."

    This patch furthers the treatment of C++11 braced list braces as parentheses by respecting the `SpacesInParentheses` setting.

    Reviewers: MyDeveloperDay, reuk, owenpan

    Reviewed By: MyDeveloperDay

    Subscribers: cfe-commits

    Tags: #clang-format, #clang

    Patch By: mitchell-stellar

    Differential Revision: https://reviews.llvm.org/D68415 — paulhoad / ViewSVN
  45. [clang-format] [PR43531] clang-format damages "alternative representations" for operators

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

    Fix for clang-format incorrectly handles "alternative operators" as described by https://en.cppreference.com/w/cpp/language/operator_alternative

    compl = ~
    not = !

    these are unary operators, and clang-format will remove the space between them and a numeric constant

    this incorrectly formats the following code

    ```
    int a compl 5;
    int a not 5;
    ```

    into:

    ```
    int a compl5;
    int a not5;
    ```

    The code adds FIXME unit tests for "alternative token" representations for {} [] and # as defined by the same link, which would require a more detailed change to the FormatTokenLexer

    Reviewers: klimek, reuk, owenpan, mitchell-stellar, STL_MSFT

    Reviewed By: mitchell-stellar

    Subscribers: cfe-commits

    Tags: #clang-format, #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D68332 — paulhoad / ViewSVN
  46. Further improve -Wbool-operation bitwise negation message — sammccall / ViewSVN
  47. [clang-rename] Fix a crash when renaming a class without definition.

    Reviewers: sammccall

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68459 — hokein / ViewSVN
  48. [clang-format] [PR42417] clang-format inserts a space after '->' for operator->() overloading

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

    This revision removes the extra space between the opertor-> and the parens ()

    ```
    class Bug {
        auto operator-> () -> int*;
        auto operator++(int) -> int;
    };
    ```

    Reviewers: klimek, owenpan, byoungyoung, mitchell-stellar

    Reviewed By: mitchell-stellar

    Subscribers: cfe-commits

    Tags: #clang-format, #clang

    Differential Revision: https://reviews.llvm.org/D68242 — paulhoad / ViewSVN
  49. [AMDGPU][MC][GFX10][WS32] Corrected decoding of dst operand for v_cmp_*_sdwa opcodes

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

    Reviewers: arsenm, rampitec

    Differential Revision: https://reviews.llvm.org/D68349 — dpreobra / ViewSVN
  50. [clang] Prevent false positives in arm-mfpu-none codegen test.

    A user pointed out to me in private email that this test will fail if
    it sees the letter 's' followed by a digit in any part of clang's
    assembly output after the function label. That includes the .ident at
    the end, which can include a full pathname or hostname or both from
    the system clang was built on. So if that path or hostname includes
    any text like 's5' then it will cause the test to fail.

    Fixed by adding a check for `.fnend`, to limit the scope of the
    `CHECK-NOT` to only the actual generated code for the test function.

    (Committed without prior review on the basis that it's a simple and
    obvious pure test-suite fix and also in a test I contributed myself.) — statham / ViewSVN
  51. [NFCI] Improve the -Wbool-operation's warning message

    Based on the request from the post commit review. Also added one new test. — xbolva00 / ViewSVN
  52. Fix uninitialized variable warnings in directory_entry default constructor. NFCI — rksimon / ViewSVN
  53. Fix MSVC "not all control paths return a value" warning. NFCI. — rksimon / ViewSVN
  54. [AMDGPU][MC][GFX10] Enabled decoding of 'null' operand

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

    Reviewers: arsenm, rampitec

    Differential Revision: https://reviews.llvm.org/D68348 — dpreobra / ViewSVN
  55. [clangd] update the package-lock.json. — hokein / ViewSVN
  56. ARM-Darwin: keep the frame register reserved even if not updated.

    Darwin platforms need the frame register to always point at a valid record even
    if it's not updated in a leaf function. Backtraces are more important than one
    extra GPR. — Tim Northover / ViewSVN
  57. [llvm-ar][test] Clarified comment

    The test is dependant on the installation of the en_US.UTF-8
    locale. The reasoning for this is clarified in the amended comment. — gbreynoo / ViewSVN
  58. [AMDGPU][MC][GFX10] Corrected definition of FLAT GLOBAL/SCRATCH instructions

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

    Reviewers: arsenm, rampitec

    Differential Revision: https://reviews.llvm.org/D68347 — dpreobra / ViewSVN
  59. [llvm-readobj] Remove redundant semicolon. NFC — atanasyan / ViewSVN
  60. [llvm-readobj][mips] Inline `printMipsPLTGOT` method — atanasyan / ViewSVN
  61. [llvm-readobj][mips] Implement GNU-style printing of .MIPS.abiflags section

    In this patch `llvm-readobj` prints ASEs flags on a single line
    separated by a comma. GNU `readelf` prints each ASEs flag on
    a separate line. It will be fixed later. — atanasyan / ViewSVN
  62. [llvm-readobj] Replace arch-specific ObjDumper methods by the single `printArchSpecificInfo`

    Initially llvm-readobj supports multiple command line options like
    `--arm-attributes` and `--mips-plt-got` for display ELF arch-specific
    information. Now all these options are superseded by the
    `--arch-specific` one. It makes sense to have a single `printArchSpecificInfo`
    method in the base `ObjDumper`, and hide all ELF/target specific details
    in the `ELFDumper::printArchSpecificInfo` override.

    Differential Revision: https://reviews.llvm.org/D68385 — atanasyan / ViewSVN
  63. Fix MSVC "not all control paths return a value" warning. NFCI. — rksimon / ViewSVN
  64. Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. — rksimon / ViewSVN
  65. Revert [test] Remove locale dependency for mri-utf8.test

    This reverts r373700 (git commit b455ebf921c5c940c2366bec226959e3a4127fee) — gbreynoo / ViewSVN
  66. [DebugInfo] LiveDebugValues: move DBG_VALUE creation into VarLoc class

    Rather than having a mixture of location-state shared between DBG_VALUEs
    and VarLoc objects in LiveDebugValues, this patch makes VarLoc the
    master record of variable locations. The refactoring means that the
    transfer of locations from one place to another is always a performed by
    an operation on an existing VarLoc, that produces another transferred
    VarLoc. DBG_VALUEs are only created at the end of LiveDebugValues, once
    all locations are known. As a plus, there is now only one method where
    DBG_VALUEs can be created.

    The test case added covers a circumstance that is now impossible to
    express in LiveDebugValues: if an already-indirect DBG_VALUE is spilt,
    previously it would have been restored-from-spill as a direct DBG_VALUE.
    We now don't lose this information along the way, as VarLocs always
    refer back to the "original" non-transfer DBG_VALUE, and we can always
    work out whether a location was "originally" indirect.

    Differential Revision: https://reviews.llvm.org/D67398 — jmorse / ViewSVN
  67. gn build: (manually) merge r373718 — nico / ViewSVN
  68. [Format] Fix docs after r373439 — sammccall / ViewSVN
  69. Revert "[NFC] [FileCheck] Fix init of stack objects in unit tests"

    This reverts commit r373717. It broke the build:
    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18721. — gribozavr / ViewSVN
  70. [DebugInfo] LiveDebugValues: defer DBG_VALUE creation during analysis

    When transfering variable locations from one place to another,
    LiveDebugValues immediately creates a DBG_VALUE representing that
    transfer. This causes trouble if the variable location should
    subsequently be invalidated by a loop back-edge, such as in the added
    test case: the transfer DBG_VALUE from a now-invalid location is used
    as proof that the variable location is correct. This is effectively a
    self-fulfilling prophesy.

    To avoid this, defer the insertion of transfer DBG_VALUEs until after
    analysis has completed. Some of those transfers are still sketchy, but
    we don't propagate them into other blocks now.

    Differential Revision: https://reviews.llvm.org/D67393 — jmorse / ViewSVN
  71. [TableGen] Introduce a generic automaton (DFA) backend

    Summary:
    This patch introduces -gen-automata, a backend for generating deterministic finite-state automata.

    DFAs are already generated by the -gen-dfa-packetizer backend. This backend is more generic and will
    hopefully be used to implement the DFA generation (and determinization) for the packetizer in the
    future.

    This backend allows not only generation of a DFA from an NFA (nondeterministic finite-state
    automaton), it also emits sidetables that allow a path through the DFA under a sequence of inputs to
    be analyzed, and the equivalent set of all possible NFA transitions extracted.

    This allows a user to not just answer "can my problem be solved?" but also "what is the
    solution?". Clearly this analysis is more expensive than just playing a DFA forwards so is
    opt-in. The DFAPacketizer has this behaviour already but this is a more compact and generic
    representation.

    Examples are bundled in unittests/TableGen/Automata.td. Some are trivial, but the BinPacking example
    is a stripped-down version of the original target problem I set out to solve, where we pack values
    (actually immediates) into bins (an immediate pool in a VLIW bundle) subject to a set of esoteric
    constraints.

    Reviewers: t.p.northover

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67968 — jamesm / ViewSVN
  72. [NFC] [FileCheck] Fix init of stack objects in unit tests

    Summary:
    Fix initialization style of objects allocated on the stack in unit test
    to use the "Type Var(init list)" convention.

    Reviewers: jhenderson, probinson, arichardson, grimar, jdenny

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68425 — thopre / ViewSVN
  73. AMDGPU/GlobalISel: Fix using wrong addrspace for aperture

    This was always passing the destination flat address space, when it
    should be picking between the two valid source options. — arsenm / ViewSVN
  74. AMDGPU/GlobalISel: Select G_PTRTOINT — arsenm / ViewSVN
  75. AMDGPU/GlobalISel: Support wave32 waterfall loops — arsenm / ViewSVN
  76. [Driver] NFC: Remove duplicate call to getLibGccType

    Reviewed By: saugustine

    Differential Revision: https://reviews.llvm.org/D68380 — c-rhodes / ViewSVN
  77. [lldb][modern-type-lookup] No longer import temporary declarations into the persistent AST

    Summary:
    As we figured out in D67803, importing declarations from a temporary ASTContext that were originally from a persistent ASTContext
    causes a bunch of duplicated declarations where we end up having declarations in the target AST that have no associated ASTImporter that
    can complete them.

    I haven't figured out how/if we can solve this in the current way we do things in LLDB, but in the modern-type-lookup this is solvable
    as we have a saner architecture with the ExternalASTMerger. As we can (hopefully) make modern-type-lookup the default mode in the future,
    I would say we try fixing this issue here. As we don't use the hack that was reinstated in D67803 during modern-type-lookup, the test case for this
    is essentially just printing any kind of container in `std::` as we would otherwise run into the issue that required a hack like D67803.

    What this patch is doing in essence is that instead of importing a declaration from a temporary ASTContext, we instead check if the
    declaration originally came from a persistent ASTContext (e.g. the debug information) and we directly import from there. The ExternalASTMerger
    is already connected with ASTImporters to these different sources, so this patch is essentially just two parts:
    1. Mark our temporary ASTContext/ImporterSource as temporary when we import from the expression AST.
    2. If the ExternalASTMerger sees we import from the expression AST, instead of trying to import these temporary declarations, check if we
    can instead import from the persistent ASTContext that is already connected. This ensures that all records from the persistent source actually
    come from the persistent source and are minimally imported in a way that allows them to be completed later on in the target AST.

    The next step is to run the ASTImporter for these temporary expressions with the MinimalImport mode disabled, but that's a follow up patch.

    This patch fixes most test failures with modern-type-lookup enabled by default (down to 73 failing tests, which includes the 22 import-std-module tests
    which need special treatment).

    Reviewers: shafik, martong

    Reviewed By: martong

    Subscribers: aprantl, rnkovacs, christof, abidh, JDevlieghere, lldb-commits

    Tags: #lldb

    Differential Revision: https://reviews.llvm.org/D68326 — Raphael Isemann / ViewSVN
  78. [CodeComplete] Ensure object is the same in compareOverloads()

    Summary:
    This fixes a regression that led to size() not being available in clangd
    when completing 'deque().^' and using libc++.

    Reviewers: sammccall

    Reviewed By: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68335 — ibiryukov / ViewSVN
  79. [clang-format] [PR43338] C# clang format has space issues betweern C# only keywords

    Summary:
    When formatting C# there can be issues with a lack of spaces between `using (` , `foreach (` and generic types

    The C# code

    ```
    public class Foo
    {
        Dictionary<string,string> foo;
    }

    ```
    will be formatted as

    ```
    public class Foo
    {
        Dictionary<string, string>foo;
                               ^^^^^   missing a space
    }
    ```

    This revision also reverts some of {D66662} in order to make this cleaner and resolve an issues seen by @owenpan that the formatting didn't add a space when not in a code block

    This also transforms C# foreach commands to be seen as tok::kw_for commands (to ensure foreach gets the same Brace Wrapping behavior as for without littering the code with `if(Style.isCSharp())`

    Reviewers: owenpan, klimek, russellmcc, mitchell-stellar

    Reviewed By: mitchell-stellar

    Subscribers: cfe-commits

    Tags: #clang, #clang-format

    Differential Revision: https://reviews.llvm.org/D67660 — paulhoad / ViewSVN
  80. [clang-format] [PR43333] Fix C# breaking before function name when using Attributes

    Summary:
    This is  a fix for https://bugs.llvm.org/show_bug.cgi?id=43333

    This comes with 3 main parts

      - C# attributes cause function names on a new line even when AlwaysBreakAfterReturnType is set to None
      - Add AlwaysBreakAfterReturnType  to None by default in the Microsoft style,
      - C# unit tests are not using Microsoft style (which we created to define the default C# style to match a vanilla C# project).

    Reviewers: owenpan, klimek, russellmcc, mitchell-stellar

    Reviewed By: mitchell-stellar

    Subscribers: cfe-commits

    Tags: #clang-tools-extra, #clang, #clang-format

    Differential Revision: https://reviews.llvm.org/D67629 — paulhoad / ViewSVN
  81. [X86] Enable inline memcmp() to use AVX512 — davezarzycki / ViewSVN
  82. [compiler-rt] Remove O1 tests from signal_line.cpp

    It does not work on arm — Vitaly Buka / ViewSVN
  83. Revert "[Symbolize] Use the local MSVC C++ demangler instead of relying on dbghelp. NFC."

    This reverts SVN r373698, as it broke sanitizer tests, e.g. in
    http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52441. — mstorsjo / ViewSVN
  84. [test] Remove locale dependency for mri-utf8.test

    Summary:
    llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be
    installed for its last RUN line to work. If not installed, the unicode
    string gets encoded (interpreted) as ascii which fails since the most
    significant byte is non zero. This commit changes the call to open to
    use a binary literal of the UTF-8 encoding for the pound sign instead,
    thus bypassing the encoding step.

    Note that the echo to create the <pound sign>.txt file will work
    regardless of the locale because both the shell and the echo (in case
    it's not a builtin of the shell concerned) only care about ascii
    character to operate. Indeed, the mri-utf8.test file (and in particular
    the pound sign) is encoded in UTF-8 and UTF-8 guarantees only ascii
    characters can create bytes that can be interpreted as ascii characters
    (i.e. bytes with the most significant bit null).

    So the process to break down the filename in the line goes something
    along:
    - find an ascii chevron '>'
    - find beginning of the filename by removing ascii space-like characters
    - find ascii newline character indicating the end of the redirection (no
      semicolon ';', closing curly bracket '}' or parenthesis ')' or the
      like
    - create a file whose name is made of all the bytes in between beginning
      and end of filename *without interpretting them*

    Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68418 — thopre / ViewSVN
  85. [AMDGPU][SILoadStoreOptimizer] NFC: Refactor code

    Summary:
    This patch fixes a potential aliasing problem in InstClassEnum,
    where local values were mixed with machine opcodes.

    Introducing InstSubclass will keep them separate and help extending
    InstClassEnum with other instruction types (e.g. MIMG) in the future.

    This patch also makes getSubRegIdxs() more concise.

    Reviewers: nhaehnle, arsenm, tstellar

    Reviewed By: arsenm

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68384 — Piotr Sobczak / ViewSVN
  86. [Symbolize] Use the local MSVC C++ demangler instead of relying on dbghelp. NFC.

    This allows making a couple llvm-symbolizer tests run in all
    environments.

    Differential Revision: https://reviews.llvm.org/D68133 — mstorsjo / ViewSVN
  87. [test] Remove a needless declaration of REQUIRES: target-windows

    This test only relies on running on a case insensitive file system,
    the exact target triple of the toolchain shouldn't matter.

    Differential Revision: https://reviews.llvm.org/D68136 — mstorsjo / ViewSVN
  88. [JITLink] Remove a redundant semicolon, silencing -Wpedantic warnings with GCC. NFC. — mstorsjo / ViewSVN
  89. [clang] [cmake] Add distribution install targets for remaining components

    Add install targets as necessary to install bash-autocomplete,
    scan-build and scan-view via LLVM_DISTRIBUTION_TARGETS.

    Differential Revision: https://reviews.llvm.org/D68413 — mgorny / ViewSVN
  90. [clang-tools-extra] [cmake] Use add_clang_tool() to install tools

    Replace add_clang_executable() calls with add_clang_tool() that takes
    care of creating correct, distribution-friendly install target.  While
    at it, remove redundant install calls.

    This change also causes clang-move and pp-trace to be installed.

    Differential Revision: https://reviews.llvm.org/D68423 — mgorny / ViewSVN
  91. [JITLink] Explicitly destroy bumpptr-allocated blocks to avoid a memory leak. — Lang Hames / ViewSVN
  92. [JITLink] Fix an unused variable warning. — Lang Hames / ViewSVN
  93. Make libc++ gdb pretty printer Python 3 compatible — maskray / ViewSVN
  94. gn build: Merge r373689 — gnsyncbot / ViewSVN
  95. [JITLink] Switch from an atom-based model to a "blocks and symbols" model.

    In the Atom model the symbols, content and relocations of a relocatable object
    file are represented as a graph of atoms, where each Atom represents a
    contiguous block of content with a single name (or no name at all if the
    content is anonymous), and where edges between Atoms represent relocations.
    If more than one symbol is associated with a contiguous block of content then
    the content is broken into multiple atoms and layout constraints (represented by
    edges) are introduced to ensure that the content remains effectively contiguous.
    These layout constraints must be kept in mind when examining the content
    associated with a symbol (it may be spread over multiple atoms) or when applying
    certain relocation types (e.g. MachO subtractors).

    This patch replaces the Atom model in JITLink with a blocks-and-symbols model.
    The blocks-and-symbols model represents relocatable object files as bipartite
    graphs, with one set of nodes representing contiguous content (Blocks) and
    another representing named or anonymous locations (Symbols) within a Block.
    Relocations are represented as edges from Blocks to Symbols. This scheme
    removes layout constraints (simplifying handling of MachO alt-entry symbols,
    and hopefully ELF sections at some point in the future) and simplifies some
    relocation logic. — Lang Hames / ViewSVN
  96. [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore

    We would like to split the SP adjustment to reduce the instructions in
    prologue and epilogue as the following case. In this way, the offset of
    the callee saved register could fit in a single store.

        add     sp,sp,-2032
        sw      ra,2028(sp)
        sw      s0,2024(sp)
        sw      s1,2020(sp)
        sw      s3,2012(sp)
        sw      s4,2008(sp)
        add     sp,sp,-64

    Differential Revision: https://reviews.llvm.org/D68011 — shiva / ViewSVN
  97. Properly handle instantiation-dependent array bounds.

    We previously failed to treat an array with an instantiation-dependent
    but not value-dependent bound as being an instantiation-dependent type.
    We now track the array bound expression as part of a constant array type
    if it's an instantiation-dependent expression. — rsmith / ViewSVN
  98. [compiler-rt] Fix signal_line.cpp test

    r373682 committed wrong experimental version — Vitaly Buka / ViewSVN
  99. [dsymutil] Fix stack-use-after-scope

    The lambda is taking the stack-allocated Verify boolean by reference and
    it would go out of scope on the next iteration. Moving it out of the
    loop should fix the issue.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=43549 — Jonas Devlieghere / ViewSVN
  100. [compiler-rt] Remove O2, O3 from signal_line test for fix android tests — Vitaly Buka / ViewSVN
  101. compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM

    Summary: Fixes https://github.com/google/oss-fuzz/issues/2836

    Reviewers: eugenis

    Subscribers: dberris, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68178 — Vitaly Buka / ViewSVN
  102. LowerTypeTests: Rename local functions to avoid collisions with identically named functions in ThinLTO modules.

    Without this we can encounter link errors or incorrect behaviour
    at runtime as a result of the wrong function being referenced.

    Differential Revision: https://reviews.llvm.org/D67945 — pcc / ViewSVN
  103. [llvm-objdump][test] Move test to X86 dir to avoid errors disassembling on non-x86 — rupprecht / ViewSVN
  104. [MemorySSA] Don't hoist stores if interfering uses (as calls) exist. — asbirlea / ViewSVN
  105. [OPENMP]Fix the test on Windows, NFC. — abataev / ViewSVN
  106. [llvm-objdump] Further rearrange llvm-objdump sections for compatability

    Summary:
    rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.

    I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
    * Archive headers
    * File headers
    * Section headers
    * Symbol table
    * Dwarf debugging
    * Relocations (if `--disassemble` is not used)
    * Section contents
    * Disassembly

    Reviewers: jhenderson, justice_adams, grimar, ychen, espindola

    Reviewed By: jhenderson

    Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68066 — rupprecht / ViewSVN
  107. ASTContext - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us.

    We can also remove a number of explicit asserts and reply on the internal asserts in castAs<> — rksimon / ViewSVN
  108. [DAGCombiner] add operation legality checks before creating shift ops (PR43542)

    As discussed on llvm-dev and:
    https://bugs.llvm.org/show_bug.cgi?id=43542
    ...we have transforms that assume shift operations are legal and transforms to
    use them are profitable, but that may not hold for simple targets.

    In this case, the MSP430 target custom lowers shifts by repeating (many)
    simpler/fixed ops. That can be avoided by keeping this code as setcc/select.

    Differential Revision: https://reviews.llvm.org/D68397 — spatel / ViewSVN
  109. OverloadCandidate::getNumParams - silence static analyzer getAs<FunctionProtoType> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use castAs<FunctionProtoType> directly and if not assert will fire for us.

    Also replaces an auto to make the type more obvious. — rksimon / ViewSVN
  110. Reland r349624: Let TableGen write output only if it changed, instead of doing so in cmake

    Move the write-if-changed logic behind a flag and don't pass it
    with the MSVC generator. msbuild doesn't have a restat optimization,
    so not doing write-if-change there doesn't have a cost, and it
    should fix whatever causes PR43385. — nico / ViewSVN
  111. DebugInfo: Generalize rnglist emission as a precursor to reusing it for loclist emission — dblaikie / ViewSVN
  112. [OPENMP50]Codegen support for scores in context selectors.

    If the context selector has associated score and several contexts
    selectors matches current context, the function with the highest score
    must be selected. — abataev / ViewSVN
  113. gn build: (manually) merge 373651 better

    The reland uses a static library, not an object library.
    Doesn't really matter for the gn build, but it's probalby
    nice to have the same semantics for the target type. — nico / ViewSVN
  114. [Tests] Add a unordered atomic load combine test — reames / ViewSVN
  115. [Test] Fix inconsistency in alignment in test case

    The IR was using a fixed 8 byte alignment, but the MIR portion was using native alignment.  Since the test doesn't appear to be deliberately testing overalignment, just make the IR match the MIR. — reames / ViewSVN
  116. [AArch64][SVE] Move the testcase into CodeGen dir

    https://reviews.llvm.org/rL373600 added an AArch64 testcase in top dir
    which should be moved to Codegen dir. — jsji / ViewSVN
  117. [AArch64InstPrinter] prefer bfi to bfc for < armv8.2-a

    Summary:
    Fixes pr/42576.

    Link: https://github.com/ClangBuiltLinux/linux/issues/697

    Reviewers: t.p.northover

    Reviewed By: t.p.northover

    Subscribers: kristof.beyls, hiraditya, llvm-commits, srhines

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68356 — nickdesaulniers / ViewSVN
  118. Reland "gn build: (manually) merge r373551"

    373551 relanded in 373651. — nico / ViewSVN
  119. Attempt to remove linker workaround on the buildbots: Attempt 2

    The first commit removed the workaround in a old script.
    This patch removes it in the file actually used by the bots.

    I have no idea if this is still needed, but removing the
    workaround seems like the easiest way to test.

    I'll revert this change if the bots go red. — ericwf / ViewSVN
  120. [PowerPC] Adjust the naming and operand order of fnmsub patterns

    Summary:
    This is follow up patch of https://reviews.llvm.org/D67595.
    Adjust naming and the Commutable operands for additional patterns
    to make it easier to read.

    The testcase update also show that we can save some unecessary fmr as
    well.

    Reviewers: #powerpc, steven.zhang, hfinkel, nemanjai

    Reviewed By: #powerpc, nemanjai

    Subscribers: wuzish, hiraditya, kbarton, MaskRay, shchenz, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68112 — jsji / ViewSVN
  121. [gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion

    Summary:
    This will handle expansion of C++ fragments in the declarative combiner
    including custom predicates, and escapes into C++ to aid the migration
    effort.

    Fixed the -DLLVM_LINK_LLVM_DYLIB=ON using DISABLE_LLVM_LINK_LLVM_DYLIB when
    creating the library. Apparently it automatically links to libLLVM.dylib
    and we don't want that from tablegen.

    Reviewers: bogner, volkan

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

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

    llvm-svn: 373551 — dsanders / ViewSVN
  122. Attempt to remove linker workaround on the buildbots.

    I have no idea if this is still needed, but removing the
    workaround seems like the easiest way to test.

    I'll revert this change if the bots go red. — ericwf / ViewSVN
  123. [HIP] Use option -nogpulib to disable linking device lib

    Differential Revision: https://reviews.llvm.org/D68300 — yaxunl / ViewSVN
  124. Check for qualified function types after substituting into the operand
    of 'typeid'.

    This is a rare place where it's valid for a function type to be
    substituted but not valid for a qualified function type to be
    substituted, so needs a special check. — rsmith / ViewSVN
  125. [clang-format] Add ability to wrap braces after multi-line control statements

    Summary:
    Change the BraceWrappingFlags' AfterControlStatement from a bool to an enum with three values:

    * "Never": This is the default, and does not do any brace wrapping after control statements.
    * "MultiLine": This only wraps braces after multi-line control statements (this really only happens when a ColumnLimit is specified).
    * "Always": This always wraps braces after control statements.

    The first and last options are backwards-compatible with "false" and "true", respectively.

    The new "MultiLine" option is useful for when a wrapped control statement's indentation matches the subsequent block's indentation. It makes it easier to see at a glance where the control statement ends and where the block's code begins. For example:

    ```
    if (
      foo
      && bar )
    {
      baz();
    }
    ```

    vs.

    ```
    if (
      foo
      && bar ) {
      baz();
    }
    ```

    Short control statements (1 line) do not wrap the brace to the next line, e.g.

    ```
    if (foo) {
      bar();
    } else {
      baz();
    }
    ```

    Reviewers: sammccall, owenpan, reuk, MyDeveloperDay, klimek

    Reviewed By: MyDeveloperDay

    Subscribers: MyDeveloperDay, cfe-commits

    Patch By: mitchell-stellar

    Tags: #clang-format, #clang, #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D68296 — paulhoad / ViewSVN
  126. [NFC] Fix unused variable in release builds — rupprecht / ViewSVN
  127. [X86] Add v32i8 shuffle lowering strategy to recognize two v4i64 vectors truncated to v4i8 and concatenated into the lower 8 bytes with undef/zero upper bytes.

    This patch recognizes the shuffle pattern we get from a
    v8i64->v8i8 truncate when v8i64 isn't a legal type.

    With VLX we can use two VTRUNCs, unpckldq, and a insert_subvector.

    Diffrential Revision: https://reviews.llvm.org/D68374 — ctopper / ViewSVN
  128. PR43547: substitute into the type of a non-type template parameter if
    it's instantiation-dependent, even if it's not dependent.

    There might be a SFINAE check in the parameter type. — rsmith / ViewSVN
  129. [compiler-rt] More optimization levels in signal_line.cpp test — Vitaly Buka / ViewSVN
  130. [X86] matchShuffleWithSHUFPD - use Zeroable element mask directly. NFCI.

    We can make use of the Zeroable mask to indicate which elements we can safely set to zero instead of creating a target shuffle mask on the fly.

    This only leaves one user of createTargetShuffleMask which we can hopefully get rid of in a similar manner.

    This is part of the work to fix PR43024 and allow us to use SimplifyDemandedElts to simplify shuffle chains - we need to get to a point where the target shuffle masks isn't adjusted by its source inputs in setTargetShuffleZeroElements but instead we cache them in a parallel Zeroable mask. — rksimon / ViewSVN
  131. [dsymutil] Don't overload LinkOptions.

    This should fix the build bots:

      error: declaration of ‘llvm::dsymutil::LinkOptions
      DsymutilOptions::LinkOptions’ [-fpermissive] — Jonas Devlieghere / ViewSVN
  132. AMDGPU/GlobalISel: Handle RegBankSelect of G_INSERT_VECTOR_ELT — arsenm / ViewSVN
  133. AMDGPU/GlobalISel: Split 64-bit vector extracts during RegBankSelect

    Register indexing 64-bit elements is possible on the SALU, but not the
    VALU. Handle splitting this into two 32-bit indexes. Extend waterfall
    loop handling to allow moving a range of instructions. — arsenm / ViewSVN
  134. AMDGPU/GlobalISel: Allow VGPR to index SGPR register

    We can still do a waterfall loop over the index if using a VGPR to
    index an SGPR. The result will still be a VGPR, but we can avoid the
    wide copy of the source register to a VGPR. — arsenm / ViewSVN
  135. AMDGPU/GlobalISel: Add some more tests for G_INSERT legalization — arsenm / ViewSVN
  136. AMDGPU/GlobalISel: Fix mutationIsSane assert v8s8 and

    This would try to do FewerElements to v9s8 — arsenm / ViewSVN
  137. [HIP] Enable specifying different default gpu arch for HIP/CUDA.

    Reviewers: tra, yaxunl

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68394 — hliao / ViewSVN
  138. Fix build failure with GCC on identifier reusing.

    - GCC is different from clang and other compilers on that.
      https://godbolt.org/z/CeQE1V — hliao / ViewSVN
  139. compiler-rt: move all __GLIBC_PREREQ into own header file

    Reviewers: eugenis

    Subscribers: dberris, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68177 — Vitaly Buka / ViewSVN
  140. [libc++] Add a per-target flag to include the generated config_site

    This allows propagating the include automatically to targets that
    depend on one of the libc++ targets such as the benchmarks. Note
    that the GoogleBenchmark build itself still needs to manually specify
    the -include, since I don't know of any way to have an external project
    link against one of the libc++ targets (which would propagate the -include
    automatically). — Louis Dionne / ViewSVN
  141. AMDGPU/SILoadStoreOptimizer: Optimize scanning for mergeable instructions

    Summary:
    This adds a pre-pass to this optimization that scans through the basic
    block and generates lists of mergeable instructions with one list per unique
    address.

    In the optimization phase instead of scanning through the basic block for mergeable
    instructions, we now iterate over the lists generated by the pre-pass.

    The decision to re-optimize a block is now made per list, so if we fail to merge any
    instructions with the same address, then we do not attempt to optimize them in
    future passes over the block.  This will help to reduce the time this pass
    spends re-optimizing instructions.

    In one pathological test case, this change reduces the time spent in the
    SILoadStoreOptimizer from 0.2s to 0.03s.

    This restructuring will also make it possible to implement further solutions in
    this pass, because we can now add less expensive checks to the pre-pass and
    filter instructions out early which will avoid the need to do the expensive
    scanning during the optimization pass. For example, checking for adjacent
    offsets is an inexpensive test we can move to the pre-pass.

    Reviewers: arsenm, pendingchaos, rampitec, nhaehnle, vpykhtin

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65961 — tstellar / ViewSVN
  142. [ModuloSchedule] removeBranch() *before* creating the trip count condition

    The Hexagon code assumes there's no existing terminator when inserting its
    trip count condition check.

    This causes swp-stages5.ll to break. The generated code looks good to me,
    it is likely a permutation. I have disabled the new codegen path to keep
    everything green and will investigate along with the other 3-4 tests
    that have different codegen.

    Fixes expensive-checks build. — jamesm / ViewSVN
  143. gn build: (manually) merge r373622 — nico / ViewSVN
  144. DeclBase/DeclCXX/DeclTemplate - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  145. [libc++] Add missing revision number in ABI changelog — Louis Dionne / ViewSVN
  146. [OPENMP]Fix emission of the declare target variables in device mode.

    Declare target variables must be emitted in device mode, target triples
    can be empty in this case. — abataev / ViewSVN
  147. [dsymutil] Improve consistency by removing redundant namespaces (NFC)

    The dsymutil implementation file has a using-directive for the llvm
    namespace. This patch just removes redundant namespace qualifiers. — Jonas Devlieghere / ViewSVN
  148. [dsymutil] Tablegenify option parsing

    This patch reimplements command line option parsing in dsymutil with
    Tablegen and libOption. The main motivation for this change is to
    prevent clashes with other cl::opt options defined in llvm. Although
    it's a bit more heavyweight, it has some nice advantages such as no
    global static initializers and better separation between the code and
    the option definitions.

    I also used this opportunity to improve how dsymutil deals with
    incompatible options. Instead of having checks spread across the code,
    everything is now grouped together in verifyOptions. The fact that the
    options are no longer global means that we need to pass them around a
    bit more, but I think it's worth the trade-off.

    Differential revision: https://reviews.llvm.org/D68361 — Jonas Devlieghere / ViewSVN
  149. [BPF] Handle offset reloc endpoint ending in the middle of chain properly

    During studying support for bitfield, I found an issue for
    an example like the one in test offset-reloc-middle-chain.ll.
      struct t1 { int c; };
      struct s1 { struct t1 b; };
      struct r1 { struct s1 a; };
      #define _(x) __builtin_preserve_access_index(x)
      void test1(void *p1, void *p2, void *p3);
      void test(struct r1 *arg) {
        struct s1 *ps = _(&arg->a);
        struct t1 *pt = _(&arg->a.b);
        int *pi = _(&arg->a.b.c);
        test1(ps, pt, pi);
      }

    The IR looks like:
      %0 = llvm.preserve.struct.access(base, ...)
      %1 = llvm.preserve.struct.access(%0, ...)
      %2 = llvm.preserve.struct.access(%1, ...)
      using %0, %1 and %2

    In this case, we need to generate three relocatiions
    corresponding to chains: (%0), (%0, %1) and (%0, %1, %2).
    After collecting all the chains, the current implementation
    process each chain (in a map) with code generation sequentially.
    For example, after (%0) is processed, the code may look like:
      %0 = base + special_global_variable
      // llvm.preserve.struct.access(base, ...) is delisted
      // from the instruction stream.
      %1 = llvm.preserve.struct.access(%0, ...)
      %2 = llvm.preserve.struct.access(%1, ...)
      using %0, %1 and %2

    When processing chain (%0, %1), the current implementation
    tries to visit intrinsic llvm.preserve.struct.access(base, ...)
    to get some of its properties and this caused segfault.

    This patch fixed the issue by remembering all necessary
    information (kind, metadata, access_index, base) during
    analysis phase, so in code generation phase there is
    no need to examine the intrinsic call instructions.
    This also simplifies the code.

    Differential Revision: https://reviews.llvm.org/D68389 — yhs / ViewSVN
  150. [OPENMP]Improve diagnostics for not found declare target entries.

    We can point to the target region + emit parent functions names/real var
    names if they were not found in host module during device codegen. — abataev / ViewSVN
  151. Revert "[Alignment][NFC] Allow constexpr Align"

    This reverts commit b3af236fb5fc6e50fcc1b54d868f0bff557f3fb1. — gchatelet / ViewSVN
  152. [RISCV] Add obsolete aliases of fscsr, frcsr (fssr, frsr)

    These old aliases were renamed, but are still used by some projects (eg newlib).

    Differential Revision: https://reviews.llvm.org/D68392 — edjones / ViewSVN
  153. [NFC] Added missing changes for rL373614 — xbolva00 / ViewSVN
  154. [Diagnostics] Bitwise negation of a boolean expr always evaluates to true; warn with -Wbool-operation

    Requested here:
    http://lists.llvm.org/pipermail/cfe-dev/2019-October/063452.html — xbolva00 / ViewSVN
  155. Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. — rksimon / ViewSVN
  156. ExprConstant - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  157. Remove duplicate P->getAs<PointerType>() call. NFCI. — rksimon / ViewSVN
  158. [yaml2obj] - Add a Size tag support for SHT_LLVM_ADDRSIG sections.

    It allows using "Size" with or without "Content" in YAML descriptions of
    SHT_LLVM_ADDRSIG sections.

    Differential revision: https://reviews.llvm.org/D68334 — grimar / ViewSVN
  159. Test commit. — sgundapa / ViewSVN
  160. [MSP430] add tests for unwanted shift codegen; NFC (PR43542) — spatel / ViewSVN
  161. Recommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."

    Fix: call `consumeError()` for a case missed.

    Original commit message:

    SHT_LLVM_ADDRSIG is described here:
    https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table

    This patch teaches tools to dump them and to parse the YAML declarations of such sections.

    Differential revision: https://reviews.llvm.org/D68333 — grimar / ViewSVN
  162. [UpdateTestChecks] add basic support for parsing msp430 asm — spatel / ViewSVN
  163. gn build: Merge r373601 — gnsyncbot / ViewSVN
  164. [PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins.

    Summary: This PR creates a utility class called ValueProfileCollector that tells PGOInstrumentationGen and PGOInstrumentationUse what to value-profile and where to attach the profile metadata. It then refactors logic scattered in PGOInstrumentation.cpp into two plugins that plug into the ValueProfileCollector.

    Authored By: Wael Yehia <wyehia@ca.ibm.com>

    Reviewer: davidxl, tejohnson, xur

    Reviewed By: davidxl, tejohnson, xur

    Subscribers: llvm-commits

    Tag: #llvm

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

    Patch By Wael Yehia <wyehia@ca.ibm.com> — bmahjour / ViewSVN
  165. [AArch64][SVE] Adding patterns for floating point SVE add instructions. — amehsan / ViewSVN
  166. Revert r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."

    It broke BB:
    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18655/steps/test/logs/stdio — grimar / ViewSVN
  167. [yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections.

    SHT_LLVM_ADDRSIG is described here:
    https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table

    This patch teaches tools to dump them and to parse the YAML declarations of such sections.

    Differential revision: https://reviews.llvm.org/D68333 — grimar / ViewSVN
  168. [NFC][InstCombine] Some tests for sub-of-negatible pattern

    As we have previously estabilished, `sub` is an outcast,
    and should be considered non-canonical iff it can be converted to `add`.

    It can be converted to `add` if it's second operand can be negated.
    So far we mostly only do that for constants and negation itself,
    but we should be more through. — lebedevri / ViewSVN
  169. [llvm-locstats] Copy the script only when needed; NFC — djtodoro / ViewSVN
  170. [Alignment][NFC] Remove StoreInst::setAlignment(unsigned)

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet, bollu, jdoerfert

    Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D68268 — gchatelet / ViewSVN
  171. [llvm-readobj] - Stop using a precompiled binary in all.test

    Having a precompiled binary here is excessive.
    I also added a few missing tags.

    Differential revision: https://reviews.llvm.org/D68386 — grimar / ViewSVN
  172. [libTooling] Add various Stencil combinators for expressions.

    Summary:
    This revision adds three new Stencil combinators:
    * `expression`, which idiomatically constructs the source for an expression,
      including wrapping the expression's source in parentheses if needed.
    * `deref`, which constructs an idiomatic dereferencing expression.
    * `addressOf`, which constructs an idiomatic address-taking expression.

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68315 — ymandel / ViewSVN
  173. [Alignment][Clang][NFC] Add CharUnits::getAsAlign

    Summary:
    This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`.
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: jholewinski, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68274 — gchatelet / ViewSVN
  174. [mips] Push `fixup_Mips_LO16` fixup for `jialc` and `jic` instructions — atanasyan / ViewSVN
  175. [llvm-readobj][mips] Remove non-standard --misp-xxx flags

    llvm-readobj "non-standard" flags `--mips-plt-got`, `--mips-abi-flags`,
    `--mips-reginfo`, and `--mips-options` are superseded by the `--arch-specific`
    flag and can be removed now. — atanasyan / ViewSVN
  176. [mips] Use llvm-readobj `-A` flag in test cases. NFC — atanasyan / ViewSVN
  177. [llvm-readobj][mips] Display MIPS specific info under --arch-specific flag

    Old options `--mips-plt-got`, `--mips-abi-flags`, '--mips-reginfo`,
    and `--mips-options` wiil be deleted in a separate patch. — atanasyan / ViewSVN
  178. [llvm-readobj][mips] Do not show an error if GOT is missed

    It is not an error if a file does not contain GOT. — atanasyan / ViewSVN
  179. gn build: Revert 373554 "gn build: (manually) merge r373551"

    r373551 was reverted in r373581. — nico / ViewSVN
  180. [AArch64] Static (de)allocation of SVE stack objects.

    Adds support to AArch64FrameLowering to allocate fixed-stack SVE objects.

    The focus of this patch is purely to allow the stack frame to
    allocate/deallocate space for scalable SVE objects. More dynamic
    allocation (at compile-time, i.e. determining placement of SVE objects
    on the stack), or resolving frame-index references that include
    scalable-sized offsets, are left for subsequent patches.

    SVE objects are allocated in the stack frame as a separate region below
    the callee-save area, and above the alignment gap. This is done so that
    the SVE objects can be accessed directly from the FP at (runtime)
    VL-based offsets to benefit from using the VL-scaled addressing modes.

    The layout looks as follows:

         +-------------+
         | stack arg   |  
         +-------------+
         | Callee Saves|
         |   X29, X30  |       (if available)
         |-------------| <- FP (if available)
         |     :       |  
         |  SVE area   |  
         |     :       |  
         +-------------+
         |/////////////| alignment gap.
         |     :       |  
         | Stack objs  |
         |     :       |  
         +-------------+ <- SP after call and frame-setup

    SVE and non-SVE stack objects are distinguished using different
    StackIDs. The offsets for objects with TargetStackID::SVEVector should be
    interpreted as purely scalable offsets within their respective SVE region.

    Reviewers: thegameg, rovka, t.p.northover, efriedma, rengolin, greened

    Reviewed By: efriedma

    Differential Revision: https://reviews.llvm.org/D61437 — s.desmalen / ViewSVN
  181. Silence static analyzer getAs<RecordType> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<RecordType> directly and if not assert will fire for us. — rksimon / ViewSVN
  182. Fix uninitialized variable warning. NFCI — rksimon / ViewSVN
  183. Fix uninitialized variable warning. NFCI — rksimon / ViewSVN
  184. Revert 373551 (CodeExpander.cpp CMake issue)

    Fix buildbots and revert the CodeExpander commit.

    (See http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190930/699857.html ) — Kristina Brooks / ViewSVN
  185. [Alignment][NFC] Allow constexpr Align

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68329 — gchatelet / ViewSVN
  186. Revert 373555: libLLVM+modules failure with CMake 3.10.2

    This reverts rL373555. I've sent an email out regarding the issue.

    Commit on GitHub:
    https://github.com/llvm/llvm-project/commit/45f682f47129c05414d4c5ae7be851772273978f — Kristina Brooks / ViewSVN
  187. [clang][NFC] Fix misspellings in ExternalASTMerger.h — Raphael Isemann / ViewSVN
  188. Update the FAQ: remove stuff related to the previous license +
    update info about the portability of LLVM. — sylvestre / ViewSVN
  189. [llvm-exegesis][NFC] Rename ExegesisTarget::decrementLoopCounterAndLoop()

    Summary: To decrementLoopCounterAndJump, and explicitely take the jump target.

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68375 — courbet / ViewSVN
  190. Fix libc++ pretty printer test for Python 3 after D67238 (take 2)

    In both Python 2 and Python 3, gdb.Value.string returns a 'str'. We just
    need to delete a `encode("utf-8")` which would return a 'bytes' in
    Python 3. — maskray / ViewSVN
  191. [X86] Add test case for v8i64->v8i8 truncate with avx512 and prefer-vector-width/min-legal-vector-width=256. NFC

    With vpmovqb, we should be able to do better here until we get
    AVX512VBMI on Cannonlake/Icelake. — ctopper / ViewSVN
  192. AMDGPU/GlobalISel: Don't re-get subtarget

    It's already available in the class. — arsenm / ViewSVN
  193. AMDGPU/GlobalISel: Expand G_BITCAST legality — arsenm / ViewSVN
  194. [X86] Add DAG combine to turn (bitcast (vbroadcast_load)) into just a vbroadcast_load if the scalar size is the same.

    This improves broadcast load folding of i64 elements on 32-bit
    targets where i64 isn't legal.

    Previously we had to represent these as vXf64 vbroadcast_loads and
    a bitcast to vXi64. But we didn't have any isel patterns
    looking for that.

    This also allows us to remove or simplify some isel patterns that
    were looking for bitcasted vbroadcast_loads. — ctopper / ViewSVN
  195. Fix driver tests when `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is `ON`

    Some Driver tests relied on the default resource direcory having per-os per-arch
    subdirectory layout, and when clang is built with `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON`,
    those test fail, because clang by default assumes per-target subdirectories.

    Explicitly set `-resource-dir` flag to point to a tree with per-os per-arch layout.

    See also: D45604, D62469

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

    Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>. — sepavloff / ViewSVN
  196. [HIP] Support -emit-llvm for device compilation

    Sometimes it is useful to compile HIP device code to LLVM BC. It is not convenient to use clang -cc1 since
    there are lots of options needed.

    This patch allows clang driver to compile HIP device code to LLVM BC with -emit-llvm -c.

    Differential Revision: https://reviews.llvm.org/D68284 — yaxunl / ViewSVN
  197. [X86] Add broadcast load folding patterns to NoVLX VPMULLQ/VPMAXSQ/VPMAXUQ/VPMINSQ/VPMINUQ patterns.

    More fixes for PR36191. — ctopper / ViewSVN
  198. [X86] Remove a couple redundant isel patterns that look to have been copy/pasted from right above them. NFC — ctopper / ViewSVN

#5501 (Oct 2, 2019 7:59:31 PM)

  1. gn build: Merge r373556 — gnsyncbot / ViewSVN
  2. Revert 373538 and follow-ups 373549 and 373552.

    They break tests on (at least) macOS. — nico / ViewSVN
  3. [gicombiner] Make rL373551 compatible with older cmakes

    Newer cmakes appear to be more flexible w.r.t object libraries. Convert to
    a static library so that it works with older cmakes too — dsanders / ViewSVN
  4. gn build: (manually) merge r373551 — nico / ViewSVN
  5. PR43519: don't inject a diagnostic when constant-evaulation of a
    pointer-to-member call can't determine a callee.

    We will have produced a diagnostic already if the callee is known to be
    unevaluatable, and diagnosing here rejects valid code during potential
    constant expression checking. — rsmith / ViewSVN
  6. Fixing broken builds due to r373538, issues with filepath and hexagon toolchain.

    It appears there are some issues with the hexagon toolchain, and also the file
    path for the library file. If this doesn't fix the remaining breakages I will
    attempt a revert. — zer0 / ViewSVN
  7. [gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion

    Summary:
    This will handle expansion of C++ fragments in the declarative combiner
    including custom predicates, and escapes into C++ to aid the migration
    effort.

    Reviewers: bogner, volkan

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68288 — dsanders / ViewSVN
  8. gn build: Merge r373538 — gnsyncbot / ViewSVN
  9. Fixing broken builds due to r373538 due to test that should have been deleted.

    test/InterfaceStubs/object.cpp should have been deleted. — zer0 / ViewSVN
  10. Mark P0784R7 as complete and start defining its feature-test macro.

    Note that this only covers the language side of this feature. (The
    library side has its own feature test macro.) — rsmith / ViewSVN
  11. For P0784R7: support placement new-expressions in constant evaluation.

    For now, we restrict this support to use from within the standard
    library implementation, since we're required to make parts of the
    standard library that use placement new work, but not permitted to
    make uses of placement new from user code work. — rsmith / ViewSVN
  12. For P0784R7: allow direct calls to operator new / operator delete from
    std::allocator::{allocate,deallocate} in constant evaluation. — rsmith / ViewSVN
  13. [gicombiner] Fix windows issue where single quotes in the command are passed through to tablegen — dsanders / ViewSVN
  14. [AMDGPU] Fix illegal agpr use by VALU

    When SIFixSGPRCopies attempts to fix an illegal copy from vector to
    scalar register it calls moveToVALU(). A copy from an agpr to sgpr
    becomes a copy from agpr to agpr, which may result in the illegal
    register class at a use of this copy.

    Solution is to copy it always into a vgpr. This may result in a
    subsequent copy into an agpr if that is what really needed, however
    should not happen too often and likely will be folded later.

    The opposite situation may not happen because an sgpr is always
    illegal where agpr is legal, so such user instructions may not
    exist.

    Differential Revision: https://reviews.llvm.org/D68358 — rampitec / ViewSVN
  15. [gicombiner] Fix a nullptr dereference when -combiners is given a name that isn't defined

    This is unlikely to be the root cause for the windows bot failures but
    it would explain the stack trace seen. — dsanders / ViewSVN
  16. [InstCombine] Bypass high bit extract before variable sign-extension (PR43523)

    https://rise4fun.com/Alive/8BY - valid for lshr+trunc+variable sext
    https://rise4fun.com/Alive/7jk - the variable sext can be redundant

    https://rise4fun.com/Alive/Qslu - 'exact'-ness of first shift can be preserver

    https://rise4fun.com/Alive/IF63 - without trunc we could view this as
                                      more general "drop redundant mask before right-shift",
                                      but let's handle it here for now
    https://rise4fun.com/Alive/iip - likewise, without trunc, variable sext can be redundant.

    There's more patterns for sure - e.g. we can have 'lshr' as the final shift,
    but that might be best handled by some more generic transform, e.g.
    "drop redundant masking before right-shift" (PR42456)

    I'm singling-out this sext patch because you can only extract
    high bits with `*shr` (unlike abstract bit masking),
    and i *know* this fold is wanted by existing code.

    I don't believe there is much to review here,
    so i'm gonna opt into post-review mode here.

    https://bugs.llvm.org/show_bug.cgi?id=43523 — lebedevri / ViewSVN
  17. [NFC][InstCombine] Add tests for 'variable sext of variable high bit extract' pattern (PR43523)

    https://bugs.llvm.org/show_bug.cgi?id=43523 — lebedevri / ViewSVN
  18. DebugInfo: Rename DebugLocStream::Entry::Begin/EndSym to just Begin/End

    Brings this struct in line with the RangeSpan class so they might
    eventually be used by common template code for generating range/loc
    lists with less duplicate code. — dblaikie / ViewSVN
  19. Move SanitizerInitializeUnwinder outside anonymous namespace.

    Fixes the Android build breakage introduced in r373528. — morehouse / ViewSVN
  20. [clang][ifs] Clang Interface Stubs ToolChain plumbing.

    This patch enables end to end support for generating ELF interface stubs
    directly from clang. Now the following:

    clang -emit-interface-stubs -o libfoo.so a.cpp b.cpp c.cpp

    will product an ELF binary with visible symbols populated. Visibility attributes
    and -fvisibility can be used to control what gets populated.

    * Adding ToolChain support for clang Driver IFS Merge Phase
    * Implementing a default InterfaceStubs Merge clang Tool, used by ToolChain
    * Adds support for the clang Driver to involve llvm-ifs on ifs files.
    * Adds -emit-merged-ifs flag, to tell llvm-ifs to emit a merged ifs text file
      instead of the final object format (normally ELF)


    Differential Revision: https://reviews.llvm.org/D63978 — zer0 / ViewSVN
  21. [InstCombine] Transform bcopy to memmove

    bcopy is still widely used mainly for network apps. Sadly, LLVM has no optimizations for bcopy, but there are some for memmove.
    Since bcopy == memmove, it is profitable to transform bcopy to memmove and use current optimizations for memmove for free here. — xbolva00 / ViewSVN
  22. [X86] Add test cases for suboptimal vselect+setcc splitting.

    If the vselect result type needs to be split, it will try to
    also try to split the condition if it happens to be a setcc.

    With avx512 where k-registers are legal, its probably better
    to just use a kshift to split the mask register. — ctopper / ViewSVN
  23. [LegalizeTypes] Check for already split condition before calilng SplitVecRes_SETCC in SplitRes_SELECT.

    No point in manually splitting the SETCC if it was already done. — ctopper / ViewSVN
  24. gn build: (manually) merge r373527 — nico / ViewSVN
  25. DebugInfo: Simplify RangeSpan to be a plain struct

    This is an effort to make RangeSpan and DebugLocStream::Entry more
    similar to share code for their emission (to reuse the more complicated
    code for using (& choosing when to use) base address selection entries,
    etc).

    It didn't seem like this struct was worth the complexity of
    encapsulation - when the members could be initialized by the ctor to any
    value (no validation) and the type is assignable (so there's no
    mutability or other constraint being implemented by its interface). — dblaikie / ViewSVN
  26. [sanitizer_common] Declare __sanitizer_on_print in Windows interception.

    Speculative fix for Windows bot. — morehouse / ViewSVN
  27. [sanitizer_common] Disable onprint.cpp on Android.

    The test fails to find the written file on Android. — morehouse / ViewSVN
  28. [sanitizer_common] Add __sanitizer_on_print to interface list.

    Should fix the current Windows buildbot failure. — morehouse / ViewSVN
  29. [compiler-rt] Use GetNextInstructionPc in signal handlers

    Summary:
    All other stack trace callers assume that PC contains return address.
    HWAsan already use GetNextInstructionPc in similar code.

    PR43339

    Reviewers: eugenis, kcc, jfb

    Subscribers: dexonsmith, dberris, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68313 — Vitaly Buka / ViewSVN
  30. NFC: add namespace {} — Vitaly Buka / ViewSVN
  31. [gicombiner] Add the boring boilerplate for the declarative combiner

    Summary:
    This is the first of a series of patches extracted from a much bigger WIP
    patch. It merely establishes the tblgen pass and the way empty combiner
    helpers are declared and integrated into a combiner info.

    The tablegen pass takes a -combiners option to select the combiner helper
    that will be generated. This can be given multiple values to generate
    multiple combiner helpers at once. Doing so helps to minimize parsing
    overhead.

    The reason for creating a GlobalISel subdirectory in utils/TableGen is that
    there will be quite a lot of non-pass files (~15) by the time the patch
    series is done.

    Reviewers: volkan

    Subscribers: mgorny, hiraditya, simoncook, Petar.Avramovic, s.egerton, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68286 — dsanders / ViewSVN
  32. Fix uninitialized variable warning in CodeGenPGO constructor. NFCI. — rksimon / ViewSVN
  33. ItaniumCXXABI - silence static analyzer getAs<RecordType> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use castAs<RecordType> directly and if not assert will fire for us. — rksimon / ViewSVN
  34. [Clang][Driver][NFC] Corrected DeviceActionBuilder methods' comments.

    Differential Revision: https://reviews.llvm.org/D68355 — sdmitriev / ViewSVN
  35. Recommit "[GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing."

    The cause for the revert should be fixed by r373513 /
    a80b6c15425f82521c624ff24c5c0a34cd534d54

    This reverts commit 47dbcbd8ec6bf6c0b9cbe5811e81a37cc55e73ef. — fhahn / ViewSVN
  36. CGObjCMac - silence static analyzer dyn_cast<>/getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use cast<>/castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  37. [PowerPC] Fix SH field overflow issue

    Store rlwinm Rx, Ry, 32, 0, 31 as rlwinm Rx, Ry, 0, 0, 31 and store
    rldicl Rx, Ry, 64, 0 as rldicl Rx, Ry, 0, 0. Otherwise SH field is overflow and
    fails assertion in assembly printing stage.

    Differential Revision: https://reviews.llvm.org/D66991 — yi-hong.lyu / ViewSVN
  38. [sanitizer_common] Rename OnPrint to __sanitizer_on_print.

    Summary:
    https://reviews.llvm.org/D28596 exposed OnPrint in the global namespace,
    which can cause collisions with user-defined OnPrint() functions.

    Reviewers: vitalybuka, dvyukov

    Reviewed By: vitalybuka, dvyukov

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67987 — morehouse / ViewSVN
  39. [libc++] Use functions instead of global variables to set libc++ build flags

    This commit follows the trend of doing things per-target instead of
    modifying the C++ flags globally. It does so for visibility-related
    flags, other basic build flags and Windows-specific flags. — Louis Dionne / ViewSVN
  40. Fix inconsistent indentation in TableGen.cpp

    The anonymous namespace starts out (incorrectly) indented but isn't
    indented from the TimeRegionsOpt declaration onwards. — dsanders / ViewSVN
  41. Handle llvm.launder.invariant.group in msan.

    Summary:
    [MSan] handle llvm.launder.invariant.group

        Msan used to give false-positives in

        class Foo {
         public:
          virtual ~Foo() {};
        };

        // Return true iff *x is set.
        bool f1(void **x, bool flag);

        Foo* f() {
          void *p;
          bool found;
          found = f1(&p,flag);
          if (found) {
            // p is always set here.
            return static_cast<Foo*>(p); // False positive here.
          }
          return nullptr;
        }

    Patch by Ilya Tokar.

    Reviewers: #sanitizers, eugenis

    Reviewed By: #sanitizers, eugenis

    Subscribers: eugenis, Prazek, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68236 — eugenis / ViewSVN
  42. [TableGen] Improve error reporting of overlapping definitions (NFC) — evandro / ViewSVN
  43. [Local] Handle terminators with users in removeUnreachableBlocks.

    Terminators like invoke can have users outside the current basic block.
    We have to replace those users with undef, before replacing the
    terminator.

    This fixes a crash exposed by rL373430.

    Reviewers: brzycki, asbirlea, davide, spatel

    Reviewed By: asbirlea

    Differential Revision: https://reviews.llvm.org/D68327 — fhahn / ViewSVN
  44. [libc++] Use a function to set warning flags per target

    This is part of a larger shift to move to per-target settings and
    eradicate global variables from the CMake build. I'm starting small
    with warnings only because those are easy to transition over and I
    want to see how it pans out, but we can handle all flags like exceptions
    and RTTI in the future. — Louis Dionne / ViewSVN
  45. [libc++] Revert to using PUBLIC instead of PRIVATE when linking system libs

    It turns out the benchmarks need to link against those libraries
    explicitly too, so CMake's propagation of PUBLIC dependencies is
    used. — Louis Dionne / ViewSVN
  46. [MemorySSA] Update Phi creation when inserting a Def.

    MemoryPhis should be added in the IDF of the blocks newly gaining Defs.
    This includes the blocks that gained a Phi and the block gaining a Def,
    if the block did not have one before.
    Resolves PR43427. — asbirlea / ViewSVN
  47. [Stencil] Hide implementaion detai. NFC. — d0k / ViewSVN
  48. [ARM] Make helpers static. NFC. — d0k / ViewSVN
  49. [OPENMP50]Add parsing/sema analysis for declare variant score.

    Context selectors may include optional score clause in format
    `score(<expr>):`, where `<expr>` must be a constant integer expression.
    Added parsing/sema analysis only. — abataev / ViewSVN
  50. [X86] Rewrite to the vXi1 subvector insertion code to not rely on the value of bits that might be undef

    The previous code tried to do a trick where we would extract the subvector from the location we were inserting. Then xor that with the new value. Take the xored value and clear out the bits above the subvector size. Then shift that xored subvector to the insert location. And finally xor that with the original vector. Since the old subvector was used in both xors, this would leave just the new subvector at the inserted location. Since the surrounding bits had been zeroed no other bits of the original vector would be modified.

    Unfortunately, if the old subvector came from undef we might aggressively propagate the undef. Then we end up with the XORs not cancelling because they aren't using the same value for the two uses of the old subvector. @bkramer gave me a case that demonstrated this, but we haven't reduced it enough to make it easily readable to see what's happening.

    This patch uses a safer, but more costly approach. It isolate the bits above the insertion and bits below the insert point and ORs those together leaving 0 for the insertion location. Then widens the subvector with 0s in the upper bits, shifts it into position with 0s in the lower bits. Then we do another OR.

    Differential Revision: https://reviews.llvm.org/D68311 — ctopper / ViewSVN
  51. Fix: Actually erase remove the elements from AssumeHandles

    Reviewers: sdmitriev, tejohnson

    Reviewed by: tejohnson

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68318 — hiraditya / ViewSVN
  52. [WebAssembly] Error when using wasm64 for ISel

    Summary:
    64-bit WebAssembly (wasm64) is not specified and not supported in the
    WebAssembly backend. We do have support for it in clang, however, and
    we would like to keep that support because we expect wasm64 to be
    specified and supported in the future. For now add an error when
    trying to use wasm64 from the backend to minimize user confusion from
    unexplained crashes.

    Reviewers: aheejin, dschuff, sunfish

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68254 — tlively / ViewSVN
  53. gn build: Merge r373489 — gnsyncbot / ViewSVN
  54. [AMDGPU] Extend buffer intrinsics with swizzling

    Summary:
    Extend cachepolicy operand in the new VMEM buffer intrinsics
    to supply information whether the buffer data is swizzled.
    Also, propagate this information to MIR.

    Intrinsics updated:
    int_amdgcn_raw_buffer_load
    int_amdgcn_raw_buffer_load_format
    int_amdgcn_raw_buffer_store
    int_amdgcn_raw_buffer_store_format
    int_amdgcn_raw_tbuffer_load
    int_amdgcn_raw_tbuffer_store
    int_amdgcn_struct_buffer_load
    int_amdgcn_struct_buffer_load_format
    int_amdgcn_struct_buffer_store
    int_amdgcn_struct_buffer_store_format
    int_amdgcn_struct_tbuffer_load
    int_amdgcn_struct_tbuffer_store

    Furthermore, disable merging of VMEM buffer instructions
    in SI Load/Store optimizer, if the "swizzled" bit on the instruction
    is on.

    The default value of the bit is 0, meaning that data in buffer
    is linear and buffer instructions can be merged.

    There is no difference in the generated code with this commit.
    However, in the future it will be expected that front-ends
    use buffer intrinsics with correct "swizzled" bit set.

    Reviewers: arsenm, nhaehnle, tpr

    Reviewed By: nhaehnle

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68200 — Piotr Sobczak / ViewSVN
  55. Add the misc-init-local-variables check.

    This checks finds all primitive type local variables (integers, doubles, pointers) that are declared without an initial value. Includes fixit functionality to initialize said variables with a default value. This is zero for most types and NaN for floating point types. The use of NaNs is copied from the D programming language.

    Patch by Jussi Pakkanen. — aaronballman / ViewSVN
  56. [Local] Remove unused LazyValueInfo pointer from removeUnreachableBlock.

    There are no users that pass in LazyValueInfo, so we can simplify the
    function a bit.

    Reviewers: brzycki, asbirlea, davide

    Reviewed By: davide

    Differential Revision: https://reviews.llvm.org/D68297 — fhahn / ViewSVN
  57. [libc++] Use PRIVATE instead of PUBLIC when linking against system libs — Louis Dionne / ViewSVN
  58. [ThinLTO/WPD] Ensure devirtualized targets use promoted symbol when necessary

    Summary:
    This fixes a hole in the handling of devirtualized targets that were
    local but need promoting due to devirtualization in another module. We
    were not correctly referencing the promoted symbol in some cases. Make
    sure the code that updates the name also looks at the ExportedGUIDs set
    by utilizing a callback that checks all conditions (the callback
    utilized by the internalization/promotion code).

    Reviewers: pcc, davidxl, hiraditya

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68159 — tejohnson / ViewSVN
  59. [CodeGen] Remove unused MachineMemOperand::print wrappers (PR41772)

    As noted on PR41772, the static analyzer reports that the MachineMemOperand::print partial wrappers set a number of args to null pointers that were then dereferenced in the actual implementation.

    It turns out that these wrappers are not being used at all (hence why we're not seeing any crashes), so I'd like to propose we just get rid of them.

    Differential Revision: https://reviews.llvm.org/D68208 — rksimon / ViewSVN
  60. [SLP] add test for vectorization of different widths (PR28457); NFC — spatel / ViewSVN
  61. [llvm] [cmake] Add install targets for missing distribution components

    Add install targets as necessary to include all files normally installed
    in LLVM_DISTRIBUTION_COMPONENTS.  This includes targets for Sphinx docs,
    opt-viewer Python modules and TableGens.

    Differential Revision: https://reviews.llvm.org/D68339 — mgorny / ViewSVN
  62. LowerExpectIntrinsic handlePhiDef - silence static analyzer dyn_cast<PHINode> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<PHINode> directly and if not assert will fire for us. — rksimon / ViewSVN
  63. Type - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  64. [CodeExtractor] NFC: Refactor sanity checks into isEligible

    Reviewers: fhahn

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68331 — hiraditya / ViewSVN
  65. Silence static analyzer getAs<VectorType> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<VectorType> directly and if not assert will fire for us. — rksimon / ViewSVN
  66. Reapply r373431 "Switch lowering: omit range check for bit tests when default is unreachable (PR43129)"

    This was reverted in r373454 due to breaking the expensive-checks bot.
    This version addresses that by omitting the addSuccessorWithProb() call
    when omitting the range check.

    > Switch lowering: omit range check for bit tests when default is unreachable (PR43129)
    >
    > This is modeled after the same functionality for jump tables, which was
    > added in r357067.
    >
    > Differential revision: https://reviews.llvm.org/D68131 — hans / ViewSVN
  67. [llvm-readelf] - Report a warning when .hash section contains a chain with a cycle.

    It is possible to craft a .hash section that triggers an infinite loop
    in llvm-readelf code. This patch fixes the issue and introduces
    a warning.

    Differential revision: https://reviews.llvm.org/D68086 — grimar / ViewSVN
  68. SemaOverload - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  69. SemaInit - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  70. [yaml2obj] - Alow Size tag for describing SHT_HASH sections.

    This is a follow-up for D68085 which allows using "Size"
    tag together with "Content" tag or alone.

    Differential revision: https://reviews.llvm.org/D68216 — grimar / ViewSVN
  71. [Clangd] ExtractFunction: Don't extract body of enclosing function.

    Summary:
    This patch disable extraction of the body of the enclosing function.
    `void f() [[{}]]`

    Extracting this CompoundStmt would leave the enclosing function without
    a body.

    Reviewers: sammccall, kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68245 — sureyeaah / ViewSVN
  72. [Clangd] Ensure children are always RootStmt in ExtractFunction (Fixes #153)

    Summary:
    We weren't always checking if children are RootStmts in ExtractFunction.

    For `void f([[int a]]);`, the ParmVarDecl appeared as a RootStmt since
    we didn't perform the check and ended up being casted to a (null) Stmt.

    Reviewers: sammccall, kadircet

    Subscribers: kristof.beyls, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68182 — sureyeaah / ViewSVN
  73. [llvm-dwarfdump] Fix dumping of wrong locstats map — djtodoro / ViewSVN
  74. [AArch64][SVE] Implement int_aarch64_sve_cnt intrinsic

    Summary: This patch includes tests for the VecOfBitcastsToInt type added by D68021

    Reviewers: c-rhodes, sdesmalen, rovka

    Reviewed By: c-rhodes

    Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits, cfe-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68023 — kmclaughlin / ViewSVN
  75. MemorySSAUpdater::applyInsertUpdates - silence static analyzer dyn_cast<MemoryAccess> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<MemoryAccess> directly and if not assert will fire for us. — rksimon / ViewSVN
  76. MemorySSA tryOptimizePhi - assert that we've found a DefChainEnd. NFCI.

    Silences static analyzer null dereference warning. — rksimon / ViewSVN
  77. LoopAccessAnalysis isConsecutiveAccess() - silence static analyzer dyn_cast<SCEVConstant> null dereference warning. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use cast<SCEVConstant> directly and if not assert will fire for us. — rksimon / ViewSVN
  78. AsmPrinter - emitGlobalConstantFP - silence static analyzer null dereference warning. NFCI.

    All the calls to emitGlobalConstantFP should provide a nonnull Type for the float. — rksimon / ViewSVN
  79. gn build: Merge r373462 — gnsyncbot / ViewSVN
  80. [ModuloSchedule] Peel out prologs and epilogs, generate actual code

    Summary:
    This extends the PeelingModuloScheduleExpander to generate prolog and epilog code,
    and correctly stitch uses through the prolog, kernel, epilog DAG.

    The key concept in this patch is to ensure that all transforms are *local*; only a
    function of a block and its immediate predecessor and successor. By defining the problem in this way
    we can inductively rewrite the entire DAG using only local knowledge that is easy to
    reason about.

    For example, we assume that all prologs and epilogs are near-perfect clones of the
    steady-state kernel. This means that if a block has an instruction that is predicated out,
    we can redirect all users of that instruction to that equivalent instruction in our
    immediate predecessor. As all blocks are clones, every instruction must have an equivalent in
    every other block.

    Similarly we can make the assumption by construction that if a value defined in a block is used
    outside that block, the only possible user is its immediate successors. We maintain this
    even for values that are used outside the loop by creating a limited form of LCSSA.

    This code isn't small, but it isn't complex.

    Enabled a bunch of testing from Hexagon. There are a couple of tests not enabled yet;
    I'm about 80% sure there isn't buggy codegen but the tests are checking for patterns
    that we don't produce. Those still need a bit more investigation. In the meantime we
    (Google) are happy with the code produced by this on our downstream SMS implementation,
    and believe it generates correct code.

    Subscribers: mgorny, hiraditya, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68205 — jamesm / ViewSVN
  81. [llvm-objcopy] Add --set-section-alignment

    Fixes PR43181. This option was recently added to GNU objcopy (binutils
    PR24942).

    `llvm-objcopy -I binary -O elf64-x86-64 --set-section-alignment .data=8` can set the alignment of .data.

    Reviewed By: grimar, jhenderson, rupprecht

    Differential Revision: https://reviews.llvm.org/D67656 — maskray / ViewSVN
  82. [InstCombine] Simplify fma multiplication to nan for undef or nan operands.

    In similar fashion to D67721, we can simplify FMA multiplications if any
    of the operands is NaN or undef. In instcombine, we will simplify the
    FMA to an fadd with a NaN operand, which in turn gets folded to NaN.

    Note that this just changes SimplifyFMAFMul, so we still not catch the
    case where only the Add part of the FMA is Nan/Undef.

    Reviewers: cameron.mcinally, mcberg2017, spatel, arsenm

    Reviewed By: cameron.mcinally

    Differential Revision: https://reviews.llvm.org/D68265 — fhahn / ViewSVN
  83. [InstCombine] Precommit tests for D68265 — fhahn / ViewSVN
  84. NFC: directly return when CommonExitBlock != Succ

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68330 — hiraditya / ViewSVN
  85. [InstSimplify] fold fma/fmuladd with a NaN or undef operand

    This is intended to be similar to the constant folding results from
    D67446
    and earlier, but not all operands are constant in these tests, so the
    responsibility for folding is left to InstSimplify.

    Differential Revision: https://reviews.llvm.org/D67721 — spatel / ViewSVN
  86. Revert r373431 "Switch lowering: omit range check for bit tests when default is unreachable (PR43129)"

    This broke http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/19967

    > Switch lowering: omit range check for bit tests when default is unreachable (PR43129)
    >
    > This is modeled after the same functionality for jump tables, which was
    > added in r357067.
    >
    > Differential revision: https://reviews.llvm.org/D68131 — hans / ViewSVN
  87. LICM - remove unused variable and reduce scope of another variable. NFCI.

    Appeases both clang static analyzer and cppcheck — rksimon / ViewSVN
  88. Fix libc++ pretty printer test for Python 3 after D67238 — maskray / ViewSVN
  89. Log2_32 returns an unsigned. NFCI.

    Silences clang static analyzer warning about out of bounds (negative) shifts. — rksimon / ViewSVN
  90. Fix uninitialized variable warning. NFCI. — rksimon / ViewSVN
  91. WinException::emitExceptHandlerTable - silence static analyzer dyn_cast<Function> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<Function> directly and if not assert will fire for us. — rksimon / ViewSVN
  92. MetadataLoader upgradeCUVariables() - silence static analyzer dyn_cast_or_null<> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we know that the source won't be null so just use dyn_cast, which will assert if the value somehow is actually null. — rksimon / ViewSVN
  93. ASTContext - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  94. [ARM] Identity shuffles are legal

    Identity shuffles, of the form (0, 1, 2, 3, ...) are perfectly OK under MVE
    (they essentially just become bitcasts). We were not catching that in the
    existing set of what we considered legal though. On NEON, they would be covered
    by vext's, but that is not generally available in MVE.

    This uses ShuffleVectorInst::isIdentityMask which is a little odd to use here
    but does what we want and prevents us from just rewriting what is the same
    function.

    Differential Revision: https://reviews.llvm.org/D68241 — dmgreen / ViewSVN
  95. [Support, ARM64] Define getHostCPUFeatures for Windows on ARM64 platform

    Patch by Adam Kallai!

    Differential Revision: https://reviews.llvm.org/D68139 — mstorsjo / ViewSVN
  96. [clangd] Bail out early if we are sure that the symbol is used outside of the file.

    Summary:
    This would reduce the false positive when the static index is in an
    unavailable state, e.g. background index is not finished.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68325 — hokein / ViewSVN
  97. [clangd] SelectionTree should mark a node as fully-selected if the only claimed tokens were early-claimed.

    Summary:
    Previously they would be marked as partially-selected based on the early claim,
    and never updated as no more tokens were claimed.
    This affects simple VarDecls like "int x".

    Reviewers: SureYeaah

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D66872 — sammccall / ViewSVN
  98. [ClangFormat] relnotes for r373439 — sammccall / ViewSVN
  99. [clang-rename] Better renaming the typedef decl.

    Summary:
    when renaming a typedef decl, we used to rename the underlying decl of the
    typedef, we should rename the typedef itself.

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68322 — hokein / ViewSVN
  100. [ClangFormat] Future-proof Standard option, allow floating or pinning to arbitrary lang version

    Summary:
    The historical context:
    - clang-format was written when C++11 was current,
      and the main language-version concern was >> vs > > template-closers.
      An option was added to allow selection of the 03/11 behavior, or auto-detection.
    - there was no option to choose simply "latest standard" so anyone who didn't
      ever want 03 behavior or auto-detection specified Cpp11.
    - In r185149 this option started to affect lexer mode.
    - no options were added to cover c++14, as parsing/formatting
      didn't change that much. The usage of Cpp11 to mean "latest" became
      codified e.g. in r206263
    - c++17 added some new constructs. These were mostly backwards-compatible and so
      not used in old programs, so having no way to turn them off was OK.
    - c++20 added some new constructs and keywords (e.g. co_*) that changed the
      meaning of existing programs, and people started to complain that
      the c++20 parsing couldn't be turned off.

    New plan:
    - Default ('Auto') behavior remains unchanged: parse as latest, format
       template-closers based on input.
    - Add new 'Latest' option that more clearly expresses the intent "use
       modern features" that many projects have chosen for their .clang-format files.
    - Allow pinning to *any* language version, using the same name as clang -std:
       c++03, c++11, c++14 etc. These set precise lexer options, and any
       clang-format code depending on these can use a >= check.
    - For backwards compatibility, `Cpp11` is an alias for `Latest`, not `c++11`.
       This matches the historical documented semantics of this option.
       This spelling (and `Cpp03`) are deprecated.

    Reviewers: klimek, modocache

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67541 — sammccall / ViewSVN
  101. gn build: (manually) merge r373425 — nico / ViewSVN
  102. [IntrinsicEmitter] Add overloaded type VecOfBitcastsToInt for SVE intrinsics

    Summary:
    This allows intrinsics such as the following to be defined:
    - declare <n x 4 x i32> @llvm.something.nxv4f32(<n x 4 x i32>, <n x 4 x i1>, <n x 4 x float>)

    ...where <n x 4 x i32> is derived from <n x 4 x float>, but
    the element needs bitcasting to int.

    Reviewers: c-rhodes, sdesmalen, rovka

    Reviewed By: c-rhodes

    Subscribers: tschuett, hiraditya, jdoerfert, llvm-commits, cfe-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68021 — kmclaughlin / ViewSVN
  103. [clang-tidy] Fix typo in r373428 — sammccall / ViewSVN
  104. [clangd] Always send file URIs to editors

    Summary:
    Editors only know about file URIs, make sure we do not use any custom
    schemes while sending edits.

    Reviewers: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68324 — kadircet / ViewSVN
  105. Remove an unnecessary cast. NFC. — foad / ViewSVN
  106. [AMDGPU] Make printf lowering faster when there are no printfs

    Summary:
    Printf lowering unconditionally visited every instruction in the module.
    To make it faster in the common case where there are no printfs, look up
    the printf function (if any) and iterate over its users instead.

    Reviewers: rampitec, kzhuravl, alex-t, arsenm

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68145 — foad / ViewSVN
  107. Revert [GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing.

    This breaks http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52310

    This reverts r373430 (git commit 70f70035484ba199a329f9f8d9bd67e37bc2b408) — fhahn / ViewSVN
  108. Switch lowering: omit range check for bit tests when default is unreachable (PR43129)

    This is modeled after the same functionality for jump tables, which was
    added in r357067.

    Differential revision: https://reviews.llvm.org/D68131 — hans / ViewSVN
  109. [GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing.

    removeUnreachableBlocks knows how to preserve the DomTree, so make use
    of it instead of re-computing the DT.

    Reviewers: davide, kuhar, brzycki

    Reviewed By: davide, kuhar

    Differential Revision: https://reviews.llvm.org/D68298 — fhahn / ViewSVN
  110. [Local] Simplify function removeUnreachableBlocks() to avoid (re-)computation.

    Two small changes in llvm::removeUnreachableBlocks() to avoid unnecessary (re-)computation.

    First, replace the use of count() with find(), which has better time complexity.

    Second, because we have already computed the set of dead blocks, replace the second loop over all basic blocks to a loop only over the already computed dead blocks. This simplifies the loop and avoids recomputation.

    Patch by Rodrigo Caetano Rocha <rcor.cs@gmail.com>

    Reviewers: efriedma, spatel, fhahn, xbolva00

    Reviewed By: fhahn, xbolva00

    Differential Revision: https://reviews.llvm.org/D68191 — fhahn / ViewSVN
  111. [clang-tidy] Fix for commits rL372706 and rL372711

    The patch committed was not the accepted version but the
    previous one. This commit fixes this issue.

    Differential Revision: https://reviews.llvm.org/D64736 — baloghadamsoftware / ViewSVN
  112. Reland "[utils] Implement the llvm-locstats tool"

    The tool reports verbose output for the DWARF debug location coverage.
    The llvm-locstats for each variable or formal parameter DIE computes what
    percentage from the code section bytes, where it is in scope, it has
    location description. The line 0 shows the number (and the percentage) of
    DIEs with no location information, but the line 100 shows the number (and
    the percentage) of DIEs where there is location information in all code
    section bytes (where the variable or parameter is in the scope). The line
    50..59 shows the number (and the percentage) of DIEs where the location
    information is in between 50 and 59 percentage of its scope covered.

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

    The cause of the test failure was resolved. — djtodoro / ViewSVN
  113. [llvm-lib] Detect duplicate input files

    Differential Revision: https://reviews.llvm.org/D68320 — ruiu / ViewSVN
  114. Rename TypeNodes.def to TypeNodes.inc for consistency across all
    our autogenerated files.  NFC.

    As requested by Nico Weber. — rjmccall / ViewSVN
  115. [llvm-lib] Correctly handle .lib input files

    If archive files are passed as input files, llvm-lib needs to append
    the members of the input archive files to the output file. This patch
    implements that behavior.

    This patch splits an existing function into smaller functions.
    Effectively, the new code is only `if (Magic == file_magic::archive)
    { ... }` part.

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

    Differential Revision: https://reviews.llvm.org/D68204 — ruiu / ViewSVN
  116. [X86] Add broadcast load folding patterns to the NoVLX compare patterns.

    These patterns use zmm registers for 128/256-bit compares when
    the VLX instructions aren't available. Previously we only
    supported registers, but as PR36191 notes we can fold broadcast
    loads, but not regular loads. — ctopper / ViewSVN
  117. Fix GCC -Wreturn-type warnings. NFC. — hliao / ViewSVN

#5500 (Oct 1, 2019 8:29:06 PM)

  1. Revert r368237 - Update fix-it hints for std::move warnings.

    r368237 attempted to improve fix-its for move warnings, but introduced some
    regressions to -Wpessimizing-move.  Revert that change and add the missing
    test cases to the pessimizing move test to prevent future regressions. — rtrieu / ViewSVN
  2. DebugInfo: Update support for detecting C++ language variants in debug info emission — dblaikie / ViewSVN
  3. gn build: (manually) merge r373407 — nico / ViewSVN
  4. Fix crash on constant-evaluation of pseudo-destruction of a pointer.

    We got confused and thought we might be pseudo-destroying the pointee
    instead. — rsmith / ViewSVN
  5. AMDGPU/GlobalISel: Use getIntrinsicID helper — arsenm / ViewSVN
  6. Remove TypeNodes.def from the modulemap.

    We currently just look for files named in the modulemap in its
    associated source directory.  This means that we can't name
    generated files, like TypeNodes.def now is, which means we can't
    explicitly mark it as textual.  But fortunately that's okay
    because (as I understand it) the most important purpose of naming
    the header in the modulemap is to ensure that it's not treated as
    public, and the search for public headers also only considers
    files in the associated source directory.  This isn't an elegant
    solution, since among other things it means that a build which
    wrote the generated files directly into the source directory would
    result in something that wouldn't build as a module, but that's
    a problem for all our other generated files as well. — rjmccall / ViewSVN
  7. AMDGPU/GlobalISel: Assume VGPR for G_FRAME_INDEX

    In principle this should behave as any other constant. However
    eliminateFrameIndex currently assumes a VALU use and uses a vector
    shift. Work around this by selecting to VGPR for now until
    eliminateFrameIndex is fixed. — arsenm / ViewSVN
  8. AMDGPU/GlobalISel: Private loads always use VGPRs — arsenm / ViewSVN
  9. AMDGPU/GlobalISel: Legalize 1024-bit G_BUILD_VECTOR

    This will be needed to support AGPR operations. — arsenm / ViewSVN
  10. AMDGPU/GlobalISel: Fix RegBankSelect for 1024-bit values — arsenm / ViewSVN

#5499 (Oct 1, 2019 5:50:53 PM)

  1. [AMDGPU] separate accounting for agprs

    Account and report agprs separately on gfx908. Other targets
    do not change the reporting.

    Differential Revision: https://reviews.llvm.org/D68307 — rampitec / ViewSVN
  2. Fix unused variable warning. NFCI. — hliao / ViewSVN
  3. [X86] Add a DAG combine to shrink vXi64 gather/scatter indices that are constant with sufficient sign bits to fit in vXi32

    The gather/scatter instructions can implicitly sign extend the indices. If we're operating on 32-bit data, an v16i64 index can force a v16i32 gather to be split in two since the index needs 2 registers. If we can shrink the index to the i32 we can avoid the split. It should always be safe to shrink the index regardless of the number of elements. We have gather/scatter instructions that can use v2i32 index stored in a v4i32 register with v2i64 data size.

    I've limited this to before legalize types to avoid creating a v2i32 after type legalization. We could check for it, but we'd also need testing. I'm also only handling build_vectors with no bitcasts to be sure the truncate will constant fold.

    Differential Revision: https://reviews.llvm.org/D68247 — ctopper / ViewSVN
  4. Emit TypeNodes.def with tblgen.

    The primary goal here is to make the type node hierarchy available to
    other tblgen backends, although it should also make it easier to generate
    more selective x-macros in the future.

    Because tblgen doesn't seem to allow backends to preserve the source
    order of defs, this is not NFC because it significantly re-orders IDs.
    I've fixed the one (fortunately obvious) place where we relied on
    the old order.  Unfortunately, I wasn't able to share code with the
    existing AST-node x-macro generators because the x-macro schema we use
    for types is different in a number of ways.  The main loss is that
    subclasses aren't ordered together, which doesn't seem important for
    types because the hierarchy is generally very shallow with little
    clustering. — rjmccall / ViewSVN
  5. Use scope qualifiers in Clang's tblgen backends to get useful
    redeclaration checking.  NFC. — rjmccall / ViewSVN
  6. [CMake] Fix the value of `config.target_cflags` for non-macOS Apple platforms. Attempt #3.

    The main problem here is that `-*-version_min=` was not being passed to
    the compiler when building test cases. This can cause problems when
    testing on devices running older OSs because Clang would previously
    assume the minimum deployment target is the the latest OS in the SDK
    which could be much newer than what the device is running.

    Previously the generated value looked like this:

    `-arch arm64 -isysroot
    <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`

    With this change it now looks like:

    `-arch arm64 -stdlib=libc++ -miphoneos-version-min=8.0 -isysroot
    <path_to_xcode>/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`

    This mirrors the setting of config.target_cflags on macOS.

    This change is made for ASan, LibFuzzer, TSan, and UBSan.

    To implement this a new `get_test_cflags_for_apple_platform()` function
    has been added that when given an Apple platform name and architecture
    returns a string containing the C compiler flags to use when building
    tests. This also calls a new helper function `is_valid_apple_platform()`
    that validates Apple platform names.

    This is the third attempt at landing the patch.

    The first attempt (r359305) had to be reverted (r359327) due to a buildbot
    failure. The problem was that calling `get_test_cflags_for_apple_platform()`
    can trigger a CMake error if the provided architecture is not supported by the
    current CMake configuration. Previously, this could be triggered by passing
    `-DCOMPILER_RT_ENABLE_IOS=OFF` to CMake. The root cause is that we were
    generating test configurations for a list of architectures without checking if
    the relevant Sanitizer actually supported that architecture. We now intersect
    the list of architectures for an Apple platform with
    `<SANITIZER>_SUPPORTED_ARCH` (where `<SANITIZER>` is a Sanitizer name) to
    iterate through the correct list of architectures.

    The second attempt (r363633) had to be reverted (r363779) due to a build
    failure. The failed build was using a modified Apple toolchain where the iOS
    simulator SDK was missing. This exposed a bug in the existing UBSan test
    generation code where it was assumed that `COMPILER_RT_ENABLE_IOS` implied that
    the toolchain supported both iOS and the iOS simulator. This is not true. This
    has been fixed by using the list `SANITIZER_COMMON_SUPPORTED_OS` for the list
    of supported Apple platforms for UBSan. For consistency with the other
    Sanitizers we also now intersect the list of architectures with
    UBSAN_SUPPORTED_ARCH.

    rdar://problem/50124489

    Differential Revision: https://reviews.llvm.org/D61242 — delcypher / ViewSVN
  7. AMDGPU: Fix an out of date assert in addressing FrameIndex

    Reviewers:
      arsenm

    Differential Revision:
      https://reviews.llvm.org/D67574 — chfang / ViewSVN
  8. [libFuzzer] Remove lazy counters.

    Summary: Lazy counters haven't improved performance for large fuzz targets.

    Reviewers: kcc

    Reviewed By: kcc

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67476 — morehouse / ViewSVN
  9. Determine endianness at a time when it doesn't inadvertantly clear gdb's wrap_buffer via gdb.execute.

    Summary:
    I haven't managed a small reproduction for this bug, it involves
    complicated and deeply nested data structures with a wide variety
    of pretty printers. But in general, we shouldn't be combining
    gdb's command line interface (via gdb.execute) with pretty-printers.

    Subscribers: christof, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68306 — saugustine / ViewSVN
  10. Revert r373172 "[X86] Add custom isel logic to match VPTERNLOG from 2 logic ops."

    This seems to be causing some performance regresions that I'm
    trying to investigate.

    One thing that stands out is that this transform can increase
    the live range of the operands of the earlier logic op. This
    can be bad for register allocation. If there are two logic
    op inputs we should really combine the one that is closest, but
    SelectionDAG doesn't have a good way to do that. Maybe we need
    to do this as a basic block transform in Machine IR. — ctopper / ViewSVN
  11. [clang][OpenMP][NFC] #include GlobalDecl.h to avoid incomplete class type — rupprecht / ViewSVN
  12. CGVTables - silence static analyzer getAs<FunctionProtoType> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use castAs<FunctionProtoType> directly and if not assert will fire for us. — rksimon / ViewSVN
  13. [X86] convertToThreeAddress, make sure second operand of SUB32ri is really an immediate before calling getImm().

    It might be a symbol instead. We can't fold those since we can't
    negate them.

    Similar for other SUB with immediates.

    Fixes PR43529. — ctopper / ViewSVN
  14. CGExprAgg - remove duplicate code. NFCI.

    Remove duplicate getAs<> call, avoiding a clang static analyzer null dereference warning. — rksimon / ViewSVN
  15. [FileCheck] Move private interface to its own header

    Summary:
    Most of the class definition in llvm/include/llvm/Support/FileCheck.h
    are actually implementation details that should not be relied upon. This
    commit moves all of it in a new header file under
    llvm/lib/Support/FileCheck. It also takes advantage of the code movement
    to put the code into a new llvm::filecheck namespace.

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

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67649 — thopre / ViewSVN
  16. [BypassSlowDivision][CodeGenPrepare] avoid crashing on unused code (PR43514)

    https://bugs.llvm.org/show_bug.cgi?id=43514 — spatel / ViewSVN
  17. gn build: Merge r373392 — gnsyncbot / ViewSVN
  18. [clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock

    Summary:
    OSSpinLock* are Apple/Darwin functions, but were previously located with ObjC checks as those were most closely tied to Apple platforms before.

    Now that there's a specific Darwin module, relocating the check there.

    This change was prepared by running rename_check.py.

    Contributed By: mwyman

    Reviewers: stephanemoore, dmaclach

    Reviewed By: stephanemoore

    Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits

    Tags: #clang-tools-extra, #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D68148 — stephanemoore / ViewSVN
  19. [ASan][NFC] Address remaining comments for https://reviews.llvm.org/D68287

    I submitted that patch after I got the LGTM, but the comments didn't
    appear until after I submitted the change. This adds `const` to the
    constructor argument and makes it a pointer. — leonardchan / ViewSVN
  20. [NFC] Fix typos in libc++ documentation — Louis Dionne / ViewSVN
  21. [ASan] Make GlobalsMD member a const reference.

    PR42924 points out that copying the GlobalsMetadata type during
    construction of AddressSanitizer can result in exteremely lengthened
    build times for translation units that have many globals. This can be addressed
    by just making the GlobalsMD member in AddressSanitizer a reference to
    avoid the copy. The GlobalsMetadata type is already passed to the
    constructor as a reference anyway.

    Differential Revision: https://reviews.llvm.org/D68287 — leonardchan / ViewSVN
  22. [clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed

    Summary:
    This is a patch to fix PR43372 (https://bugs.llvm.org/show_bug.cgi?id=43372) - clang-format can't format file with includes, ( which really keep providing replacements for already sorted headers.)

    A similar issue was addressed by @krasimir in {D60199}, however, this seemingly only prevented the issue when the files being formatted did not contain windows line endings (\r\n)

    It's possible this is related to https://twitter.com/StephanTLavavej/status/1176722938243895296 given who @STL_MSFT  works for!

    As people often used the existence of replacements to determine if a file needs clang-formatting, this is probably pretty important for windows users

    There may be a better way of comparing 2 strings and ignoring \r (which appear in both Results and Code), I couldn't choose between this idiom or the copy_if approach, but I'm happy to change it to whatever people consider more performant.

    Reviewers: krasimir, klimek, owenpan, ioeric

    Reviewed By: krasimir

    Subscribers: cfe-commits, STL_MSFT, krasimir

    Tags: #clang-format, #clang, #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D68227 — paulhoad / ViewSVN
  23. [OPENMP50]Initial codegen for declare variant implementation vendor.

    Initial implementation of global aliases emission for the declare
    variant pragma with implementation vendor context selector set. — abataev / ViewSVN
  24. [DDG] Data Dependence Graph - Root Node

    Summary:
    This patch adds Root Node to the DDG. The purpose of the root node is to create a single entry node that allows graph walk iterators to iterate through all nodes of the graph, making sure that no node is left unvisited during a graph walk (eg. SCC or DFS). Once the DDG is fully constructed it will have exactly one root node. Every node in the graph is reachable from the root. The algorithm for connecting the root node is based on depth-first-search that keeps track of visited nodes to try to avoid creating unnecessary edges.

    Authored By: bmahjour

    Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert

    Reviewed By: Meinersbur

    Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack

    Tag: #llvm

    Differential Revision: https://reviews.llvm.org/D67970 — bmahjour / ViewSVN
  25. [libc++] Re-apply workaround for D63883

    In reality, this workaround is for the fact that LIBCXX_CXX_ABI=libcxxabi
    can't be specified on Linux, since libc++abi isn't shipped with the system.
    Since the build bots explicitly specify LIBCXX_CXX_ABI=libcxxabi, they fail
    unless we apply the workaround. — Louis Dionne / ViewSVN
  26. [libc++] Remove workaround for D63883

    I tried applying D63883 three times and could never get around to
    making it work. I'm giving up on that for now, but soon this should
    be irrelevant anyway since all builds will move to the monorepo
    (where we're always using the in-tree libc++abi unless explicitly
    specified otherwise). — Louis Dionne / ViewSVN
  27. [MemorySSA] Check for unreachable blocks when getting last definition.

    If a single predecessor is found, still check if the block is
    unreachable. The test that found this had a self loop unreachable block.
    Resolves PR43493. — asbirlea / ViewSVN
  28. Add a missing pass in ARM O3 pipeline — kuhar / ViewSVN
  29. [MemorySSA] Update last_access_in_block check.

    The check for "was there an access in this block" should be: is the last
    access in this block and is it not a newly inserted phi.
    Resolves new test in PR43438.

    Also fix a typo when simplifying trivial Phis to match the comment. — asbirlea / ViewSVN
  30. [Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in MachineLICM — kuhar / ViewSVN
  31. [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination

    Summary:
    PHIElimination modifies CFG and marks MachineDominatorTree as preserved. Therefore, it the CFG changes it should also update the MDT, when available. This patch teaches PHIElimination to recalculate MDT when necessary.

    This fixes the `tailmerging_in_mbp.ll` test failure discovered after switching to generic DomTree verification algorithm in MachineDominators in D67976.

    Reviewers: arsenm, hliao, alex-t, rampitec, vpykhtin, grosser

    Reviewed By: rampitec

    Subscribers: MatzeB, wdng, hiraditya, javed.absar, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68154 — kuhar / ViewSVN
  32. Reapply [Dominators][CodeGen] Clean up MachineDominators

    This reverts r373117 (git commit 159ef37735f21ae373282e0c53cbd9b6af1e0dfd)

    Phabricator review: https://reviews.llvm.org/D67976. — kuhar / ViewSVN
  33. [NFC] Updated tests after rL373371

    Forgot to run check-clang-semacxx. — xbolva00 / ViewSVN
  34. [OPENMP]Fix PR43330: OpenMP target: Mapping of partial arrays fails.

    Fixed calculation the size of the array sections. — abataev / ViewSVN
  35. [Diagnostics] Make -Wenum-compare-conditional off by default

    Too many false positives, eg. in Chromium. — xbolva00 / ViewSVN
  36. [ThinLTO] Enable index-only WPD from clang

    Summary:
    To trigger the index-only Whole Program Devirt support added to LLVM, we
    need to be able to specify -fno-split-lto-unit in conjunction with
    -fwhole-program-vtables. Keep the default for -fwhole-program-vtables as
    -fsplit-lto-unit, but don't error on that option combination.

    Reviewers: pcc

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68029 — tejohnson / ViewSVN
  37. [PGO] Fix typos from r359612. NFC. — xur / ViewSVN
  38. [ARM] Some MVE shuffle plus extend tests. NFC — dmgreen / ViewSVN
  39. Revert "compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM"
    Revert "compiler-rt: move all __GLIBC_PREREQ into own header file"

    "move all __GLIBC_PREREQ" breaks build on some bots

    This reverts commit 2d75ee937397c209dbd95aefc88da6301fed07da.
    This reverts commit 7a6461fcc2ed8e28c43993c561721af0bbe97f3a. — Vitaly Buka / ViewSVN
  40. AMDGPU/SILoadStoreOptimizer: Add helper functions for working with CombineInfo

    Summary:
    This is a refactoring that will make future improvements to this pass easier.
    This change should not change the behavior of the pass.

    Reviewers: arsenm, pendingchaos, rampitec, nhaehnle, vpykhtin

    Reviewed By: nhaehnle, vpykhtin

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65496 — tstellar / ViewSVN
  41. [InstCombine] Deal with -(trunc(X >>u 63)) -> trunc(X >>s 63)

    Identical to it's trunc-less variant, just pretent-to hoist
    trunc, and everything else still holds:
    https://rise4fun.com/Alive/JRU — lebedevri / ViewSVN
  42. [InstCombine] Preserve 'exact' in -(X >>u 31) -> (X >>s 31) fold

    https://rise4fun.com/Alive/yR4 — lebedevri / ViewSVN
  43. [NFC][InstCombine] (Better) tests for sign-bit-smearing pattern

    https://rise4fun.com/Alive/JRU
    https://rise4fun.com/Alive/yR4 <- we can preserve 'exact' — lebedevri / ViewSVN
  44. [llvm-mca] Add a -mattr flag

    This adds a -mattr flag to llvm-mca, for cases where the -mcpu option does not
    contain all optional features.

    Differential Revision: https://reviews.llvm.org/D68190 — dmgreen / ViewSVN
  45. [ReleaseProcess] Document requirement to set MACOSX_DEPLOYMENT_TARGET — Vedant Kumar / ViewSVN
  46. [IndVars] An implementation of loop predication without a need for speculation

    This patch implements a variation of a well known techniques for JIT compilers - we have an implementation in tree as LoopPredication - but with an interesting twist. This version does not assume the ability to execute a path which wasn't taken in the original program (such as a guard or widenable.condition intrinsic). The benefit is that this works for arbitrary IR from any frontend (including C/C++/Fortran). The tradeoff is that it's restricted to read only loops without implicit exits.

    This builds on SCEV, and can thus eliminate the loop varying portion of the any early exit where all exits are understandable by SCEV. A key advantage is that fixing deficiency exposed in SCEV - already found one while writing test cases - will also benefit all of full redundancy elimination (and most other loop transforms).

    I haven't seen anything in the literature which quite matches this. Given that, I'm not entirely sure that keeping the name "loop predication" is helpful. Anyone have suggestions for a better name? This is analogous to partial redundancy elimination - since we remove the condition flowing around the backedge - and has some parallels to our existing transforms which try to make conditions invariant in loops.

    Factoring wise, I chose to put this in IndVarSimplify since it's a generally applicable to all workloads. I could split this off into it's own pass, but we'd then probably want to add that new pass every place we use IndVars.  One solid argument for splitting it off into it's own pass is that this transform is "too good". It breaks a huge number of existing IndVars test cases as they tend to be simple read only loops.  At the moment, I've opted it off by default, but if we add this to IndVars and enable, we'll have to update around 20 test files to add side effects or disable this transform.

    Near term plan is to fuzz this extensively while off by default, reflect and discuss on the factoring issue mentioned just above, and then enable by default.  I also need to give some though to supporting widenable conditions in this framing.

    Differential Revision: https://reviews.llvm.org/D67408 — reames / ViewSVN
  47. AMDGPU/GlobalISel: Increase max legal size to 1024

    There are 1024 bit register classes defined for AGPRs. Additionally
    OpenCL defines vectors up to 16 x i64, and this helps those tests
    legalize. — arsenm / ViewSVN
  48. [X86] Add a VBROADCAST_LOAD ISD opcode representing a scalar load broadcasted to a vector.

    Summary:
    This adds the ISD opcode and a DAG combine to create it. There are
    probably some places where we can directly create it, but I'll
    leave that for future work.

    This updates all of the isel patterns to look for this new node.
    I had to add a few additional isel patterns for aligned extloads
    which we should probably fix with a DAG combine or something. This
    does mean that the broadcast load folding for avx512 can no
    longer match a broadcasted aligned extload.

    There's still some work to do here for combining a broadcast of
    a broadcast_load. We also need to improve extractelement or
    demanded vector elements of a broadcast_load. I'll try to get
    those done before I submit this patch.

    Reviewers: RKSimon, spatel

    Reviewed By: RKSimon

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68198 — ctopper / ViewSVN
  49. [OPENMP]Fix PR43516: Compiler crash with collapse(2) on non-rectangular
    loop.

    Missed check if the condition is also dependent when building final
    expressions for the collapsed loop directives. — abataev / ViewSVN
  50. [AMDGPU] Add VerifyScheduling support.

    Summary:
    This is cut and pasted from the corresponding GenericScheduler
    functions.

    Reviewers: arsenm, atrick, tstellar, vpykhtin

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68264 — foad / ViewSVN
  51. [Diagnostics] Move warning into the subgroup (-Wenum-compare-conditional) — xbolva00 / ViewSVN
  52. [DAG][X86] Convert isNegatibleForFree/GetNegatedExpression to a target hook (PR42863)

    This patch converts the DAGCombine isNegatibleForFree/GetNegatedExpression into overridable TLI hooks.

    The intention is to let us extend existing FNEG combines to work more generally with negatible float ops, allowing it work with target specific combines and opcodes (e.g. X86's FMA variants).

    Unlike the SimplifyDemandedBits, we can't just handle target nodes through a Target callback, we need to do this as an override to allow targets to handle generic opcodes as well. This does mean that the target implementations has to duplicate some checks (recursion depth etc.).

    Partial reversion of rL372756 - I've identified the infinite loop issue inside the X86 override but haven't fixed it yet so I've only (re)committed the common TargetLowering refactoring part of the patch.

    Differential Revision: https://reviews.llvm.org/D67557 — rksimon / ViewSVN
  53. [Dominators][CodeGen] Add MachinePostDominatorTree verification

    Summary:
    This patch implements Machine PostDominator Tree verification and ensures that the verification doesn't fail the in-tree tests.

    MPDT verification can be enabled using `verify-machine-dom-info` -- the same flag used by Machine Dominator Tree verification.

    Flipping the flag revealed that MachineSink falsely claimed to preserve CFG and MDT/MPDT. This patch fixes that.

    Reviewers: arsenm, hliao, rampitec, vpykhtin, grosser

    Reviewed By: hliao

    Subscribers: wdng, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68235 — kuhar / ViewSVN
  54. [clang] Make handling of unnamed template params similar to function params

    Summary:
    Clang uses the location identifier should be inserted for declarator
    decls when a decl is unnamed. But for type template and template template
    paramaters it uses the location of "typename/class" keyword, which makes it hard
    for tooling to insert/change parameter names.

    This change tries to unify these two cases by making template parameter
    parsing and sourcerange operations similar to function params/declarator decls.

    Reviewers: ilya-biryukov

    Subscribers: arphaman, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68143 — kadircet / ViewSVN
  55. Revert rL349624 : Let TableGen write output only if it changed, instead of doing so in cmake, attempt 2

    Differential Revision: https://reviews.llvm.org/D55842
    -----------------
    As discussed on PR43385 this is causing Visual Studio msbuilds to perpetually rebuild all tablegen generated files — rksimon / ViewSVN
  56. Revert "Reland "[utils] Implement the llvm-locstats tool""

    This reverts commit rL373317 due to test failure on the
    clang-s390x-linux build bot. — djtodoro / ViewSVN
  57. Revert [InstCombine] sprintf(dest, "%s", str) -> memccpy(dest, str, 0, MAX)

    Seems to be slower than memcpy + strlen. — xbolva00 / ViewSVN
  58. [InstCombine] sprintf(dest, "%s", str) -> memccpy(dest, str, 0, MAX) — xbolva00 / ViewSVN
  59. [llvm-exegesis/lib] Fix missing linkage to MCParser

    Otherwise, shared-lib build fails with:

    lib64/libLLVMExegesis.a(SnippetFile.cpp.o): In function `llvm::exegesis::readSnippets(llvm::exegesis::LLVMState const&, llvm::StringRef)':
    SnippetFile.cpp:(.text._ZN4llvm8exegesis12readSnippetsERKNS0_9LLVMStateENS_9StringRefE+0x31f): undefined reference to `llvm::createMCAsmParser(llvm::SourceMgr&, llvm::MCContext&, llvm::MCStreamer&, llvm::MCAsmInfo const&, unsigned int)'
    SnippetFile.cpp:(.text._ZN4llvm8exegesis12readSnippetsERKNS0_9LLVMStateENS_9StringRefE+0x41c): undefined reference to `llvm::MCAsmParser::setTargetParser(llvm::MCTargetAsmParser&)'
    collect2: error: ld returned 1 exit status — mgorny / ViewSVN
  60. [NFC][ARM][MVE] More tests

    Add some tail predication tests with fast math. — sam_parker / ViewSVN
  61. [libc++] Harden usage of static_assert against C++03

    In C++03, we emulate static_assert with a macro, and we must parenthesize
    multiple arguments. — Louis Dionne / ViewSVN
  62. [clang] Ignore builtin namespaces in test/Import/cxx-anon-namespace

    Some platforms (e.g. AArch64) put __va_list in the 'std' namespace which might
    end up being the first namespace we match in this test. Instead let
    the first namespace match via file name/line so that we skip the
    builtin namespaces. — Raphael Isemann / ViewSVN
  63. DIExpression::createFragmentExpression - silence static analyzer DIExpression* null dereference warning with an assertion. NFCI. — rksimon / ViewSVN
  64. VirtualFileSystem - replace dyn_cast<>+assert with cast<> calls. NFCI.

    Silences a number of clang static analyzer null dereference warnings. — rksimon / ViewSVN
  65. ObjectFile makeTriple - silence static analyzer dyn_cast<COFFObjectFile> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<COFFObjectFile> directly and if not assert will fire for us. — rksimon / ViewSVN
  66. [clangd] Implement getBeginning for overloaded operators.

    Summary:
    This will fix some bugs where navigation doesn't work on cases like
    `std::cout <^< "hello"`.

    Reviewers: ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67695 — hokein / ViewSVN
  67. InstrProf - avoid static analyzer dyn_cast<ConstantInt> null dereference warning.

    The static analyzer is warning about a potential null dereference, as we're already earlying-out for a null Constant pointer I've just folded this into a dyn_cast_or_null<ConstantInt>.

    No test case, this is by inspection only. — rksimon / ViewSVN
  68. ConstantFold - ConstantFoldSelectInstruction - assume constant vector elements are constant. NFCI.

    Goes a bit further than rL372743 which added the early out - elements should be Constant so use cast<Constant> instead (and rely on the assert if anything fails). — rksimon / ViewSVN
  69. [clangd] Use the index-based API to do the header-source switch.

    Summary:
    If the file heuristic fails, we try to use the index&AST to do the
    header/source inference.

    Reviewers: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68211 — hokein / ViewSVN
  70. [obj2yaml] - Fix BB after r373315.

    The success return value for data extractor's cursor
    should also be checked. — grimar / ViewSVN
  71. [clangd] Handle template arguments in findExplicitReferences

    Reviewers: kadircet

    Reviewed By: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68137 — ibiryukov / ViewSVN
  72. Reland "[utils] Implement the llvm-locstats tool"

    The tool reports verbose output for the DWARF debug location coverage.
    The llvm-locstats for each variable or formal parameter DIE computes what
    percentage from the code section bytes, where it is in scope, it has
    location description. The line 0 shows the number (and the percentage) of
    DIEs with no location information, but the line 100 shows the number (and
    the percentage) of DIEs where there is location information in all code
    section bytes (where the variable or parameter is in the scope). The line
    50..59 shows the number (and the percentage) of DIEs where the location
    information is in between 50 and 59 percentage of its scope covered.

    Differential Revision: https://reviews.llvm.org/D66526 — djtodoro / ViewSVN
  73. [yaml2obj] - Allow specifying custom Link values for SHT_HASH section.

    This allows setting any sh_link values for SHT_HASH sections.

    Differential revision: https://reviews.llvm.org/D68214 — grimar / ViewSVN
  74. [yaml2obj/obj2yaml] - Add support for SHT_HASH sections.

    SHT_HASH specification is:
    http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#hash

    In short the format is the following: it has 2 uint32 fields
    in its header: nbucket and nchain followed by (nbucket + nchain)
    uint32 values.

    This patch allows dumping and parsing such sections.

    Differential revision: https://reviews.llvm.org/D68085 — grimar / ViewSVN
  75. Fixup r373278: Move test to X86 directory

    ...since it's using an x86 triple. — rovka / ViewSVN
  76. [llvm-exegesis][NFC] Refactor X86 tests fixtures into a base class.

    Reviewers: gchatelet, a.sidorin

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68262 — courbet / ViewSVN
  77. [clang][lldb][NFC] Encapsulate ExternalASTMerger::ImporterSource

    NFC preparation work for upcoming ExternalASTMerger patches. — Raphael Isemann / ViewSVN
  78. Revert "[OCaml] Handle nullptr in Llvm.global_initializer"

    This reverts commit r373299. It broke tests:
    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18485 — gribozavr / ViewSVN
  79. Revert "GlobalISel: Handle llvm.read_register"

    This reverts commit r373294. It broke Clang's
    CodeGen/arm64-microsoft-status-reg.cpp:
    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18483 — gribozavr / ViewSVN
  80. [NFC][HardwareLoops] Update some iterators — sam_parker / ViewSVN
  81. Decrease the verbosity of the -ftime-trace option
    And move the relevant information in the doc.

    Summary:
    Currently, building a large software like Firefox shows
    'Use chrome://tracing or Speedscope App (https://www.speedscope.app) for flamegraph visualization'
    for each file.

    Reviewers: anton-afanasyev

    Reviewed By: anton-afanasyev

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68260 — sylvestre / ViewSVN
  82. [clangd] Handle OverloadExpr in targetDecl

    Reviewers: sammccall

    Reviewed By: sammccall

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68119 — ibiryukov / ViewSVN
  83. [clang-tidy] Fix module registry name and description for Darwin clang-tidy module.

    Summary: When creating the module, must have copy-pasted from the misc module, and forgotten to update the name/description of the module in the registry.

    Reviewers: stephanemoore, benhamilton, gribozavr

    Reviewed By: gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang, #clang-tools-extra, #llvm

    Differential Revision: https://reviews.llvm.org/D68251 — gribozavr / ViewSVN
  84. [X86] Consider isCodeGenOnly in the EVEX2VEX pass to make VMAXPD/PS map to the non-commutable VEX instruction. Use EVEX2VEX override to fix the scalar instructions.

    Previously the match was ambiguous and VMAXPS/PD and VMAXCPS/PD
    were mapped to the same VEX instruction. But we should keep
    the commutableness when change the opcode. — ctopper / ViewSVN
  85. [WebAssembly] Make sure EH pads are preferred in sorting

    Summary:
    In CFGSort, we try to make EH pads have higher priorities as soon as
    they are ready to be sorted, to prevent creation of unwind destination
    mismatches in CFGStackify. We did that by making priority queues'
    comparison function  prefer EH pads, but it was possible for an EH pad
    to be popped from `Preferred` queue and then not sorted immediately and
    enter `Ready` queue instead in a certain condition. This patch makes
    sure that special condition does not consider EH pads as its candidates.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68229 — aheejin / ViewSVN
  86. [WebAssembly] Unstackify regs after fixing unwinding mismatches

    Summary:
    Fixing unwind mismatches for exception handling can result in splicing
    existing BBs and moving some of instructions to new BBs. In this case
    some of stackified def registers in the original BB can be used in the
    split BB. For example, we have this BB and suppose %r0 is a stackified
    register.
    ```
    bb.1:
      %r0 = call @foo
      ... use %r0 ...
    ```

    After fixing unwind mismatches in CFGStackify, `bb.1` can be split and
    some instructions can be moved to a newly created BB:
    ```
    bb.1:
      %r0 = call @foo

    bb.split (new):
      ... use %r0 ...
    ```

    In this case we should make %r0 un-stackified, because its use is now in
    another BB.

    When spliting a BB, this CL unstackifies all def registers that have
    uses in the new split BB.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68218 — aheejin / ViewSVN
  87. [OCaml] Handle nullptr in Llvm.global_initializer

    LLVMGetInitializer returns nullptr in case there is no
    initializer. There is not much that can be done with nullptr in OCaml,
    not even test if it is null. Also, there does not seem to be a C or
    OCaml API to test if there is an initializer. So this diff changes
    Llvm.global_initializer to return an option.

    Differential Revision: https://reviews.llvm.org/D65195
    Reviewed by: whitequark
    Authored by: kren1 — hiraditya / ViewSVN
  88. AMDGPU/GlobalISel: Select s1 src G_SITOFP/G_UITOFP — arsenm / ViewSVN
  89. Remove a undefined constructor introduced by r373244. — yuanfang / ViewSVN
  90. AMDGPU/GlobalISel: Add support for init.exec intrinsics

    TThe existing wave32 behavior seems broken and incomplete, but this
    reproduces it. — arsenm / ViewSVN
  91. AMDGPU/GlobalISel: Allow scc/vcc alternative mappings for s1 constants — arsenm / ViewSVN
  92. GlobalISel: Handle llvm.read_register

    SelectionDAG has a bunch of machinery to defer this to selection time
    for some reason. Just directly emit a copy during IRTranslator. The
    x86 usage does somewhat questionably check hasFP, which could depend
    on the whole function being at minimum translated.

    This does lose the convergent bit if the callsite had it, which may be
    a problem. We also lose that in general for intrinsics, which may also
    be a problem. — arsenm / ViewSVN
  93. AMDGPU/GlobalISel: Avoid creating shift of 0 in arg lowering

    This is sort of papering over the fact that we don't run a combiner
    anywhere, but avoiding creating 2 instructions in the first place is
    easy. — arsenm / ViewSVN
  94. TLI: Remove DAG argument from getRegisterByName

    Replace with the MachineFunction. X86 is the only user, and only uses
    it for the function. This removes one obstacle from using this in
    GlobalISel. The other is the more tolerable EVT argument.

    The X86 use of the function seems questionable to me. It checks hasFP,
    before frame lowering. — arsenm / ViewSVN
  95. [llvm-readobj/llvm-readelf] Delete --arm-attributes (alias for --arch-specific)

    D68110 added --arch-specific (supported by GNU readelf) and made
    --arm-attributes an alias for it. The tests were later migrated to use
    --arch-specific.

    Note, llvm-readelf --arch-specific currently just uses llvm-readobj
    style output for ARM attributes. The readelf-style output is not
    implemented.

    Reviewed By: compnerd, kongyi, rupprecht

    Differential Revision: https://reviews.llvm.org/D68196 — maskray / ViewSVN
  96. [X86] Add test case to show missed opportunity to shrink a constant index to a gather in order to avoid splitting.

    Also add a test case for an index that could be shrunk, but
    would create a narrow type. We can go ahead and do it we just
    need to be before type legalization.

    Similar test cases for scatter as well. — ctopper / ViewSVN
  97. Don't elide the use of the thread wrapper for a thread_local constinit
    variable with non-trivial destruction.

    We still need to invoke the thread wrapper to trigger registration of
    the destructor call on thread shutdown. — rsmith / ViewSVN
  98. AMDGPU/GlobalISel: Select G_UADDO/G_USUBO — arsenm / ViewSVN
  99. GlobalISel: Implement widenScalar for G_SITOFP/G_UITOFP sources

    Legalize 16-bit G_SITOFP/G_UITOFP for AMDGPU. — arsenm / ViewSVN
  100. AMDGPU/GlobalISel: Legalize G_GLOBAL_VALUE

    Handle other cases besides LDS. Mostly a straight port of the existing
    handling, without the intermediate custom nodes. — arsenm / ViewSVN

#5498 (Sep 30, 2019 5:38:30 PM)

  1. compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOM

    Summary: Fixes https://github.com/google/oss-fuzz/issues/2836

    Reviewers: eugenis

    Subscribers: dberris, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68178 — Vitaly Buka / ViewSVN
  2. compiler-rt: move all __GLIBC_PREREQ into own header file

    Reviewers: eugenis

    Subscribers: dberris, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68177 — Vitaly Buka / ViewSVN
  3. Rename tsan_interceptors.cpp into tsan_interceptors_posix.cpp

    Summary:
    It's needed to use __GLIBC_PREREQ from <features.h>

    tsan didn't let us to include <features.h> by using --sysroot=. to disable system includes on
    anything that is not named as "tsan*posix*", "tsan*mac*", "tsan*linux*".
    See compiler-rt/lib/tsan/CMakeLists.txt

    Reviewers: eugenis, dvyukov, kcc

    Reviewed By: kcc

    Subscribers: mgorny, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68176 — Vitaly Buka / ViewSVN
  4. [c++20] Add a C++20 version of the existing turing machine test.

    Unlike the C++11 version, this one uese mutable state and dynamic
    allocation instead of a carefully balanced and ever-accumulating pile of
    temporaries. — rsmith / ViewSVN
  5. During constant evaluation, handle CXXBindTemporaryExprs for
    array-of-class types, not just for class types. — rsmith / ViewSVN
  6. DebugInfo: Add parsing support for debug_loc base address specifiers — dblaikie / ViewSVN
  7. [c++20] Fix crash when constant-evaluating an assignment with a
    reference member access on its left-hand side. — rsmith / ViewSVN
  8. Fix Driver/modules.cpp test to work when build directory name contains '.s'

    Reviewers: dyung, rsmith, hansw

    Subscribers: mati865, mgorny, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D66176 — tstellar / ViewSVN
  9. [SimplifyLibCalls] Define the value of the Euler number

    This patch fixes the build break on Windows hosts.

    There must be a better way of accessing the equivalent POSIX math constant
    `M_E`. — evandro / ViewSVN
  10. DebugInfo: Simplify section label caching/usage — dblaikie / ViewSVN
  11. Fix crash on value-dependent delete-expressions.

    We used to miscompute the 'value-dependent' bit, and would crash if we
    tried to evaluate a delete expression that should be value-dependent. — rsmith / ViewSVN
  12. Add partial bswap test to the X86 backend. NFC — deadalnix / ViewSVN
  13. [DAGCombiner] Clang format MatchRotate. NFC — deadalnix / ViewSVN
  14. Make function static that didn't need linkage.

    In r373247 I added a helper function, but neglected to make it static. — erichkeane / ViewSVN
  15. Remove else-after-return — dblaikie / ViewSVN
  16. [bugpoint] Update runPasses to take ArrayRef instead of a pointer (NFC)

    This makes it slightly easier to pass extra arguments to runPasses
    and simplifies the code slightly.

    Reviewers: efriedma, bogner, dblaikie, diegotf, hiraditya

    Reviewed By: dblaikie, hiraditya

    Differential Revision: https://reviews.llvm.org/D68228 — fhahn / ViewSVN
  17. [globalisel][knownbits] Allow targets to call GISelKnownBits::computeKnownBitsImpl()

    Summary:
    It seems we missed that the target hook can't query the known-bits for the
    inputs to a target instruction. Fix that oversight

    Reviewers: aditya_nandakumar

    Subscribers: rovka, hiraditya, volkan, Petar.Avramovic, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67380 — dsanders / ViewSVN
  18. Refactor default constructor SFINAE in pair and tuple.

    Refactor the  recent implicit default constructor changes to match the
    existing SFINAE style. — ericwf / ViewSVN
  19. [ConstantFolding] Fold constant calls to log2()

    Somehow, folding calls to `log2()` with a constant was missing.

    Differential revision: https://reviews.llvm.org/D67300 — evandro / ViewSVN
  20. [InstCombine] Expand the simplification of log()

    Expand the simplification of special cases of `log()` to include `log2()`
    and `log10()` as well as intrinsics and more types.

    Differential revision: https://reviews.llvm.org/D67199 — evandro / ViewSVN
  21. [DAGCombiner] Update MatchRotate so that it returns an SDValue. NFC — deadalnix / ViewSVN
  22. Fix failure caused by r373247

    I incorrectly thought that the 'isLambda' check never fired, so when
    splitting up a helper function, I lost the 'nullptr' return value.
    ClangD Hover functionality apparently uses this, so the Unittest caught
    that.

    This patch correctly propogates the nullptr from the helper function. — erichkeane / ViewSVN
  23. [NFC] Fix tests, second try — xbolva00 / ViewSVN
  24. [OPENMP50]Mark declare variant attribute as inheritable.

    Attribute must be inherited by the redeclarations. — abataev / ViewSVN
  25. [NFCI] Updated broken test — xbolva00 / ViewSVN
  26. [LegacyPassManager] Deprecate the BasicBlockPass/Manager.

    Summary:
    The BasicBlockManager is potentially broken and should not be used.
    Replace all uses of the BasicBlockPass with a FunctionBlockPass+loop on
    blocks.

    Reviewers: chandlerc

    Subscribers: jholewinski, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68234 — asbirlea / ViewSVN
  27. build: serialise `LLVM_ENABLE_UNWIND_TABLES` into LLVMConfig

    Serialize the value of the configuration option into the configuration so that
    builds which integrate LLVM can identify the value of the flag that was used to
    build the libraries.  This is intended to be used by Swift to control tests
    which rely on the unwind information. — Saleem Abdulrasool / ViewSVN
  28. [Diagnostics] Warn if enumeration type mismatch in conditional expression

    Summary:
    - Useful warning
    - GCC compatibility (GCC warns in C++ mode)

    Reviewers: rsmith, aaron.ballman

    Reviewed By: aaron.ballman

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67919 — xbolva00 / ViewSVN
  29. [FunctionAttrs] Added noalias for memccpy/mempcpy arguments — xbolva00 / ViewSVN
  30. [InstCombine][NFC] visitShl(): call SimplifyQuery::getWithInstruction() once — lebedevri / ViewSVN
  31. [NFC][InstCombine] Redundant-left-shift-input-masking: add some more undef tests — lebedevri / ViewSVN
  32. Teach CallGraph to look into Generic Lambdas.

    CallGraph visited LambdaExpr by getting the Call Operator from
    CXXRecordDecl (LambdaExpr::getCallOperator calls
    CXXRecordDecl::getLambdaCallOperator), which replaced generic lambda
    call operators with the non-instantiated FunctionDecl.  The result was
    that the CallGraph would only pick up non-dependent calls.

    This patch does a few things:
    1- Extend CXXRecordDecl to have a getDependentLambdaCallOperator, which
    will get the FunctionTemplateDecl, rather than immediately getting the
    TemplateDecl.
    2- Define getLambdaCallOperator and getDependentLambdaCallOperator in
    terms of a common function.
    3- Extend LambdaExpr with a getDependentCallOperator, which just calls
    the above function.
    4- Changes CallGraph to handle Generic LambdaExprs. — erichkeane / ViewSVN
  33. [X86] Mask off upper bits of splat element in LowerBUILD_VECTORvXi1 when forming a SELECT.

    The i1 scalar would have been type legalized to i8, but that
    doesn't guarantee anything about the upper bits. If we're going
    to use it as condition we need to make sure the upper bits are 0.

    I've special cased ISD::SETCC conditions since that should
    guarantee zero upper bits. We could go further and use
    computeKnownBits, but we have no tests that would need that.

    Fixes PR43507. — ctopper / ViewSVN
  34. [X86] Address post-commit review from code I accidentally commited in r373136.

    See https://reviews.llvm.org/D68167 — ctopper / ViewSVN
  35. Fix build warning for r373240. — yuanfang / ViewSVN
  36. [OPENMP50]Do not emit warning for the function with the currently
    defined body.

    If the function is currently defined, we should not emit a warning that
    it might be emitted already because it was not really emitted. — abataev / ViewSVN
  37. Revert "[MC] Emit unused undefined symbol even if its binding is not set"

    This reverts r373168. It caused PR43511. — nico / ViewSVN
  38. [PGO] Don't group COMDAT variables for compiler generated profile variables in ELF

    With this patch, compiler generated profile variables will have its own COMDAT
    name for ELF format, which syncs the behavior with COFF. Tested with clang
    PGO bootstrap. This shows a modest reduction in object sizes in ELF format.

    Differential Revision: https://reviews.llvm.org/D68041 — xur / ViewSVN
  39. [NewPM] Port MachineModuleInfo to the new pass manager.

    Existing clients are converted to use MachineModuleInfoWrapperPass. The
    new interface is for defining a new pass manager API in CodeGen.

    Reviewers: fedor.sergeev, philip.pfaffe, chandlerc, arsenm

    Reviewed By: arsenm, fedor.sergeev

    Differential Revision: https://reviews.llvm.org/D64183 — yuanfang / ViewSVN
  40. [msan] Intercept __getrlimit.

    Summary:
    This interceptor is useful on its own, but the main purpose of this
    change is to intercept libpthread initialization on linux/glibc in
    order to run __msan_init before any .preinit_array constructors.

    We used to trigger on pthread_initialize_minimal -> getrlimit(), but
    that call has changed to __getrlimit at some point.

    Reviewers: vitalybuka, pcc

    Subscribers: jfb, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68168 — eugenis / ViewSVN
  41. Fix buildbot failure from r373217 (don't match metadata id exactly)

    Fix this failure by ignoring the id of the metadata being checked:
        http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/3046/consoleFull#-21332887158254eaf0-7326-4999-85b0-388101f2d404 — tejohnson / ViewSVN
  42. [MCA] Use references to LSUnitBase in class Scheduler and add helper methods to acquire/release LS queue entries. NFCI — adibiagio / ViewSVN
  43. [LegacyPassManager] Attempt to fix BasicBlockManager

    Temporarily fix BaiscBlockManager based on the code in the other
    managers.
    Replacement of all uses of the BasicBlockPass to follow.

    Resolves PR42264. — asbirlea / ViewSVN
  44. [X86] Add ANY_EXTEND to switch in ReplaceNodeResults, but just fall back to default handling.

    ANY_EXTEND of v8i8 is marked Custom on AVX512 for handling extends
    from v8i8. But the type legalization infrastructure will call
    ReplaceNodeResults for v8i8 results. We should just defer it the
    default handling instead of asserting in the default of the switch.

    Fixes PR43509. — ctopper / ViewSVN
  45. [AArch64][SVE] Implement punpk[hi|lo] intrinsics

    Summary:
    Adds the following two intrinsics:
      - int_aarch64_sve_punpkhi
      - int_aarch64_sve_punpklo

    This patch also contains a fix which allows LLVMHalfElementsVectorType
    to forward reference overloadable arguments.

    Reviewers: sdesmalen, rovka, rengolin

    Reviewed By: sdesmalen

    Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, greened, cfe-commits, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67830 — kmclaughlin / ViewSVN
  46. [EarlyCSE] Pass preserves AA. — asbirlea / ViewSVN
  47. [InstCombine] fold negate disguised as select+mul

      Name: negate if true
      %sel = select i1 %cond, i32 -1, i32 1
      %r = mul i32 %sel, %x
      =>
      %m = sub i32 0, %x
      %r = select i1 %cond, i32 %m, i32 %x

      Name: negate if false
      %sel = select i1 %cond, i32 1, i32 -1
      %r = mul i32 %sel, %x
      =>
      %m = sub i32 0, %x
      %r = select i1 %cond, i32 %x, i32 %m

    https://rise4fun.com/Alive/Nlh — spatel / ViewSVN
  48. Fix doc for t inline asm constraints for ARM/Thumb

    Summary: The constraint goes up to regs d15 and q7, not d16 and q8.

    Subscribers: kristof.beyls, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68090 — pabbar01 / ViewSVN
  49. [AArch64][GlobalISel] Support lowering variadic musttail calls

    This adds support for lowering variadic musttail calls. To do this, we have
    to...

    - Detect a musttail call in a variadic function before attempting to lower the
      call's formal arguments. This is done in the IRTranslator.
    - Compute forwarded registers in `lowerFormalArguments`, and add copies for
      those registers.
    - Restore the forwarded registers in `lowerTailCall`.

    Because there doesn't seem to be any nice way to wrap these up into the outgoing
    argument handler, the restore code in `lowerTailCall` is done separately.

    Also, irritatingly, you have to make sure that the registers don't overlap with
    any passed parameters. Otherwise, the scheduler doesn't know what to do with the
    extra copies and asserts.

    Add call-translator-variadic-musttail.ll to test this. This is pretty much the
    same as the X86 musttail-varargs.ll test. We didn't have as nice of a test to
    base this off of, but the idea is the same.

    Differential Revision: https://reviews.llvm.org/D68043 — paquette / ViewSVN
  50. [mips] Fix code indentation. NFC — atanasyan / ViewSVN
  51. Add tests for rotate with demanded bits. NFC — deadalnix / ViewSVN
  52. [InstCombine] add tests for negate disguised as mul; NFC — spatel / ViewSVN
  53. [AMDGPU] SIFoldOperands should not fold register acrocc the EXEC definition

          Reviewers: rampitec

          Differential Revision: https://reviews.llvm.org/D67662 — alex-t / ViewSVN
  54. [SSP] [3/3] cmpxchg and addrspacecast instructions can now
    trigger stack protectors.  Fixes PR42238.

    Add test coverage for llvm.memset, as proxy for all llvm.mem*
    intrinsics. There are two issues here: (1) they could be lowered to a
    libc call, which could be intercepted, and do Bad Stuff; (2) with a
    non-constant size, they could overwrite the current stack frame.

    The test was mostly written by Matt Arsenault in r363169, which was
    later reverted; I tweaked what he had and added the llvm.memset part.

    Differential Revision: https://reviews.llvm.org/D67845 — probinson / ViewSVN
  55. [SSP] [2/3] Refactor an if/dyn_cast chain to switch on opcode. NFC

    Differential Revision: https://reviews.llvm.org/D67844 — probinson / ViewSVN
  56. [Clang] Use -main-file-name for source filename if not set

    -main-file-name is currently used to set the source name used in debug
    information.

    If the source filename is "-" and -main-file-name is set, then use the
    filename also for source_filename and ModuleID of the output.

    The argument is generally used outside the internal clang calls when
    running clang in a wrapper like icecc which gives the source via stdin
    but still wants to get a object file with the original source filename
    both in debug info and IR code.

    Patch by: the_jk (Joel Klinghed)

    Differential Revision: https://reviews.llvm.org/D67592 — tejohnson / ViewSVN
  57. [SSP] [1/3] Revert "StackProtector: Use PointerMayBeCaptured"
    "Captured" and "relevant to Stack Protector" are not the same thing.

    This reverts commit f29366b1f594f48465c5a2754bcffac6d70fd0b1.
    aka r363169.

    Differential Revision: https://reviews.llvm.org/D67842 — probinson / ViewSVN
  58. Fix breakage of sphinx builders. Sorry for leaving this broken over the
    weekend! — kpn / ViewSVN
  59. Support MemoryLocation::UnknownSize in TargetLowering::IntrinsicInfo

    Summary:
    Previously IntrinsicInfo::size was an unsigned what can't represent the
    64 bit value used by MemoryLocation::UnknownSize.

    Reviewers: jmolloy

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68219 — tberghammer / ViewSVN
  60. Correct function declarations; NFC.

    This header is included by C code so the functions need to have a prototype. Also, fix the function definitions so that they have C linkage rather than C++ linkage. — aaronballman / ViewSVN
  61. [FileCheck] Remove implementation types from API

    Summary:
    Remove use of FileCheckPatternContext and FileCheckString concrete types
    from FileCheck API to allow moving it and the other implementation only
    only declarations into a private header file.

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

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68186 — thopre / ViewSVN
  62. [OPENMP] Fix comment, NFC. — abataev / ViewSVN
  63. [llvm-exegesis][NFC] Move BenchmarkFailure to own file.

    Summary: And rename to exegesis::Failure, as it's used everytwhere.

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68217 — courbet / ViewSVN
  64. [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: jholewinski, arsenm, jvesely, nhaehnle, eraman, hiraditya, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D68141 — gchatelet / ViewSVN
  65. [ConstantRange] add helper function addWithNoWrap().
    Differential Revision: https://reviews.llvm.org/D67339 — shchenz / ViewSVN
  66. gn build: Merge r373202 — gnsyncbot / ViewSVN
  67. [llvm-exegesis][NFC] Refactor snippet file reading out of tool main.

    Summary: Add unit tests.

    Reviewers: gchatelet

    Subscribers: mgorny, tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68212 — courbet / ViewSVN
  68. Revert "Reland "[utils] Implement the llvm-locstats tool""

    This reverts commit rL373183. — djtodoro / ViewSVN
  69. DeclCXX/ExprCXX - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  70. [clangd] Implement a smart version of HeaderSource switch.

    Summary:
    This patch implements another version header-source switch by incorporating the
    AST and index, it will be used:
      - to improve the current header-source switch feature (layer with the
        existing file heuristic);
      - by the incoming define-outline code action;

    Reviewers: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67907 — hokein / ViewSVN
  71. [Alignment][NFC] Adding a max function.

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68201 — gchatelet / ViewSVN
  72. [Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet, jdoerfert

    Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits

    Tags: #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D68142 — gchatelet / ViewSVN
  73. [lldb][clang][modern-type-lookup] Use ASTImporterSharedState in ExternalASTMerger

    Summary:
    The ExternalASTMerger should use the ASTImporterSharedState. This allows it to
    handle std::pair in LLDB (but the rest of libc++ is still work in progress).

    Reviewers: martong, shafik, a.sidorin

    Subscribers: rnkovacs, christof, JDevlieghere, lldb-commits

    Tags: #lldb

    Differential Revision: https://reviews.llvm.org/D68140 — Raphael Isemann / ViewSVN
  74. [NFC][ARM][MVE] More tests

    Add some loop tests that cover different float operations and types. — sam_parker / ViewSVN
  75. NFC changes to SelectionDAGBuilder::visitBitTestHeader(), preparing for PR43129 — hans / ViewSVN
  76. Pre-commit a test case for PR43129. — hans / ViewSVN
  77. [llvm-locstats] Fix the test for the Hexagon target — djtodoro / ViewSVN
  78. [ARM][MVE] Change VCTP operand

    The VCTP instruction will calculate the predicate masked based upon
    the number of elements that need to be processed. I had inserted the
    sub before the vctp intrinsic and supplied it as the operand, but
    this is incorrect as the phi should directly feed the vctp. The sub
    is calculating the value for the next iteration.

    Differential Revision: https://reviews.llvm.org/D67921 — sam_parker / ViewSVN
  79. [TargetLowering] Simplify expansion of S{ADD,SUB}O

    ISD::SADDO uses the suggested sequence described in the section §2.4 of
    the RISCV Spec v2.2. ISD::SSUBO uses the dual approach but checking for
    (non-zero) positive.

    Differential Revision: https://reviews.llvm.org/D47927 — rogfer01 / ViewSVN
  80. [ARM][CGP] Allow signext arguments

    As we perform a zext on any arguments used in the promoted tree, it
    doesn't matter if they're marked as signext. The only permitted
    user(s) in the tree which would interpret the sign bits are signed
    icmps. For these instructions, their promoted operands are truncated
    before the icmp uses them.

    Differential Revision: https://reviews.llvm.org/D68019 — sam_parker / ViewSVN
  81. Revert "[SCEV] add no wrap flag for SCEVAddExpr."

    This reverts r366419 because the analysis performed is within the context of
    the loop and it's only valid to add wrapping flags to "global" expressions if
    they're always correct. — Tim Northover / ViewSVN
  82. Reland "[utils] Implement the llvm-locstats tool"

    The tool reports verbose output for the DWARF debug location coverage.
    The llvm-locstats for each variable or formal parameter DIE computes what
    percentage from the code section bytes, where it is in scope, it has
    location description. The line 0 shows the number (and the percentage) of
    DIEs with no location information, but the line 100 shows the number (and
    the percentage) of DIEs where there is location information in all code
    section bytes (where the variable or parameter is in the scope). The line
    50..59 shows the number (and the percentage) of DIEs where the location
    information is in between 50 and 59 percentage of its scope covered.

    Differential Revision: https://reviews.llvm.org/D66526 — djtodoro / ViewSVN
  83. [SystemZ]  Add SystemZPostRewrite in addPostRegAlloc() instead at -O0.

    SystemZPostRewrite needs to be run before (it may emit COPYs) the Post-RA
    pseudo pass also at -O0, so it should be added in addPostRegAlloc().

    Review: Ulrich Weigand — jonpa / ViewSVN
  84. [X86] Remove some redundant isel patterns. NFCI

    These are all also implemented in avx512_logical_lowering_types
    with support for masking. — ctopper / ViewSVN
  85. AMDGPU/GlobalISel: Fix select for v2s16 and/or/xor — arsenm / ViewSVN
  86. [test] Change llvm-readobj --arm-attributes to --arch-specific after r373125 — maskray / ViewSVN
  87. [X86] Split v16i32/v8i64 bitreverse on avx512f targets without avx512bw to enable the use of vpshufb on the 256-bit halves. — ctopper / ViewSVN
  88. Undef the macros after their use

    Summary:

    Reviewers:
    t.p.northover

    Subscribers:

    Differential Revision: https://reviews.llvm.org/D46378 — hiraditya / ViewSVN
  89. [X86] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r373174 — maskray / ViewSVN

#5497 (Sep 29, 2019 6:12:51 PM)

  1. [X86] Remove -x86-experimental-vector-widening-legalization command line flag

    This was added back to allow some performance regressions to be
    investigated. The main perf issue was fixed shortly after adding
    this back and no other major issues have been reported. So I
    think its safe to remove this again. — ctopper / ViewSVN
  2. Don't crash if a variable with a constexpr destructor has a
    value-dependent initializer. — rsmith / ViewSVN
  3. [X86] Add custom isel logic to match VPTERNLOG from 2 logic ops.

    There's room from improvement here, but this is a decent
    starting point.

    There are a few minor regressions in the vector-rotate tests,
    where we are now forming a vpternlog from an and before we get
    a chance to form it for a bitselect that we were matching
    previously. This results in an AND and an ANDN feeding the
    vpternlog where previously we just had an AND after the
    vpternlog. I think we can probably DAG combine the AND with
    the bitselect to get back to similar codegen. — ctopper / ViewSVN
  4. Add test case peeking through vector concat when combining insert into shuffles. NFC — deadalnix / ViewSVN
  5. [LLVM-C][Ocaml] Add MergeFunctions and DCE pass

    MergeFunctions and DCE pass are missing from OCaml/C-api. This patch
    adds them.

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

    Reviewers: whitequark, hiraditya, deadalnix

    Reviewed By: whitequark

    Subscribers: llvm-commits

    Tags: #llvm

    Authored by: kren1 — hiraditya / ViewSVN
  6. [Docs] Moves article links to new pages

    Moves existing article links on the Programming, Subsystem, and Reference documentation pages to new locations. Also moves Github Repository and Publications links to the sidebar. — dr87 / ViewSVN
  7. [MC] Emit unused undefined symbol even if its binding is not set

    For the following two cases, we currently suppress the symbols. This
    patch emits them (compatible with GNU as).

    * `test2_a = undef`: if `undef` is otherwise unused.
    * `.hidden hidden`: if `hidden` is unused. This is the main point of the
      patch, because omitting the symbol would cause a linker semantic
      difference.

    It causes a behavior change that is not compatible with GNU as:

    .weakref foo1, bar1

    When neither foo1 nor bar1 is used, we now emit bar1, which is arguably
    more consistent.

    Another change is that we will emit .TOC. for .TOC.@tocbase .  For this
    directive, suppressing .TOC. can be seen as a size optimization, but we
    choose to drop it for simplicity and consistency. — maskray / ViewSVN
  8. [DivRemPairs] Don't assert that we won't ever get expanded-form rem pairs in different BB's (PR43500)

    If we happen to have the same div in two basic blocks,
    and in one of those we also happen to have the rem part,
    we'd match the div-rem pair, but the wrong ones.
    So let's drop overly-ambiguous assert.

    Fixes https://bugs.llvm.org/show_bug.cgi?id=43500 — lebedevri / ViewSVN
  9. [SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!")

    Initially SLP vectorizer replaced all going-to-be-vectorized
    instructions with Undef values. It may break ScalarEvaluation and may
    cause a crash.
    Reworked SLP vectorizer so that it does not replace vectorized
    instructions by UndefValue anymore. Instead vectorized instructions are
    marked for deletion inside if BoUpSLP class and deleted upon class
    destruction.

    Reviewers: mzolotukhin, mkuper, hfinkel, RKSimon, davide, spatel

    Subscribers: RKSimon, Gerolf, anemet, hans, majnemer, llvm-commits, sanjoy

    Differential Revision: https://reviews.llvm.org/D29641 — abataev / ViewSVN
  10. [clang-format] Reference qualifiers in member templates causing extra indentation.

    Summary:
    The following code

    ```
    struct f {
      template <class T>
      void bar() && noexcept {}
    };
    ```

    will be formatted to the following with LLVM style, and
    `AlwaysBreakTemplateDeclarations: Yes`

    ```
    struct f {
      template <class T>
          void bar() && noexcept {}
    };
    ```

    The indentation of the `void bar()` line is wrong.

    Reviewers: klimek, owenpan, krasimir, timwoj, MyDeveloperDay

    Reviewed By: klimek, MyDeveloperDay

    Subscribers: MyDeveloperDay, ilya-biryukov, llvm-commits, cfe-commits

    Patch By: AndWass

    Tags: #clang-format, #clang, #llvm

    Differential Revision: https://reviews.llvm.org/D68072 — paulhoad / ViewSVN
  11. [PowerPC] Fix conditions of assert in PPCAsmPrinter

    Summary:
    g++ build emits warning:

    llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:667:77: error: suggest parentheses around ?&&? within ?||? [-Werror=parentheses]
         assert(MO.isGlobal() || MO.isCPI() || MO.isJTI() || MO.isBlockAddress() &&
                                                             ~~~~~~~~~~~~~~~~~~~~^~
                "Unexpected operand type for LWZtoc pseudo.");

    I believe the intension is to assert all different types,
    so we should add a parentheses to include all '||'.

    Reviewers: #powerpc, sfertile, hubert.reinterpretcast, Xiangling_L

    Reviewed By: Xiangling_L

    Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, shchenz, steven.zhang, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68180 — jsji / ViewSVN
  12. [ARM] Cortex-M4 schedule additions

    This is an attempt to fill in some of the missing instructions from the
    Cortex-M4 schedule, and make it easier to do the same for other ARM cpus.

    - Some instructions are marked as hasNoSchedulingInfo as they are pseudos or
      otherwise do not require scheduling info
    - A lot of features have been marked not supported
    - Some WriteRes's have been added for cvt instructions.
    - Some extra instruction latencies have been added, notably by relaxing the
      regex for dsp instruction to catch more cases, and some fp instructions.

    This goes a long way to get the CompleteModel working for this CPU. It does not
    go far enough as to get all scheduling info for all output operands correct.

    Differential Revision: https://reviews.llvm.org/D67957 — dmgreen / ViewSVN

#5496 (Sep 29, 2019 12:38:57 AM)

  1. [cxx_status] Mark P0784R7 as partially complete. — rsmith / ViewSVN
  2. For now, disallow lifetime-extended temporaries with non-trivial (but
    constexpr) destructors from being used in the values of constexpr
    variables.

    The standard rules here are unclear at best, so rejecting the
    problematic cases seems prudent. Prior to this change, we would fail to
    run the destructors for these temporaries, even if they had
    side-effects, which is certainly not the right behavior. — rsmith / ViewSVN
  3. Fix checking for permitted results of constant expressions.

    In the presence of mutable state, we need to check whether temporaries
    involved in a constant expression have permissible values at the end of
    the overall evaluation, rather than at the end of the evaluation of the
    initializer of the temporary. — rsmith / ViewSVN
  4. For P0784R7: compute whether a variable has constant destruction if it
    has a constexpr destructor.

    For constexpr variables, reject if the variable does not have constant
    destruction. In all cases, do not emit runtime calls to the destructor
    for variables with constant destruction. — rsmith / ViewSVN
  5. [Docs] Adds sections for Command Line and LibFuzzer articles

    Adds sections for Command Line and Libfuzzer articles on Programming Documentation page. — dr87 / ViewSVN
  6. [X86] Enable isel to fold broadcast loads that have been bitcasted from FP into a vpternlog. — ctopper / ViewSVN
  7. [X86] Move bitselect matching to vpternlog into X86ISelDAGToDAG.cpp

    This allows us to reduce the use count on the condition node before
    the match. This enables load folding for that operand without
    relying on the peephole pass. This will be improved on for
    broadcast load folding in a subsequent commit.

    This still requires a bunch of isel patterns for vXi16/vXi8 types
    though. — ctopper / ViewSVN
  8. [X86] Enable canonicalizeBitSelect for AVX512 since we can use VPTERNLOG now. — ctopper / ViewSVN
  9. [X86] Match (or (and A, B), (andn (A, C))) to VPTERNLOG with AVX512.

    This uses a similar isel pattern as we used for vpcmov with XOP. — ctopper / ViewSVN
  10. [NFC] Move hot cold splitting class to header file

    Summary:  This is to facilitate unittests

    Reviewers: compnerd, vsk, tejohnson, sebpop, brzycki, SirishP

    Reviewed By: tejohnson

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68079 — hiraditya / ViewSVN
  11. SemaExpr - silence static analyzer getAs<> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. — rksimon / ViewSVN
  12. [PowerPC] make tests immune to improved undef handling

    The fma mutate test will not exercise what it was intended to test
    once we simplify those ops immediately, but the test will still
    pass with the existing CHECKs, so I'm leaving it in case that
    still has minimal value. — spatel / ViewSVN

#5495 (Sep 28, 2019 6:29:39 AM)

  1. Don't install example analyzer plugins

    Summary: Fixes PR43430.

    Reviewers: hintonda, NoQ, Szelethus, lebedev.ri

    Reviewed By: lebedev.ri

    Differential Revision: https://reviews.llvm.org/D68172 — aaronpuchert / ViewSVN
  2. Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`

    When testing clang that has been compiled with `-DDEFAULT_SYSROOT` set to some path,
    some tests would fail. Override sysroot to be empty string for the tests to succeed
    when clang is configured with `DEFAULT_SYSROOT`.

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

    Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>. — sepavloff / ViewSVN
  3. [GlobalISel Enable memcpy inlining with optsize.

    We should be disabling inline for minsize, not optsize. — aemerson / ViewSVN
  4. [TimeProfiler] Fix "OptModule" section and add new "Backend" sections

    Remove unnecessary "OptModule" section. Add "PerFunctionPasses",
    "PerModulePasses" and "CodeGenPasses" sections under "Backend" section. — anton-afanasyev / ViewSVN
  5. Add an operand to memory intrinsics to denote the "tail" marker.

    We need to propagate this information from the IR in order to be able to safely
    do tail call optimizations on the intrinsics during legalization. Assuming
    it's safe to do tail call opt without checking for the marker isn't safe because
    the mem libcall may use allocas from the caller.

    This adds an extra immediate operand to the end of the intrinsics and fixes the
    legalizer to handle it.

    Differential Revision: https://reviews.llvm.org/D68151 — aemerson / ViewSVN
  6. AMDGPU/GlobalISel: Avoid getting MRI in every function

    Store it in AMDGPUInstructionSelector to avoid boilerplate in nearly
    every select function. — arsenm / ViewSVN
  7. [X86] Add broadcast load unfolding support for VPTESTMD/Q and VPTESTNMD/Q. — ctopper / ViewSVN
  8. [X86] Stop using UpdateNodeOperands in combineGatherScatter. Create new nodes like most other DAG combines.

    Creating new nodes is what we usually do. Have to explicitly
    check that we don't update to an existing node and having
    to manually manage the worklist is unusual.

    We can probably add a helper function to reduce the duplication
    of having to check if we should create a gather or scatter, but
    I wanted to just get the simple thing done. — ctopper / ViewSVN
  9. [X86] Split combineGatherScatter into a version for generic ISD nodes and another version for X86 specific nodes.

    The majority of the code doesn't run on the X86 nodes today since
    its gated by isBeforeLegalizeOps and we don't formm X86 nodes
    until after that. Except for a couple special case in type
    legalization. But I think we would probably break those if
    some of the transforms fire on them.

    I want to remove the hardcoded operand numbers and the unusual
    use of UpdateNodeOperands. Being able to know which ISD opcodes
    are present should help with that. — ctopper / ViewSVN
  10. [SampleFDO] Create a separate flag profile-accurate-for-symsinlist to handle
    profile symbol list.

    Currently many existing users using profile-sample-accurate want to reduce
    code size as much as possible. Their use cases are different from the scenario
    profile symbol list tries to handle -- the major motivation of adding profile
    symbol list is to get the major memory/code size saving without introduce
    performance regression. So to keep the behavior of profile-sample-accurate
    unchanged, we think decoupling these two things and using a new flag to
    control the handling of profile symbol list may be better.

    When profile-sample-accurate and the new flag profile-accurate-for-symsinlist
    are both present, since profile-sample-accurate is a user assertion we let it
    have a higher precedence.

    Differential Revision: https://reviews.llvm.org/D68047 — wmi / ViewSVN
  11. [llvm-lipo] Add support for -arch

    Add support for -arch.

    Differential revision: https://reviews.llvm.org/D68116

    Test plan: make check-all — alexshap / ViewSVN
  12. [X86] Add test case to show missed opportunity to turn (add (zext (vXi1 X)), Y) -> (sub Y, (sext (vXi1 X))) with avx512.

    With avx512, the vXi1 type is legal. And we can more easily sign
    extend them to vector registers. zext requires a sign extend and
    a shift.

    If we can easily turn the zext into a sext we should. — ctopper / ViewSVN
  13. [libFuzzer] Dump trace and provide correct msg for overwritten input.

    Summary:
    Now crashes with a stacktrace and uses 'overwrites-const-input' as the error
    message instead of 'out-of-memory'.

    Reviewers: morehouse, Dor1s

    Reviewed By: morehouse, Dor1s

    Subscribers: #sanitizers, llvm-commits, metzman, Dor1s

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68067 — hctim / ViewSVN
  14. [PatternMatch] Add m_SExtOrSelf(), m_ZExtOrSExtOrSelf() matchers + unittests

    m_SExtOrSelf() is for consistency.

    m_ZExtOrSExtOrSelf() is motivated by the D68103/r373106 :
    sometimes it is useful to look past any extensions of the shift amount,
    and m_ZExtOrSExtOrSelf() may be exactly the tool to do that. — lebedevri / ViewSVN
  15. [llvm-readobj] Rename --arm-attributes to --arch-specific

    This is for compatibility with GNU readobj. --arm-attributes option is
    left as a hidden alias due to large number of tests using it.

    Differential Revision: https://reviews.llvm.org/D68110 — kongyi / ViewSVN
  16. Revert "[profile] Add a test dependency on cxx-headers"

    This reverts commit b539350f7d006b7d6f42c5c4b5715da87a52e5d8.

    See: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52140/steps/annotate/logs/stdio

    The cxx-headers target doesn't exist everywhere. — Vedant Kumar / ViewSVN
  17. For P0784R7: add support for explicit destructor calls and
    pseudo-destructor calls in constant evaluation. — rsmith / ViewSVN
  18. [profile] Mark instrprof-gcov-fork.test UNSUPPORTED on Darwin as well

    This test remains flaky everywhere, I think. We should consider deleting
    it and accompanying support code in GCOVProfiling: I've stopped short of
    doing that now as the gcov exec* tests appear to be stable.

    See the thread re: r347779. — Vedant Kumar / ViewSVN
  19. [profile] Add a test dependency on cxx-headers

    This enables running profile runtime tests which #include <string>, etc.
    via just `check-profile`. — Vedant Kumar / ViewSVN
  20. [InstSimplify] generalize FP folds with undef/NaN; NFC

    We can reuse this logic for things like fma. — spatel / ViewSVN
  21. [Clang][OpenMP Offload] Create start/end symbols for the offloading entry table with a help of a linker

    Linker automatically provides __start_<section name> and __stop_<section name> symbols to satisfy unresolved references if <section name> is representable as a C identifier (see https://sourceware.org/binutils/docs/ld/Input-Section-Example.html for details). These symbols indicate the start address and end address of the output section respectively. Therefore, renaming OpenMP offload entries section name from ".omp.offloading_entries" to "omp_offloading_entries" to use this feature.

    This is the first part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943).

    Differential Revision: https://reviews.llvm.org/D68070 — sdmitriev / ViewSVN
  22. Revert [Dominators][CodeGen] Clean up MachineDominators

    This reverts r373101 (git commit 72c57ec3e6b320c31274dadb888dc16772b8e7b6) — kuhar / ViewSVN
  23. Revert XFAIL a codegen test AArch64/tailmerging_in_mbp.ll

    This reverts r373103 (git commit a524e630a793e18e7d5fabc2262781f310eb0279) — kuhar / ViewSVN
  24. [NFC][PhaseOrdering] Add end-to-end tests for the 'two shifts by sext' problem

    We start with two separate sext's, but EarlyCSE runs before InstCombine,
    so when we get them, they are a single sext, and we just ignore that.
    Likewise, if we had a single sext, we don't do anything there. — lebedevri / ViewSVN
  25. [Docs] Adds new section to User Guides page

    Adds a section to the User Guides page for articles related to building, packaging, and distributing LLVM. Includes sub-sections for CMake, Clang, and Docker. — dr87 / ViewSVN
  26. [InstSimplify] add tests for fma/fmuladd with undef operand; NFC — spatel / ViewSVN

#5491 (Sep 26, 2019 7:30:42 AM)

  1. [libc++] Take 2: Implement LWG 2510

    Summary:
    LWG2510 makes tag types like allocator_arg_t explicitly default
    constructible instead of implicitly default constructible. It also
    makes the constructors for std::pair and std::tuple conditionally
    explicit based on the explicit-ness of the default constructibility
    for the pair/tuple's elements.

    This was previously committed as r372777 and reverted in r372832 due to
    the commit breaking LLVM's build in C++14 mode. This issue has now been
    addressed.

    Reviewers: mclow.lists

    Subscribers: christof, jkorous, dexonsmith, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D65161 — Louis Dionne / ViewSVN
  2. [clangd] Bump vscode-clangd v0.0.18

    CHANGELOG:
    - enable semantic highlighting by default
    - upgrade the LSP dependencies to pickup the incoming LSP v3.15.0 — hokein / ViewSVN
  3. [clangd][vscode] Add npm helper commands to package/release the extension.

    Summary: Help to fix https://github.com/clangd/clangd/issues/159.

    Reviewers: ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68080 — hokein / ViewSVN
  4. Return results by value from ClangTidyCheckFactories::createChecks — gribozavr / ViewSVN
  5. Use std::unique_ptr in ClangTidyCheckFactories

    I had to explicitly define some destructors that could only be defined
    in the corresponding .cpp files. — gribozavr / ViewSVN
  6. [FlattenCFG] Silence static analyzer dyn_cast<BranchInst> null dereference warnings. NFCI.

    The static analyzer is warning about a potential null dereferences, but we should be able to use cast<BranchInst> directly and if not assert will fire for us. — rksimon / ViewSVN
  7. [OpenCL] Add -Wconversion to fdeclare-opencl-builtins test

    Add the -Wconversion -Werror options to check no unexpected conversion
    is done.

    Patch by Pierre Gondois and Sven van Haastregt.

    Differential Revision: https://reviews.llvm.org/D67714 — svenvh / ViewSVN
  8. [llvm-ar][test] Move MRI tests from "llvm/test/Object/"

    llvm/test/Object/ contains tests for the ArchiveWriter library, however
    support for MRI scripts is found in llvm-ar and not the library. This
    diff moves the MRI related tests and removes those that are duplicates.

    Differential Revision: https://reviews.llvm.org/D68038 — gbreynoo / ViewSVN
  9. [InstCombine] Don't assume CmpInst has been visited in getFlippedStrictnessPredicateAndConstant

    Summary:
    Removing an assumption (assert) that the CmpInst already has been
    simplified in getFlippedStrictnessPredicateAndConstant. Solution is
    to simply bail out instead of hitting the assertion. Instead we
    assume that any profitable rewrite will happen in the next iteration
    of InstCombine.

    The reason why we can't assume that the CmpInst already has been
    simplified is that the worklist does not guarantee such an ordering.

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

    Reviewers: spatel, lebedev.ri

    Reviewed By: lebedev.ri

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68022 — bjope / ViewSVN
  10. [clangd][vscode] Update vscode lsp dependencies to pickup the new changes in LSP v3.15.0.

    Summary: This would enable the newly-added semantic selection feature in vscode.

    Reviewers: usaxena95

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67964 — hokein / ViewSVN
  11. [clangd][vscode] Turn on the semantic highlighting by default.

    Summary:
    We have turned on the flag manually and used it for a while, and don't see any
    major issues, let's enable it by default.

    Reviewers: ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68077 — hokein / ViewSVN
  12. [llvm-exegesis][NFC] Remove dead code.

    Summary: `hasAliasingImplicitRegistersThrough()` is no longer used.

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68078 — courbet / ViewSVN
  13. MetadataLoader lazyLoadOneMetadata - silence static analyzer dyn_cast<MDNode> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<MDNode> directly and if not assert will fire for us. — rksimon / ViewSVN
  14. Remove local shadow constant. NFCI.

    ValueTracking.cpp already has a local static MaxDepth = 6 constant - this one seems to have been missed when rL124183 landed. — rksimon / ViewSVN
  15. [libcxx] Do not implicitly #include assert.h

    Users should only get the assert() macros if they explicitly include
    them.

    Found after switching from the GNU C++ stdlib to the LLVM C++ stdlib. — davezarzycki / ViewSVN
  16. [ValueTracking] Silence static analyzer dyn_cast<Operator> null dereference warnings. NFCI.

    The static analyzer is warning about a potential null dereferences, but since the pointer is only used in a switch statement for Operator::getOpcode() (with an empty default) then its easiest just to wrap this in a null test as the dyn_cast might return null here. — rksimon / ViewSVN
  17. MemorySanitizer - silence static analyzer dyn_cast<> null dereference warnings. NFCI.

    The static analyzer is warning about a potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us. — rksimon / ViewSVN
  18. PGOMemOPSizeOpt - silence static analyzer dyn_cast<MemIntrinsic> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<MemIntrinsic> directly and if not assert will fire for us. — rksimon / ViewSVN
  19. [BPF] Remove unused variables. NFCI.

    Fixes a dyn_cast<> null dereference warning. — rksimon / ViewSVN
  20. [MIPS GlobalISel] Lower aggregate structure return arguments

    Implement aggregate structure split to simpler types in splitToValueTypes.
    splitToValueTypes is used for return values.
    According to MipsABIInfo from clang/lib/CodeGen/TargetInfo.cpp,
    aggregate structure arguments for O32 always get simplified and thus
    will remain unsupported by the MIPS GlobalISel for the time being.
    For O32, aggregate structures can be encountered only for complex number
    returns e.g. 'complex float' or 'complex double' from <complex.h>.

    Differential Revision: https://reviews.llvm.org/D67963 — petar.avramovic / ViewSVN
  21. HexagonAsmParser::ParseDirectiveFalign - silence static analyzer dyn_cast<MCConstantExpr> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<MCConstantExpr> directly and if not assert will fire for us. — rksimon / ViewSVN
  22. [SLPVectorizer][X86] Add SSE common check prefix to let us merge SSE2+SLM checks — rksimon / ViewSVN
  23. [CostModel][X86] Fix SLM <2 x i64> icmp costs

    SLM is 2 x slower for <2 x i64> comparison ops than other vector types, we should account for this like we do for SLM <2 x i64> add/sub/mul costs.

    This should remove some of the SLM codegen diffs in D43582 — rksimon / ViewSVN
  24. [clang-tidy] Make llvm-header-guard work on llvm git monorepo

    Reviewers: gribozavr

    Reviewed By: gribozavr

    Subscribers: xazax.hun, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68026 — hokein / ViewSVN
  25. [SystemZ]  Recognize mnop-mcount in backend

    With -pg -mfentry -mnop-mcount, a nop is emitted instead of the call to
    fentry.

    Review: Ulrich Weigand
    https://reviews.llvm.org/D67765 — jonpa / ViewSVN
  26. [Testing] Workaround libcxx bug when OS is "none"

    If clang is configured to use libcxx as the default C++ standard
    library, then using "none" for the OS in the target triple will cause
    libcxx to #error needlessly. Passing -nostdinc++ is a workaround for
    these tests. See also: https://reviews.llvm.org/D68075

    Please note: this workaround will probably exist for a few years until
    the installed version of libcxx is updated. — davezarzycki / ViewSVN
  27. [clangd] Add a helper for extracting nonlocal decls in a FunctionDecl

    Summary:
    To be used by define-inline code action to determine whether the
    function/method body will still be valid in another context.

    Traverses clang-ast to find all decl nodes under the function decl and stores
    the non-local ones.

    Reviewers: hokein

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67748 — kadircet / ViewSVN
  28. [X86] Remove isCodeGenOnly from (V)ROUND.*_Int and put it on the non _Int form instead.

    This matches what's done for VRNDSCALE and most other instructions.

    This mainly determines which instruction will be preferred by
    disassembler and assembly parser. The printing and encoding
    information is the same.

    We prefer the _Int form since it uses the VR128 class due to
    intrinsic interface. For some of EVEX features like embedded
    rounding, we only select from intrinsics today. So there is
    only a VR128 version. So making the VR128 version the preferred
    is overally consistent. — ctopper / ViewSVN
  29. [analyzer] A speculative attempt to avoid gcc-7 crashes caused by r372942. — dergachev / ViewSVN
  30. [SortIncludesTest] Add SortPriority fields to fix -Wmissing-field-initializers after D64695/r372919 — uabelho / ViewSVN
  31. [IfConversion] Disallow TBB == FBB for valid triangles

    Summary:
    Previously the case

         EBB
         | \_
         |  |
         | TBB
         |  /
         FBB

    was treated as a valid triangle also when TBB and FBB was the same basic
    block. This could then lead to an invalid CFG when we removed the edge
    from EBB to TBB, since that meant we would also remove the edge from EBB
    to FBB.

    Since TBB == FBB is quite a degenerated case of a triangle, we now
    don't treat it as a valid triangle anymore, and thus we will avoid the
    trouble with updating the CFG.

    Reviewers: efriedma, dmgreen, kparzysz

    Reviewed By: efriedma

    Subscribers: bjope, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67832 — uabelho / ViewSVN
  32. [analyzer] Avoid small vectors of non-default-constructibles.

    Unconfuses certain compilers. — dergachev / ViewSVN
  33. [X86] Mark the EVEX encoded PSADBW instructions as commutable to enable load folding of the other operand.

    The SSE and VEX versions are already correct. — ctopper / ViewSVN
  34. [ConstantFolding] Use FoldBitCast correctly

    Previously we might attempt to use a BitCast to turn bits into vectors of pointers,
    but that requires an inttoptr cast to be legal. Add an assertion to detect the formation of illegal bitcast attempts
    early (in the tests, we often constant-fold away the result before getting to this assertion check),
    while being careful to still handle the early-return conditions without adding extra complexity in the result.

    Patch by Jameson Nash <jameson@juliacomputing.com>.

    Differential Revision: https://reviews.llvm.org/D65057 — kfischer / ViewSVN
  35. [clang-format] Add SortPriority fields to fix -Wmissing-field-initializers after D64695/r372919 — maskray / ViewSVN
  36. Improve C API support for atomicrmw and cmpxchg.

    atomicrmw and cmpxchg have a volatile flag, so allow them to be get and set with LLVM{Get,Set}Volatile. atomicrmw and fence have orderings, so allow them to be get and set with LLVM{Get,Set}Ordering. Add missing LLVMAtomicRMWBinOpFAdd and LLVMAtomicRMWBinOpFSub enum constants. AtomicCmpXchg also has a weak flag, add a getter/setter for that too. Add a getter/setter for the binary-op of an atomicrmw.

    atomicrmw and cmpxchg have a volatile flag, so allow it to be set/get with LLVMGetVolatile and LLVMSetVolatile. Add missing LLVMAtomicRMWBinOpFAdd and LLVMAtomicRMWBinOpFSub enum constants. AtomicCmpXchg also has a weak flag, add a getter/setter for that too. Add a getter/setter for the binary-op of an atomicrmw.

    Add LLVMIsA## for CatchSwitchInst, CallBrInst and FenceInst, as well as AtomicCmpXchgInst and AtomicRMWInst.

    Update llvm-c-test to include atomicrmw and fence, and to copy volatile for the four applicable instructions.

    Differential Revision: https://reviews.llvm.org/D67132 — nicholas / ViewSVN
  37. [libFuzzer] [NFC] Fix grammar error with "it's" — hctim / ViewSVN
  38. [libTooling] Add `run` combinator to Stencils.

    Summary:
    This revision adds `run`, a StencilPart that runs a user-defined function that
    computes a result over `MatchFinder::MatchResult`.

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67969 — ymandel / ViewSVN
  39. [TargetLowering] Make allowsMemoryAccess methode virtual.

    Rename old function to explicitly show that it cares only about alignment.
    The new allowsMemoryAccess call the function related to alignment by default
    and can be overridden by target to inform whether the memory access is legal or
    not.

    Differential Revision: https://reviews.llvm.org/D67121 — thomasraoux / ViewSVN
  40. [MC][WebAssembly] Error on data symbols in the text section.

    Previously we had an assert but this can actually occur in valid user
    code so we need to handle this in release builds too.

    Differential Revision: https://reviews.llvm.org/D67997 — sbc / ViewSVN
  41. [X86] Use VR512_0_15RegClass intead of VR512RegClass in X86VZeroUpper.

    This pass is only concerned with ZMM0-15 and YMM0-15. For YMM
    we use VR256 which only contains YMM0-15, but for ZMM we were
    using VR512 which contains ZMM0-31. Using VR512_0_15 is more
    correct.

    Given that the ABI and register allocator will use registers in
    order, its unlikely that register from 16-31 would be used
    without also using 0-15. So this probably doesn't functionally
    matter. — ctopper / ViewSVN
  42. [MemorySSA] Avoid adding Phis in the presence of unreachable blocks.

    Summary:
    If a block has all incoming values with the same MemoryAccess (ignoring
    incoming values from unreachable blocks), then use that incoming
    MemoryAccess and do not create a Phi in the first place.

    Revert IDF work-around added in rL372673; it should not be required unless
    the Def inserted is the first in its block.

    The patch also cleans up a series of tests, added during the many
    iterations on insertDef.

    The patch also fixes PR43438.
    The same issue that occurs in insertDef with "adding phis, hence the IDF of
    Phis is needed", can also occur in fixupDefs: the `getPreviousRecursive`
    call only adds Phis walking on the predecessor edges, which means there
    may be the case of a Phi added walking the CFG "backwards" which
    triggers the needs for an additional Phi in successor blocks.
    Such Phis are added during fixupDefs only in the presence of unreachable
    blocks.
    Hence this highlights the need to avoid adding Phis in blocks with
    unreachable predecessors in the first place.

    Reviewers: george.burgess.iv

    Subscribers: Prazek, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67995 — asbirlea / ViewSVN
  43. [InstCombine] foldUnsignedUnderflowCheck(): one last pattern with 'sub' (PR43251)

    https://rise4fun.com/Alive/0j9 — lebedevri / ViewSVN
  44. [NFC][InstCombine] Tests for 'base u<= offset && (base - offset) != 0' pattern (PR43251) — lebedevri / ViewSVN
  45. [InstSimplify] Handle more 'A </>/>=/<= B &&/|| (A - B) !=/== 0' patterns (PR43251)

    https://rise4fun.com/Alive/sl9s
    https://rise4fun.com/Alive/2plN

    https://bugs.llvm.org/show_bug.cgi?id=43251 — lebedevri / ViewSVN
  46. [NFC][InstSimplify] More exaustive test coverage for 'A </>/>=/<= B &&/|| (A - B) !=/== 0' pattern (PR43251) — lebedevri / ViewSVN
  47. Simplify -fms-compatibility include lookup logic, NFC

    This include search logic has an extra parameter to deal with Windows
    includes with backslashes, which get normalized to forward slashes on
    non-Windows under -fms-compatibility.

    Hoist the conditional operator out of LookupHeaderIncludeOrImport and
    pass the result in instead of repeating the ?: expression everywhere. — rnk / ViewSVN
  48. Fix memory leak in DeclTest.

    Fixes a leak introduced in r372903, detected on the ASan bot.
    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/35430/steps/check-clang%20asan/logs/stdio

    Direct leak of 192 byte(s) in 1 object(s) allocated from:
        #0 0x561d88 in operator new(unsigned long) /b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_new_delete.cc:105
        #1 0x1a48779 in clang::ItaniumMangleContext::create(clang::ASTContext&, clang::DiagnosticsEngine&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ItaniumMangle.cpp:5134:10
        #2 0xdff000 in Decl_AsmLabelAttr_Test::TestBody() /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/unittests/AST/DeclTest.cpp:97:23 — eugenis / ViewSVN
  49. [LICM] Don't verify domtree/loopinfo unless EXPENSIVE_CHECKS is enabled.

    For large functions, verifying the whole function after each loop takes
    non-linear time.

    Differential Revision: https://reviews.llvm.org/D67571 — efriedma / ViewSVN
  50. [Verifier] add invariant check for callbr

    Summary:
    The list of indirect labels should ALWAYS have their blockaddresses as
    argument operands to the callbr (but not necessarily the other way
    around).  Add an invariant that checks this.

    The verifier catches a bad test case that was added recently in r368478.
    I think that was a simple mistake, and the test was made less strict in
    regards to the precise addresses (as those weren't specifically the
    point of the test).

    This invariant will be used to find a reported bug.

    Link: https://www.spinics.net/lists/arm-kernel/msg753473.html
    Link: https://github.com/ClangBuiltLinux/linux/issues/649

    Reviewers: craig.topper, void, chandlerc

    Reviewed By: void

    Subscribers: ychen, lebedev.ri, javed.absar, kristof.beyls, hiraditya, llvm-commits, srhines

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67196 — nickdesaulniers / ViewSVN
  51. [clang-format] Modified SortIncludes and IncludeCategories to priority for sorting #includes within the Group Category.

    Summary:
    This new Style rule is made as a part of adding support for NetBSD KNF in clang-format. NetBSD have it's own priority of includes which should be followed while formatting NetBSD code. This style sorts the Cpp Includes according to the priorities of NetBSD, as mentioned in the [Style Guide](http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style?rev=HEAD&content-type=text/x-cvsweb-markup)
    The working of this Style rule shown below:

    **Configuration:**
    This revision introduces a new field under IncludeCategories named `SortPriority` which defines the priority of ordering the `#includes` and the `Priority` will define the categories for grouping the `#include blocks`.

    Reviewers: cfe-commits, mgorny, christos, MyDeveloperDay

    Reviewed By: MyDeveloperDay

    Subscribers: lebedev.ri, rdwampler, christos, mgorny, krytarowski

    Patch By: Manikishan

    Tags: #clang, #clang-format

    Differential Revision: https://reviews.llvm.org/D64695 — paulhoad / ViewSVN
  52. [libTooling][NFC] Switch StencilTest.cpp to use EXPECT_THAT_EXPECTED

    Summary:
    Currently, some tests use homegrown matchers to handle `llvm::Expected`
    values. This revision standardizes on EXPECT_THAT_EXPECTED and `HasValue`.

    Reviewers: ilya-biryukov

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67973 — ymandel / ViewSVN

#5490 (Sep 25, 2019 12:36:52 PM)

  1. [OPENMP50]Parsing/sema support for 'implementation/vendor' context
    selector.

    Added basic parsing/semantic support for
    'implementation={vendor(<vendor>)}' context selector. — abataev / ViewSVN
  2. [libc++] Purge mentions of GCC 4 from the test suite

    We don't support GCC 4 and older according to the documentation, so
    we should pretend it doesn't exist.

    This is a re-application of r372787. — Louis Dionne / ViewSVN
  3. [InstSimplify] Match 1.0 and 0.0 for both operands in SimplifyFMAMul

    Because we do not constant fold multiplications in SimplifyFMAMul,
    we match 1.0 and 0.0 for both operands, as multiplying by them
    is guaranteed to produce an exact result (if it is allowed to do so).

    Note that it is not enough to just swap the operands to ensure a
    constant is on the RHS, as we want to also cover the case with
    2 constants.

    Reviewers: lebedev.ri, spatel, reames, scanon

    Reviewed By: lebedev.ri, reames

    Differential Revision: https://reviews.llvm.org/D67553 — fhahn / ViewSVN
  4. [InstCombine] Fold  (A - B) u>=/u< A  --> B  u>/u<= A  iff B != 0

    https://rise4fun.com/Alive/KtL

    This also shows that the fold added in D67412 / r372257
    was too specific, and the new fold allows those test cases
    to be handled more generically, therefore i delete now-dead code.

    This is yet again motivated by
    D67122 "[UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour" — lebedevri / ViewSVN
  5. [NFC][InstCombine] Add tests for (X - Y) < X  -->  Y <= X  iff  Y != 0

    https://rise4fun.com/Alive/KtL
    This should go to InstCombiner::foldICmpBinO(), next to
    "Convert sub-with-unsigned-overflow comparisons into a comparison of args." — lebedevri / ViewSVN
  6. [MSP430] Allow msp430_intrcc functions to not have interrupt attribute.

    Summary:
    Useful in case you want to have control over interrupt vector generation.
    For example in Rust language we have an arrangement where all unhandled
    ISR vectors gets mapped to a single default handler function. Which is
    hard to implement when LLVM tries to generate vectors on its own.

    Reviewers: asl, krisb

    Subscribers: hiraditya, JDevlieghere, awygle, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67313 — dambrouski / ViewSVN
  7. Add forward declaration of operator<< in <string_view> as required.

    This declaration was previously missing despite appearing in the
    synopsis. Users are still required to include <ostream> to get the
    definition of the streaming operator. — ericwf / ViewSVN
  8. [AMDGPU] Improve fma.f64 test. NFC. — rampitec / ViewSVN
  9. add tests that debug mode catches nullptr->string_view conversions in comparison operators — ericwf / ViewSVN
  10. [AMDGPU] gfx10 v_fmac_f16 operand folding

    Fold immediates into v_fmac_f16.

    Differential Revision: https://reviews.llvm.org/D68037 — rampitec / ViewSVN
  11. [emacs] simplify and improve keyword highlighting in tablegen-mode.el

    Summary:
    The keyword and type keyword matchers in tablegen-mode.el checked
    for space, newline, tab, or open paren after the regular expression
    that matches keywords (or type keywords, respectively). This is
    unnecessary, because those regular expressions already include word
    boundaries. This change removes the extra check. This also causes
    "def" in "def:" to be highlighted as a keyword, which was missed
    before.

    Reviewers: lattner, MaskRay

    Reviewed By: MaskRay

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68002 — inglorion / ViewSVN
  12. [Mangle] Add flag to asm labels to disable '\01' prefixing

    LLDB synthesizes decls using asm labels. These decls cannot have a mangle
    different than the one specified in the label name. I.e., the '\01' prefix
    should not be added.

    Fixes an expression evaluation failure in lldb's TestVirtual.py on iOS.

    rdar://45827323

    Differential Revision: https://reviews.llvm.org/D67774 — Vedant Kumar / ViewSVN
  13. [NFC] Add { } to silence compiler warning [-Wmissing-braces].

    llvm-project/llvm/unittests/ADT/ArrayRefTest.cpp:254:25: warning: suggest braces around initialization of subobject [-Wmissing-braces]
      std::array<int, 5> A1{42, -5, 0, 1000000, -1000000};
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            {                           } — huihuiz / ViewSVN
  14. [InstCombine] Limit FMul constant folding for fma simplifications.

    As @reames pointed out post-commit, rL371518 adds additional rounding
    in some cases, when doing constant folding of the multiplication.
    This breaks a guarantee llvm.fma makes and must be avoided.

    This patch reapplies rL371518, but splits off the simplifications not
    requiring rounding from SimplifFMulInst as SimplifyFMAFMul.

    Reviewers: spatel, lebedev.ri, reames, scanon

    Reviewed By: reames

    Differential Revision: https://reviews.llvm.org/D67434 — fhahn / ViewSVN
  15. [CUDA][HIP] Enable kernel function return type deduction.

    Summary:
    - Even though only `void` is still accepted as the deduced return type,
      enabling deduction/instantiation on the return type allows more
      consistent coding.

    Reviewers: tra, jlebar

    Subscribers: cfe-commits, yaxunl

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68031 — hliao / ViewSVN
  16. [AArch64][GlobalISel] Choose CCAssignFns per-argument for tail call lowering

    When checking for tail call eligibility, we should use the correct CCAssignFn
    for each argument, rather than just checking if the caller/callee is varargs or
    not.

    This is important for tail call lowering with varargs. If we don't check it,
    then basically any varargs callee with parameters cannot be tail called on
    Darwin, for one thing. If the parameters are all guaranteed to be in registers,
    this should be entirely safe.

    On top of that, not checking for this could potentially make it so that we have
    the wrong stack offsets when checking for tail call eligibility.

    Also refactor some of the stuff for CCAssignFnForCall and pull it out into a
    helper function.

    Update call-translator-tail-call.ll to show that we can now correctly tail call
    on Darwin. Also add two extra tail call checks. The first verifies that we still
    respect the caller's stack size, and the second verifies that we still don't
    tail call when a varargs function has a memory argument.

    Differential Revision: https://reviews.llvm.org/D67939 — paquette / ViewSVN
  17. Add a missing default parameter to regex::assign. This is LWG3296; reviewed as https://reviews.llvm.org/D67944 — marshall / ViewSVN
  18. [CodeGen] Replace -max-jump-table-size with -max-jump-table-targets

    Modern processors predict the targets of an indirect branch regardless of
    the size of any jump table used to glean its target address.  Moreover,
    branch predictors typically use resources limited by the number of actual
    targets that occur at run time.

    This patch changes the semantics of the option `-max-jump-table-size` to limit
    the number of different targets instead of the number of entries in a jump
    table.  Thus, it is now renamed to `-max-jump-table-targets`.

    Before, when `-max-jump-table-size` was specified, it could happen that
    cluster jump tables could have targets used repeatedly, but each one was
    counted and typically resulted in tables with the same number of entries.
    With this patch, when specifying `-max-jump-table-targets`, tables may have
    different lengths, since the number of unique targets is counted towards the
    limit, but the number of unique targets in tables is the same, but for the
    last one containing the balance of targets.

    Differential revision: https://reviews.llvm.org/D60295 — evandro / ViewSVN
  19. [LangRef] Clarify absence of rounding guarantees for fmuladd.

    During the review of D67434, it was recommended to make fmuladd's
    behavior more explicit. D67434 depends on this interpretation.

    Reviewers: efriedma, jfb, reames, scanon, lebedev.ri, spatel

    Reviewed By: spatel

    Differential Revision: https://reviews.llvm.org/D67552 — fhahn / ViewSVN
  20. Re-land r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

    Reverted in r372880 due to the test failure.
    Also contains a fix that adjusts printQualifiedName to return the same results as before in
    case of anonymous function locals and parameters. — ibiryukov / ViewSVN
  21. [clangd] Change constness of parameters to findExplicitRefs

    Summary:
    Recursive AST requires non-const ast nodes, but it doesn't really
    mutate them. In addition to that, in clangd we mostly have const ast nodes. So
    it makes sense to move the const_cast into callee rather than having it at every
    caller in the future.

    Reviewers: ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68027 — kadircet / ViewSVN
  22. [DAGCombiner] add one-use restriction to vector transform with cheap extract

    We might be able to do better on the example in the test,
    but in general, we should not scalarize a splatted vector
    binop if there are other uses of the binop. Otherwise, we
    can end up with code as we had - a scalar op that is
    redundant with a vector op. — spatel / ViewSVN
  23. [PatternMatch] Make m_Br more flexible, add matchers for BB values.

    Currently m_Br only takes references to BasicBlock*, which limits its
    flexibility. For example, you have to declare a variable, even if you
    ignore the result or you have to have additional checks to make sure the
    matched BB matches an expected one.

    This patch adds m_BasicBlock and m_SpecificBB matchers, which can be
    used like the existing matchers for constants or values.

    I also had a look at the existing uses and updated a few. IMO it makes
    the code a bit more explicit.

    Reviewers: spatel, craig.topper, RKSimon, majnemer, lebedev.ri

    Reviewed By: lebedev.ri

    Differential Revision: https://reviews.llvm.org/D68013 — fhahn / ViewSVN
  24. [NFC] Fix typo in `getPreviousDecl` comment. — ymandel / ViewSVN
  25. [x86] add test for multi-use scalarization of vector binop; NFC — spatel / ViewSVN
  26. [TargetInstrInfo] Let findCommutedOpIndices take const MachineInstr&

    Neither the base implementation of findCommutedOpIndices nor any in-tree target modifies the instruction passed in and there is no reason why they would in the future.

    Committed on behalf of @hvdijk (Harald van Dijk)

    Differential Revision: https://reviews.llvm.org/D66138 — rksimon / ViewSVN
  27. [PatternMatch] Generalize brc_match (NFC).

    Preparation for D68013. — fhahn / ViewSVN
  28. Revert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

    Reason: causes a test failure, will investigate and re-land with a fix. — ibiryukov / ViewSVN
  29. [IR] allow fast-math-flags on phi of FP values (2nd try)

    The changes here are based on the corresponding diffs for allowing FMF on 'select':
    D61917 <https://reviews.llvm.org/D61917>

    As discussed there, we want to have fast-math-flags be a property of an FP value
    because the alternative (having them on things like fcmp) leads to logical
    inconsistency such as:
    https://bugs.llvm.org/show_bug.cgi?id=38086

    The earlier patch for select made almost no practical difference because most
    unoptimized conditional code begins life as a phi (based on what I see in clang).
    Similarly, I don't expect this patch to do much on its own either because
    SimplifyCFG promptly drops the flags when converting to select on a minimal
    example like:
    https://bugs.llvm.org/show_bug.cgi?id=39535

    But once we have this plumbing in place, we should be able to wire up the FMF
    propagation and start solving cases like that.

    The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a
    regression in a LoopVectorize test. We are intersecting the FMF of any
    FPMathOperator there, so if a phi is not properly annotated, new math
    instructions may not be either. Once we fix the propagation in SimplifyCFG, it
    may be safe to remove that hack.

    Differential Revision: https://reviews.llvm.org/D67564 — spatel / ViewSVN
  30. Fix analyzer TypeAttributeImpl::anchor() override.

    TypeAttributeImpl inherits from EnumAttributeImpl which already defines anchor() as a virtual, so we should override this instead of redeclaring it. — rksimon / ViewSVN
  31. [gn build] Fix Python DeprecationWarning

    Summary:
    This fixes two issues:
    - DeprecationWarning: invalid escape sequence \`
    - ResourceWarning: unclosed file

    Subscribers: mgorny, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67753 — mantognini / ViewSVN
  32. [clangd] Fix parseNamespaceEvents to parse the last token

    Reviewers: hokein, ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68020 — kadircet / ViewSVN
  33. [Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator. Cleanup MachinePostDominators.

    Summary:
    This patch fixes a bug that originated from passing a virtual exit block (nullptr) to `MachinePostDominatorTee::findNearestCommonDominator` and resulted in assertion failures inside its callee. It also applies a small cleanup to the class.

    The patch introduces a new function in PDT that given a list of `MachineBasicBlock`s finds their NCD. The new overload of `findNearestCommonDominator` handles virtual root correctly.

    Note that similar handling of virtual root nodes is not necessary in (forward) `DominatorTree`s, as right now they don't use virtual roots.

    Reviewers: tstellar, tpr, nhaehnle, arsenm, NutshellySima, grosser, hliao

    Reviewed By: hliao

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

    Tags: #amdgpu, #llvm

    Differential Revision: https://reviews.llvm.org/D67974 — kuhar / ViewSVN
  34. [SystemZ]  Improve emitSelect()

    Merge more Select pseudo instructions in emitSelect() by allowing other
    instructions between them as long as they do not clobber CC.

    Debug value instructions are now moved down to below the new PHIs instead of
    erasing them.

    Review: Ulrich Weigand
    https://reviews.llvm.org/D67619 — jonpa / ViewSVN
  35. Fix cppcheck variable shadow warning. NFCI. — rksimon / ViewSVN
  36. Add missing ExplicitTy default initialization to ConstantExprKeyType constructors.

    Fixes cppcheck uninitialized variable warnings — rksimon / ViewSVN
  37. [libTooling] Introduce the MatchConsumer abstraction

    Summary:
    This revision introduces a separate (small) library for the `MatchConsumer`
    abstraction: computations over AST match results.  This abstraction is central
    to the Transformer framework, and there deserves being defined explicitly.

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67961 — ymandel / ViewSVN
  38. Revert [IR] allow fast-math-flags on phi of FP values

    This reverts r372866 (git commit dec03223a97af0e4dfcb23da55c0f7f8c9b62d00) — spatel / ViewSVN
  39. [llvm-readobj/llvm-readelf] - .stack_sizes: demangle symbol names in warnings reported.

    I started this patch as a refactoring, tried to make a helper for
    getting symbol names, similar to how we get section names
    used in warning messages.

    So this patch cleanups the code and fixes an issue: symbol names
    in warning messages were not demangled.

    Differential revision: https://reviews.llvm.org/D68012 — grimar / ViewSVN
  40. [IR] allow fast-math-flags on phi of FP values

    The changes here are based on the corresponding diffs for allowing FMF on 'select':
    D61917

    As discussed there, we want to have fast-math-flags be a property of an FP value
    because the alternative (having them on things like fcmp) leads to logical
    inconsistency such as:
    https://bugs.llvm.org/show_bug.cgi?id=38086

    The earlier patch for select made almost no practical difference because most
    unoptimized conditional code begins life as a phi (based on what I see in clang).
    Similarly, I don't expect this patch to do much on its own either because
    SimplifyCFG promptly drops the flags when converting to select on a minimal
    example like:
    https://bugs.llvm.org/show_bug.cgi?id=39535

    But once we have this plumbing in place, we should be able to wire up the FMF
    propagation and start solving cases like that.

    The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a
    regression in a LoopVectorize test. We are intersecting the FMF of any
    FPMathOperator there, so if a phi is not properly annotated, new math
    instructions may not be either. Once we fix the propagation in SimplifyCFG, it
    may be safe to remove that hack.

    Differential Revision: https://reviews.llvm.org/D67564 — spatel / ViewSVN
  41. [docs][llvm-strings] Clarify "printable character" wording

    The --bytes option uses the phrase "printable ASCII characters", but the
    description section used simply "printable characters". To avoid any
    confusion about locale impacts etc, this change adopts the former's
    phrasing in both places. It also fixes a minor grammar issue in the
    description.

    Reviewed by: MaskRay

    Differential Revision: https://reviews.llvm.org/D68016 — jhenderson / ViewSVN
  42. [docs][llvm-strip] Update llvm-strip doc to better match llvm-objcopy's

    Main changes are mostly wording of some options, but this change also
    fixes a switch reference so that a link is created and moves
    --strip-sections into the ELF-specific area since it is only supported
    for ELF currently. — jhenderson / ViewSVN
  43. [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

    Summary:
    To be used in clangd, e.g. in D66647.
    Currently the alternative to this function is doing string manipulation on results of `printQualifiedName`, which is
    hard-to-impossible to get right in presence of template arguments.

    Reviewers: kadircet, aaron.ballman

    Reviewed By: kadircet, aaron.ballman

    Subscribers: aaron.ballman, usaxena95, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67825 — ibiryukov / ViewSVN
  44. [clangd] Add missing header guard, NFC. — hokein / ViewSVN
  45. [clangd] A helper to find explicit references and their names

    Summary:
    Allows to simplify pending code tweaks:
      - the upcoming DefineInline tweak (D66647)
      - remove using declaration (D56612)
      - qualify name under cursor (D56610)

    Another potential future application is simplifying semantic highlighting.

    Reviewers: kadircet

    Reviewed By: kadircet

    Subscribers: mgrang, jfb, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67826 — ibiryukov / ViewSVN
  46. [AMDGPU][MC][DOC] Updated AMD GPU assembler description.

    Summary of changes:
    - Updated to reflect recent changes in assembler;
    - Minor bugfixing and improvements. — dpreobra / ViewSVN
  47. [DAG] Pull out minimum shift value calc into a helper function. NFCI. — rksimon / ViewSVN
  48. [llvm-readobj] - Simplify stack-sizes.test test case.

    This is a follow-up for D67757,
    which allows to describe .stack_sizes sections with a new
    YAML syntax.

    Differential revision: https://reviews.llvm.org/D67759 — grimar / ViewSVN
  49. [yaml2elf] - Support describing .stack_sizes sections using unique suffixes.

    Currently we can't use unique suffixes in section names to describe
    stack sizes sections. E.g. '.stack_sizes [1]' will be treated as a regular section.
    This happens because we recognize stack sizes section by name and
    do not yet drop the suffix before the check.

    The patch fixes it.

    Differential revision: https://reviews.llvm.org/D68018 — grimar / ViewSVN
  50. gn build: (manually) merge r372843 — nico / ViewSVN
  51. builtins test: Move clear_cache_test.c from a mprotect()ed global to a mmap()ed variable

    ld64 in the macOS 10.15 SDK gives __DATA a maxprot of 3, meaning it
    can't be made executable at runtime by default.

    Change clear_cache_test.c to use mmap()ed data that's mapped as writable
    and executable from the beginning, instead of trying to mprotect()ing a
    __DATA variable as executable. This fixes the test on macOS with the
    10.15 SDK.

    PR43407.

    Differential Revision: https://reviews.llvm.org/D67929 — nico / ViewSVN
  52. Add a release note for r372844 — hans / ViewSVN
  53. [yaml2obj] - Add a Size field for StackSizesSection.

    It is a follow-up requested in the review comment
    for D67757. Allows to use Content + Size or just Size
    when describing .stack_sizes sections in YAML document

    Differential revision: https://reviews.llvm.org/D67958 — grimar / ViewSVN
  54. Revert r370850 "Re-commit r363191 "[MS] Pretend constexpr variable template specializations are inline""

    This work-around was necessary to handle standard library headers in
    Visual Studio 2019 16.2. Now that 16.3 has shipped to stable, we can
    remove it.

    > Re-commit r363191 "[MS] Pretend constexpr variable template specializations are inline"
    >
    > While the next Visual Studio update (16.3) will fix this issue, that hasn't
    > shipped yet. Until then Clang wouldn't work with MSVC's headers which seems
    > unfortunate. Let's keep this in until VS 16.3 ships. (See also PR42843.)
    >
    >> 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 — hans / ViewSVN
  55. gn build: Merge r372841 — gnsyncbot / ViewSVN
  56. [clangd] Move the existing heder-source-switch implemenation out of clangdServer.

    Summary: This is a NFC change.

    Reviewers: kadircet

    Reviewed By: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67960 — hokein / ViewSVN
  57. [ARM] Ensure we do not attempt to create lsll #0

    During legalisation we can end up with some pretty strange nodes, like shifts
    of 0. We need to make sure we don't try to make long shifts of these, ending up
    with invalid assembly instructions. A long shift with a zero immediate actually
    encodes a shift by 32.

    Differential Revision: https://reviews.llvm.org/D67664 — dmgreen / ViewSVN
  58. [llvm-readobj] - Don't crash when dumping .stack_sizes and unable to find a relocation resolver.

    The crash might happen when we have either a broken or unsupported object
    and trying to resolve relocations when dumping the .stack_sizes section.

    For the test case I used a 32-bits ELF header and a 64-bit relocation.
    In this case a null pointer is returned by the code instead of the relocation
    resolver function and then we crash.

    Differential revision: https://reviews.llvm.org/D67962 — grimar / ViewSVN
  59. [OpenCL] Add image query builtin functions

    Add the image query builtin functions from the OpenCL C specification.

    Patch by Pierre Gondois and Sven van Haastregt.

    Differential Revision: https://reviews.llvm.org/D67713 — svenvh / ViewSVN
  60. Revert r372777: [libc++] Implement LWG 2510 and its follow-ups

    This also reverts:
    - r372778: [libc++] Implement LWG 3158
    - r372782: [libc++] Try fixing tests that fail on GCC 5 and older
    - r372787: Purge mentions of GCC 4 from the test suite

    Reason: the change breaks compilation of LLVM with libc++, for details see
    http://lists.llvm.org/pipermail/libcxx-dev/2019-September/000599.html — ibiryukov / ViewSVN
  61. Add tracing in pickNodeFromQueue.

    This matches GenericScheduler::pickNodeFromQueue, from which this
    function was mostly cut and pasted. — foad / ViewSVN
  62. Fix signature of overloaded operator delete.

    This overload was left over from an operator new that was removed in
    r123027. Fix it to match another operator new that was added in r248453. — foad / ViewSVN
  63. [clangd] Fix the stale documentation about background indexing.

    Reviewers: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D66937 — hokein / ViewSVN
  64. [AArch64] Convert neon_ushl and neon_sshl with positive constants to VSHL.

    I think we should be able to use shl instead of sshl and ushl for
    positive constant shift values, unless I am missing something.

    We already have the machinery in place to ensure we only replace
    nodes, if the shift value is positive and <= the element width.

    This is a generalization of an earlier patch rL372565.

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

    Reviewed By: anemet

    Differential Revision: https://reviews.llvm.org/D67955 — fhahn / ViewSVN
  65. [Driver] Always use -z separate-loadable-segments with lld on Fuchsia

    The option was added to lld in D67481/372807.

    Reviewed By: phosek

    Differential Revision: https://reviews.llvm.org/D68009 — maskray / ViewSVN
  66. [ADT] Add StringMap::insert_or_assign

    Summary: Similar to std::unordered_map::insert_or_assign

    Reviewers: alexshap, bkramer, dblaikie, lhames

    Subscribers: jkorous, dexonsmith, kristina, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67668 — maskray / ViewSVN
  67. [AArch64][GlobalISel] Tweak legalization rule for G_BSWAP to handle widening s16. — aemerson / ViewSVN
  68. [NFC] Add { } to silence compiler warning [-Wmissing-braces].

    /local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/lib/Object/MachOObjectFile.cpp:2731:7: warning: suggest braces around initialization of subobject [-Wmissing-braces]
          "i386",   "x86_64", "x86_64h",  "armv4t",  "arm",    "armv5e",
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          {
    1 warning generated.

    /local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:355:46: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        return addMappingFromTable<1>(MI, MRI, { 0 }, Table);
                                                 ^
                                                 {}
    1 warning generated.

    /local/mnt/workspace/huihuiz/llvm-comm-git-2/llvm-project/llvm/tools/llvm-objcopy/ELF/Object.cpp:400:57: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    static constexpr std::array<uint8_t, 4> ZlibGnuMagic = {'Z', 'L', 'I', 'B'};
                                                            ^~~~~~~~~~~~~~~~~~
                                                            {                 }
    1 warning generated. — huihuiz / ViewSVN
  69. [llvm-objcopy][test] Clean up -B tests

    -B is ignored for GNU objcopy compatibility after D67215/r371914.

    * Delete mentions of -B from input-output-target.test - we have enough -B tests.
    * Merge binary-input-with-arch.test into binary-output-target.test.

    Reviewed By: rupprecht

    Differential Revision: https://reviews.llvm.org/D67693 — maskray / ViewSVN
  70. [Powerpc][LoopPreIncPrep] NFC - refactor this pass for ds/dq form.

    Differential Revision: https://reviews.llvm.org/D67431 — shchenz / ViewSVN
  71. [x86] Adding support for some missing intrinsics: _castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64

    Summary:
    Adding support for some missing intrinsics:
    _castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64

    Reviewers: craig.topper, LuoYuanke, RKSimon, pengfei

    Reviewed By: RKSimon

    Subscribers: llvm-commits

    Patch by yubing (Bing Yu)

    Differential Revision: https://reviews.llvm.org/D67212 — pengfei / ViewSVN
  72. [Docs] Moves Reference docs to new page

    Moves Reference docs to new page. Also adds a table of contents to Getting Involved page. — dr87 / ViewSVN
  73. [WebAssembly][NFC] Remove duplicate SIMD instructions and predicates

    Summary:
    Instead of having different v128.load and v128.store instructions for
    each MVT, just have one of each that is reused in all the
    patterns. Also removes the HasSIMD128 predicate where accompanied by
    HasUnimplementedSIMD128, since the latter implies the former.

    Reviewers: aheejin, dschuff

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67930 — tlively / ViewSVN
  74. Use double quotes for LDFLAGS in -DLLVM_BUILD_INSTRUMENTED_COVERAGE

    Mimics the changes in r372209 to handle the change of quotes in
    r372226. Probably isn't sufficient for windows, but unbreaks the cmake
    flag at least. — Justin Bogner / ViewSVN
  75. [NFC] Invoke lipo from CMAKE_LIPO.

    This shouldn't change anything, except that a cmake cache file that specifies
    CMAKE_LIPO can specify an alternate lipo to use. — zer0 / ViewSVN
  76. [SCEV] Disable canonical expansion for non-affine addrecs.

    Reviewed By: apilipenko

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

    Patch by Evgeniy Brevnov (ybrevnov@azul.com) — apilipenko / ViewSVN
  77. [libc++] Purge mentions of GCC 4 from the test suite

    We don't support GCC 4 and older according to the documentation, so
    we should pretend it doesn't exist. — Louis Dionne / ViewSVN
  78. [BPF] Generate array dimension size properly for zero-size elements

    Currently, if an array element type size is 0, the number of
    array elements will be set to 0, regardless of what user
    specified. This implementation is done in the beginning where
    BTF is mostly used to calculate the member offset.

    For example,
      struct s {};
      struct s1 {
            int b;
            struct s a[2];
      };
      struct s1 s1;
    The BTF will have struct "s1" member "a" with element count 0.

    Now BTF types are used for compile-once and run-everywhere
    relocations and we need more precise type representation
    for type comparison. Andrii reported the issue as there
    are differences between original structure and BTF-generated
    structure.

    This patch made the change to correctly assign "2"
    as the number elements of member "a".
    Some dead codes related to ElemSize compuation are also removed.

    Differential Revision: https://reviews.llvm.org/D67979 — yhs / ViewSVN
  79. Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds.

    Second attempt: Now with ';' -> '|' replacement.

    On some platforms, certain runtimes are not supported. For runtimes builds of
    those platforms it would be nice if we could disable certain runtimes (ie
    libunwind on Windows).

    Differential Revision: https://reviews.llvm.org/D67195 — zer0 / ViewSVN
  80. [PGO][PGSO] ProfileSummary changes.

    (Split of off D67120)

    ProfileSummary changes for profile guided size optimization.

    Differential Revision: https://reviews.llvm.org/D67377 — yamauchi / ViewSVN
  81. [libc++] Try fixing tests that fail on GCC 5 and older — Louis Dionne / ViewSVN
  82. [libc++] Remove C++03 variadics in shared_ptr

        Summary: As suggested by @ldionne in D66178, this patch removes C++03 variadics //only//. Following patches will apply more updates.

        Reviewers: ldionne, EricWF, mclow.lists

        Subscribers: christof, dexonsmith, libcxx-commits, ldionne

        Tags: #libc

        Differential Revision: https://reviews.llvm.org/D67675 — zoecarver / ViewSVN
  83. [libc++] Implement LWG 3158

    Summary:
    LWG 3158 marks the allocator_arg_t constructor of std::tuple as
    conditionnally explicit based on whether the default constructors
    of the tuple's members are explicitly default constructible.

    Reviewers: EricWF, mclow.lists

    Subscribers: christof, jkorous, dexonsmith, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D65232 — Louis Dionne / ViewSVN
  84. [libc++] Implement LWG 2510

    Summary:
    LWG2510 makes tag types like allocator_arg_t explicitly default
    constructible instead of implicitly default constructible. It also
    makes the constructors for std::pair and std::tuple conditionally
    explicit based on the explicit-ness of the default constructibility
    for the pair/tuple's elements.

    Reviewers: mclow.lists, EricWF

    Subscribers: christof, jkorous, dexonsmith, libcxx-commits

    Tags: #libc

    Differential Revision: https://reviews.llvm.org/D65161 — Louis Dionne / ViewSVN
  85. [NFC] Strenghten preconditions for warning — xbolva00 / ViewSVN

#5489 (Sep 24, 2019 12:09:48 PM)

  1. [HIP] Support new kernel launching API

    Differential Revision: https://reviews.llvm.org/D67947 — yaxunl / ViewSVN
  2. Extends the expansion of the LWZtoc pseduo op for AIX.

    Differential Revision: https://reviews.llvm.org/D67853 — sfertile / ViewSVN
  3. [GCRelocate] Add a peephole to canonicalize base pointer relocation

    If we generate the gc.relocate, and then later prove two arguments to the statepoint are equivalent, we should canonicalize the gc.relocate to the form we would have produced if this had been known before rewriting. — reames / ViewSVN
  4. [X86] Add MMX MOVD/MOVQ stores to folding tables to support stack folding — rksimon / ViewSVN
  5. [InstCombine] (a+b) < a && (a+b) != 0 -> (0-b) < a iff a/b != 0 (PR43259)

    Summary:
    This is again motivated by D67122 sanitizer check enhancement.
    That patch seemingly worsens `-fsanitize=pointer-overflow`
    overhead from 25% to 50%, which strongly implies missing folds.

    For
    ```
    #include <cassert>
    char* test(char& base, signed long offset) {
      __builtin_assume(offset < 0);
      return &base + offset;
    }
    ```
    We produce

    https://godbolt.org/z/r40U47

    and again those two icmp's can be merged:
    ```
    Name: 0
    Pre: C != 0
      %adjusted = add i8 %base, C
      %not_null = icmp ne i8 %adjusted, 0
      %no_underflow = icmp ult i8 %adjusted, %base
      %r = and i1 %not_null, %no_underflow
    =>
      %neg_offset = sub i8 0, C
      %r = icmp ugt i8 %base, %neg_offset
    ```
    https://rise4fun.com/Alive/ALap
    https://rise4fun.com/Alive/slnN

    There are 3 other variants of this pattern,
    i believe they all will go into InstSimplify.

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

    Reviewers: spatel, xbolva00, nikic

    Reviewed By: spatel

    Subscribers: efriedma, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67849 — lebedevri / ViewSVN
  6. [InstCombine] (a+b) <= a && (a+b) != 0 -> (0-b) < a (PR43259)

    Summary:
    This is again motivated by D67122 sanitizer check enhancement.
    That patch seemingly worsens `-fsanitize=pointer-overflow`
    overhead from 25% to 50%, which strongly implies missing folds.

    This pattern isn't exactly what we get there
    (strict vs. non-strict predicate), but this pattern does not
    require known-bits analysis, so it is best to handle it first.

    ```
    Name: 0
      %adjusted = add i8 %base, %offset
      %not_null = icmp ne i8 %adjusted, 0
      %no_underflow = icmp ule i8 %adjusted, %base
      %r = and i1 %not_null, %no_underflow
    =>
      %neg_offset = sub i8 0, %offset
      %r = icmp ugt i8 %base, %neg_offset
    ```
    https://rise4fun.com/Alive/knp

    There are 3 other variants of this pattern,
    they all will go into InstSimplify:
    https://rise4fun.com/Alive/bIDZ

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

    Reviewers: spatel, xbolva00, nikic

    Reviewed By: spatel

    Subscribers: hiraditya, majnemer, vsk, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67846 — lebedevri / ViewSVN
  7. [X86] Add tests showing failure to stack fold MMX MOVD/MOVQ stores — rksimon / ViewSVN
  8. [TextAPI] Remove redundant checking causing warnings. NFC.

    - Minor coding format. — hliao / ViewSVN
  9. Regex: Make "match" and "sub" const member functions

    Summary:
    The Regex "match" and "sub" member functions were previously not "const"
    because they wrote to the "error" member variable. This commit removes
    those assignments, and instead assumes that the validity of the regex
    is already known after the initial compilation of the regular
    expression. As a result, these member functions were possible to make
    "const". This makes it easier to do things like pre-compile Regexes
    up-front, and makes "match" and "sub" thread-safe. The error status is
    now returned as an optional output, which also makes the API of "match"
    and "sub" more consistent with each other.

    Also, some uses of Regex that could be refactored to be const were made const.

    Patch by Nicolas Guillemot

    Reviewers: jankratochvil, thopre

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67241 — thopre / ViewSVN
  10. [yaml2obj/obj2yaml] - Add support for .stack_sizes sections.

    .stack_sizes is a SHT_PROGBITS section that contains pairs of
    <address (4/8 bytes), stack size (uleb128)>.

    This patch teach tools to parse and dump it.

    Differential revision: https://reviews.llvm.org/D67757 — grimar / ViewSVN
  11. [Compiler] Fix LLVM_NODISCARD for GCC

    Summary:
    This branch is currently dead since we don't use C++17.
    #if __cplusplus > 201402L && LLVM_HAS_CPP_ATTRIBUTE(nodiscard)
    #define LLVM_NODISCARD [[nodiscard]]

    This branch is Clang-only.
    #elif LLVM_HAS_CPP_ATTRIBUTE(clang::warn_unused_result)
    #define LLVM_NODISCARD [[clang::warn_unused_result]]


    While we could use gnu variant  [[gnu::warn_unused_result]], it is not ideal because it works only on functions.
    /home/xbolva00/LLVM/llvm/include/llvm/ADT/ArrayRef.h:41:24: warning: ‘warn_unused_result’ attribute only applies to function types [-Wattributes]

    GCC (checked 5,6,7,8) seems to enable [[nodiscard]] even in C++14 mode and does not produce warnings that nodiscard is C++17 feature. but Clang does - but we do not reach it due the code above. So it affects only GCC and does what we want.

    Reviewers: jfb, rsmith, echristo, aaron.ballman

    Reviewed By: aaron.ballman

    Subscribers: MaskRay, dexonsmith

    Differential Revision: https://reviews.llvm.org/D67663 — xbolva00 / ViewSVN
  12. [clang-format] [PR36858] Add missing .hh and .cs extensions from python support utilities

    Summary: https://bugs.llvm.org/show_bug.cgi?id=36858 identifies .hh as a missing C++ header extension file while making this change I realized there was no support for .cs files which were added recently

    Reviewers: pseyfert, klimek, owenpan

    Reviewed By: klimek

    Subscribers: cfe-commits

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D67949 — paulhoad / ViewSVN
  13. AggressiveAntiDepBreaker - silence static analyzer null dereference warning. NFCI.

    Assert that we've found the critical path. — rksimon / ViewSVN
  14. SafepointIRVerifier - silence static analyzer dyn_cast<Instruction> null dereference warnings. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<Instruction> directly and if not assert will fire for us. — rksimon / ViewSVN
  15. [COFF] Silence static analyzer null dereference warning. NFCI.

    Assert that the COFFSymbolRef is correct. — rksimon / ViewSVN
  16. Revert r372333: [DAG][X86] Convert isNegatibleForFree/GetNegatedExpression to a target hook (PR42863)

    Reason: this caused severe compile time regressions in JAX.
    See email thread  of original revision on llvm-commits for details:
    http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190923/697042.html — ibiryukov / ViewSVN
  17. [docs][llvm-strip][llvm-objcopy] Improve wording and fix highlighting — jhenderson / ViewSVN
  18. [clangd] Add semantic selection to ClangdLSPServer.

    Summary:
    This adds semantic selection to the LSP Server.
    Adds support for serialization of input request and the output reply.
    Also adds regression tests for the feature.

    Currently we do not support multi cursor.The LSP Server only accepts single position in the request as opposed to many position in the spec.

    Spec:
    https://github.com/microsoft/language-server-protocol/blob/dbaeumer/3.15/specification.md#textDocument_selectionRange

    Reviewers: hokein

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67720 — usaxena95 / ViewSVN
  19. [clangd] Save an unnecessary copy, NFC. — hokein / ViewSVN
  20. [docs][llvm-size] Fix typo — jhenderson / ViewSVN
  21. [Diagnostics] Handle tautological left shifts in boolean context — xbolva00 / ViewSVN
  22. [Orc] Silence static analyzer dyn_cast<ConstantInt> null dereference warning. NFCI. — rksimon / ViewSVN
  23. [llvm-objcopy] Fix a warningon unused variable. NFC. — hliao / ViewSVN
  24. ConstantFold - silence static analyzer dyn_cast<> null dereference warning. NFCI.

    Early out if the vector element is not Constant. — rksimon / ViewSVN
  25. Fix cppcheck "reduce variable scope" warning. NFCI. — rksimon / ViewSVN
  26. [IR] IntrinsicInst - silence static analyzer dyn_cast<> null dereference warnings. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<> directly and if not assert will fire for us. — rksimon / ViewSVN
  27. LoopVectorize - silence static analyzer dyn_cast<CmpInst> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<CmpInst> directly and if not assert will fire for us. — rksimon / ViewSVN
  28. [tblgen] Disable Leak detection for ASan/GCC and LSan/LLVM

    Summary: Add support for sanitizing TableGen.cpp with ASan/GCC and LSan/LLVM.

    Reviewers: fjricci, kcc, aaron.ballman, mgorny

    Reviewed By: fjricci

    Subscribers: jakubjelinek, llvm-commits, #llvm

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67908 — kamil / ViewSVN
  29. [TSAN] Add read/write range interface functions with PC

    Adding annotation function variants __tsan_write_range_pc and
    __tsan_read_range_pc to annotate ranged access to memory while providing a
    program counter for the access.

    Differential Revision: https://reviews.llvm.org/D66885 — jprotze / ViewSVN
  30. [SimplifyCFG] FoldTwoEntryPHINode - silence static analyzer null dereference warning. NFCI.

    Assert that we've found the DomBlock. — rksimon / ViewSVN
  31. SimplifyCFG - silence static analyzer dyn_cast<LandingPadInst> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<LandingPadInst> directly and if not assert will fire for us. — rksimon / ViewSVN
  32. SimplifyCFG - silence static analyzer dyn_cast<Instruction> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<Instruction> directly and if not assert will fire for us. — rksimon / ViewSVN
  33. [clangd] Collect macros in the preamble region of the main file

    Summary:
    - store all macro references in the ParsedAST;
    - unify the two variants of CollectMainFileMacros;

    Reviewers: ilya-biryukov

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67496 — hokein / ViewSVN
  34. [ModuloSchedule] KernelRewriter::rewrite - silence static analyzer dyn_cast<> null dereference warning. NFCI.

    Assert that we've found the start of the MI schedule list. — rksimon / ViewSVN
  35. [ARM] Split large widening MVE loads

    Similar to rL372717, we can force the splitting of extends of vector loads in
    MVE, in order to use the better widening loads as opposed to going through
    expensive extends. This adds a combine to early-on detect extends of loads and
    split the load in two, from where normal legalisation will kick in and we get a
    series of widening loads.

    Differential Revision: https://reviews.llvm.org/D67909 — dmgreen / ViewSVN
  36. lowerObjCCall - silence static analyzer dyn_cast<CallInst> null dereference warnings. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<CallInst> directly and if not assert will fire for us. — rksimon / ViewSVN
  37. [ARM] MVE sext and widen/narrow tests from larger types. NFC — dmgreen / ViewSVN
  38. [ARM] Split large truncating MVE stores

    MVE does not have a simple sign extend instruction that can move elements
    across lanes. We currently often end up moving each lane into and out of a GPR,
    in order to get elements into the correct places. When we have a store of a
    trunc (or a extend of a load), we can instead just split the store/load in two,
    using the narrowing/widening load/store instructions from each half of the
    vector.

    This does that for stores. It happens very early in a store combine, so as to
    easily detect the truncates. (It would be possible to do this later, but that
    would involve looking through a buildvector of extract elements. Not impossible
    but this way seemed simpler).

    By enabling store combines we also get a vmovdrr combine for free, helping some
    other tests.

    Differential Revision: https://reviews.llvm.org/D67828 — dmgreen / ViewSVN
  39. [clang-tidy][test] Add -fexceptions to bugprone-infinite-loop.test

    This fixes llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast.

    -fexceptions is disabled by default on XCore and PS4. — maskray / ViewSVN
  40. [modularize] Fix compilation warning after r372681

    In r372681 lang_cxx_11 and lang_cxx_14 were added to LanguageIDs
    but they were not handled in the switch in VisitLinkageSpecDecl in
    Modularize.cpp so at clang 8 complained with

    /data/repo/master/clang-tools-extra/modularize/Modularize.cpp:583:13: error: enumeration values 'lang_cxx_11' and 'lang_cxx_14' not handled in switch [-Werror,-Wswitch]
        switch (D->getLanguage()) {
                ^
    1 error generated.

    With this patch we now treat lang_cxx, lang_cxx_11 and lang_cxx_14 the
    same way in the switch in VisitLinkageSpecDecl. — uabelho / ViewSVN
  41. gn build: Merge r372712 — gnsyncbot / ViewSVN
  42. [llvm-objcopy] Refactor ELF-specific config out to ELFCopyConfig. NFC.

    Summary:
    This patch splits the command-line parsing into two phases:

    First, parse cross-platform options and leave ELF-specific options unparsed.

    Second, in the ELF implementation, parse ELF-specific options and construct ELFCopyConfig.

    Reviewers: espindola, alexshap, rupprecht, jhenderson, jakehehrlich, MaskRay

    Reviewed By: alexshap, jhenderson, jakehehrlich, MaskRay

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67139 — seiya / ViewSVN
  43. [clang-tidy] Add bugprone-infinite-loop.rst from D64736 to fix buildbot — maskray / ViewSVN
  44. MCRegisterInfo: Merge getLLVMRegNum and getLLVMRegNumFromEH

    Summary:
    The functions different in two ways:
    - getLLVMRegNum could return both "eh" and "other" dwarf register
      numbers, while getLLVMRegNumFromEH only returned the "eh" number.
    - getLLVMRegNum asserted if the register was not found, while the second
      function returned -1.

    The second distinction was pretty important, but it was very hard to
    infer that from the function name. Aditionally, for the use case of
    dumping dwarf expressions, we needed a function which can work with both
    kinds of number, but does not assert.

    This patch solves both of these issues by merging the two functions into
    one, returning an Optional<unsigned> value. While the same thing could
    be achieved by adding an "IsEH" argument to the (renamed)
    getLLVMRegNumFromEH function, it seemed better to avoid the confusion of
    two functions and put the choice of asserting into the hands of the
    caller -- if he checks the Optional value, he can safely process
    "untrusted" input, and if he blindly dereferences the Optional, he gets
    the assertion.

    I've updated all call sites to the new API, choosing between the two
    options according to the function they were calling originally, except
    that I've updated the usage in DWARFExpression.cpp to use the "safe"
    method instead, and added a test case which would have previously
    triggered an assertion failure when processing (incorrect?) dwarf
    expressions.

    Reviewers: dsanders, arsenm, JDevlieghere

    Subscribers: wdng, aprantl, javed.absar, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67154 — labath / ViewSVN
  45. [NFC] Update test after r372708 — xbolva00 / ViewSVN
  46. [Diagnostics] Do not diagnose unsigned shifts in boolean context (-Wint-in-bool-context)

    I was looking at old GCC's patch. Current "trunk" version avoids warning for unsigned case, GCC warns only for signed shifts. — xbolva00 / ViewSVN
  47. gn build: Merge r372706 — gnsyncbot / ViewSVN
  48. [clang-tidy] Add missing InfiniteLoopCheck.h, InfiniteLoopCheck.cpp and test from D64736 — maskray / ViewSVN
  49. [ASTImporter] 4th attempt to fix Windows buildbot test errors — martong / ViewSVN
  50. Revert rL372693 : [clang-tidy] New bugprone-infinite-loop check for detecting obvious infinite loops

    Finding infinite loops is well-known to be impossible (halting problem).
    However, it is possible to detect some obvious infinite loops, for example,
    if the loop condition is not changed. Detecting such loops is beneficial
    since the tests will hang on programs containing infinite loops so
    testing-time detection may be costly in large systems. Obvious cases are
    where the programmer forgets to increment/decrement the counter or
    increments/decrements the wrong variable.

    Differential Revision: https://reviews.llvm.org/D64736
    -------
    Broke some buildbots "No SOURCES given to target: obj.clangTidyBugproneModule" — rksimon / ViewSVN
  51. [Debuginfo] dbg.value points to undef value after Induction Variable Simplification.

    Induction Variable Simplification pass does not update dbg.value intrinsic.

    Before:

    %add = add nuw nsw i32 %ArgIndex.06, 1
    call void @llvm.dbg.value(metadata i32 %add, metadata !17, metadata !DIExpression())

    After:

    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
    call void @llvm.dbg.value(metadata i64 undef, metadata !17, metadata !DIExpression())

    There should be:

    %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
    call void @llvm.dbg.value(metadata i64 %indvars.iv.next, metadata !17, metadata !DIExpression())

    Differential Revision: https://reviews.llvm.org/D67770 — avl / ViewSVN
  52. sanitizer_common: fix freebsd build error

    Variable flags is not used. Remove it.

    Suggested-by: randall77 (Keith Randall)
    Review: https://reviews.llvm.org/D67928 — dvyukov / ViewSVN
  53. [LV] Forced vectorization with runtime checks and OptForSize

    When vectorisation is forced with a pragma, we optimise for min size, and we
    need to emit runtime memory checks, then allow this code growth and don't run
    in an assert like we currently do.

    This is the result of D65197 and D66803, and was a use-case not really
    considered before. If this now happens, we emit an optimisation remark warning
    about the code-size expansion, which can be avoided by not forcing
    vectorisation or possibly source-code modifications.

    Differential Revision: https://reviews.llvm.org/D67764 — sjoerdmeijer / ViewSVN
  54. [clang-tidy] New bugprone-infinite-loop check for detecting obvious infinite loops

    Finding infinite loops is well-known to be impossible (halting problem).
    However, it is possible to detect some obvious infinite loops, for example,
    if the loop condition is not changed. Detecting such loops is beneficial
    since the tests will hang on programs containing infinite loops so
    testing-time detection may be costly in large systems. Obvious cases are
    where the programmer forgets to increment/decrement the counter or
    increments/decrements the wrong variable.

    Differential Revision: https://reviews.llvm.org/D64736 — baloghadamsoftware / ViewSVN
  55. [clang-format] NFC clang-format the clang-format unit tests

    Summary:
    It is annoying that the clang-format tests aren't themselves clang-formatted, if you use a format on save option in VS or vim this file gets massively changed then you have to `git difftool` all the other changes back out, which is risky.

    I know people don't like mass clang-format changes but sometimes it becomes unmanageable to not. There are no other changes here other than just the reformat.

    clang-format tests all pass.

    ```
    [==========] 691 tests from 21 test cases ran. (55990 ms total)
    [  PASSED  ] 691 tests.
    ```

    Reviewers: klimek, owenpan, timwoj

    Reviewed By: owenpan

    Subscribers: cfe-commits

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D67888 — paulhoad / ViewSVN
  56. [ASTImporter] 3rd attempt to fix Windows buildbot test errors — martong / ViewSVN
  57. Revert "[static analyzer] Define __clang_analyzer__ macro in driver"

    This reverts commit fbd13570b0d5f92ef2cf6bcfe7cc2f6178500187. — Jan Korous / ViewSVN
  58. Revert "[lit] Add -D__clang_analyzer__ to clang_analyze_cc1"

    This reverts commit 4185460f758b98ea5b898c04c179704756ca8f53. — Jan Korous / ViewSVN
  59. Revert "[static analyzer][test] Test directly that driver sets D__clang_analyzer__"

    This reverts commit c7541903d72765a38808e9973572a8d50c9d94fb. — Jan Korous / ViewSVN
  60. Fix int to bool errors exposed due to r372612.
     
    Differential Revision: https://reviews.llvm.org/D67937
    M    lib/builtins/fp_add_impl.inc
    M    lib/builtins/fp_lib.h
    M    lib/builtins/fp_trunc_impl.inc — rdhindsa / ViewSVN
  61. [static analyzer][test] Test directly that driver sets D__clang_analyzer__

    Follow-up to fbd13570b0d — Jan Korous / ViewSVN
  62. [lit] Add -D__clang_analyzer__ to clang_analyze_cc1

    Fixup after fbd13570b0d — Jan Korous / ViewSVN
  63. Support for DWARF-5 C++ language tags.

    This patch provides support for DW_LANG_C_plus_plus_11,
    DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

    Patch by Sourabh Singh Tomar!
    Differential Revision: https://reviews.llvm.org/D67613

    Reapplies r372663 after adapting a failing test in the LLDB testsuite. — Adrian Prantl / ViewSVN
  64. [static analyzer] Remove --analyze-auto

    Differential Revision: https://reviews.llvm.org/D67934 — Jan Korous / ViewSVN
  65. [static analyzer] Define __clang_analyzer__ macro in driver

    Differential Revision: https://reviews.llvm.org/D67938 — Jan Korous / ViewSVN
  66. [InstCombine] Fold a shifty implementation of clamp-to-allones.

    Summary:
    Fold
    or(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X)
    into
    X s> Y ? -1 : X

    https://rise4fun.com/Alive/d8Ab

    clamp255 is a common operator in image processing, can be implemented
    in a shifty way "(255 - X) >> 31 | X & 255". Fold shift into select
    enables more optimization, e.g., vmin generation for ARM target.

    Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

    Reviewed By: lebedev.ri

    Subscribers: kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67800 — huihuiz / ViewSVN
  67. [InstCombine] Fold a shifty implementation of clamp-to-zero.

    Summary:
    Fold
    and(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X)
    into
    X s> Y ? X : 0

    https://rise4fun.com/Alive/lFH

    Fold shift into select enables more optimization,
    e.g., vmax generation for ARM target.

    Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

    Reviewed By: lebedev.ri

    Subscribers: xbolva00, andreadb, craig.topper, RKSimon, kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67799 — huihuiz / ViewSVN
  68. [GlobalISel][IRTranslator] Fix switch table lowering to use signed LE not unsigned.

    We were miscompiling switch value comparisons with the wrong signedness, which
    shows up when we have things like switch case values with i1 types, which end up
    being legalized incorrectly.

    Fixes PR43383 — aemerson / ViewSVN
  69. [llvm-cov] NFC: Specify a specific C++ standard in the test.

    Makes life easier for downstream users with customized default standard. — dergachev / ViewSVN
  70. [MemorySSA] Update Phi insertion.

    Summary:
    MemoryPhis may be needed following a Def insertion inthe IDF of all the
    new accesses added (phis + potentially a def). Ensure this also  occurs when
    only the new MemoryPhis are the defining accesses.

    Note: The need for computing IDF here is because of new Phis added with
    edges incoming from unreachable code, Phis that had previously been
    simplified. The preferred solution is to not reintroduce such Phis.
    This patch is the needed fix while working on the preferred solution.

    Reviewers: george.burgess.iv

    Subscribers: Prazek, sanjoy.google, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67927 — asbirlea / ViewSVN
  71. Revert "Support for DWARF-5 C++ language tags."

    This reverts commit bf9c8ffb54943c6d77398adbedddf05ef9724007. — Jonas Devlieghere / ViewSVN
  72. [NFC][InstCombine] Add tests for shifty implementation of clamping.

    Summary:
    Clamp negative to zero and clamp positive to allOnes are common
    operation in image saturation.

    Add tests for shifty implementation of clamping, as prepare work for
    folding:

    and(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X) --> X s> 0 ? X : 0;

    or(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X) --> X s> Y ? allOnes : X.

    Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67798 — huihuiz / ViewSVN
  73. [NFCI] Return PathSensitiveBugReport where appropriate

    Some compilers have trouble converting unique_ptr<PathSensitiveBugReport> to
    unique_ptr<BugReport> causing some functions to fail to compile.
    Changing the return type of the functions that fail to compile does not
    appear to have any issues.
    I ran into this issue building with clang 3.8 on Ubuntu 16.04. — xiaobai / ViewSVN
  74. HotColdSplitting: invalidate the AssumptionCache on split

    When a cold path is outlined, the value tracking in the assumption cache may be
    invalidated due to the code motion.  We would previously trip an assertion in
    subsequent passes (but required the passes to happen in a single run as the
    assumption cache is shared across the passes).  Invalidating the cache ensures
    that we get the correct information when needed with the legacy pass manager as
    well. — Saleem Abdulrasool / ViewSVN
  75. [llvm-lipo] Add support for archives

    Add support for creating universal binaries which
    can contain an archive.

    Differential revision: https://reviews.llvm.org/D67758

    Test plan: make check-all — alexshap / ViewSVN
  76. [SampleFDO] Treat names in profile as not cold only when profile symbol list
    is available

    In rL372232, we treated names showing up in profile as not cold when
    profile-sample-accurate is enabled. This caused 70k size regression in
    Chrome/Android. The patch put a guard and only enable the change when
    profile symbol list is available, i.e., keep the old behavior when profile
    symbol list is not available.

    Differential Revision: https://reviews.llvm.org/D67931 — wmi / ViewSVN
  77. [Diagnostics] Warn for enum constants in bool context (-Wint-in-bool-context; GCC compatibility)

    Extracted from D63082. — xbolva00 / ViewSVN
  78. Support for DWARF-5 C++ language tags.

    This patch provides support for DW_LANG_C_plus_plus_11,
    DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend.

    Patch by Sourabh Singh Tomar!
    Differential Revision: https://reviews.llvm.org/D67613 — Adrian Prantl / ViewSVN
  79. Fix uninitialized variable warning. NFCI. — rksimon / ViewSVN
  80. [X86] Reduce the number of unique check prefixes in memset-nonzero.ll. NFC

    The avx512 with prefer-256-bit generates the same code as AVX2 so
    just reuse that prefix. — ctopper / ViewSVN
  81. [WebAssembly] vNxM.load_splat instructions

    Summary:
    Adds the new load_splat instructions as specified at
    https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#load-and-splat.

    DAGISel does not allow matching multiple copies of the same load in a
    single pattern, so we use a new node in WebAssemblyISD to wrap loads
    that should be splatted.

    Depends on D67783.

    Reviewers: aheejin

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67784 — tlively / ViewSVN
  82. [InstCombine] foldOrOfICmps(): Acquire SimplifyQuery with set CxtI

    Extracted from https://reviews.llvm.org/D67849#inline-610377 — lebedevri / ViewSVN
  83. [InstCombine] foldAndOfICmps(): Acquire SimplifyQuery with set CxtI

    Extracted from https://reviews.llvm.org/D67849#inline-610377 — lebedevri / ViewSVN
  84. [WebAssembly] Remove unused memory instructions and patterns

    Summary:
    Removes duplicated SIMD loads and store instructions and removes
    patterns involving GlobalAddresses that were not used in any tests.

    Reviewers: aheejin, sunfish

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67783 — tlively / ViewSVN
  85. [InstCombine] Annotate strndup calls with dereferenceable_or_null

    "Implementations are free to malloc() a buffer containing either (size + 1) bytes or (strnlen(s, size) + 1) bytes. Applications should not assume that strndup() will allocate (size + 1) bytes when strlen(s) is smaller than size." — xbolva00 / ViewSVN
  86. [ASTImporter] 2nd attempt to fix Windows buildbot test errors — martong / ViewSVN
  87. [X86] Use TargetConstant for condition code on X86ISD::SETCC/CMOV/BRCOND nodes.

    This removes the need for ConvertToTarget opcodes in the isel table.
    It's also consistent with the recent changes to use TargetConstant
    for intrinsic nodes that always take immediates.

    Differential Revision: https://reviews.llvm.org/D67902 — ctopper / ViewSVN
  88. [TableGen] Emit OperandType enums for RegisterOperands/RegisterClasses

    https://reviews.llvm.org/D66773

    The OpTypes::OperandType was creating an enum for all records that
    inherit from Operand, but in reality there are operands for instructions
    that inherit from other types too. In particular, RegisterOperand and
    RegisterClass. This commit adds those types to the list of operand types
    that are tracked by the OperandType enum.

    Patch by: nlguillemot — aditya_nandakumar / ViewSVN
  89. [Sema] Fix the atomic expr rebuilding order.

    Summary:
    - Rearrange the atomic expr order to the API order when rebuilding
      atomic expr during template instantiation.

    Reviewers: erichkeane

    Subscribers: jfb, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67924 — hliao / ViewSVN
  90. [IR] Add getExtendedType() to IntegerType and Type (dispatching to IntegerType or VectorType) — lebedevri / ViewSVN
  91. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): improve comment — lebedevri / ViewSVN
  92. [SLC] Convert some strndup calls to strdup calls

    Summary:
    Motivation:
    - If we can fold it to strdup, we should (strndup does more things than strdup).
    - Annotation mechanism. (Works for strdup well).

    strdup and strndup are part of C 20 (currently posix fns), so we should optimize them.

    Reviewers: efriedma, jdoerfert

    Reviewed By: jdoerfert

    Subscribers: lebedev.ri, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67679 — xbolva00 / ViewSVN
  93. [OPENMP]Use standard parsing for 'match' clause, NFC.

    Reused standard clauses parsing scheme for parsing/matching 'match'
    clause in 'declare variant' directive. — abataev / ViewSVN
  94. [ASTImporter] Attempt to fix Windows buildbot test errors — martong / ViewSVN
  95. [libc++] Mark CTAD tests as not failing on AppleClang 10.0.1

    They do fail on AppleClang 10.0.0, but not AppleClang 10.0.1 — Louis Dionne / ViewSVN
  96. NFC: Fix a poorly-written test

    The author of r364954 foolishly forgot that == binds tighter than ?: — epilk / ViewSVN
  97. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask (PR42563)

    Summary:
    If we have a pattern `(x & (-1 >> maskNbits)) << shiftNbits`,
    we already know (have a fold) that will drop the `& (-1 >> maskNbits)`
    mask iff `(shiftNbits-maskNbits) s>= 0` (i.e. `shiftNbits u>= maskNbits`).

    So even if `(shiftNbits-maskNbits) s< 0`, we can still
    fold, we will just need to apply a **constant** mask afterwards:
    ```
    Name: c, normal+mask
      %t0 = lshr i32 -1, C1
      %t1 = and i32 %t0, %x
      %r = shl i32 %t1, C2
    =>
      %n0 = shl i32 %x, C2
      %n1 = i32 ((-(C2-C1))+32)
      %n2 = zext i32 %n1 to i64
      %n3 = lshr i64 -1, %n2
      %n4 = trunc i64 %n3 to i32
      %r = and i32 %n0, %n4
    ```
    https://rise4fun.com/Alive/gslRa

    Naturally, old `%masked` will have to be one-use.
    This is not valid for pattern f - where "masking" is done via `ashr`.

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

    Reviewers: spatel, nikic, xbolva00

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67725 — lebedevri / ViewSVN
  98. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563)

    Summary:
    And this is **finally** the interesting part of that fold!

    If we have a pattern `(x & (~(-1 << maskNbits))) << shiftNbits`,
    we already know (have a fold) that will drop the `& (~(-1 << maskNbits))`
    mask iff `(maskNbits+shiftNbits) u>= bitwidth(x)`.
    But that is actually ignorant, there's more general fold here:

    In this pattern, `(maskNbits+shiftNbits)` actually correlates
    with the number of low bits that will remain in the final value.
    So even if `(maskNbits+shiftNbits) u< bitwidth(x)`, we can still
    fold, we will just need to apply a **constant** mask afterwards:
    ```
    Name: a, normal+mask
      %onebit = shl i32 -1, C1
      %mask = xor i32 %onebit, -1
      %masked = and i32 %mask, %x
      %r = shl i32 %masked, C2
    =>
      %n0 = shl i32 %x, C2
      %n1 = add i32 C1, C2
      %n2 = zext i32 %n1 to i64
      %n3 = shl i64 -1, %n2
      %n4 = xor i64 %n3, -1
      %n5 = trunc i64 %n4 to i32
      %r = and i32 %n0, %n5
    ```
    https://rise4fun.com/Alive/F5R

    Naturally, old `%masked` will have to be one-use.
    Similar fold exists for patterns c,d,e, will post patch later.

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

    Reviewers: spatel, nikic, xbolva00

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67677 — lebedevri / ViewSVN
  99. [BreakFalseDeps] ignore function with minsize attribute

    This came up in the x86-specific:
    https://bugs.llvm.org/show_bug.cgi?id=43239
    ...but it is a general problem for the BreakFalseDeps pass.
    Dependencies may be broken by adding some other instruction,
    so that should be avoided if the overall goal is to minimize size.

    Differential Revision: https://reviews.llvm.org/D67363 — spatel / ViewSVN
  100. [SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!")

    Summary:
    Initially SLP vectorizer replaced all going-to-be-vectorized
    instructions with Undef values. It may break ScalarEvaluation and may
    cause a crash.
    Reworked SLP vectorizer so that it does not replace vectorized
    instructions by UndefValue anymore. Instead vectorized instructions are
    marked for deletion inside if BoUpSLP class and deleted upon class
    destruction.

    Reviewers: mzolotukhin, mkuper, hfinkel, RKSimon, davide, spatel

    Subscribers: RKSimon, Gerolf, anemet, hans, majnemer, llvm-commits, sanjoy

    Differential Revision: https://reviews.llvm.org/D29641 — abataev / ViewSVN

#5487 (Sep 23, 2019 9:20:30 AM)

  1. [Clang-doc] NFC: Fixed link to llvm bugs in documentation — sureyeaah / ViewSVN
  2. [InstCombine] foldUnsignedUnderflowCheck(): s/Subtracted/ZeroCmpOp/ — lebedevri / ViewSVN
  3. Fix __is_fundamental to accept nullptr_t

        Summary: This patch updates the __is_fundamental builtin type trait to return true for nullptr_t.

        Reviewers: rsmith, EricWF, efriedma, craig.topper, erichkeane

        Subscribers: cfe-commits

        Tags: #clang

        Differential Revision: https://reviews.llvm.org/D67899 — zoecarver / ViewSVN
  4. [OPENMP]Fix PR43355: DO not emit target calls if only -fopenmp-targets
    is not provided.

    We should not emit any target-dependent code if only -fopenmp flag is
    used and device targets are not provided to prevent compiler crash. — abataev / ViewSVN
  5. [AMDGPU][MC] Corrected handling of relocatable expressions

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

    Reviewers: rampitec

    Differential Revision: https://reviews.llvm.org/D67829 — dpreobra / ViewSVN
  6. Fix __is_signed builtin

        Summary: This patch fixes the __is_signed builtin type trait to work with floating point types and enums. Now, the builtin will return true if it is passed a floating point type and false for an enum type.

        Reviewers: EricWF, rsmith, erichkeane, craig.topper, efriedma

        Subscribers: cfe-commits

        Tags: #clang

        Differential Revision: https://reviews.llvm.org/D67897 — zoecarver / ViewSVN
  7. [libc++] Mark iostreams test as XFAIL on older macOSes — Louis Dionne / ViewSVN
  8. HexagonLoopIdiomRecognition - silence static analyzer dyn_cast<> null dereference warnings. NFCI. — rksimon / ViewSVN
  9. [TextAPI] Add New Supported Platforms

    Summary: This patch introduces simulators, as well was the restriced zippered and macCatalyst to supported platforms

    Reviewers: ributzka, steven_wu

    Reviewed By: ributzka

    Subscribers: hiraditya, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67528 — cishida / ViewSVN
  10. [clangd] Simplify the callside of URI::resolve, NFC.

    Summary:
    - Add a overrloded URI::resolve, which accepts a string URI;
    - also fixed some callside that don't check the error;

    Reviewers: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67916 — hokein / ViewSVN
  11. [Hexagon] Bitcast v4i16 to v8i8, unify no-op casts between scalar and HVX — kparzysz / ViewSVN
  12. [docs] Fix some typos in InternalsManual — svenvh / ViewSVN
  13. [Alignment][NFC] Migrate Instructions to Align

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67917 — gchatelet / ViewSVN
  14. [Diagnostics] Warn if '<<' in bool context with -Wint-in-bool-context (GCC compatibility)

    Extracted from D63082, addressed review comments related to a warning message. — xbolva00 / ViewSVN
  15. Fix test atomic-expr.cpp after R372422

    The test tried to match a path in a printout by doing '^:' which failed
    on windows, since C:\... is a path. — erichkeane / ViewSVN
  16. [llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library

    Modify LLVMConfig to produce LLVM_USE_CRT variables in build-directory. It helps to set the same compiler debug options like in builded library.

    Committed on behalf of @igorban (Igor)

    Differential Revision: https://reviews.llvm.org/D67175 — rksimon / ViewSVN
  17. [OPENMP]Call __kmpc_push_tripcount in task context.

    Runtime function __kmpc_push_tripcount better to call inside of the task
    context for target regions. Otherwise, the libomptarget is unable to
    link the provided tripcount value for nowait target regions and
    completely looses this information. — abataev / ViewSVN
  18. Added a test for agreement between paths used in ClangTidy's diagnostics and header filter

    This test would have been broken by r372388. — gribozavr / ViewSVN
  19. [x86] fix assert with horizontal math + broadcast of vector (PR43402)

    https://bugs.llvm.org/show_bug.cgi?id=43402 — spatel / ViewSVN
  20. [libTooling] Add `access` and `ifBound` combinators to Stencil library.

    Summary:
    This revision add the `access` and `ifBound` combinators to the Stencil library:
    * `access` -- constructs an idiomatic expression for accessing a member (a
      `MemberExpr`).
    * `ifBound` -- chooses between two `StencilParts` based on the whether an id is
      bound in the match (corresponds to the combinator of the same name in
      RangeSelector).

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67633 — ymandel / ViewSVN
  21. [ValueTracking] Remove unused matchSelectPattern optional argument. NFCI.

    The matchSelectPattern const wrapper is never explicitly called with the optional Instruction::CastOps argument, and it turns out that it wasn't being forwarded to matchSelectPattern anyway!

    Noticed while investigating clang static analyzer warnings. — rksimon / ViewSVN
  22. [ValueTracking] Fix uninitialized variable warnings in matchSelectPattern const wrapper. NFCI.

    Static analyzer complains about const_cast uninitialized variables, we should explicitly set these to null.

    Ideally that const wrapper would go away though....... — rksimon / ViewSVN
  23. llvm-undname: Add support for demangling typeinfo names

    typeinfo names aren't symbols but string constant contents
    stored in compiler-generated typeinfo objects, but llvm-cxxfilt
    can demangle these for Itanium names.

    In the MSVC ABI, these are just a '.' followed by a mangled
    type -- this means they don't start with '?' like all MS-mangled
    symbols do.

    Differential Revision: https://reviews.llvm.org/D67851 — nico / ViewSVN
  24. Revert "[clang-tidy] Fix relative path in header-filter."

    This reverts commit r372388. It made '-header-filter' inconsistent with
    paths printed in diagnostics. — gribozavr / ViewSVN
  25. [Diagnostics] Avoid -Wsizeof-array-div when dividing the size of a nested array by the size of the deepest base type — xbolva00 / ViewSVN
  26. Cosmetic; don't use the magic constant 35 when HASH is more readable. This matches other MCK__<THING>_* usage better.

    Summary: No functional change. This fixes a magic constant in MCK__*_... macros only.

    Reviewers: ostannard

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67840 — markrvmurray / ViewSVN
  27. Function::BuildLazyArguments() - fix "variable used but never read" analyzer warning. NFCI.

    Simplify the code by separating the masking of the SDC variable from using it. — rksimon / ViewSVN
  28. gn build: Merge r372595 — gnsyncbot / ViewSVN
  29. [Alignment][NFC] DataLayout migration to llvm::Align

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: jholewinski, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67914 — gchatelet / ViewSVN
  30. [libTooling] Introduce new library of source-code builders.

    Summary:
    Introduces facilities for easily building source-code strings, including
    idiomatic use of parentheses and the address-of, dereference and member-access
    operators (dot and arrow) and queries about need for parentheses.

    Reviewers: gribozavr

    Subscribers: mgorny, cfe-commits, ilya-biryukov

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67632 — ymandel / ViewSVN
  31. Removed dead code from Stencil.h — gribozavr / ViewSVN
  32. Removed an incorred namespace-end comment — gribozavr / ViewSVN
  33. [Alignment] Get DataLayout::StackAlignment as Align

    Summary:
    Internally it is needed to know if StackAlignment is set but we can
    expose it as llvm::Align.

    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67852 — gchatelet / ViewSVN
  34. Localizer - fix "variable used but never read" analyzer warning. NFCI.

    Simplify the code by separating the modification of the Changed variable from returning it. — rksimon / ViewSVN
  35. TargetInstrInfo::getStackSlotRange - fix "variable used but never read" analyzer warning. NFCI.

    We don't need to divide the BitSize local variable at all. — rksimon / ViewSVN
  36. gn build: Merge r372564 — gnsyncbot / ViewSVN
  37. Revert "Reland "[utils] Implement the llvm-locstats tool""

    This reverts commit rL372554. — djtodoro / ViewSVN
  38. [llvm-readobj] - Stop treating ".stack_sizes.*" sections as stack sizes sections.

    llvm-readobj currently handles .stack_sizes.* (e.g. .stack_sizes.foo)
    as a normal stack sizes section. Though MC does not produce sections with
    such names. Also, linkers do not combine .stack_sizes.* into .stack_sizes.

    A mini discussion about this correctness issue is here: https://reviews.llvm.org/D67757#inline-609274
    This patch changes implementation so that only now only '.stack_sizes' name is
    accepted as a real stack sizes section.

    Differential revision: https://reviews.llvm.org/D67824 — grimar / ViewSVN
  39. CriticalAntiDepBreaker - Assert that we've found the bottom of the critical path. NFCI.

    Silences static analyzer null dereference warnings. — rksimon / ViewSVN
  40. [llvm-readobj] - Implement LLVM-style dumping for .stack_sizes sections.

    D65313 implemented GNU-style dumping (llvm-readelf).
    This one implements LLVM-style dumping (llvm-readobj).

    Differential revision: https://reviews.llvm.org/D67834 — grimar / ViewSVN
  41. [NFC] Fixed clang wasm test after rL372573

    These tests should not depend on -O1.. — xbolva00 / ViewSVN
  42. [FunctionAttrs] Enable nonnull arg propagation

    Enable flag introduced in rL294998. Security concerns are no longer valid, since function signatures for mentioned libc functions has no nonnull attribute (Clang does not generate them? I see no nonnull attr in LLVM IR for these functions) and since rL372091 we carefully annotate the callsites where we know that size is static, non zero. So let's enable this flag again.. — xbolva00 / ViewSVN
  43. [ARM][MVE] Remove old tail predicates

    Remove any predicate that we replace with a vctp intrinsic, and try
    to remove their operands too. Also look into the exit block to see if
    there's any duplicates of the predicates that we've replaced and
    clone the vctp to be used there instead.

    Differential Revision: https://reviews.llvm.org/D67709 — sam_parker / ViewSVN
  44. [AArch64] support neon_sshl and neon_ushl in performIntrinsicCombine.

    Try to generate ushll/sshll for aarch64_neon_ushl/aarch64_neon_sshl,
    if their first operand is extended and the second operand is a constant

    Also adds a few tests marked with FIXME, where we can further increase
    codegen.

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

    Reviewed By: anemet

    Differential Revision: https://reviews.llvm.org/D62308 — fhahn / ViewSVN
  45. [ASTImporter][NFC] Add comprehensive tests for ODR violation handling strategies

    Summary:
    In this patch we provide additional and comprehensive tests for the ODR
    handling strategies. This is the continuation of
    https://reviews.llvm.org/D59692.

    Reviewers: shafik, a_sidorin, balazske, a.sidorin

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D66951 — martong / ViewSVN
  46. [Alignment] fix build — gchatelet / ViewSVN
  47. [ARM][LowOverheadLoops] Use subs during revert.

    Check whether there are any uses or defs between the LoopDec and
    LoopEnd. If there's not, then we can use a subs to set the cpsr and
    skip generating a cmp.

    Differential Revision: https://reviews.llvm.org/D67801 — sam_parker / ViewSVN
  48. [Alignment][NFC] Switch DataLayout private members to llvm::Align

    Summary:
    This is patch is part of a series to introduce an Alignment type.
    See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
    See this patch for the introduction of the type: https://reviews.llvm.org/D64790

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67836 — gchatelet / ViewSVN
  49. [ARM][LowOverheadLoops] Use tBcc when reverting

    Check the branch target ranges and use a tBcc instead of t2Bcc when
    we can.

    Differential Revision: https://reviews.llvm.org/D67796 — sam_parker / ViewSVN
  50. [MIPS GlobalISel] VarArg argument lowering, select G_VASTART and vacopy

    CC_Mips doesn't accept vararg functions for O32, so we have to explicitly
    use CC_Mips_FixedArg.
    For lowerCall we now properly figure out whether callee function is vararg
    or not, this has no effect for O32 since we always use CC_Mips_FixedArg.
    For lower formal arguments we need to copy arguments in register to stack
    and save pointer to start for argument list into MipsMachineFunction
    object so that G_VASTART could use it during instruction select.
    For vacopy we need to copy content from one vreg to another,
    load and store are used for that purpose.

    Differential Revision: https://reviews.llvm.org/D67756 — petar.avramovic / ViewSVN
  51. Reland "[utils] Implement the llvm-locstats tool"

    The tool reports verbose output for the DWARF debug location coverage.
    The llvm-locstats for each variable or formal parameter DIE computes what
    percentage from the code section bytes, where it is in scope, it has
    location description. The line 0 shows the number (and the percentage) of
    DIEs with no location information, but the line 100 shows the number (and
    the percentage) of DIEs where there is location information in all code
    section bytes (where the variable or parameter is in the scope). The line
    50..59 shows the number (and the percentage) of DIEs where the location
    information is in between 50 and 59 percentage of its scope covered.

    Differential Revision: https://reviews.llvm.org/D66526 — djtodoro / ViewSVN
  52. Revert "Extension: Mark the default constructor of chrono::duration as conditionally noexcept"; this breaks the gcc5 bot for C++11

    This reverts commit c8ca15c95c4c0d6d1356500d5fe49a319ea4ca01. — marshall / ViewSVN
  53. [X86] Canonicalize all zeroes vector to RHS in X86DAGToDAGISel::tryVPTESTM. — ctopper / ViewSVN
  54. [X86] Remove SETEQ/SETNE canonicalization code from LowerIntVSETCC_AVX512 to prevent an infinite loop.

    The attached test case would previous infinite loop after
    r365711.

    I'm going to move this to X86ISelDAGToDAG.cpp to get the setcc
    to match VPTEST in 32-bit mode in a follow up commit. — ctopper / ViewSVN
  55. [X86] Add 32-bit command line to avx512f-vec-test-testn.ll — ctopper / ViewSVN
  56. For P0784R7: add further testing of requirements on constexpr
    destructors. — rsmith / ViewSVN
  57. Prefer AVX512 memcpy when applicable

    When AVX512 is available and the preferred vector width is 512-bits or
    more, we should prefer AVX512 for memcpy().

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

    https://reviews.llvm.org/D67874 — davezarzycki / ViewSVN
  58. Extension: Mark the default constructor of chrono::duration as conditionally noexcept — marshall / ViewSVN
  59. For P0784R7: add support for constexpr destructors, and call them as
    appropriate during constant evaluation.

    Note that the evaluator is sometimes invoked on incomplete expressions.
    In such cases, if an object is constructed but we never reach the point
    where it would be destroyed (and it has non-trivial destruction), we
    treat the expression as having an unmodeled side-effect. — rsmith / ViewSVN
  60. [X86] Convert to Constant arguments to MMX shift by i32 intrinsics to TargetConstant during lowering.

    This allows us to use timm in the isel table which is more
    consistent with other intrinsics that take an immediate now.

    We can't declare the intrinsic as taking an ImmArg because we
    need to match non-constants to the shift by MMX register
    instruction which we do by mutating the intrinsic id during
    lowering. — ctopper / ViewSVN
  61. [X86] Remove stale FIXME.

    This goes back to when MMX was migrated to intrinsic only. The
    hack referenced here has been gone for quite a while. — ctopper /