collapse
20%
WDescription%
Build stability: 4 out of the last 5 builds failed.20
Build History
x
 
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems
 Identified problems

Changes

#14892 (Oct 15, 2019 2:19:09 PM)

  1. [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 / detail
  2. [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 / detail
  3. [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 / detail
  4. [llvm-lipo] Add missing cast

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

    Test plan: make check-all — alexshap / detail
  5. 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 / detail
  6. [OPENMP]Fix comments/params, NFC. — abataev / detail
  7. [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 / detail
  8. [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 / detail
  9. [Concept] Associated Constraints Infrastructure

    Add code to correctly calculate the associated constraints of a template (no enforcement yet).
    D41284 on Phabricator. — saar.raz / detail
  10. [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 / detail
  11. Fix as-w-option.c on Windows where no assembler exists — rnk / detail
  12. 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 / detail
  13. Added support for "#pragma clang section relro=<name>"

    Differential Revision: https://reviews.llvm.org/D68806 — dmikulin / detail
  14. [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 / detail
  15. [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 / detail
  16. [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 / detail
  17. [test] Update YAML mapping in VirtualFileSystemTest

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

    Accidentally committed debug print. — Jan Korous / detail
  19. [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 / detail
  20. [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 / detail
  21. Reland [Driver] Fix -working-directory issues

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

    This reverts commit 999f8a7416f8edc54ef92e715fd23c532bcc74d4. — Jan Korous / detail
  22. [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 / detail
  23. [X86] Make memcmp() use PTEST if possible and also enable AVX1 — davezarzycki / detail
  24. 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 / detail
  25. [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 / detail
  26. [MemorySSA] Update DomTree before applying MSSA updates.

    Update on the fix in rL374850. — asbirlea / detail
  27. [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 / detail
  28. [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 / detail
  29. [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 / detail

#14881 (Oct 14, 2019 1:48:45 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 / detail
  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 / detail
  3. [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 / detail

#14880 (Oct 13, 2019 9:22:41 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 / detail
  2. convert another test to unix line endings — nico / detail
  3. convert a test to unix line endings — nico / detail
  4. fix typo in 374747 — nico / detail
  5. 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 / detail
  6. [X86] Autogenerate complete checks. NFC — ctopper / detail
  7. Make symbols.test pass on Windows.

    See commit message of r374746 for details.

    Hopefully final bit of PR43592. — nico / detail
  8. 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 / detail
  9. 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 / detail

#14879 (Oct 13, 2019 4:58:25 PM)

  1. [NewGVN] Use m_Br to simplify code a bit. (NFC) — fhahn / detail
  2. 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 / detail
  3. 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 / detail
  4. merge-request.sh: Update 9.0 metabug for 9.0.1 — atanasyan / detail
  5. Set a default build directory in the LLVMBuildFactory and then properly use it. — gkistanova / detail
  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 / detail
  7. Remove build directory for each build on clang-x86_64-debian-fast. — gkistanova / detail
  8. [Attributor][FIX] NullPointerIsDefined needs the pointer AS (AANonNull)

    Also includes a shortcut via AADereferenceable if possible. — jdoerfert / detail
  9. [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 / detail
  10. [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 / detail
  11. [NFC][InstCombine] Some preparatory cleanup in dropRedundantMaskingOfLeftShiftInput() — lebedevri / detail
  12. [Docs] Moves Control Flow Document to User Guides

    Moves Control Flow document from Reference docs page to User guides page. — dr87 / detail
  13. [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 / detail

#14878 (Oct 13, 2019 12:33:25 PM)

  1. [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 / detail
  2. Add missing "REQUIRES: shell" to system-include-extractor.test

    Part of PR43592. — nico / detail
  3. [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 / detail
  4. [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 / detail
  5. 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 / detail
  6. [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 / detail
  7. [X86] SimplifyMultipleUseDemandedBitsForTargetNode - use getTargetShuffleInputs with KnownUndef/Zero results. — rksimon / detail
  8. [X86] getTargetShuffleInputs - add KnownUndef/Zero output support

    Adjust SimplifyDemandedVectorEltsForTargetNode to use the known elts masks instead of recomputing it locally. — rksimon / detail
  9. [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 / detail
  10. [libc++][test] <=> now has a feature-test macro

    ...which `test/support/test_macros.h` can use to detect compiler support. — caseycarter / detail
  11. gn build: (manually) merge r374720 — nico / detail

#14877 (Oct 13, 2019 7:38:58 AM)

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

    relanding {D68554} with fixed lit tests, checked on Windows and MacOS — paulhoad / detail
  2. [X86][AVX] Add i686 avx splat tests — rksimon / detail
  3. 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 / detail
  4. 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 / detail
  5. 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 / detail
  6. [clang-tidy] bugprone-not-null-terminated-result: checker adjustments 4 — charusso / detail
  7. [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 / detail
  8. [clang-tidy] bugprone-not-null-terminated-result: checker adjustments 2 — charusso / detail

#14876 (Oct 13, 2019 2:38:28 AM)

  1. [clang-tidy] bugprone-not-null-terminated-result: checker adjustments — charusso / detail
  2. [clang-tidy] bugprone-not-null-terminated-result: Sphinx adjustments 2 — charusso / detail
  3. [clang-tidy] bugprone-not-null-terminated-result: Sphinx adjustments — charusso / detail
  4. gn build: Merge r374707 — gnsyncbot / detail
  5. [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 / detail
  6. [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 / detail
  7. [X86] Enable v4i32->v4i16 and v8i16->v8i8 saturating truncates to use pack instructions with avx512. — ctopper / detail
  8. [X86] Add v2i64->v2i32/v2i16/v2i8 test cases to the trunc packus/ssat/usat tests. NFC — ctopper / detail
  9. [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 / detail
  10. [Attributor][FIX] Remove leftover, now unused, variable — jdoerfert / detail

#14875 (Oct 12, 2019 10:07:10 PM)

  1. [Attributor] Remove unused verification flag

    We use the verify max iteration now which is more reliable. — jdoerfert / detail
  2. [Attributor][NFC] Expose call site traversal without QueryingAA — jdoerfert / detail
  3. [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 / detail
  4. [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 / detail
  5. UnifiedTreeBuilder code cleaning. NFC. — gkistanova / detail
  6. [Attributor][FIX] Add missing function declaration in test case — jdoerfert / detail
  7. Incremental. — gkistanova / detail
  8. [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 / detail
  9. NFC. Few cosmetic changes. — gkistanova / detail
  10. [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 / detail
  11. Changed clang-x86_64-debian-fast builder to use UnifiedTreeBuilder. — gkistanova / detail
  12. Removed some default cmake options which doesn't seem worth being default from UnifiedTreeBuilder.addCmakeSteps. — gkistanova / detail
  13. Do not set default cmake options in CmakeCommand. — gkistanova / detail

#14874 (Oct 12, 2019 5:42:29 PM)

  1. 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 / detail
  2. gn build: (manually) merge r374663 — nico / detail

#14873 (Oct 12, 2019 1:17:24 PM)

  1. [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 / detail
  2. Revert r374648: "Reland r374388: [lit] Make internal diff work in pipelines"

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

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

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

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

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

    This series of patches still breaks a Windows bot. — jdenny / detail
  8. 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 / detail
  9. Revert r374666: "[lit] Adjust error handling for decode introduced by r374665"

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

    This series of patches still breaks a Windows bot. — jdenny / detail
  11. [X86] scaleShuffleMask - use size_t Scale to avoid overflow warnings — rksimon / detail
  12. SymbolRecord - consistently use explicit for single operand constructors — rksimon / detail
  13. SymbolRecord - fix uninitialized variable warnings. NFCI. — rksimon / detail
  14. [lit] Try errors="ignore" for decode introduced by r374665

    Still trying to fix the same error as in r374666. — jdenny / detail
  15. [NFC][LoopIdiom] Adjust FIXME to be self-explanatory — lebedevri / detail
  16. Replace for-loop of SmallVector::push_back with SmallVector::append. NFCI. — rksimon / detail
  17. Fix cppcheck shadow variable name warnings. NFCI. — rksimon / detail
  18. [X86] Use any_of/all_of patterns in shuffle mask pattern recognisers. NFCI. — rksimon / detail
  19. [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 / detail
  20. [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 / detail
  21. Revert r374657: "[lit] Try again to fix new tests that fail on Windows bots" — jdenny / detail

#14869 (Oct 11, 2019 11:41:42 PM)

  1. [lit] Remove setting of the target-windows feature

    No other OSes use a target-<os> feature, and no tests depend on it
    any lomger.

    Differential Revision: https://reviews.llvm.org/D68450 — mstorsjo / detail
  2. [clang][IFS] Fixing spelling errors in interface-stubs OPT flag (NFC).

    This is just a long standing spelling error that was found recently. — zer0 / detail
  3. [llvm-lipo] Pass ArrayRef by value.

    Pass ArrayRef by value, fix formatting. NFC.

    Test plan: make check-all — alexshap / detail
  4. 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 / detail
  5. 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 / detail
  6. 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 / detail
  7. [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 / detail
  8. [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 / detail
  9. [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 / detail
  10. Slightly relax restriction on exact order arguments must appear. — dyung / detail

#14868 (Oct 11, 2019 7:20:53 PM)

  1. [asan] Return true from instrumentModule

    createSanitizerCtorAndInitFunctions always change the module. — Vitaly Buka / detail
  2. DebugInfo: Fix msan use-of-uninitialized exposed by r374600 — dblaikie / detail
  3. [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 / detail
  4. [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 / detail
  5. [X86] Add test case showing missing opportunity to fold vmovsdb into a store after type legalization. NFC — ctopper / detail
  6. DebugInfo: Reduce the scope of some variables related to debug_ranges emission

    Minor tidy up/NFC — dblaikie / detail
  7. [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 / detail
  8. gn build: (manually) merge r374606 better — nico / detail
  9. gn build: Merge r235758 — gnsyncbot / detail
  10. gn build: Cmanually) merge r374590 — nico / detail
  11. [AMDGPU] Use GCN prefix in dpp_combine.mir. NFC. — rampitec / detail
  12. [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 / detail
  13. [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 / detail
  14. [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 / detail
  15. 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 / detail

#14867 (Oct 11, 2019 2:52:01 PM)

  1. [mips] Remove unused local variables. NFC — atanasyan / detail
  2. [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 / detail
  3. [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 / detail
  4. [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 / detail
  5. [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 / detail
  6. Added legacy mode support for automatic SVN schedulers. — gkistanova / detail
  7. Release notes: Add the option WarnForDeadNestedAssignments
    https://reviews.llvm.org/D66733 — sylvestre / detail
  8. 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 / detail
  9. [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 / detail
  10. [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 / detail
  11. [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 / detail
  12. llvm-dwarfdump: Add verbose printing for debug_loclists — dblaikie / detail
  13. [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 / detail
  14. Suppress false-positive -Wdeprecated-volatile warning from __is_*_assignable(volatile T&, U). — rsmith / detail
  15. [X86][SSE] Add support for v4i8 add reduction — rksimon / detail
  16. gn build: (manually) merge r374110 — nico / detail
  17. [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 / detail

#14866 (Oct 11, 2019 10:23:03 AM)

  1. Update clang module map for new excluded .def file. — rsmith / detail
  2. 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 / detail
  3. [AArch64] add tests for (v)select-of-constants; NFC

    These are copied from existing test files in x86/PPC. — spatel / detail
  4. [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 / detail
  5. [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 / detail
  6. [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 / detail
  7. 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 / detail
  8. [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 / detail
  9. gn build: Merge r374558 — gnsyncbot / detail
  10. [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 / detail
  11. [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 / detail
  12. [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 / detail
  13. [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 / detail
  14. [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 / detail
  15. Fix compilation warnings. NFC. — hliao / detail
  16. [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 / detail
  17. [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 / detail
  18. Updated add_new_check.py to create checker tests in the new directory — gribozavr / detail
  19. [ClangTidy] Separate tests for infrastructure and checkers, fixup

    Renamed a file that I missed in r374540. — gribozavr / detail
  20. [mips] Follow-up to r374544. Fix test case. — atanasyan / detail
  21. [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 / detail
  22. [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 / detail

#14865 (Oct 11, 2019 5:27:34 AM)

  1. [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 / detail
  2. [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 / detail
  3. [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 / detail
  4. 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 / detail
  5. [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 / detail
  6. [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 / detail
  7. [X86] isFNEG - add recursion depth limit

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

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68780 — courbet / detail
  9. [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 / detail
  10. 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 / detail
  11. [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 / detail

#14864 (Oct 11, 2019 12:53:58 AM)

  1. [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 / detail
  2. [ADT][Statistics] Fix test after rL374490 — kadircet / detail
  3. 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 / detail
  4. [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 / detail
  5. [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 / detail
  6. [NFC] run specific pass instead of whole -O3 pipeline for popcount recoginzation testcase. — shchenz / detail
  7. Updated llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast and llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast builders. — gkistanova / detail
  8. [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 / detail
  9. [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 / detail
  10. [X86] Add a DAG combine to turn v16i16->v16i8 VTRUNCUS+store into a saturating truncating store. — ctopper / detail
  11. [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 / detail
  12. [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 / detail
  13. [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 / detail

#14863 (Oct 10, 2019 8:25:48 PM)

  1. 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 / detail
  2. [CUDA][HIP} Add a test for constexpr default ctor

    Differential Revision: https://reviews.llvm.org/D68753 — yaxunl / detail
  3. [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 / detail
  4. [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 / detail
  5. [Attributor][FIX] Do not replace musstail calls with constant — jdoerfert / detail
  6. 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 / detail
  7. AMDGPU: Move SelectFlatOffset back into AMDGPUISelDAGToDAG — arsenm / detail
  8. 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 / detail
  9. [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 / detail
  10. Include whether the destructor is constexpr in -ast-dump output for a
    clss. — rsmith / detail
  11. [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 / detail
  12. [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 / detail
  13. 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 / detail
  14. gn build: Merge r374476 — gnsyncbot / detail
  15. [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 / detail
  16. [msan, NFC] Move option parsing into constructor — Vitaly Buka / detail
  17. Fix compilation warning due to typo. — hliao / detail
  18. [tooling] Fix assertion on MacOSX. — hliao / detail
  19. [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 / detail
  20. [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 / detail
  21. 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 / detail
  22. Fix check-interception link error in compiler-rt debug mode — rnk / detail
  23. [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 / detail
  24. [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 / detail

#14862 (Oct 10, 2019 4:00:35 PM)

  1. Fix help message for -ffp-contract

    Differential Revision: https://reviews.llvm.org/D68823 — yaxunl / detail
  2. Moved a few builders to use UnifiedTreeBuilder. — gkistanova / detail
  3. PR43629: Fix crash evaluating constexpr placement new on a subobject of
    an out-of-lifetime object. — rsmith / detail
  4. [GISel] Simplifying return from else in function. NFC

    Forgot to integrate this little change in previous commit — mggm / detail
  5. [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 / detail
  6. [X86] Add test cases for packus/ssat/usat 32i32->v32i8 test cases. NFC — ctopper / detail
  7. [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 / detail
  8. Fix some errors in <arm_neon.h> tests that cause them to fail with lax
    vector conversions disabled. — rsmith / detail
  9. 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 / detail
  10. [AMDGPU] Handle undef old operand in DPP combine

    It was missing an undef flag.

    Differential Revision: https://reviews.llvm.org/D68813 — rampitec / detail
  11. [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 / detail
  12. [InstCombine] Add test case for PR43617 (NFC)

    Also, refactor check in `LibCallSimplifier::optimizeLog()`. — evandro / detail
  13. [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 / detail
  14. 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 / detail
  15. 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 / detail
  16. Add a missing include in test.

    A fix for r373993. — eugenis / detail
  17. [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 / detail
  18. [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 / detail
  19. Fix a documentation warning from GSYM commit. — gclayton / detail
  20. [MSVC] Automatically add atlmfc folder to include and libpath.

    Differential Revision: https://reviews.llvm.org/D68736 — zturner / detail
  21. [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 / detail
  22. [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 / detail
  23. 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 / detail
  24. [ScanDeps] clang-format, 80 cols. — mspencer / detail
  25. [OPENMP]Update doc for supported constructs, NFC. — abataev / detail
  26. [OPENMP50]Support for 'master taskloop' directive.

    Added full support for master taskloop directive. — abataev / detail
  27. [x86] reduce duplicate test assertions; NFC — spatel / detail
  28. [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 / detail
  29. [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 / detail
  30. Revert r374388: "[lit] Make internal diff work in pipelines"

    This breaks a Windows bot. — jdenny / detail
  31. [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 / detail
  32. Revert r374389: "[lit] Clean up internal diff's encoding handling"

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

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

    This breaks a Windows bot. — jdenny / detail
  35. 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 / detail
  36. [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 / detail
  37. [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 / detail
  38. Fix one more clang test which didn't have \5C in it — rnk / detail
  39. Update clang tests for new LLVM IR backslash printing in r374415 — rnk / detail

#14861 (Oct 10, 2019 11:33:42 AM)

  1. 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 / detail
  2. Fix Windows build after r374381 — nico / detail
  3. Remove strings.h include to fix GSYM Windows build

    Fifth time's the charm. — rnk / detail
  4. Unbreak buildbots. — gclayton / detail
  5. Fix buildbots by using memset instead of bzero. — gclayton / detail
  6. [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 / detail
  7. Fix build by adding the missing dependency. — hliao / detail
  8. [lit] Leverage argparse features to remove some code

    Reviewed By: rnk, serge-sans-paille

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

    Fix for PR43636 — rnk / detail
  10. 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 / detail
  11. [lit] Move argument parsing/validation to separate file

    Reviewed By: serge-sans-paille

    Differential Revision: https://reviews.llvm.org/D68529 — yln / detail
  12. [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 / detail
  13. Unbreak  llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast buildbot. — gclayton / detail
  14. [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 / detail
  15. Unbreak windows buildbots. — gclayton / detail
  16. gn build: restore tablegen restat optimization after r373664 — nico / detail
  17. [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 / detail
  18. gn build: merge r374381 more (effectively a no-op) — nico / detail
  19. [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 / detail
  20. [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 / detail
  21. [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 / detail
  22. [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 / detail
  23. 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 / detail
  24. gn build: Merge r374381 — gnsyncbot / detail
  25. 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 / detail
  26. [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 / detail
  27. [ARM] VQSUB instruction

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

    Differential Revision: https://reviews.llvm.org/D68567 — dmgreen / detail
  28. [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 / detail
  29. Fix assertions disabled builds after rL374367 — kadircet / detail
  30. [DAGCombiner] reduce code duplication; NFC — spatel / detail
  31. [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 / detail
  32. [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 / detail
  33. 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 / detail
  34. [AMDGPU] Fixed dpp_combine.mir with expensive checks. NFC. — rampitec / detail
  35. Fix Wdocumentation warnings. NFCI. — rksimon / detail
  36. [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 / detail
  37. [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 / detail
  38. 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 / detail
  39. 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 / detail
  40. 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 / detail
  41. [X86] combineFMA - Convert to use isNegatibleForFree/GetNegatedExpression.

    Split off from D67557. — rksimon / detail
  42. Fix OCaml/core.ml fneg check (try 2) — rksimon / detail
  43. 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 / detail

#14860 (Oct 10, 2019 7:12:51 AM)

  1. [X86] combineFMADDSUB - Convert to use isNegatibleForFree/GetNegatedExpression.

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

    This reverts commit r374318 / b6f1d1fa0e3ee0e25f22414bf97c05276b934507. — thopre / detail
  3. 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 / detail
  4. Fix OCaml/core.ml fneg check — rksimon / detail
  5. [DAG][X86] Add isNegatibleForFree/GetNegatedExpression override placeholders. NFCI.

    Continuing to undo the rL372756 reversion.

    Differential Revision: https://reviews.llvm.org/D67557 — rksimon / detail
  6. [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 / detail
  7. [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 / detail
  8. [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 / detail
  9. [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 / detail
  10. [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 / detail
  11. 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 / detail
  12. [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 / detail
  13. [AArch64][x86] add tests for (v)select bit magic; NFC — spatel / detail
  14. [Sanitizers] Fix getrandom test — David CARLIER / detail
  15. [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 / detail
  16. [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 / detail
  17. [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 / detail
  18. Fix -Wparentheses warning. NFCI. — rksimon / detail
  19. 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 / detail
  20. Fix sanitizer lint check after r374315 — russell_gallop / detail
  21. [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 / detail
  22. [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 / detail
  23. [UBSan] Appease linter — lebedevri / detail
  24. [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 / detail

#14859 (Oct 10, 2019 3:52:20 AM)

  1. [UBSan] Split nullptr-and-nonzero-offset-variable.c in another direction — lebedevri / detail
  2. 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 / detail
  3. [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 / detail
  4. [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 / detail
  5. [UBSan] Revisit nullptr-and-nonzero-offset-variable.cpp test to hopefully make it pass on sanitizer-windows BB — lebedevri / detail
  6. 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 / detail
  7. [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 / detail
  8. 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 / detail
  9. [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 / detail

#14858 (Oct 10, 2019 12:45:08 AM)

  1. [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 / detail
  2. 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 / detail
  3. [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 / detail
  4. [Attributor][NFC] clang format — jdoerfert / detail
  5. [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 / detail

#14857 (Oct 9, 2019 9:46:48 PM)

  1. gn build: Merge r374277 — gnsyncbot / detail
  2. 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 / detail
  3. [ast] Fix indentation. NFC. — hliao / detail
  4. [sema] Revise `getCurrentMangleNumberContext` interface. NFC.

    - Prefer returning mulitple values using a tuple instead of
      additional pointers/references. — hliao / detail
  5. [PowerPC] add testcase for ppc loop instr form prep - NFC — shchenz / detail
  6. gn build: (manually) merge r374271 — nico / detail
  7. [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 / detail

#14856 (Oct 9, 2019 6:47:16 PM)

  1. 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 / detail
  2. 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 / detail
  3. [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 / detail
  4. 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 / detail
  5. [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 / detail
  6. [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 / detail
  7. 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 / detail
  8. gn build: Merge r374245 — gnsyncbot / detail
  9. [WebAssembly] Fix tests missed in rL374235 — tlively / detail
  10. [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 / detail
  11. 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 / detail
  12. 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 / detail
  13. AMDGPU: Relax register classes used — arsenm / detail
  14. AMDGPU: Fix typos — arsenm / detail
  15. GlobalISel: Implement fewerElementsVector for G_BUILD_VECTOR

    Turn it into a G_CONCAT_VECTORS of G_BUILD_VECTOR. — arsenm / detail
  16. gn build: (manually) merge r374219 — nico / detail
  17. [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 / detail
  18. [GISel] Refactor and split PatternMatchTest. NFC

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

    Check for `nullptr` before inspecting composite function. — evandro / detail
  20. [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 / detail
  21. [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 / detail
  22. [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 / detail
  23. [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 / detail

#14855 (Oct 9, 2019 2:29:41 PM)

  1. llvm-dwarfdump: Support multiple debug_loclists contributions

    Also fixing the incorrect "offset" field being computed/printed for each
    location list. — dblaikie / detail
  2. [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 / detail
  3. [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 / detail
  4. [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 / detail
  5. [sanitizer, NFC] Fix grammar in comment — Vitaly Buka / detail
  6. [System Model] [TTI] Define AMDGPUTTIImpl::getST and AMDGPUTTIImpl::getTLI

    To fix "infinite recursion" warning. — Vitaly Buka / detail
  7. [System Model] [TTI] Fix virtual destructor warning — Vitaly Buka / detail
  8. [sanitizer] Disable signal_trap_handler on s390 — Vitaly Buka / detail
  9. [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 / detail
  10. [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 / detail
  11. [sanitizer] Make signal_name a C test — Vitaly Buka / detail
  12. [sanitizer] Use raise() in test and cover more signals — Vitaly Buka / detail
  13. [ConstProp] add tests for extractelement with undef index; NFC — spatel / detail
  14. [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 / detail
  15. [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 / detail
  16. [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 / detail
  17. [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 / detail
  18. [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 / detail
  19. [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 / detail
  20. 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 / detail
  21. [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 / detail
  22. [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 / detail
  23. [InstCombine] add another test for gep inbounds; NFC — spatel / detail
  24. [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 / detail
  25. [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 / detail
  26. [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 / detail

#14854 (Oct 9, 2019 10:08:43 AM)

  1. [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 / detail
  2. [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 / detail
  3. [NFC] Remove files got accidentally upload in llvm-svn 374179 — jasonliu / detail
  4. [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 / detail
  5. 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 / detail
  6. [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 / detail
  7. [NFC] Reverting changes from test commit.
    llvm commit access test succeeded. — mitchell / detail
  8. [NFC] Test commit.
    Testing llvm commit access only. — mitchell / detail
  9. [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 / detail
  10. [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 / detail
  11. Fix Wdocumentation unknown parameter warning. NFCI. — rksimon / detail
  12. [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 / detail
  13. 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 / detail
  14. [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 / detail
  15. [clang-offload-bundler] Support `.cui` and `.d`.

    Reviewers: tra, yaxunl

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68663 — hliao / detail
  16. [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 / detail
  17. [mips] Rename local variable. NFC — atanasyan / detail
  18. [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 / detail
  19. [clangd] Propagate context into reply handlers — kadircet / detail
  20. [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 / detail
  21. [CostModel][X86] Add tests for insertelement to non-immediate vector element indices — rksimon / detail
  22. [CostModel][X86] Add tests for extractelement from non-immediate vector element indices — rksimon / detail
  23. [ARM] Add saturating arithmetic tests for MVE. NFC — dmgreen / detail

#14853 (Oct 9, 2019 5:21:15 AM)

  1. [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 / detail
  2. [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 / detail
  3. [mips] Set default float ABI to "soft" on FreeBSD

    Initial patch by Kyle Evans.

    Fix PR43596 — atanasyan / detail
  4. [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 / detail
  5. [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 / detail
  6. 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 / detail
  7. [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 / detail
  8. [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 / detail
  9. 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 / detail
  10. [llvm-exegesis][NFC] Fix rL374146.

    Remove extra semicolon: Target.cpp:187:2: warning: extra ‘;’ [-Wpedantic] — courbet / detail
  11. [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 / detail
  12. 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 / detail
  13. [llvm-exegesis][NFC] Remove unecessary `using llvm::` directives.

    We've been in namespace llvm for at least a year. — courbet / detail

#14852 (Oct 9, 2019 12:47:55 AM)

  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 / detail
  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 / detail

#14851 (Oct 8, 2019 8:22:55 PM)

  1. 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 / detail
  2. [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 / detail
  3. [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 / detail
  4. [cxx_status] Note that Clang has supported std::source_location since
    version 9. — rsmith / detail
  5. Factor out some duplication. NFC. — rsmith / detail
  6. gn build: unbreak libcxx build after r374116 by restoring gen_link_script.py for gn — nico / detail

#14850 (Oct 8, 2019 4:04:31 PM)

  1. [Docs] Fixes broken sphinx build - undefined label

    Removes label ref pointing to non-existent subsystem docs page. — dr87 / detail
  2. [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 / detail
  3. [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 / detail
  4. [sanitizer] Fix crypt.cpp on Android again — Vitaly Buka / detail
  5. [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 / detail
  6. [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 / detail
  7. DebugInfo: Move LLE enum handling to .def to match RLE handling — dblaikie / detail
  8. [libc++] Workaround old versions of CMake that don't understand list(JOIN) — Louis Dionne / detail
  9. 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 / detail
  10. [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 / detail
  11. [sanitizer] Fix crypt.cpp test on Darwin — Vitaly Buka / detail
  12. [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 / detail
  13. [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 / detail
  14. [CVP][NFC] Revisit sext vs. zext test — lebedevri / detail
  15. [clang] Add llvm-ifs in test deps — Vitaly Buka / detail
  16. 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 / detail
  17. [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 / detail
  18. Try to get ubsan-blacklist-vfs.c pass more on Windows — nico / detail
  19. 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 / detail
  20. 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 / detail

#14849 (Oct 8, 2019 11:45:40 AM)

  1. [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 / detail
  2. [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 / detail
  3. [NFC] Attempt to make ubsan-blacklist-vfs test pass on Windows

    Previously disabled in d0c2d5daa3e — Jan Korous / detail
  4. [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 / detail
  5. [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 / detail
  6. 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 / detail
  7. 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 / detail
  8. [SLP] add test with prefer-vector-width function attribute; NFC (PR43578) — spatel / detail
  9. [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 / detail
  10. [sanitizer] Disable crypt*.cpp tests on Android — Vitaly Buka / detail
  11. 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 / detail
  12. [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 / detail
  13. 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 / detail
  14. [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 / detail
  15. [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 / detail
  16. [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 / detail
  17. [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 / detail
  18. (Re)generate various tests. NFC — deadalnix / detail
  19. [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 / detail
  20. [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 / detail
  21. [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 / detail
  22. [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 / detail
  23. gn build: Merge r374062 — gnsyncbot / detail
  24. gn build: Merge r374061 — gnsyncbot / detail
  25. [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 / detail
  26. Revert [TextAPI] Introduce TBDv4

    This reverts r374058 (git commit 5d566c5a46aeaa1fa0e5c0b823c9d5f84036dc9a) — cishida / detail
  27. [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 / detail
  28. [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 / detail
  29. gn build: Merge r374058 — gnsyncbot / detail
  30. [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 / detail
  31. [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 / detail
  32. [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 / detail
  33. [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 / detail
  34. [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 / detail
  35. [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 / detail

#14848 (Oct 8, 2019 7:26:41 AM)

  1. 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 / detail
  2. [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 / detail
  3. 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 / detail
  4. [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 / detail
  5. [clangd] Bump timeouts in speculative completion tests — kadircet / detail
  6. Restore documentation that 'svn update' unexpectedly yanked out from under me. — kpn / detail
  7. 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 / detail
  8. Add test for rotating truncated vectors. NFC — deadalnix / detail
  9. [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 / detail
  10. 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 / detail
  11. 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 / detail
  12. [SLP] add test with prefer-vector-width function attribute; NFC — spatel / detail

#14847 (Oct 8, 2019 5:44:22 AM)

  1. [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 / detail
  2. [LoopRotate] Unconditionally get DomTree.

    LoopRotate is a loop pass and the DomTree should always be available.

    Similar to a70c5261436322a53187d67b8bdc0445d0463a9a — fhahn / detail
  3. [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 / detail
  4. [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 / detail
  5. [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 / detail
  6. 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 / detail
  7. [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 / detail
  8. [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 / detail
  9. [NFC] Add REQUIRES for r374017 in testcase — wuzish / detail
  10. [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 / detail
  11. [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 / detail
  12. [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 / detail

#14846 (Oct 8, 2019 1:12:22 AM)

  1. [LoopVectorize] Fix non-debug builds after rL374017 — kadircet / detail
  2. [llvm-exegesis] Add stabilization test with config

    In preparation for D68629. — courbet / detail
  3. [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 / detail

#14845 (Oct 7, 2019 8:52:16 PM)

  1. [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 / detail
  2. [ConstantRange] [NFC] replace addWithNoSignedWrap with addWithNoWrap. — shchenz / detail
  3. [WebAssembly] Add REQUIRES: asserts to cfg-stackify-eh.ll

    This was missing in D68552. — aheejin / detail
  4. [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 / detail
  5. [NFC] Fix ubsan-blacklist test

    Restored original test and marked tests for VFS as unsupported on Windows. — Jan Korous / detail
  6. [sanitizer] Fix signal_trap_handler.cpp on android — Vitaly Buka / detail
  7. [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 / detail
  8. 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 / detail
  9. [LLDB] Enable mails on the standalone bot — Jonas Devlieghere / detail
  10. Revert "[LLDB] Enable mails on the matrix bot"

    This reverts commit 3b05a74c5b56868049a700bc2b7fe56388349f33. — Jonas Devlieghere / detail
  11. [LLDB] Enable mails on the matrix bot — Jonas Devlieghere / detail
  12. Revert "Add VFS support for sanitizers' blacklist"

    Fix tests on Windows for now.

    This reverts commit 96ac97a4213287003f08636d0c372b3f71e9cfca. — Jan Korous / detail
  13. [msan] Add interceptors: crypt, crypt_r.

    Reviewers: vitalybuka

    Subscribers: srhines, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D68431 — eugenis / detail
  14. [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 / detail
  15. AMDGPU/GlobalISel: Clamp G_SITOFP/G_UITOFP sources — arsenm / detail
  16. [Attributor][NFC] Add debug output — jdoerfert / detail
  17. [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 / detail

#14844 (Oct 7, 2019 4:26:52 PM)

  1. [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 / detail
  2. [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 / detail
  3. [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 / detail
  4. [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 / detail
  5. [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 / detail
  6. [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 / detail
  7. Fix the spelling of my name. — joerg / detail
  8. [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 / detail
  9. [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 / detail
  10. Add VFS support for sanitizers' blacklist

    Differential Revision: https://reviews.llvm.org/D67742 — Jan Korous / detail
  11. [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 / detail
  12. [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 / detail
  13. [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 / detail
  14. [Diagnostics] Emit better -Wbool-operation's warning message if we known that the result is always true — xbolva00 / detail
  15. [Attributor][FIX] Remove assertion wrong for on invalid IRPositions — jdoerfert / detail
  16. [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 / detail
  17. [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 / detail
  18. [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 / detail
  19. [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 / detail
  20. [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 / detail
  21. [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 / detail
  22. [InstCombine][NFC] Tests for "conditional sign-extend of high-bit-extract" pattern (PR42389)

    https://bugs.llvm.org/show_bug.cgi?id=42389 — lebedevri / detail
  23. [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 / detail
  24. [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 / detail
  25. [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 / detail
  26. [LLDB] Add LLVM 9 to the Matrix bot — Jonas Devlieghere / detail
  27. [Bitcode] Update naming of UNOP_NEG to UNOP_FNEG

    Differential Revision: https://reviews.llvm.org/D68588 — mcinally / detail
  28. [AccelTable] Remove stale comment (NFC)

    rdar://55857228 — Jonas Devlieghere / detail
  29. [OPENMP]Fix caonical->canonical, NFC.

    Fixed typo. — abataev / detail
  30. Attempt to fix a few clang-tidy tests on Windows, see PR43593. — nico / detail
  31. 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 / detail
  32. gn build: try to make system-libs.windows.test pass — nico / detail
  33. 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 / detail
  34. GlobalISel: Partially implement lower for G_INSERT — arsenm / detail
  35. AMDGPU/GlobalISel: Fix selection of 16-bit shifts — arsenm / detail
  36. AMDGPU/GlobalISel: Select VALU G_AMDGPU_FFBH_U32 — arsenm / detail
  37. AMDGPU/GlobalISel: Use S_MOV_B64 for inline constants

    This hides some defects in SIFoldOperands when the immediates are
    split. — arsenm / detail
  38. AMDGPU/GlobalISel: Widen 16-bit G_MERGE_VALUEs sources

    Continue making a mess of merge/unmerge legality. — arsenm / detail

#14843 (Oct 7, 2019 12:01:51 PM)

  1. [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 / detail
  2. 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 / detail
  3. 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 / detail
  4. [clang] [cmake] Support LLVM_DISTRIBUTION_COMPONENTS in stand-alone build

    Differential Revision: https://reviews.llvm.org/D68412 — mgorny / detail
  5. 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 / detail
  6. Try to get clangd tests passing on Windows.

    Part of PR43592. See also r328645. — nico / detail
  7. [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 / detail
  8. 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 / detail
  9. [libTooling][NFC] Fix build break in r373916.

    r373916 used raw strings inside macro calls, which breaks some builds. — ymandel / detail
  10. [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 / detail
  11. [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 / detail
  12. [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 / detail
  13. [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 / detail
  14. Fix build errors caused by rL373914. — wmi / detail
  15. 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 / detail
  16. [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 / detail
  17. [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 / detail
  18. [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 / detail
  19. [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 / detail
  20. [LoopVectorize] add test that asserted after cost model change (PR43582); NFC — spatel / detail

#14842 (Oct 7, 2019 7:41:08 AM)

  1. 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 / detail
  2. 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 / detail
  3. [clang] Add test for FindNextToken in Lexer.

    Reviewers: ilya-biryukov

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68565 — usaxena95 / detail
  4. Fix another sphinx warning.

    Differential Revision: https://reviews.llvm.org/D64746 — kpn / detail
  5. Regenerate ptr-rotate.ll . NFC — deadalnix / detail
  6. [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 / detail
  7. [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 / detail
  8. 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 / detail
  9. 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 / detail
  10. [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 / detail
  11. Fix sphinx warnings.

    Differential Revision: https://reviews.llvm.org/D64746 — kpn / detail
  12. Test commit

    Fix comment. — mbrkusanin / detail
  13. [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 / detail
  14. 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 / detail
  15. 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 / detail
  16. [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 / detail
  17. [ASTImporter][NFC] Enable disabled but passing test

    RedeclChainShouldBeCorrectAmongstNamespaces — martong / detail
  18. [ASTImporter][NFC] Update ASTImporter internals docs — martong / detail
  19. [ASTImporter][NFC] Fix typo in user docs — martong / detail
  20. [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 / detail
  21. [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 / detail
  22. [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 / detail
  23. [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 / detail
  24. [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 / detail

#14841 (Oct 7, 2019 2:44:04 AM)

  1. 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 / detail
  2. [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 / detail
  3. 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 / detail
  4. [llvm-locstats] Fix a typo in the documentation; NFC — djtodoro / detail
  5. [X86] Autogenerate checks in leaFixup32.mir and leaFixup64.mir. NFC — ctopper / detail
  6. [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 / detail
  7. [NFC][CGP] Tests for making ICMP_EQ use CR result of ICMP_S(L|G)T dominators — yi-hong.lyu / detail

#14840 (Oct 6, 2019 10:12:19 PM)

  1. [c++20] Check for a class-specific operator delete when deleting an
    object of class type with a virtual destructor. — rsmith / detail
  2. 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 / detail

#14839 (Oct 6, 2019 5:53:42 PM)

  1. gn build: no-op style tweak in sync script — nico / detail
  2. [Docs] Removes Subsystem Documentation page

    Removes Subsystem Documentation page. Also moves existing topics on Subsystem Documentation page to User Guides and Reference pages. — dr87 / detail
  3. [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 / detail

#14838 (Oct 6, 2019 1:30:15 PM)

  1. Fix signed/unsigned warning. NFCI — rksimon / detail
  2. [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 / detail
  3. [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 / detail
  4. [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 / detail
  5. 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 / detail
  6. [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 / detail
  7. [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 / detail
  8. [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 / detail
  9. gn build: make windows build less broken — nico / detail
  10. [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 / detail
  11. [Docs] Removes Programming Documentation page

    Removes Programming Documentation page. Also moves existing topics on Programming Documentation page to User Guides and Reference pages. — dr87 / detail

#14837 (Oct 6, 2019 9:05:16 AM)

  1. [X86][SSE] resolveTargetShuffleInputs - call getTargetShuffleInputs instead of using setTargetShuffleZeroElements directly. NFCI. — rksimon / detail
  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 / detail
  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 / detail
  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 / detail
  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 / detail
  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 / detail
  7. [X86][AVX] combineExtractSubvector - merge duplicate variables. NFCI. — rksimon / detail
  8. [InstCombine] add fast-math-flags for better test coverage; NFC — spatel / detail
  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 / detail
  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 / detail

#14836 (Oct 6, 2019 4:07:56 AM)

  1. [X86] Enable AVX512BW for memcmp() — davezarzycki / detail
  2. [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 / detail

#14834 (Oct 5, 2019 7:11:56 PM)

  1. AMDGPU/GlobalISel: Fall back on weird G_EXTRACT offsets — arsenm / detail
  2. AMDGPU/GlobalISel: RegBankSelect mul24 intrinsics — arsenm / detail
  3. AMDGPU/GlobalISel: RegBankSelect DS GWS intrinsics — arsenm / detail
  4. AMDGPU/GlobalISel: Lower G_ATOMIC_CMPXCHG_WITH_SUCCESS — arsenm / detail
  5. GlobalISel: Partially implement lower for G_EXTRACT

    Turn into shift and truncate. Doesn't yet handle pointers. — arsenm / detail
  6. AMDGPU/GlobalISel: Fix RegBankSelect for sendmsg intrinsics

    This wasn't updated for the immarg handling change. — arsenm / detail
  7. [FastISel] Copy the inline assembly dialect to the INLINEASM instruction.

    Fixes PR43575. — ctopper / detail

#14833 (Oct 5, 2019 2:48:47 PM)

  1. [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 / detail
  2. [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 / detail

#14832 (Oct 5, 2019 10:23:44 AM)

  1. [X86] lowerShuffleAsLanePermuteAndRepeatedMask - variable renames. NFCI.

    Rename some variables to match lowerShuffleAsRepeatedMaskAndLanePermute - prep work toward adding some equivalent sublane functionality. — rksimon / detail
  2. Try to fix sphinx indentation error — rksimon / detail
  3. [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 / detail
  4. 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 / detail
  5. [Diagnostics] Highlight expr's source range for -Wbool-operation

    Warning message looks better; and GCC adds it too. — xbolva00 / detail
  6. 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 / detail
  7. 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 / detail
  8. Remove redundant !HasDependentValue check. NFCI.

    Fixes cppcheck warning. — rksimon / detail
  9. 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 / detail
  10. BranchFolding - IsBetterFallthrough - assert non-null pointers. NFCI.

    Silences static analyzer null dereference warnings. — rksimon / detail

#14831 (Oct 5, 2019 5:21:05 AM)

  1. [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 / detail
  2. [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 / detail
  3. [NFCI] Slightly improve warning message — xbolva00 / detail
  4. [Diagnostics] Use Expr::isKnownToHaveBooleanValue() to check bitwise negation of bool in languages without a bool type

    Thanks for this advice, Richard Trieu! — xbolva00 / detail

#14829 (Oct 4, 2019 8:26:54 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 / detail
  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 / detail
  3. [Test] Add a test case fo a missed oppurtunity in implicit null checking — reames / detail
  4. [RISCV] Added missing ImmLeaf predicates

    simm9_lsb0 and simm12_lsb0 operand types were missing predicates. — apazos / detail
  5. Add a unittest to verify for assumption cache

    Reviewers: vsk, tejohnson

    Reviewed By: vsk

    Differential Revision: https://reviews.llvm.org/D68095 — hiraditya / detail
  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 / detail

#14828 (Oct 4, 2019 4:04:26 PM)

  1. [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 / detail
  2. 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 / detail
  3. 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 / detail
  4. [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 / detail
  5. [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 / detail
  6. [NFC][InstCombine] Autogenerate shift.ll test — lebedevri / detail
  7. [NFC][InstCombine] Autogenerate icmp-shr-lt-gt.ll test — lebedevri / detail
  8. [NFC][InstCombine] Tests for bit test via highest sign-bit extract (w/ trunc) (PR43564)

    https://rise4fun.com/Alive/x5IS — lebedevri / detail
  9. [NFC][InstCombine] Tests for right-shift shift amount reassociation (w/ trunc) (PR43564, PR42391)

    https://rise4fun.com/Alive/GEw — lebedevri / detail
  10. 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 / detail
  11. [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 / detail
  12. [clang] fix a typo from r372531

    Reviewers: xbolva00

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68482 — yuanfang / detail
  13. [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 / detail
  14. [InstCombine] add tests for fneg disguised as fmul; NFC — spatel / detail
  15. [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 / detail
  16. [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 / detail
  17. [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 / detail
  18. [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 / detail
  19. [test] Remove another two unnecessary uses of REQUIRES: target-windows. NFC.

    Differential Revision: https://reviews.llvm.org/D68449 — mstorsjo / detail
  20. [JITLink] Silence GCC warnings. NFC.

    Use parentheses in an expression with mixed && and ||.

    Differential Revision: https://reviews.llvm.org/D68447 — mstorsjo / detail
  21. [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 / detail
  22. [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 / detail
  23. 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 / detail

#14818 (Oct 3, 2019 12:30:56 PM)

  1. [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 / detail
  2. 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 / detail
  3. [HIP] Use option -nogpulib to disable linking device lib

    Differential Revision: https://reviews.llvm.org/D68300 — yaxunl / detail
  4. 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 / detail
  5. [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 / detail
  6. [NFC] Fix unused variable in release builds — rupprecht / detail
  7. [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 / detail
  8. 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 / detail
  9. [compiler-rt] More optimization levels in signal_line.cpp test — Vitaly Buka / detail
  10. [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 / detail
  11. [dsymutil] Don't overload LinkOptions.

    This should fix the build bots:

      error: declaration of ‘llvm::dsymutil::LinkOptions
      DsymutilOptions::LinkOptions’ [-fpermissive] — Jonas Devlieghere / detail
  12. AMDGPU/GlobalISel: Handle RegBankSelect of G_INSERT_VECTOR_ELT — arsenm / detail
  13. 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 / detail
  14. 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 / detail
  15. AMDGPU/GlobalISel: Add some more tests for G_INSERT legalization — arsenm / detail
  16. AMDGPU/GlobalISel: Fix mutationIsSane assert v8s8 and

    This would try to do FewerElements to v9s8 — arsenm / detail
  17. [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 / detail
  18. Fix build failure with GCC on identifier reusing.

    - GCC is different from clang and other compilers on that.
      https://godbolt.org/z/CeQE1V — hliao / detail
  19. 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 / detail
  20. [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 / detail
  21. 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 / detail
  22. [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 / detail
  23. gn build: (manually) merge r373622 — nico / detail
  24. 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 / detail
  25. [libc++] Add missing revision number in ABI changelog — Louis Dionne / detail
  26. [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 / detail
  27. [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 / detail
  28. [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 / detail
  29. [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 / detail
  30. [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 / detail
  31. Revert "[Alignment][NFC] Allow constexpr Align"

    This reverts commit b3af236fb5fc6e50fcc1b54d868f0bff557f3fb1. — gchatelet / detail
  32. [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 / detail
  33. [NFC] Added missing changes for rL373614 — xbolva00 / detail
  34. [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 / detail
  35. Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI. — rksimon / detail
  36. 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 / detail
  37. Remove duplicate P->getAs<PointerType>() call. NFCI. — rksimon / detail

#14817 (Oct 3, 2019 8:05:10 AM)

  1. [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 / detail
  2. Test commit. — sgundapa / detail
  3. [MSP430] add tests for unwanted shift codegen; NFC (PR43542) — spatel / detail
  4. 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 / detail
  5. [UpdateTestChecks] add basic support for parsing msp430 asm — spatel / detail
  6. gn build: Merge r373601 — gnsyncbot / detail
  7. [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 / detail
  8. [AArch64][SVE] Adding patterns for floating point SVE add instructions. — amehsan / detail
  9. 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 / detail
  10. [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 / detail
  11. [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 / detail
  12. [llvm-locstats] Copy the script only when needed; NFC — djtodoro / detail
  13. [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 / detail
  14. [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 / detail
  15. [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 / detail
  16. [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 / detail
  17. [mips] Push `fixup_Mips_LO16` fixup for `jialc` and `jic` instructions — atanasyan / detail
  18. [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 / detail
  19. [mips] Use llvm-readobj `-A` flag in test cases. NFC — atanasyan / detail
  20. [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 / detail
  21. [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 / detail
  22. gn build: Revert 373554 "gn build: (manually) merge r373551"

    r373551 was reverted in r373581. — nico / detail
  23. [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 / detail
  24. 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 / detail
  25. Fix uninitialized variable warning. NFCI — rksimon / detail
  26. Fix uninitialized variable warning. NFCI — rksimon / detail
  27. 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 / detail
  28. [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 / detail
  29. 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 / detail

#14816 (Oct 3, 2019 3:24:38 AM)

  1. [clang][NFC] Fix misspellings in ExternalASTMerger.h — Raphael Isemann / detail
  2. Update the FAQ: remove stuff related to the previous license +
    update info about the portability of LLVM. — sylvestre / detail
  3. [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 / detail
  4. 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 / detail
  5. [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 / detail
  6. AMDGPU/GlobalISel: Don't re-get subtarget

    It's already available in the class. — arsenm / detail
  7. AMDGPU/GlobalISel: Expand G_BITCAST legality — arsenm / detail

#14815 (Oct 2, 2019 10:43:00 PM)

  1. [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 / detail
  2. 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 / detail
  3. [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 / detail
  4. [X86] Add broadcast load folding patterns to NoVLX VPMULLQ/VPMAXSQ/VPMAXUQ/VPMINSQ/VPMINUQ patterns.

    More fixes for PR36191. — ctopper / detail
  5. [X86] Remove a couple redundant isel patterns that look to have been copy/pasted from right above them. NFC — ctopper / detail
  6. gn build: Merge r373556 — gnsyncbot / detail
  7. Revert 373538 and follow-ups 373549 and 373552.

    They break tests on (at least) macOS. — nico / detail
  8. [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 / detail
  9. gn build: (manually) merge r373551 — nico / detail
  10. 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 / detail
  11. 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 / detail

#14814 (Oct 2, 2019 6:10:47 PM)

  1. [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 / detail
  2. gn build: Merge r373538 — gnsyncbot / detail
  3. Fixing broken builds due to r373538 due to test that should have been deleted.

    test/InterfaceStubs/object.cpp should have been deleted. — zer0 / detail
  4. 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 / detail
  5. 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 / detail
  6. For P0784R7: allow direct calls to operator new / operator delete from
    std::allocator::{allocate,deallocate} in constant evaluation. — rsmith / detail
  7. [gicombiner] Fix windows issue where single quotes in the command are passed through to tablegen — dsanders / detail
  8. [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 / detail
  9. [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 / detail
  10. [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 / detail
  11. [NFC][InstCombine] Add tests for 'variable sext of variable high bit extract' pattern (PR43523)

    https://bugs.llvm.org/show_bug.cgi?id=43523 — lebedevri / detail
  12. 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 / detail
  13. Move SanitizerInitializeUnwinder outside anonymous namespace.

    Fixes the Android build breakage introduced in r373528. — morehouse / detail
  14. [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 / detail
  15. [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 / detail
  16. [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 / detail
  17. [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 / detail
  18. gn build: (manually) merge r373527 — nico / detail
  19. 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 / detail
  20. [sanitizer_common] Declare __sanitizer_on_print in Windows interception.

    Speculative fix for Windows bot. — morehouse / detail
  21. [sanitizer_common] Disable onprint.cpp on Android.

    The test fails to find the written file on Android. — morehouse / detail
  22. [sanitizer_common] Add __sanitizer_on_print to interface list.

    Should fix the current Windows buildbot failure. — morehouse / detail
  23. [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 / detail
  24. NFC: add namespace {} — Vitaly Buka / detail
  25. [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 / detail
  26. Fix uninitialized variable warning in CodeGenPGO constructor. NFCI. — rksimon / detail
  27. 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 / detail
  28. [Clang][Driver][NFC] Corrected DeviceActionBuilder methods' comments.

    Differential Revision: https://reviews.llvm.org/D68355 — sdmitriev / detail
  29. 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 / detail
  30. Added new builders lldb-s390x-fedora, lldb-ppc64le-fedora.

    Patch by Jan Kratochvil. — gkistanova / detail
  31. 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 / detail
  32. [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 / detail
  33. [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 / detail
  34. [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 / detail
  35. Fix inconsistent indentation in TableGen.cpp

    The anonymous namespace starts out (incorrectly) indented but isn't
    indented from the TimeRegionsOpt declaration onwards. — dsanders / detail
  36. 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 / detail
  37. [TableGen] Improve error reporting of overlapping definitions (NFC) — evandro / detail
  38. [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 / detail
  39. [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 / detail
  40. [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 / detail
  41. [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 / detail
  42. [Stencil] Hide implementaion detai. NFC. — d0k / detail
  43. [ARM] Make helpers static. NFC. — d0k / detail
  44. [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 / detail
  45. [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 / detail
  46. 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 / detail
  47. [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 / detail
  48. gn build: Merge r373489 — gnsyncbot / detail
  49. [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 / detail
  50. [LLDB] Send e-mails to the default recipients — Jonas Devlieghere / detail
  51. 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 / detail
  52. [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 / detail
  53. [libc++] Use PRIVATE instead of PUBLIC when linking against system libs — Louis Dionne / detail
  54. [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 / detail

#14813 (Oct 2, 2019 9:34:21 AM)

  1. [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 / detail
  2. [SLP] add test for vectorization of different widths (PR28457); NFC — spatel / detail
  3. [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 / detail
  4. 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 / detail
  5. 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 / detail
  6. [CodeExtractor] NFC: Refactor sanity checks into isEligible

    Reviewers: fhahn

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68331 — hiraditya / detail
  7. 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 / detail
  8. 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 / detail
  9. [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 / detail
  10. 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 / detail
  11. 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 / detail
  12. [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 / detail
  13. [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 / detail
  14. [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 / detail
  15. [llvm-dwarfdump] Fix dumping of wrong locstats map — djtodoro / detail
  16. [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 / detail
  17. 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 / detail
  18. MemorySSA tryOptimizePhi - assert that we've found a DefChainEnd. NFCI.

    Silences static analyzer null dereference warning. — rksimon / detail
  19. 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 / detail
  20. AsmPrinter - emitGlobalConstantFP - silence static analyzer null dereference warning. NFCI.

    All the calls to emitGlobalConstantFP should provide a nonnull Type for the float. — rksimon / detail
  21. gn build: Merge r373462 — gnsyncbot / detail
  22. [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 / detail
  23. [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 / detail
  24. [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 / detail
  25. [InstCombine] Precommit tests for D68265 — fhahn / detail
  26. NFC: directly return when CommonExitBlock != Succ

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68330 — hiraditya / detail
  27. [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 / detail
  28. 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 / detail

#14812 (Oct 2, 2019 4:51:09 AM)

  1. LICM - remove unused variable and reduce scope of another variable. NFCI.

    Appeases both clang static analyzer and cppcheck — rksimon / detail
  2. Fix libc++ pretty printer test for Python 3 after D67238 — maskray / detail
  3. Log2_32 returns an unsigned. NFCI.

    Silences clang static analyzer warning about out of bounds (negative) shifts. — rksimon / detail
  4. Fix uninitialized variable warning. NFCI. — rksimon / detail
  5. 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 / detail
  6. 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 / detail
  7. 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 / detail
  8. [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 / detail
  9. [Support, ARM64] Define getHostCPUFeatures for Windows on ARM64 platform

    Patch by Adam Kallai!

    Differential Revision: https://reviews.llvm.org/D68139 — mstorsjo / detail
  10. [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 / detail
  11. [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 / detail
  12. [ClangFormat] relnotes for r373439 — sammccall / detail
  13. [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 / detail
  14. [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 / detail
  15. gn build: (manually) merge r373425 — nico / detail
  16. [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 / detail
  17. [clang-tidy] Fix typo in r373428 — sammccall / detail
  18. [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 / detail
  19. Remove an unnecessary cast. NFC. — foad / detail
  20. [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 / detail
  21. 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 / detail
  22. 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 / detail
  23. [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 / detail
  24. [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 / detail

#14811 (Oct 2, 2019 12:21:00 AM)

  1. [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 / detail
  2. 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 / detail
  3. [llvm-lib] Detect duplicate input files

    Differential Revision: https://reviews.llvm.org/D68320 — ruiu / detail
  4. Rename TypeNodes.def to TypeNodes.inc for consistency across all
    our autogenerated files.  NFC.

    As requested by Nico Weber. — rjmccall / detail
  5. [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 / detail
  6. [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 / detail
  7. Fix GCC -Wreturn-type warnings. NFC. — hliao / detail

#14810 (Oct 1, 2019 8:02:38 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 / detail
  2. DebugInfo: Update support for detecting C++ language variants in debug info emission — dblaikie / detail
  3. gn build: (manually) merge r373407 — nico / detail
  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 / detail
  5. AMDGPU/GlobalISel: Use getIntrinsicID helper — arsenm / detail
  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 / detail
  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 / detail
  8. AMDGPU/GlobalISel: Private loads always use VGPRs — arsenm / detail
  9. AMDGPU/GlobalISel: Legalize 1024-bit G_BUILD_VECTOR

    This will be needed to support AGPR operations. — arsenm / detail
  10. AMDGPU/GlobalISel: Fix RegBankSelect for 1024-bit values — arsenm / detail
  11. [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 / detail
  12. Fix unused variable warning. NFCI. — hliao / detail
  13. [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 / detail
  14. 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 / detail
  15. Use scope qualifiers in Clang's tblgen backends to get useful
    redeclaration checking.  NFC. — rjmccall / detail
  16. [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 / detail
  17. AMDGPU: Fix an out of date assert in addressing FrameIndex

    Reviewers:
      arsenm

    Differential Revision:
      https://reviews.llvm.org/D67574 — chfang / detail
  18. [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 / detail

#14809 (Oct 1, 2019 3:46:53 PM)

  1. 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 / detail
  2. 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 / detail
  3. [clang][OpenMP][NFC] #include GlobalDecl.h to avoid incomplete class type — rupprecht / detail
  4. 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 / detail
  5. [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 / detail
  6. CGExprAgg - remove duplicate code. NFCI.

    Remove duplicate getAs<> call, avoiding a clang static analyzer null dereference warning. — rksimon / detail
  7. [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 / detail
  8. [BypassSlowDivision][CodeGenPrepare] avoid crashing on unused code (PR43514)

    https://bugs.llvm.org/show_bug.cgi?id=43514 — spatel / detail
  9. gn build: Merge r373392 — gnsyncbot / detail
  10. [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 / detail
  11. [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 / detail
  12. [NFC] Fix typos in libc++ documentation — Louis Dionne / detail
  13. [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 / detail
  14. [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 / detail
  15. [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 / detail
  16. [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 / detail
  17. [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 / detail
  18. [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 / detail
  19. [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 / detail
  20. Add a missing pass in ARM O3 pipeline — kuhar / detail
  21. [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 / detail

#14808 (Oct 1, 2019 11:30:56 AM)

  1. [Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in MachineLICM — kuhar / detail
  2. [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 / detail
  3. Reapply [Dominators][CodeGen] Clean up MachineDominators

    This reverts r373117 (git commit 159ef37735f21ae373282e0c53cbd9b6af1e0dfd)

    Phabricator review: https://reviews.llvm.org/D67976. — kuhar / detail
  4. [NFC] Updated tests after rL373371

    Forgot to run check-clang-semacxx. — xbolva00 / detail
  5. [OPENMP]Fix PR43330: OpenMP target: Mapping of partial arrays fails.

    Fixed calculation the size of the array sections. — abataev / detail
  6. [Diagnostics] Make -Wenum-compare-conditional off by default

    Too many false positives, eg. in Chromium. — xbolva00 / detail
  7. [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 / detail
  8. [PGO] Fix typos from r359612. NFC. — xur / detail
  9. [ARM] Some MVE shuffle plus extend tests. NFC — dmgreen / detail
  10. 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 / detail
  11. 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 / detail
  12. [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 / detail
  13. [InstCombine] Preserve 'exact' in -(X >>u 31) -> (X >>s 31) fold

    https://rise4fun.com/Alive/yR4 — lebedevri / detail
  14. [NFC][InstCombine] (Better) tests for sign-bit-smearing pattern

    https://rise4fun.com/Alive/JRU
    https://rise4fun.com/Alive/yR4 <- we can preserve 'exact' — lebedevri / detail
  15. [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 / detail
  16. [ReleaseProcess] Document requirement to set MACOSX_DEPLOYMENT_TARGET — Vedant Kumar / detail
  17. [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 / detail
  18. 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 / detail
  19. [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 / detail
  20. [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 / detail
  21. [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 / detail
  22. [Diagnostics] Move warning into the subgroup (-Wenum-compare-conditional) — xbolva00 / detail
  23. [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 / detail
  24. [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 / detail

#14807 (Oct 1, 2019 7:23:20 AM)

  1. [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 / detail
  2. 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 / detail
  3. Revert "Reland "[utils] Implement the llvm-locstats tool""

    This reverts commit rL373317 due to test failure on the
    clang-s390x-linux build bot. — djtodoro / detail
  4. Revert [InstCombine] sprintf(dest, "%s", str) -> memccpy(dest, str, 0, MAX)

    Seems to be slower than memcpy + strlen. — xbolva00 / detail
  5. [InstCombine] sprintf(dest, "%s", str) -> memccpy(dest, str, 0, MAX) — xbolva00 / detail
  6. [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 / detail
  7. [NFC][ARM][MVE] More tests

    Add some tail predication tests with fast math. — sam_parker / detail
  8. [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 / detail
  9. [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 / detail
  10. DIExpression::createFragmentExpression - silence static analyzer DIExpression* null dereference warning with an assertion. NFCI. — rksimon / detail
  11. VirtualFileSystem - replace dyn_cast<>+assert with cast<> calls. NFCI.

    Silences a number of clang static analyzer null dereference warnings. — rksimon / detail
  12. 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 / detail
  13. [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 / detail
  14. 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 / detail
  15. 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 / detail
  16. [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 / detail
  17. [obj2yaml] - Fix BB after r373315.

    The success return value for data extractor's cursor
    should also be checked. — grimar / detail
  18. [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 / detail
  19. 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 / detail
  20. [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 / detail
  21. [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 / detail

#14806 (Oct 1, 2019 2:41:58 AM)

  1. Fixup r373278: Move test to X86 directory

    ...since it's using an x86 triple. — rovka / detail
  2. [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 / detail
  3. [clang][lldb][NFC] Encapsulate ExternalASTMerger::ImporterSource

    NFC preparation work for upcoming ExternalASTMerger patches. — Raphael Isemann / detail
  4. 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 / detail
  5. 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 / detail
  6. [NFC][HardwareLoops] Update some iterators — sam_parker / detail
  7. 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 / detail
  8. [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 / detail
  9. [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 / detail
  10. [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 / detail
  11. [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 / detail
  12. [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 / detail

#14805 (Sep 30, 2019 10:27:06 PM)

  1. [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 / detail
  2. AMDGPU/GlobalISel: Select s1 src G_SITOFP/G_UITOFP — arsenm / detail
  3. Remove a undefined constructor introduced by r373244. — yuanfang / detail
  4. AMDGPU/GlobalISel: Add support for init.exec intrinsics

    TThe existing wave32 behavior seems broken and incomplete, but this
    reproduces it. — arsenm / detail
  5. AMDGPU/GlobalISel: Allow scc/vcc alternative mappings for s1 constants — arsenm / detail
  6. 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 / detail
  7. 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 / detail
  8. 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 / detail
  9. [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 / detail
  10. [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 / detail
  11. 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 / detail
  12. AMDGPU/GlobalISel: Select G_UADDO/G_USUBO — arsenm / detail

#14804 (Sep 30, 2019 6:20:25 PM)

  1. GlobalISel: Implement widenScalar for G_SITOFP/G_UITOFP sources

    Legalize 16-bit G_SITOFP/G_UITOFP for AMDGPU. — arsenm / detail
  2. 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 / detail
  3. 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 / detail
  4. 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 / detail
  5. 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 / detail
  6. [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 / detail
  7. During constant evaluation, handle CXXBindTemporaryExprs for
    array-of-class types, not just for class types. — rsmith / detail
  8. DebugInfo: Add parsing support for debug_loc base address specifiers — dblaikie / detail
  9. [c++20] Fix crash when constant-evaluating an assignment with a
    reference member access on its left-hand side. — rsmith / detail
  10. 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 / detail
  11. [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 / detail
  12. DebugInfo: Simplify section label caching/usage — dblaikie / detail
  13. 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 / detail
  14. Add partial bswap test to the X86 backend. NFC — deadalnix / detail
  15. [DAGCombiner] Clang format MatchRotate. NFC — deadalnix / detail
  16. Make function static that didn't need linkage.

    In r373247 I added a helper function, but neglected to make it static. — erichkeane / detail

#14803 (Sep 30, 2019 2:06:46 PM)

  1. Remove else-after-return — dblaikie / detail
  2. [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 / detail
  3. [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 / detail
  4. Refactor default constructor SFINAE in pair and tuple.

    Refactor the  recent implicit default constructor changes to match the
    existing SFINAE style. — ericwf / detail
  5. [ConstantFolding] Fold constant calls to log2()

    Somehow, folding calls to `log2()` with a constant was missing.

    Differential revision: https://reviews.llvm.org/D67300 — evandro / detail
  6. [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 / detail
  7. [DAGCombiner] Update MatchRotate so that it returns an SDValue. NFC — deadalnix / detail
  8. 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 / detail
  9. [NFC] Fix tests, second try — xbolva00 / detail
  10. [OPENMP50]Mark declare variant attribute as inheritable.

    Attribute must be inherited by the redeclarations. — abataev / detail
  11. [NFCI] Updated broken test — xbolva00 / detail
  12. [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 / detail
  13. 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 / detail
  14. [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 / detail
  15. [FunctionAttrs] Added noalias for memccpy/mempcpy arguments — xbolva00 / detail
  16. [InstCombine][NFC] visitShl(): call SimplifyQuery::getWithInstruction() once — lebedevri / detail
  17. [NFC][InstCombine] Redundant-left-shift-input-masking: add some more undef tests — lebedevri / detail
  18. 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 / detail
  19. [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 / detail
  20. [X86] Address post-commit review from code I accidentally commited in r373136.

    See https://reviews.llvm.org/D68167 — ctopper / detail
  21. Fix build warning for r373240. — yuanfang / detail
  22. [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 / detail
  23. Revert "[MC] Emit unused undefined symbol even if its binding is not set"

    This reverts r373168. It caused PR43511. — nico / detail
  24. [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 / detail
  25. [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 / detail
  26. [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 / detail
  27. 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 / detail
  28. [MCA] Use references to LSUnitBase in class Scheduler and add helper methods to acquire/release LS queue entries. NFCI — adibiagio / detail
  29. [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 / detail
  30. [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 / detail
  31. [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 / detail
  32. [EarlyCSE] Pass preserves AA. — asbirlea / detail
  33. [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 / detail
  34. 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 / detail

#14802 (Sep 30, 2019 9:52:55 AM)

  1. [LLDB] Only sent e-mail when the status changed — Jonas Devlieghere / detail
  2. [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 / detail
  3. [mips] Fix code indentation. NFC — atanasyan / detail
  4. Add tests for rotate with demanded bits. NFC — deadalnix / detail
  5. [InstCombine] add tests for negate disguised as mul; NFC — spatel / detail
  6. [AMDGPU] SIFoldOperands should not fold register acrocc the EXEC definition

          Reviewers: rampitec

          Differential Revision: https://reviews.llvm.org/D67662 — alex-t / detail
  7. [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 / detail
  8. [SSP] [2/3] Refactor an if/dyn_cast chain to switch on opcode. NFC

    Differential Revision: https://reviews.llvm.org/D67844 — probinson / detail
  9. [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 / detail
  10. [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 / detail
  11. Fix breakage of sphinx builders. Sorry for leaving this broken over the
    weekend! — kpn / detail
  12. 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 / detail
  13. 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 / detail
  14. [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 / detail
  15. [OPENMP] Fix comment, NFC. — abataev / detail
  16. [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 / detail
  17. [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 / detail
  18. [ConstantRange] add helper function addWithNoWrap().
    Differential Revision: https://reviews.llvm.org/D67339 — shchenz / detail
  19. gn build: Merge r373202 — gnsyncbot / detail
  20. [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 / detail

#14801 (Sep 30, 2019 5:11:39 AM)

  1. Revert "Reland "[utils] Implement the llvm-locstats tool""

    This reverts commit rL373183. — djtodoro / detail
  2. 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 / detail
  3. [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 / detail
  4. [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 / detail
  5. [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 / detail
  6. [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 / detail
  7. [NFC][ARM][MVE] More tests

    Add some loop tests that cover different float operations and types. — sam_parker / detail
  8. NFC changes to SelectionDAGBuilder::visitBitTestHeader(), preparing for PR43129 — hans / detail
  9. Pre-commit a test case for PR43129. — hans / detail
  10. [llvm-locstats] Fix the test for the Hexagon target — djtodoro / detail
  11. [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 / detail
  12. [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 / detail

#14800 (Sep 30, 2019 12:51:15 AM)

  1. [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 / detail
  2. 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 / detail
  3. 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 / detail
  4. [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 / detail
  5. [X86] Remove some redundant isel patterns. NFCI

    These are all also implemented in avx512_logical_lowering_types
    with support for masking. — ctopper / detail
  6. AMDGPU/GlobalISel: Fix select for v2s16 and/or/xor — arsenm / detail
  7. [test] Change llvm-readobj --arm-attributes to --arch-specific after r373125 — maskray / detail

#14799 (Sep 29, 2019 8:38:50 PM)

  1. [X86] Split v16i32/v8i64 bitreverse on avx512f targets without avx512bw to enable the use of vpshufb on the 256-bit halves. — ctopper / detail
  2. Undef the macros after their use

    Summary:

    Reviewers:
    t.p.northover

    Subscribers:

    Differential Revision: https://reviews.llvm.org/D46378 — hiraditya / detail
  3. [X86] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r373174 — maskray / detail
  4. [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 / detail

#14798 (Sep 29, 2019 4:32:50 PM)

  1. Don't crash if a variable with a constexpr destructor has a
    value-dependent initializer. — rsmith / detail

#14797 (Sep 29, 2019 12:22:36 PM)

  1. [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 / detail
  2. Add test case peeking through vector concat when combining insert into shuffles. NFC — deadalnix / detail
  3. [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 / detail
  4. [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 / detail
  5. [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 / detail
  6. [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 / detail

#14796 (Sep 29, 2019 8:08:58 AM)

  1. [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 / detail
  2. [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 / detail
  3. [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 / detail

#14795 (Sep 29, 2019 3:26:15 AM)

  1. [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 / detail
  2. [cxx_status] Mark P0784R7 as partially complete. — rsmith / detail
  3. 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 / detail

#14794 (Sep 28, 2019 11:11:57 PM)

  1. 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 / detail
  2. 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 / detail
  3. [Docs] Adds sections for Command Line and LibFuzzer articles

    Adds sections for Command Line and Libfuzzer articles on Programming Documentation page. — dr87 / detail

#14793 (Sep 28, 2019 7:05:46 PM)

  1. [X86] Enable isel to fold broadcast loads that have been bitcasted from FP into a vpternlog. — ctopper / detail
  2. [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 / detail
  3. [X86] Enable canonicalizeBitSelect for AVX512 since we can use VPTERNLOG now. — ctopper / detail
  4. [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 / detail

#14792 (Sep 28, 2019 2:50:55 PM)

  1. [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 / detail

#14791 (Sep 28, 2019 10:36:48 AM)

  1. 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 / detail
  2. [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 / detail
  3. 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 / detail

#14790 (Sep 28, 2019 5:47:34 AM)

  1. 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 / detail

#14789 (Sep 28, 2019 1:27:15 AM)

  1. [GlobalISel Enable memcpy inlining with optsize.

    We should be disabling inline for minsize, not optsize. — aemerson / detail
  2. [TimeProfiler] Fix "OptModule" section and add new "Backend" sections

    Remove unnecessary "OptModule" section. Add "PerFunctionPasses",
    "PerModulePasses" and "CodeGenPasses" sections under "Backend" section. — anton-afanasyev / detail
  3. 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 / detail

#14788 (Sep 27, 2019 9:14:33 PM)

  1. AMDGPU/GlobalISel: Avoid getting MRI in every function

    Store it in AMDGPUInstructionSelector to avoid boilerplate in nearly
    every select function. — arsenm / detail
  2. [X86] Add broadcast load unfolding support for VPTESTMD/Q and VPTESTNMD/Q. — ctopper / detail
  3. [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 / detail
  4. [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 / detail

#14787 (Sep 27, 2019 5:07:48 PM)

  1. [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 / detail
  2. [llvm-lipo] Add support for -arch

    Add support for -arch.

    Differential revision: https://reviews.llvm.org/D68116

    Test plan: make check-all — alexshap / detail
  3. [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 / detail
  4. [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 / detail
  5. [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 / detail
  6. [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 / detail
  7. 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 / detail
  8. For P0784R7: add support for explicit destructor calls and
    pseudo-destructor calls in constant evaluation. — rsmith / detail
  9. [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 / detail
  10. [profile] Add a test dependency on cxx-headers

    This enables running profile runtime tests which #include <string>, etc.
    via just `check-profile`. — Vedant Kumar / detail
  11. [InstSimplify] generalize FP folds with undef/NaN; NFC

    We can reuse this logic for things like fma. — spatel / detail
  12. [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 / detail

#14786 (Sep 27, 2019 12:56:14 PM)

  1. Revert [Dominators][CodeGen] Clean up MachineDominators

    This reverts r373101 (git commit 72c57ec3e6b320c31274dadb888dc16772b8e7b6) — kuhar / detail
  2. Revert XFAIL a codegen test AArch64/tailmerging_in_mbp.ll

    This reverts r373103 (git commit a524e630a793e18e7d5fabc2262781f310eb0279) — kuhar / detail
  3. [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 / detail
  4. [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 / detail
  5. [InstSimplify] add tests for fma/fmuladd with undef operand; NFC — spatel / detail
  6. [X86] Call SimplifyDemandedBits in combineGatherScatter any time the mask element is wider than i1, not just when AVX512 is disabled.

    The AVX2 intrinsics can still be used when AVX512 is enabled and
    those go through this path. So we should simplify them. — ctopper / detail
  7. [X86] Add test case to show failure to perform SimplifyDemandedBits on mask of avx2 gather intrinsics when avx512 is enabled. — ctopper / detail
  8. [InstCombine] Simplify shift-by-sext to shift-by-zext

    Summary:
    This is valid for any `sext` bitwidth pair:
    ```
    Processing /tmp/opt.ll..

    ----------------------------------------
      %signed = sext %y
      %r = shl %x, %signed
      ret %r
    =>
      %unsigned = zext %y
      %r = shl %x, %unsigned
      ret %r
      %signed = sext %y

    Done: 2016
    Optimization is correct!
    ```

    (This isn't so for funnel shifts, there it's illegal for e.g. i6->i7.)

    Main motivation is the C++ semantics:
    ```
    int shl(int a, char b) {
        return a << b;
    }
    ```
    ends as
    ```
      %3 = sext i8 %1 to i32
      %4 = shl i32 %0, %3
    ```
    https://godbolt.org/z/0jgqUq
    which is, as this shows, too pessimistic.

    There is another problem here - we can only do the fold
    if sext is one-use. But we can trivially have cases
    where several shifts have the same sext shift amount.
    This should be resolved, later.

    Reviewers: spatel, nikic, RKSimon

    Reviewed By: spatel

    Subscribers: efriedma, hiraditya, nlopes, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68103 — lebedevri / detail

#14782 (Sep 27, 2019 3:02:03 AM)

  1. Revert r372893 "[CodeGen] Replace -max-jump-table-size with -max-jump-table-targets"

    This caused severe compile-time regressions, see PR43455.

    > 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 — hans / detail
  2. Revert r373056: [clang-format] Reference qualifiers in member templates causing extra indentation

    Reason: this breaks unit tests. — ibiryukov / detail
  3. [sancov][NFC] Make filename Regexes "const"

    Summary:
    The const-correctness of match() was fixed in rL372764, which allows
    such static Regex objects to be marked const.

    Reviewers: thopre

    Reviewed By: thopre

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68091 — thopre / detail
  4. [clangd] Support OverloadExpr in findExplicitReferences

    Reviewers: kadircet

    Reviewed By: kadircet

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

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D68118 — ibiryukov / detail
  5. [clang-format] Reference qualifiers in member templates causing extra indentation

    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.

    Patch by Andreas Wass (AndWass)!

    Differential Revision: https://reviews.llvm.org/D68072 — ibiryukov / detail
  6. [NFC][InstCombine] Revisit shift-by-signext tests — lebedevri / detail
  7. [Alignment][NFC] MaybeAlign in GVNExpression

    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/D67922 — gchatelet / detail
  8. [MC][ARM] vscclrm disassembles as vldmia

    Happens only when the mve.fp subtarget feature is enabled:

    $ llvm-mc -triple thumbv8.1m.main -mattr=+mve.fp,+8msecext -disassemble <<< "0x9f,0xec,0x08,0x0b"
      .text
      vldmia  pc, {d0, d1, d2, d3}
    $ llvm-mc -triple thumbv8.1m.main -mattr=+8msecext -disassemble <<< "0x9f,0xec,0x08,0x0b"
      .text
      vscclrm {d0, d1, d2, d3, vpr}

    Assembling returns the correct encoding with or without mve.fp:

    $ llvm-mc -triple thumbv8.1m.main -mattr=+mve.fp,+8msecext -show-encoding <<< "vscclrm {d0-d3, vpr}"
      .text
      vscclrm {d0, d1, d2, d3, vpr}   @ encoding: [0x9f,0xec,0x08,0x0b]
    $ llvm-mc -triple thumbv8.1m.main -mattr=+8msecext -show-encoding <<< "vscclrm {d0-d3, vpr}"
      .text
      vscclrm {d0, d1, d2, d3, vpr}   @ encoding: [0x9f,0xec,0x08,0x0b]

    The problem seems to be in the TableGen description of VSCCLRMD.
    The least significant bit should be set to zero.

    Differential Revision: https://reviews.llvm.org/D68025 — alelab01 / detail
  9. Fix the 'directory' field in DumpCompilationDatabase and add test

    This broke in r371027 due to a missing negation
    (llvm::sys::fs::current_path returns false on success). — hans / detail
  10. [llvm-exegesis] Refactor how forbidden registers are computed.

    Summary:
    Right now latency generation can incorrectly select the scratch register
    as a dependency-carrying register.
    - Move the logic for preventing register selection from Uops
       implementation to common SnippetGenerator class.
    - Aliasing detection now takes a set of forbidden registers just like
       random register assignment does.

    Reviewers: gchatelet

    Subscribers: tschuett, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68084 — courbet / detail

#14781 (Sep 26, 2019 10:45:08 PM)

  1. [LoopInfo] Remove duplicates in ExitBlocks to reduce the compile time of
    hasDedicatedExits.

    For the compile time problem described in https://reviews.llvm.org/D67359,
    turns out the root cause is there are many duplicates in ExitBlocks so
    the algorithm complexity of hasDedicatedExits gets very high. If we remove
    the duplicates, the compile time issue is gone.

    Thanks to Philip Reames for raising a good question and it leads me to
    find the root cause.

    Differential Revision: https://reviews.llvm.org/D68107 — wmi / detail
  2. Revert "[LoopInfo] Limit the iterations to check whether a loop has dedicated
    exits"

    Get a better approach in https://reviews.llvm.org/D68107 to solve the problem.
    Revert the initial patch and will commit the new one soon.

    This reverts commit rL372990. — wmi / detail
  3. [test] Use %clang_cc1 instead of %clang -cc1 — maskray / detail
  4. Fix use-after-free found in Clang's testsuite.

    We need to discard all remaining cleanups if an earlier cleanup failed,
    otherwise we may try to rerun the remaining cleanups later, potentially
    after the scope containing the object is destroyed. (This can happen
    when checking a potential constant expression.) — rsmith / detail
  5. [WebAssembly] v128.andnot

    Summary:
    As specified at
    https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#bitwise-and-not

    Reviewers: aheejin

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68113 — tlively / detail
  6. [WebAssembly] SIMD Load and extend operations

    Summary:
    As specified at
    https://github.com/webassembly/simd/blob/master/proposals/simd/SIMD.md#load-and-extend.
    These instructions are behind the unimplemented-simd128 target feature
    for now because they have not been implemented in V8 yet.

    Reviewers: aheejin

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68058 — tlively / detail
  7. Revert r373034

    It breaks the build on MSVC. — comex / detail
  8. Speculative fix for gcc build. — pcc / detail

#14780 (Sep 26, 2019 6:32:29 PM)

  1. For P0784R7: add support for new (std::nothrow). — rsmith / detail
  2. For P0784R7: Add support for dynamic allocation with new / delete during
    constant evaluation. — rsmith / detail
  3. hwasan: Compatibility fixes for short granules.

    We can't use short granules with stack instrumentation when targeting older
    API levels because the rest of the system won't understand the short granule
    tags stored in shadow memory.

    Moreover, we need to be able to let old binaries (which won't understand
    short granule tags) run on a new system that supports short granule
    tags. Such binaries will call the __hwasan_tag_mismatch function when their
    outlined checks fail. We can compensate for the binary's lack of support
    for short granules by implementing the short granule part of the check in
    the __hwasan_tag_mismatch function. Unfortunately we can't do anything about
    inline checks, but I don't believe that we can generate these by default on
    aarch64, nor did we do so when the ABI was fixed.

    A new function, __hwasan_tag_mismatch_v2, is introduced that lets code
    targeting the new runtime avoid redoing the short granule check. Because tag
    mismatches are rare this isn't important from a performance perspective; the
    main benefit is that it introduces a symbol dependency that prevents binaries
    targeting the new runtime from running on older (i.e. incompatible) runtimes.

    Differential Revision: https://reviews.llvm.org/D68059 — pcc / detail
  4. [Consumed][NFC] Refactor handleCall to take function argument list.

    Differential Revision: https://reviews.llvm.org/D67569 — comex / detail
  5. Revert "gn build: (manually) merge r373028"

    This reverts commit r373029, which depends on r373028, which I reverted. — gribozavr / detail
  6. Revert "[clang-tidy] New check to warn when storing dispatch_once_t in non-static, non-global storage"

    This reverts commit r373028, because the new test fails on Linux. — gribozavr / detail
  7. [X86] Remove CodeGenOnly instructions added in r373021, but keep the isel patterns and add COPY_TO_REGCLASS to them. — ctopper / detail
  8. gn build: (manually) merge r373028 — nico / detail
  9. [clang-tidy] New check to warn when storing dispatch_once_t in non-static, non-global storage

    Summary:
    Creates a new darwin ClangTidy module and adds the darwin-dispatch-once-nonstatic check that warns about dispatch_once_t variables not in static or global storage. This catches a missing static for local variables in e.g. singleton initialization behavior, and also warns on storing dispatch_once_t values in Objective-C instance variables. C/C++ struct/class instances may potentially live in static/global storage, and are ignored for this check.

    The osx.API static analysis checker can find the non-static storage use of dispatch_once_t; I thought it useful to also catch this issue in clang-tidy when possible.

    Contributed By: mwyman

    Reviewers: benhamilton, hokein, stephanemoore, aaron.ballman, gribozavr

    Reviewed By: stephanemoore, gribozavr

    Subscribers: jkorous, arphaman, kadircet, usaxena95, NoQ, xazax.hun, lebedev.ri, mgorny, cfe-commits

    Tags: #clang, #clang-tools-extra

    Differential Revision: https://reviews.llvm.org/D67567 — stephanemoore / detail
  10. [X86] Remove unused arguments from a tablegen multiclass. NFC — ctopper / detail
  11. [X86] Add VMOVSSZrrk/VMOVSDZrrk/VMOVSSZrrkz/VMOVSDZrrkz to getUndefRegClearance.

    We have isel patterns that can put an IMPLICIT_DEF on one of
    the sources for these instructions. So we should make sure
    we break any dependencies there. This should be done by
    just using one of the other sources. — ctopper / detail
  12. Remove the AliasAnalysis argument in function areMemAccessesTriviallyDisjoint

    Reviewers:
      arsenm

    Differential Revision:
      https://reviews.llvm.org/D58360 — chfang / detail
  13. [OpenMP 5.0] Fix user-defined mapper lookup in sema

    This patches fixes the case when a user-defined mapper is attached to
    the elements of an array, and to report error when a mapper is used for
    types other than struct, class, and union.

    Patch by Lingda Li <lildmh@gmail.com>

    Differential Revision: https://reviews.llvm.org/D67978 — meinersbur / detail
  14. Always rebuild a DeclRefExpr if its FoundDecl would change.

    Fixes a regression introduced by r369999. — rsmith / detail
  15. [X86] Add CodeGenOnly instructions for (f32 (X86selects $mask, (loadf32 addr), fp32imm0) to use masked MOVSS from memory.

    Similar for f64 and having a non-zero passthru value.

    We were previously not trying to fold the load at all. Using
    a CodeGenOnly instruction allows us to use FR32X/FR64X as the
    register class to avoid a bunch of COPY_TO_REGCLASS. — ctopper / detail
  16. Revert [SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!")

    This reverts r372626 (git commit 6a278d9073bdc158d31d4f4b15bbe34238f22c18) — rupprecht / detail
  17. [LoopFusion] Add ability to fuse guarded loops

    Summary:
    This patch extends the current capabilities in loop fusion to fuse guarded loops
    (as defined in https://reviews.llvm.org/D63885). The patch adds the necessary
    safety checks to ensure that it safe to fuse the guarded loops (control flow
    equivalent, no intervening code, and same guard conditions). It also provides an
    alternative method to perform the actual fusion of guarded loops. The mechanics
    to fuse guarded loops are slightly different then fusing non-guarded loops, so I
    opted to keep them separate methods. I will be cleaning this up in later
    patches, and hope to converge on a single method to fuse both guarded and
    non-guarded loops, but for now I think the review will be easier to keep them
    separate.

    Reviewers: jdoerfert, Meinersbur, dmgreen, etiotto, Whitney

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65464 — kbarton / detail
  18. [Unroll] Do NOT unroll a loop with small runtime upperbound

    For a runtime loop if we can compute its trip count upperbound:

    Don't unroll if:
    1. loop is not guaranteed to run either zero or upperbound iterations; and
    2. trip count upperbound is less than UnrollMaxUpperBound
    Unless user or TTI asked to do so.

    If unrolling, limit unroll factor to loop's trip count upperbound.

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

    Change-Id: I6083c46a9d98b2e22cd855e60523fdc5a4929c73 — zzheng / detail

#14779 (Sep 26, 2019 2:24:02 PM)

  1. [AMDGPU] copy OtherPredicates from pseudo to VOP3_Real

    Differential Revision: https://reviews.llvm.org/D68102 — rampitec / detail
  2. [DAGCombine][X86][AArch64][NFC] Add tests for shift-by-signext — lebedevri / detail
  3. [InstCombine][NFC] Add tests for shift-by-signext — lebedevri / detail
  4. [InstCombine][NFC] Regenerate load-cmp.ll test — lebedevri / detail
  5. [LOOPGUARD] Disable loop with multiple loop exiting blocks.
    Summary: As discussed in the loop group meeting. With the current
    definition of loop guard, we should not allow multiple loop exiting
    blocks. For loops that has multiple loop exiting blocks, we can simply
    unable to find the loop guard.
    When getUniqueExitBlock() obtains a vector size not equals to one, that
    means there is either no exit blocks or there exists more than one
    unique block the loop exit to.
    If we don't disallow loop with multiple loop exit blocks, then with our
    current implementation, there can exist exit blocks don't post dominated
    by the non pre-header successor of the guard block.
    Reviewer: reames, Meinersbur, kbarton, etiotto, bmahjour
    Reviewed By: Meinersbur, kbarton
    Subscribers: fhahn, hiraditya, llvm-commits
    Tag: LLVM
    Differential Revision: https://reviews.llvm.org/D66529 — whitneyt / detail
  6. [OPENMP50]Emit warnings if the functions was defined/used before marked
    declare variant.

    We can use the original function if it was used/emitted already. So,
    just use warnings for these cases, not errors. — abataev / detail
  7. [AIX]Emit function descriptor csect in assembly

    This patch emits the function descriptor csect for functions with definitions
    under both 32-bit/64-bit mode on AIX.

    Differential Revision: https://reviews.llvm.org/D66724 — xiangling_liao / detail
  8. [NFC][emacs] remove out-of-date comment from tablegen-mode.el

    Summary:
    The syntax table was originally based on and attributed to
    jasmin.el, but was rewritten in r45192, so the comment that
    says the code comes from jasmin.el is no longer accurate. This
    change removes the comment, shortening the code a bit.

    Reviewers: MaskRay, lattner

    Reviewed By: MaskRay

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D68042 — inglorion / detail
  9. [clang-scan-deps] Allow continuation line backslashes followed by whitespace
    in the dependency source minimizer

    Clang allows continuations that have whitespace between the backslash and the newline.
    This patch ensures that the dependency source minimizer can handle the whitespace between
    the backslash and the newline when looking for a line continuation.

    Differential Revision: https://reviews.llvm.org/D68052 — arphaman / detail
  10. [NFC] Precommit tests for D68089 — xbolva00 / detail
  11. Revert "[analyzer] A speculative attempt to avoid gcc-7 crashes..."

    This reverts commit r372940 which was an overreaction to a flaky buildbot. — dergachev / detail
  12. Only pass -coverage-notes-file when emitting coverage

    The only functional change here is that -coverage-notes-file is not
    passed to -cc1 in some situations.

    This code appears to be trying to put the gcno and gcda output next to
    the final object file, but it's doing that in a really convoluted way
    that needs to be re-examined. It looks for -c or -S in the original
    command, and then looks at the -o argument if present in order to handle
    the -fno-integrated-as case. However, this doesn't work if this is a
    link command with multiple inputs. I looked into fixing this, but the
    check-profile test suite has a lot of dependencies on this behavior, so
    I left it all alone. — rnk / detail
  13. Document requirement of function attributes with constrained floating
    point.

    Reviewed by:    andrew.w.kaylor, uweigand, efriedma
    Approved by:    andrew.w.kaylor
    Differential Revision:  https://reviews.llvm.org/D67839 — kpn / detail
  14. DAGISelMatcherOpt - TGParser::ParseOperation - silence static analyzer cast_or_null<CheckTypeMatcher> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, replace with an null/isa assertion and cast<CheckTypeMatcher>. — rksimon / detail
  15. [InstCombine] Use m_Zero instead of isNullValue() when checking if a GEP index is all zeroes to prevent an infinite loop.

    The test case here previously infinite looped. Only one element from the GEP is used so SimplifyDemandedVectorElts would replace the other lanes in each index with undef leading to the first index being <0, undef, undef, undef>. But there's a GEP transform that tries to replace an index into a 0 sized type with a zero index. But the zero index check only works on ConstantInt 0 or ConstantAggregateZero so it would turn the index back to zeroinitializer. Resulting in a loop.

    The fix is to use m_Zero() to allow a vector of zeroes and undefs.

    Differential Revision: https://reviews.llvm.org/D67977 — ctopper / detail
  16. Move normalization of `\` in #includes from -fms-compatibility to -fms-extensions

    Handling backslashes in include paths in the implementation isn't
    non-conforming. — rnk / detail

#14776 (Sep 26, 2019 4:49:16 AM)

  1. [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 / detail
  2. [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 / detail
  3. [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 / detail
  4. 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 / detail
  5. 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 / detail
  6. [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 / detail
  7. [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 / detail
  8. 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 / detail
  9. 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 / detail
  10. [BPF] Remove unused variables. NFCI.

    Fixes a dyn_cast<> null dereference warning. — rksimon / detail
  11. [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 / detail
  12. 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 / detail
  13. [SLPVectorizer][X86] Add SSE common check prefix to let us merge SSE2+SLM checks — rksimon / detail
  14. [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 / detail
  15. [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 / detail
  16. [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 / detail
  17. [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 / detail
  18. [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 / detail

#14775 (Sep 26, 2019 12:29:21 AM)

  1. [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 / detail
  2. [analyzer] A speculative attempt to avoid gcc-7 crashes caused by r372942. — dergachev / detail
  3. [SortIncludesTest] Add SortPriority fields to fix -Wmissing-field-initializers after D64695/r372919 — uabelho / detail
  4. [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 / detail
  5. [analyzer] Avoid small vectors of non-default-constructibles.

    Unconfuses certain compilers. — dergachev / detail
  6. [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 / detail

#14774 (Sep 25, 2019 8:16:07 PM)

  1. [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 / detail
  2. [clang-format] Add SortPriority fields to fix -Wmissing-field-initializers after D64695/r372919 — maskray / detail
  3. 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 / detail
  4. [libFuzzer] [NFC] Fix grammar error with "it's" — hctim / detail
  5. [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 / detail
  6. [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 / detail
  7. [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 / detail
  8. [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 / detail
  9. [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 / detail

#14773 (Sep 25, 2019 4:02:54 PM)

  1. [InstCombine] foldUnsignedUnderflowCheck(): one last pattern with 'sub' (PR43251)

    https://rise4fun.com/Alive/0j9 — lebedevri / detail
  2. [NFC][InstCombine] Tests for 'base u<= offset && (base - offset) != 0' pattern (PR43251) — lebedevri / detail
  3. [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 / detail
  4. [NFC][InstSimplify] More exaustive test coverage for 'A </>/>=/<= B &&/|| (A - B) !=/== 0' pattern (PR43251) — lebedevri / detail
  5. 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 / detail
  6. 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 / detail
  7. [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 / detail
  8. [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 / detail
  9. [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 / detail
  10. [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 / detail
  11. [OPENMP50]Parsing/sema support for 'implementation/vendor' context
    selector.

    Added basic parsing/semantic support for
    'implementation={vendor(<vendor>)}' context selector. — abataev / detail
  12. [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 / detail
  13. [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 / detail
  14. [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 / detail
  15. [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 / detail
  16. [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 / detail

#14772 (Sep 25, 2019 11:53:53 AM)

  1. 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 / detail
  2. [AMDGPU] Improve fma.f64 test. NFC. — rampitec / detail
  3. add tests that debug mode catches nullptr->string_view conversions in comparison operators — ericwf / detail
  4. [AMDGPU] gfx10 v_fmac_f16 operand folding

    Fold immediates into v_fmac_f16.

    Differential Revision: https://reviews.llvm.org/D68037 — rampitec / detail
  5. [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 / detail
  6. [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 / detail
  7. [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 / detail
  8. [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 / detail
  9. [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 / detail
  10. [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 / detail
  11. Add a missing default parameter to regex::assign. This is LWG3296; reviewed as https://reviews.llvm.org/D67944 — marshall / detail
  12. [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 / detail
  13. [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 / detail
  14. 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 / detail
  15. [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 / detail
  16. [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 / detail
  17. [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 / detail
  18. [NFC] Fix typo in `getPreviousDecl` comment. — ymandel / detail
  19. [x86] add test for multi-use scalarization of vector binop; NFC — spatel / detail
  20. [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 / detail
  21. [PatternMatch] Generalize brc_match (NFC).

    Preparation for D68013. — fhahn / detail
  22. Revert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from Decl::printQualifiedName

    Reason: causes a test failure, will investigate and re-land with a fix. — ibiryukov / detail

#14771 (Sep 25, 2019 7:38:57 AM)

  1. [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 / detail
  2. 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 / detail
  3. [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 / detail
  4. [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 / detail
  5. [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 / detail
  6. [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 / detail
  7. Fix cppcheck variable shadow warning. NFCI. — rksimon / detail
  8. Add missing ExplicitTy default initialization to ConstantExprKeyType constructors.

    Fixes cppcheck uninitialized variable warnings — rksimon / detail
  9. [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 / detail
  10. Revert [IR] allow fast-math-flags on phi of FP values

    This reverts r372866 (git commit dec03223a97af0e4dfcb23da55c0f7f8c9b62d00) — spatel / detail
  11. [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 / detail
  12. [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 / detail
  13. [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 / detail
  14. [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 / detail
  15. [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 / detail
  16. [clangd] Add missing header guard, NFC. — hokein / detail
  17. [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 / detail
  18. [AMDGPU][MC][DOC] Updated AMD GPU assembler description.

    Summary of changes:
    - Updated to reflect recent changes in assembler;
    - Minor bugfixing and improvements. — dpreobra / detail
  19. [DAG] Pull out minimum shift value calc into a helper function. NFCI. — rksimon / detail
  20. [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 / detail
  21. [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 / detail
  22. gn build: (manually) merge r372843 — nico / detail
  23. 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 / detail
  24. Add a release note for r372844 — hans / detail
  25. [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 / detail
  26. 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 / detail
  27. gn build: Merge r372841 — gnsyncbot / detail
  28. [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 / detail
  29. [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 / detail
  30. [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 / detail

#14770 (Sep 25, 2019 3:10:36 AM)

  1. [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 / detail
  2. 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 / detail
  3. Add tracing in pickNodeFromQueue.

    This matches GenericScheduler::pickNodeFromQueue, from which this
    function was mostly cut and pasted. — foad / detail
  4. 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 / detail
  5. [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 / detail
  6. [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 / detail
  7. [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 / detail

#14769 (Sep 24, 2019 10:50:01 PM)

  1. [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 / detail
  2. [AArch64][GlobalISel] Tweak legalization rule for G_BSWAP to handle widening s16. — aemerson / detail
  3. [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 / detail
  4. [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 / detail
  5. [Powerpc][LoopPreIncPrep] NFC - refactor this pass for ds/dq form.

    Differential Revision: https://reviews.llvm.org/D67431 — shchenz / detail
  6. [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 / detail

#14768 (Sep 24, 2019 6:36:44 PM)

  1. [Docs] Moves Reference docs to new page

    Moves Reference docs to new page. Also adds a table of contents to Getting Involved page. — dr87 / detail
  2. [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 / detail
  3. 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 / detail
  4. [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 / detail
  5. [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 / detail
  6. [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 / detail
  7. [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 / detail
  8. 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 / detail
  9. [PGO][PGSO] ProfileSummary changes.

    (Split of off D67120)

    ProfileSummary changes for profile guided size optimization.

    Differential Revision: https://reviews.llvm.org/D67377 — yamauchi / detail
  10. [libc++] Try fixing tests that fail on GCC 5 and older — Louis Dionne / detail

#14767 (Sep 24, 2019 2:23:24 PM)

  1. [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 / detail
  2. [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 / detail
  3. [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 / detail
  4. [NFC] Strenghten preconditions for warning — xbolva00 / detail
  5. [HIP] Support new kernel launching API

    Differential Revision: https://reviews.llvm.org/D67947 — yaxunl / detail
  6. Extends the expansion of the LWZtoc pseduo op for AIX.

    Differential Revision: https://reviews.llvm.org/D67853 — sfertile / detail
  7. [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 / detail

#14759 (Sep 23, 2019 6:39:47 PM)

  1. 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 / detail
  2. [static analyzer] Remove --analyze-auto

    Differential Revision: https://reviews.llvm.org/D67934 — Jan Korous / detail
  3. [static analyzer] Define __clang_analyzer__ macro in driver

    Differential Revision: https://reviews.llvm.org/D67938 — Jan Korous / detail
  4. [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 / detail
  5. [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 / detail
  6. [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 / detail
  7. [llvm-cov] NFC: Specify a specific C++ standard in the test.

    Makes life easier for downstream users with customized default standard. — dergachev / detail
  8. [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 / detail
  9. Revert "Support for DWARF-5 C++ language tags."

    This reverts commit bf9c8ffb54943c6d77398adbedddf05ef9724007. — Jonas Devlieghere / detail
  10. [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 / detail
  11. [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 / detail
  12. 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 / detail
  13. [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 / detail
  14. [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 / detail
  15. [Diagnostics] Warn for enum constants in bool context (-Wint-in-bool-context; GCC compatibility)

    Extracted from D63082. — xbolva00 / detail
  16. 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 / detail
  17. Fix uninitialized variable warning. NFCI. — rksimon / detail
  18. [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 / detail

#14758 (Sep 23, 2019 2:27:14 PM)

  1. [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 / detail
  2. [InstCombine] foldOrOfICmps(): Acquire SimplifyQuery with set CxtI

    Extracted from https://reviews.llvm.org/D67849#inline-610377 — lebedevri / detail
  3. [InstCombine] foldAndOfICmps(): Acquire SimplifyQuery with set CxtI

    Extracted from https://reviews.llvm.org/D67849#inline-610377 — lebedevri / detail
  4. [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 / detail
  5. [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 / detail
  6. [ASTImporter] 2nd attempt to fix Windows buildbot test errors — martong / detail
  7. [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 / detail
  8. [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 / detail
  9. [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 / detail
  10. [IR] Add getExtendedType() to IntegerType and Type (dispatching to IntegerType or VectorType) — lebedevri / detail
  11. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): improve comment — lebedevri / detail
  12. [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 / detail
  13. [OPENMP]Use standard parsing for 'match' clause, NFC.

    Reused standard clauses parsing scheme for parsing/matching 'match'
    clause in 'declare variant' directive. — abataev / detail
  14. [ASTImporter] Attempt to fix Windows buildbot test errors — martong / detail
  15. [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 / detail
  16. NFC: Fix a poorly-written test

    The author of r364954 foolishly forgot that == binds tighter than ?: — epilk / detail

#14757 (Sep 23, 2019 10:12:37 AM)

  1. [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 / detail
  2. [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 / detail
  3. [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 / detail
  4. [Clang-doc] NFC: Fixed link to llvm bugs in documentation — sureyeaah / detail
  5. [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 / detail
  6. [InstCombine] foldUnsignedUnderflowCheck(): s/Subtracted/ZeroCmpOp/ — lebedevri / detail
  7. 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 / detail
  8. [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 / detail
  9. [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 / detail
  10. 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 / detail
  11. [libc++] Mark iostreams test as XFAIL on older macOSes — Louis Dionne / detail
  12. HexagonLoopIdiomRecognition - silence static analyzer dyn_cast<> null dereference warnings. NFCI. — rksimon / detail
  13. [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 / detail
  14. [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 / detail
  15. [Hexagon] Bitcast v4i16 to v8i8, unify no-op casts between scalar and HVX — kparzysz / detail
  16. [docs] Fix some typos in InternalsManual — svenvh / detail
  17. [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 / detail
  18. [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 / detail
  19. 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 / detail
  20. [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 / detail
  21. [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 / detail
  22. Added a test for agreement between paths used in ClangTidy's diagnostics and header filter

    This test would have been broken by r372388. — gribozavr / detail
  23. [x86] fix assert with horizontal math + broadcast of vector (PR43402)

    https://bugs.llvm.org/show_bug.cgi?id=43402 — spatel / detail
  24. [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 / detail
  25. [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 / detail
  26. [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 / detail
  27. 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 / detail
  28. Revert "[clang-tidy] Fix relative path in header-filter."

    This reverts commit r372388. It made '-header-filter' inconsistent with
    paths printed in diagnostics. — gribozavr / detail
  29. [Diagnostics] Avoid -Wsizeof-array-div when dividing the size of a nested array by the size of the deepest base type — xbolva00 / detail
  30. 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 / detail
  31. 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 / detail
  32. gn build: Merge r372595 — gnsyncbot / detail
  33. [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 / detail

#14756 (Sep 23, 2019 5:35:41 AM)

  1. [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 / detail
  2. Removed dead code from Stencil.h — gribozavr / detail
  3. Removed an incorred namespace-end comment — gribozavr / detail
  4. [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 / detail
  5. 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 / detail
  6. TargetInstrInfo::getStackSlotRange - fix "variable used but never read" analyzer warning. NFCI.

    We don't need to divide the BitSize local variable at all. — rksimon / detail
  7. gn build: Merge r372564 — gnsyncbot / detail
  8. Revert "Reland "[utils] Implement the llvm-locstats tool""

    This reverts commit rL372554. — djtodoro / detail
  9. [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 / detail
  10. CriticalAntiDepBreaker - Assert that we've found the bottom of the critical path. NFCI.

    Silences static analyzer null dereference warnings. — rksimon / detail
  11. [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 / detail
  12. [NFC] Fixed clang wasm test after rL372573

    These tests should not depend on -O1.. — xbolva00 / detail
  13. [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 / detail
  14. [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 / detail
  15. [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 / detail
  16. [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 / detail
  17. [Alignment] fix build — gchatelet / detail
  18. [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 / detail
  19. [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 / detail
  20. [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 / detail

#14755 (Sep 23, 2019 1:15:51 AM)

  1. [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 / detail
  2. 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 / detail
  3. 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 / detail
  4. [X86] Canonicalize all zeroes vector to RHS in X86DAGToDAGISel::tryVPTESTM. — ctopper / detail
  5. [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 / detail
  6. [X86] Add 32-bit command line to avx512f-vec-test-testn.ll — ctopper / detail
  7. For P0784R7: add further testing of requirements on constexpr
    destructors. — rsmith / detail
  8. 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 / detail
  9. Extension: Mark the default constructor of chrono::duration as conditionally noexcept — marshall / detail

#14754 (Sep 22, 2019 9:03:04 PM)

  1. 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 / detail
  2. [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 / detail
  3. [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 / detail
  4. [X86][SelectionDAGBuilder] Move the hack for handling MMX shift by i32 intrinsics into the X86 backend.

    This intrinsics should be shift by immediate, but gcc allows any
    i32 scalar and clang needs to match that. So we try to detect the
    non-constant case and move the data from an integer register to an
    MMX register.

    Previously this was done by creating a v2i32 build_vector and
    bitcast in SelectionDAGBuilder. This had to be done early since
    v2i32 isn't a legal type. The bitcast+build_vector would be DAG
    combined to X86ISD::MMX_MOVW2D which isel will turn into a
    GPR->MMX MOVD.

    This commit just moves the whole thing to lowering and emits
    the X86ISD::MMX_MOVW2D directly to avoid the illegal type. The
    test changes just seem to be due to nodes being linearized in a
    different order. — ctopper / detail

#14753 (Sep 22, 2019 4:52:13 PM)

  1. [X86] Require last argument to LWPINS/LWPVAL builtins to be an ICE. Add ImmArg to the llvm intrinsics.

    Update the isel patterns to use timm instead of imm. — ctopper / detail
  2. [NFC] Fixed failed test — xbolva00 / detail
  3. [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI is profitable (PR43381)

    Summary:
    PR43381 notes that while we are good at matching `(X >> C1) & C2` as BEXTR/BEXTRI,
    we only do that if we either have BEXTRI (TBM),
    or if BEXTR is marked as being fast (`-mattr=+fast-bextr`).
    In all other cases we don't match.

    But that is mainly only true for AMD CPU's.
    However, for all the CPU's for which we have sched models,
    the BZHI is always fast (or the sched models are all bad.)

    So if we decide that it's unprofitable to emit BEXTR/BEXTRI,
    we should consider falling-back to BZHI if it is available,
    and follow-up with the shift.

    While it's really tempting to do something because it's cool
    it is wise to first think whether it actually makes sense to do.
    We shouldn't just use BZHI because we can, but only it it is beneficial.
    In particular, it isn't really worth it if the input is a register,
    mask is small, or we can fold a load.
    But it is worth it if the mask does not fit into 32-bits.

    (careful, i don't know much about intel cpu's, my choice of `-mcpu` may be bad here)
    Thus we manage to fold a load:
    https://godbolt.org/z/Er0OQz
    Or if we'd end up using BZHI anyways because the mask is large:
    https://godbolt.org/z/dBJ_5h
    But this isn'r actually profitable in general case,
    e.g. here we'd increase microop count
    (the register renaming is free, mca does not model that there it seems)
    https://godbolt.org/z/k6wFoz
    Likewise, not worth it if we just get load folding:
    https://godbolt.org/z/1M1deG

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

    Reviewers: RKSimon, craig.topper, davezarzycki, spatel

    Reviewed By: craig.topper, davezarzycki

    Subscribers: andreadb, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67875 — lebedevri / detail
  4. [Diagnostics] Warn if ?: with integer constants always evaluates to true

    Extracted from D63082. GCC has this warning under -Wint-in-bool-context, but as noted in the D63082's review, we should put it under TautologicalConstantCompare. — xbolva00 / detail
  5. [clang] fixing conditional explicit for out-of-line definition PR42980

    Summary: not every read in CXXConstructorDecl::getExplicitSpecifierInternal() was made on the canonical declaration.

    Reviewers: rsmith, aaron.ballman

    Reviewed By: rsmith

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67889 — tyker / detail
  6. Verifier - silence static analyzer dyn_cast<VectorType> null dereference warnings. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use cast<VectorType> directly and if not assert will fire for us. — rksimon / detail
  7. [AMDGPU] isSDNodeAlwaysUniform - silence static analyzer dyn_cast<LoadSDNode> null dereference warning. NFCI.

    The static analyzer is warning about a potential null dereference, but we should be able to use cast<LoadSDNode> directly and if not assert will fire for us. — rksimon / detail
  8. [clang] [Basic] Enable __has_feature(leak_sanitizer)

    Add a 'leak_sanitizer' feature akin to existing '*_sanitizer' features
    to let programmers switch code paths accounting for leak sanitizers
    being enabled.

    Differential Revision: https://reviews.llvm.org/D67719 — mgorny / detail
  9. [X86] Fix some VCVTPS2PH isel patterns where 'i32' was used instead of 'timm'

    This seems to have completed omitted any check for the opcode
    of the operand in the isel table. — ctopper / detail
  10. [X86][TableGen] Allow timm to appear in output patterns. Use it to remove ConvertToTarget opcodes from the X86 isel table.

    We're now using a lot more TargetConstant nodes in SelectionDAG.
    But we were still telling isel to convert some of them
    to TargetConstants even though they already are. This is because
    isel emits a conversion anytime the output pattern has a an 'imm'.
    I guess for patterns in instructions we take the 'timm' from the
    'set' pattern, but for Pat patterns with explcicit output we
    previously had to say 'imm' since 'timm' wasn't allowed in outputs. — ctopper / detail

#14752 (Sep 22, 2019 12:40:32 PM)

  1. [NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875) — lebedevri / detail
  2. [X86] Update commutable EVEX vcmp patterns to use timm instead of imm.

    We need to match TargetConstant, not Constant. This was broken
    in r372338, but we lacked test coverage. — ctopper / detail
  3. [X86] Add more tests for commuting evex vcmp instructions during isel to fold a load.

    Some of the isel patterns were not updated to check for
    TargetConstant instead of Constant in r372338. — ctopper / detail
  4. [SelectionDAG] computeKnownBits/ComputeNumSignBits - cleanup demanded/unknown paths. NFCI.

    Merge the calls, just adjust the demandedelts if we have a valid extract_subvector constant index, else demand all elts. — rksimon / detail
  5. [XRay] Silence static analyzer dyn_cast<BufferExtents> null dereference warning. NFCI. — rksimon / detail
  6. [LSR] Silence static analyzer null dereference warnings with assertions. NFCI.

    Add assertions to make it clear that GenerateIVChain / NarrowSearchSpaceByPickingWinnerRegs should succeed in finding non-null values — rksimon / detail
  7. ConstantHoisting - Silence static analyzer dyn_cast<PointerType> null dereference warning. NFCI. — rksimon / detail
  8. [CLANG][BPF] permit any argument type for __builtin_preserve_access_index()

    Commit c15aa241f821 ("[CLANG][BPF] change __builtin_preserve_access_index()
    signature") changed the builtin function signature to
      PointerT __builtin_preserve_access_index(PointerT ptr)
    with a pointer type as the argument/return type, where argument and
    return types must be the same.

    There is really no reason for this constraint. The builtin just
    presented a code region so that IR builtins
      __builtin_{array, struct, union}_preserve_access_index
    can be applied.

    This patch removed the pointer type restriction to permit any
    argument type as long as it is permitted by the compiler.

    Differential Revision: https://reviews.llvm.org/D67883 — yhs / detail
  9. gn build: Friendlier error on invalid entries in llvm_targets_to_build — nico / detail
  10. [Cost][X86] Add more missing vector truncation costs

    The AVX512 cases still need some work to correct recognise the PMOV truncation cases. — rksimon / detail
  11. gn build: consolidate "Nothing to do" branches in targets.gni

    No behavior change. — nico / detail

#14751 (Sep 22, 2019 8:29:59 AM)

  1. [compiler-rt] Fix lint check failure on comments

    This fixes buildbot failures for https://reviews.llvm.org/rL372459.
    (at least on PowerPC/Z )

    The fix is generated by running clang-format on the error lines only. — jsji / detail
  2. [InstCombine] allow icmp+binop folds before min/max bailout (PR43310)

    This has the potential to uncover missed analysis/folds as shown in the
    min/max code comment/test, but fewer restrictions on icmp folds should
    be better in general to solve cases like:
    https://bugs.llvm.org/show_bug.cgi?id=43310 — spatel / detail
  3. [InstCombine] add tests for icmp fold hindered by min/max; NFC — spatel / detail
  4. Fix uninitialized variable warning. NFCI. — rksimon / detail
  5. [AArch64] AArch64StackTagging - Silence static analyzer dyn_cast<> null dereference warning. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us. — rksimon / detail
  6. gn build: Add missing RISCV to llvm_targets_to_build="all" — nico / detail
  7. gn build: Add build files for llvm/lib/Target/AVR

    Differential Revision: https://reviews.llvm.org/D67872 — nico / detail
  8. [NVPTX] NVPTXLowerAggrCopies - Silence static analyzer dyn_cast<StoreInst> null dereference warning. NFCI. — rksimon / detail
  9. [Lanai] LanaiAsmParser - Silence static analyzer dyn_cast null dereference warnings. NFCI.

    We were already doing this dyn_cast && isa<> && cast<> pattern for some add*Operands methods, just do this more consistently to stop clang static analyzer warning so much. — rksimon / detail
  10. [VPlan] Silence static analyzer dyn_cast null dereference warning. NFCI. — rksimon / detail
  11. AMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI. — rksimon / detail
  12. [MIPS] Don't dereference dyn_cast<> Constant results. NFCI.

    The static analyzer is warning about potential null dereferences, but we should be able to use cast<> directly and if not assert will fire for us. — rksimon / detail
  13. [Hexagon] Don't dereference dyn_cast<ConstantFPSDNode> result. NFCI.

    The static analyzer is warning about potential null dereference, but we should be able to use cast<ConstantFPSDNode> directly and if not assert will fire for us. — rksimon / detail

#14743 (Sep 21, 2019 3:49:36 PM)

  1. NFC: Change ObjCQualified*TypesAreCompatible to take
    ObjCObjectPointerType arguments.

    All callers already had one, just creating a QualType to pass, after
    which the function cast it right back. — jyknight / detail
  2. [InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0  -->  Y == 0

    https://rise4fun.com/Alive/v9Y4 — lebedevri / detail
  3. [InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or symmetry

    Only a single `X >= Y && Y == 0  -->  Y == 0` fold appears to be missing. — lebedevri / detail
  4. [NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck().

    One case is not handled. — lebedevri / detail
  5. [Docs] Updates sidebar links

    Adds sidebar links to mailing lists, IRC, and meetups and social events. — dr87 / detail
  6. [Docs] Adds new page for Getting Involved articles

    Adds a new page for existing Getting Involved, Development Process, and Community Proposals articles. Also moves Mailing Lists, Meetups and social events, and IRC sections. — dr87 / detail

#14742 (Sep 21, 2019 12:59:43 PM)

  1. [CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header

    This fixes (one aspect of) compilation of LLDB with MSVC for ARM64.

    LLDB source files include intrin.h, and the MSVC intrin.h transitively
    includes arm64intr.h, which has an ARM64_FPSR define, which clashes
    with the enum declaration.

    Differential Revision: https://reviews.llvm.org/D67864 — mstorsjo / detail
  2. SROA: Check Total Bits of vector type

    While Promoting alloca instruction of Vector Type,
    Check total size in bits of its slices too.
    If they don't match, don't promote the alloca instruction.

    Bug : https://bugs.llvm.org/show_bug.cgi?id=42585 — ssarda / detail
  3. Test mail. NFC.

    Testing commit acces. NFC. — ssarda / detail
  4. Recommit [SampleFDO] Expose an interface to return the size of a section
    or the size of the profile for profile in ExtBinary format.

    Fix a test failure on Mac.

    [SampleFDO] Expose an interface to return the size of a section or the
    size of the profile for profile in ExtBinary format.

    Sometimes we want to limit the size of the profile by stripping some functions
    with low sample count or by stripping some function names with small text size
    from profile symbol list. That requires the profile reader to have the
    interfaces returning the size of a section or the size of total profile. The
    patch add those interfaces.

    At the same time, add some dump facility to show the size of each section.

    Differential revision: https://reviews.llvm.org/D67726 — wmi / detail

#14741 (Sep 21, 2019 10:03:41 AM)

  1. [Attributor] Implement "norecurse" function attribute deduction

    Summary:
    This patch introduces `norecurse` function attribute deduction.

    `norecurse` will be deduced if the following conditions hold:
    * The size of SCC in which the function belongs equals to 1.
    * The function doesn't have self-recursion.
    * We have `norecurse` for all call site.

    To avoid a large change, SCC is calculated using scc_iterator in InfoCache initialization for now.

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67751 — uenoku / detail
  2. [Support] Add a DataExtractor constructor that takes ArrayRef<uint8_t>

    The new constructor can simplify some llvm-readobj call sites.

    Reviewed By: grimar, dblaikie

    Differential Revision: https://reviews.llvm.org/D67797 — maskray / detail
  3. [Docs] Bug fix for document not included in toctree

    Fixes 'document not included in toctree' bug for FAQ and Lexicon topics. — dr87 / detail
  4. [Docs] Updates sidebar links

    Adds additional links to sidebar. Also removes Glossary and FAQ from LLVM Design & Overview section. (These links now reside on the sidebar.) — dr87 / detail

#14740 (Sep 21, 2019 7:06:05 AM)

  1. [NFC][X86] Adjust check prefixes in bmi.ll (PR43381) — lebedevri / detail

#14739 (Sep 21, 2019 3:31:34 AM)

  1. [AArch64][GlobalISel] Implement selection for G_SHL of <2 x i64>

    Simple continuation of existing selection support. — aemerson / detail
  2. [AArch64][GlobalISel] Selection support for G_ASHR of <2 x s64>

    Just add an extra case to the existing selection logic. — aemerson / detail
  3. [AArch64][GlobalISel] Make <4 x s32> G_ASHR and G_LSHR legal. — aemerson / detail
  4. Revert "[SampleFDO] Expose an interface to return the size of a section or the size"

    This reverts commit f118852046a1d255ed8c65c6b5db320e8cea53a0.

    Broke the macOS build/greendragon bots. — aemerson / detail
  5. [MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount

    Recommit: fix asan errors.

    The way MachinePipeliner uses these target hooks is stateful - we reduce trip
    count by one per call to reduceLoopCount. It's a little overfit for hardware
    loops, where we don't have to worry about stitching a loop induction variable
    across prologs and epilogs (the induction variable is implicit).

    This patch introduces a new API:

      /// Analyze loop L, which must be a single-basic-block loop, and if the
      /// conditions can be understood enough produce a PipelinerLoopInfo object.
      virtual std::unique_ptr<PipelinerLoopInfo>
      analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const;

    The return value is expected to be an implementation of the abstract class:

      /// Object returned by analyzeLoopForPipelining. Allows software pipelining
      /// implementations to query attributes of the loop being pipelined.
      class PipelinerLoopInfo {
      public:
        virtual ~PipelinerLoopInfo();
        /// Return true if the given instruction should not be pipelined and should
        /// be ignored. An example could be a loop comparison, or induction variable
        /// update with no users being pipelined.
        virtual bool shouldIgnoreForPipelining(const MachineInstr *MI) const = 0;

        /// Create a condition to determine if the trip count of the loop is greater
        /// than TC.
        ///
        /// If the trip count is statically known to be greater than TC, return
        /// true. If the trip count is statically known to be not greater than TC,
        /// return false. Otherwise return nullopt and fill out Cond with the test
        /// condition.
        virtual Optional<bool>
        createTripCountGreaterCondition(int TC, MachineBasicBlock &MBB,
                                     SmallVectorImpl<MachineOperand> &Cond) = 0;

        /// Modify the loop such that the trip count is
        /// OriginalTC + TripCountAdjust.
        virtual void adjustTripCount(int TripCountAdjust) = 0;

        /// Called when the loop's preheader has been modified to NewPreheader.
        virtual void setPreheader(MachineBasicBlock *NewPreheader) = 0;

        /// Called when the loop is being removed.
        virtual void disposed() = 0;
      };

    The Pipeliner (ModuloSchedule.cpp) can use this object to modify the loop while
    allowing the target to hold its own state across all calls. This API, in
    particular the disjunction of creating a trip count check condition and
    adjusting the loop, improves the code quality in ModuloSchedule.cpp. — jamesm / detail
  6. Attempt to fix a windows buildbot failure — szelethus / detail
  7. Add __lsan::ScopedInterceptorDisabler for strerror(3)

    Summary:
    strerror(3) on NetBSD uses internally TSD with a destructor that is never
    fired for exit(3). It's correctly called for pthread_exit(3) scenarios.

    This is a case when a leak on exit(3) is expected, unavoidable and harmless.

    Reviewers: joerg, vitalybuka, dvyukov, mgorny

    Reviewed By: vitalybuka

    Subscribers: dmgreen, kristof.beyls, jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67337 — kamil / detail
  8. Avoid memory leak in ASan test

    Summary:
    Add missing free(3) for the malloc(3) call.

    Detected on NetBSD with LSan.

    Reviewers: joerg, mgorny, vitalybuka, dvyukov

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67330 — kamil / detail

#14738 (Sep 21, 2019 12:33:14 AM)

  1. Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD

    Summary:
    The atexit(3) and __cxa_atexit() calls allocate internally memory and free on exit,
    after executing all callback. This causes false positives as DoLeakCheck() is called
    from the atexit handler. In the LSan/ASan tests there are strict checks triggering
    false positives here.

    Intercept all atexit(3) and __cxa_atexit() calls and disable LSan when calling the
    real functions.

    Stop tracing allocations in pthread_atfork(3) funtions, as there are performed
    internal allocations that are not freed for the time of running StopTheWorld()
    code. This avoids false-positives.

    The same changes have to be replicated in the ASan and LSan runtime.

    Non-NetBSD OSs are not tested and this code is restricted to NetBSD only.

    Reviewers: dvyukov, joerg, mgorny, vitalybuka, eugenis

    Reviewed By: vitalybuka

    Subscribers: jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67331 — kamil / detail
  2. [X86] Use sse_load_f32/f64 and timm in patterns for memory form of vgetmantss/sd.

    Previously we only matched scalar_to_vector and scalar load, but
    we should be able to narrow a vector load or match vzload.

    Also need to match TargetConstant instead of Constant. The register
    patterns were previously updated, but not the memory patterns. — ctopper / detail
  3. [X86] Add test case to show failure to fold load with getmantss due to isel pattern looking for Constant instead of TargetConstant

    The intrinsic has an immarg so its gets created with a TargetConstant
    instead of a Constant after r372338. The isel pattern was only
    updated for the register form, but not the memory form. — ctopper / detail
  4. [Clang Interpreter] Fixed Bug 43362, build failure on GCC

    free() was not directly included in InterpStack.cpp, added include now. — nand / detail
  5. Fix bad APInt compare.

    APInt comparison require both to have the same bitwidth.  Since only the value
    is needed, use the compare function APInt::isSameValue instead. — rtrieu / detail

#14737 (Sep 20, 2019 8:14:13 PM)

  1. Merge and improve code that detects same value in comparisons.

    -Wtautological-overlap-compare and self-comparison from -Wtautological-compare
    relay on detecting the same operand in different locations.  Previously, each
    warning had it's own operand checker.  Now, both are merged together into
    one function that each can call.  The function also now looks through member
    access and array accesses.

    Differential Revision: https://reviews.llvm.org/D66045 — rtrieu / detail
  2. Revert assertion added by r372394

    The assertion added by r372394 causes CUDA test in test-suite to assert.

    The assertion was not there originally, so revert it. — yaxunl / detail
  3. avr targetinfo: remove unneeded dep on MC — nico / detail
  4. AMDGPU/GlobalISel: Allow selection of scalar min/max

    I believe all of the uniform/divergent pattern predicates are
    redundant and can be removed. The uniformity bit already influences
    the register class, and nothhing has broken when I've removed this and
    others. — arsenm / detail
  5. LiveIntervals: Add missing operator!= for segments — arsenm / detail
  6. Improve -Wtautological-overlap-compare

    Allow this warning to detect a larger number of constant values, including
    negative numbers, and handle non-int types better.

    Differential Revision: https://reviews.llvm.org/D66044 — rtrieu / detail
  7. Support for 64-bit PC-relative relocations for X86_64

    ELF files generated for X86_64 targets may contain 64-bit PC-relative
    relocations. For instance, an exception handler table entry contains the start
    of exception-throwing frame relative to the start of exception handler. As these
    two labels belong to different sections, their difference and so the relocation
    is 64-bit.

    An attempt to parse such file, i.e. in DWARFContext::create, results in "failed
    to compute relocation" error.

    This fix adds support for such relocations to RelocationResolver.cpp.

    Reviewed By: MaskRay

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

    Patch by Oleg Pliss (Oleg.Pliss@azul.com) — apilipenko / detail
  8. gn build: Merge r372445 — gnsyncbot / detail
  9. [clang-tidy] Add check for classes missing -hash ⚠️

    Summary:
    Apple documentation states that:
    "If two objects are equal, they must have the same hash value. This last
    point is particularly important if you define isEqual: in a subclass and
    intend to put instances of that subclass into a collection. Make sure
    you also define hash in your subclass."
    https://developer.apple.com/documentation/objectivec/1418956-nsobject/1418795-isequal?language=objc

    In many or all versions of libobjc, -[NSObject isEqual:] is a pointer
    equality check and -[NSObject hash] returns the messaged object's
    pointer. A relatively common form of developer error is for a developer to
    override -isEqual: in a subclass without overriding -hash to ensure that
    hashes are equal for objects that are equal.

    It is assumed that an override of -isEqual: is a strong signal for
    changing the object's equality operator to something other than pointer
    equality which implies that a missing override of -hash could result in
    distinct objects being equal but having distinct hashes because they are
    independent instances. This added check flags classes that override
    -isEqual: but inherit NSObject's implementation of -hash to warn of the
    potential for unexpected behavior.

    The proper implementation of -hash is the responsibility of the
    developer and the check will only verify that the developer made an
    effort to properly implement -hash. Developers can set up unit tests
    to verify that their implementation of -hash is appropriate.

    Test Notes:
    Ran check-clang-tools.

    Reviewers: aaron.ballman, benhamilton

    Reviewed By: aaron.ballman

    Subscribers: Eugene.Zelenko, mgorny, xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67737 — stephanemoore / detail
  10. [clang-scan-deps] strip the --serialize-diagnostics argument

    This ensures that clang-scan-deps won't write out diagnostics when
    scanning dependencies. — arphaman / detail
  11. [GlobalISel] Defer setting HasCalls on MachineFrameInfo to selection time.

    We currently always set the HasCalls on MFI during translation and legalization if
    we're handling a call or legalizing to a libcall. However, if that call is later
    optimized to a tail call then we don't need the flag. The flag being set to true
    causes frame lowering to always save and restore FP/LR, which adds unnecessary code.

    This change does the same thing as SelectionDAG and ports over some code that scans
    instructions after selection, using TargetInstrInfo to determine if target opcodes
    are known calls.

    Code size geomean improvements on CTMark:
    -O0 : 0.1%
    -Os : 0.3%

    Differential Revision: https://reviews.llvm.org/D67868 — aemerson / detail
  12. [Inliner] Remove incorrect early exit during switch cost computation

    Summary:
    The CallAnalyzer::visitSwitchInst has an early exit when the estimated
    lower bound of the switch cost will put the overall cost of the inline
    above the threshold. However, this code is not correctly estimating the
    lower bound for switches that can be transformed into bit tests, leading
    to unnecessary lost inlines, and also differing behavior with
    optimization remarks enabled.

    First, the early exit is controlled by whether ComputeFullInlineCost is
    enabled or not, and that in turn is disabled by default but enabled when
    enabling -pass-remarks=missed. This by itself wouldn't lead to a
    problem, except that as described below, the lower bound can be above
    the real lower bound, so we can sometimes get different inline decisions
    with inline remarks enabled, which is problematic.

    The early exit was added in along with a new switch cost model in D31085.
    The reason why this early exit was added is due to a concern one reviewer
    raised about compile time for large switches:
    https://reviews.llvm.org/D31085?id=94559#inline-276200

    However, the code just below there calls
    getEstimatedNumberOfCaseClusters, which in turn immediately calls
    BasicTTIImpl getEstimatedNumberOfCaseClusters, which in the worst case
    does a linear scan of the cases to get the high and low values. The
    bit test handling in particular is guarded by whether the number of
    cases fits into the max bit width. There is no suggestion that anyone
    measured a compile time issue, it appears to be theoretical.

    The problem is that the reviewer's comment about the lower bound
    calculation is incorrect, specifically in the case of a switch that can
    be lowered to a bit test. This isn't followed up on the comment
    thread, but the author does add a FIXME to that effect above the early
    exit added when they subsequently revised the patch.

    As a result, we were incorrectly early exiting and not inlining
    functions with switch statements that would be lowered to bit tests in
    cases where we were nearing the threshold. Combined with the fact that
    this early exit was skipped with opt remarks enabled, this caused
    different inlining decisions to be made when -pass-remarks=missed is
    enabled to debug the missing inline.

    Remove the early exit for the above reasons.

    I also copied over an existing AArch64 inlining test to X86, and
    adjusted the threshold so that the bit test inline only occurs with the
    fix in this patch.

    Reviewers: davidxl

    Subscribers: eraman, kristof.beyls, haicheng, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67716 — tejohnson / detail
  13. [SampleFDO] Expose an interface to return the size of a section or the size
    of the profile for profile in ExtBinary format.

    Sometimes we want to limit the size of the profile by stripping some functions
    with low sample count or by stripping some function names with small text size
    from profile symbol list. That requires the profile reader to have the
    interfaces returning the size of a section or the size of total profile. The
    patch add those interfaces.

    At the same time, add some dump facility to show the size of each section. — wmi / detail
  14. Remove outdated FIXME. — rsmith / detail
  15. Fix assertion failure when constant evaluation of a switch jumps over an
    uninitialized variable in an init-statement of a 'for' or 'if'. — rsmith / detail
  16. [SystemZ] Support z15 processor name

    The recently announced IBM z15 processor implements the architecture
    already supported as "arch13" in LLVM.  This patch adds support for
    "z15" as an alternate architecture name for arch13.

    Corrsponding LLVM support was committed as rev. 372435. — uweigand / detail
  17. [SystemZ] Support z15 processor name

    The recently announced IBM z15 processor implements the architecture
    already supported as "arch13" in LLVM.  This patch adds support for
    "z15" as an alternate architecture name for arch13.

    The patch also uses z15 in a number of places where we used arch13
    as long as the official name was not yet announced. — uweigand / detail
  18. Fix missed case of switching getConstant to getTargetConstant. Try 2.

    Summary: This fixes a crasher introduced by r372338.

    Reviewers: echristo, arsenm

    Subscribers: wdng, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67850 — saugustine / detail
  19. Remove sanitizer-aarch64-linux-mte bot.

    We never did anything with it, and it looks easier to add the tests
    on one of the existing x86_64 bots (via qemu). — eugenis / detail
  20. [Docs] Add a custom sidebar to doc pages

    Adds a custom sidebar to LLVM docs. Sidebar includes links to How to submit a bug and FAQ topics, as well as a Show Source link and search box. — dr87 / detail
  21. [PPC] PPCLoopPreIncPrep - silence static analyzer null dereference warning. — rksimon / detail
  22. [AddressSanitizer] Don't dereference dyn_cast<ConstantInt> results. NFCI.

    The static analyzer is warning about potential null dereference, but we can use cast<ConstantInt> directly and if not assert will fire for us. — rksimon / detail
  23. [Docs] Move topics to new categories

    This commit moves several topics to new categories. — dr87 / detail
  24. [NFC][PowerPC] Consolidate testing of common linkage symbols

    Add a new file to test the code gen for common linkage symbol.
    Remove common linkage in some other testcases to avoid distraction. — jsji / detail
  25. Revert "[MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount"

    This commit broke the ASan buildbot. See comments in rL372376 for more
    information.

    This reverts commit 15e27b0b6d9d51362fad85dbe95ac5b3fadf0a06. — hctim / detail
  26. [docs] Update structure-aware-fuzzing link.

    The document has been moved to the google/fuzzing GitHub repo. — morehouse / detail
  27. Ensure AtomicExpr goes through SEMA checking after TreeTransform

    RebuildAtomicExpr was skipping doing semantic analysis which broke in
    the cases where the expressions were not dependent. This resulted in the
    ImplicitCastExpr from an array to a pointer being lost, causing a crash
    in IR CodeGen.

    Differential Revision: https://reviews.llvm.org/D67854 — erichkeane / detail
  28. Can't pass .dSYM directory to llvm-objdump -dsym= (and error message is wrong)

    Summary:
    Allow users to pass the path to a .dSYM directory to llvm-objdump's -dsym
    flag rather than requiring users to find the DWARF DSYM Mach-O within the
    bundle structure by hand.

    rdar://46873333

    Reviewers: pete, lhames, friss, aprantl

    Reviewed By: pete, aprantl

    Subscribers: MaskRay, aprantl, rupprecht, seiya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67780 — mtrent / detail
  29. [Mips] Remove immarg test for intrinsics that no longer have an immarg after r372409. — ctopper / detail

#14736 (Sep 20, 2019 11:45:56 AM)

  1. Fix a documentation error — szelethus / detail
  2. Fix -Wdocumentation warning. NFCI. — rksimon / detail
  3. [NFC][PowerPC] Refactor classifyGlobalReference

    We always(and only) check the NLP flag after calling
    classifyGlobalReference to see whether it is accessed
    indirectly.

    Refactor to code to use isGVIndirectSym instead. — jsji / detail
  4. Fix MSVC "not all control paths return a value" warning. NFCI. — rksimon / detail
  5. [www] Turn 'Clang 9' boxes green in C++ status pages now Clang 9 is
    released. — rsmith / detail
  6. Reland '[analyzer][MallocChecker][NFC] Document and reorganize some functions'

    Differential Revision: https://reviews.llvm.org/D54823 — szelethus / detail
  7. [NFC][InstCombine] Fixup newly-added tests — lebedevri / detail
  8. [MTE] Handle MTE instructions in AArch64LoadStoreOptimizer.

    Summary: Generate pre- and post-indexed forms of ST*G and STGP when possible.

    Reviewers: ostannard, vitalybuka

    Subscribers: kristof.beyls, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67741 — eugenis / detail
  9. [libTooling] Add `ifBound`, `elseBranch` RangeSelector combinators.

    Summary:
    Adds two new combinators and corresponding tests to the RangeSelector library.
    * `ifBound` -- conditional evaluation of range-selectors, based on whether a
       given node id is bound in the match.
    * `elseBranch` -- selects the source range of the else and its statement.

    Reviewers: gribozavr

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67621 — ymandel / detail
  10. [SelectionDAG][Mips][Sparc] Don't allow SimplifyDemandedBits to constant fold TargetConstant nodes to a Constant.

    Summary:
    After the switch in SimplifyDemandedBits, it tries to create a
    constant when possible. If the original node is a TargetConstant
    the default in the switch will call computeKnownBits on the
    TargetConstant which will succeed. This results in the
    TargetConstant becoming a Constant. But TargetConstant exists to
    avoid being changed.

    I've fixed the two cases that relied on this in tree by explicitly
    making the nodes constant instead of target constant. The Sparc
    case is an old bug. The Mips case was recently introduced now that
    ImmArg on intrinsics gets turned into a TargetConstant when the
    SelectionDAG is created. I've removed the ImmArg since it lowers
    to generic code.

    Reviewers: arsenm, RKSimon, spatel

    Subscribers: jyknight, sdardis, wdng, arichardson, hiraditya, fedor.sergeev, jrtc27, atanasyan, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67802 — ctopper / detail
  11. [aarch64] add def-pats for dot product

    This patch adds the patterns to select the dot product instructions.
    Tested on aarch64-linux with make check-all.

    Differential Revision: https://reviews.llvm.org/D67645 — spop / detail
  12. Remove assert from MachineLoop::getLoopPredecessor()

    According to the documentation method returns predecessor
    if the given loop's header has exactly one unique predecessor
    outside the loop. Otherwise return null.

    In reality it asserts if there is no predecessor outside of
    the loop.

    The testcase has the loop where predecessors outside of the
    loop were not identified as analyzeBranch() was unable to
    process the mask branch and returned true. That is also not
    correct to assert for the truly dead loops.

    Differential Revision: https://reviews.llvm.org/D67634 — rampitec / detail
  13. [MVT] Add v256i1 to MachineValueType

    This type can show up when lowering some HVX vector code on Hexagon. — kparzysz / detail
  14. [InstCombine] Tests for (a+b)<=a && (a+b)!=0 fold (PR43259)

    https://rise4fun.com/Alive/knp
    https://rise4fun.com/Alive/ALap — lebedevri / detail
  15. [ARM] Fix CTTZ not generating correct instructions MVE

    CTTZ intrinsic should have been set to Custom, not Expand — oliverlars / detail
  16. [docs] Remove training whitespaces. NFC

    Subscribers: jfb, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67835 — fpetrogalli / detail
  17. Add a missing space in a MIR parser error message — dstenb / detail
  18. gn build: Merge r372396 — gnsyncbot / detail
  19. [TextAPI] Arch&Platform to Target

    Summary:
    This is a patch for updating TextAPI/Macho to read in targets as opposed to arch/platform.
    This is because in previous versions tbd files only supported a single platform but that is no longer the case,
    so, now its tracked by unique triples.
    This precedes a seperate patch that will add  the TBD-v4 format

    Reviewers: ributzka, steven_wu, plotfi, compnerd, smeenai

    Reviewed By: ributzka

    Subscribers: mgorny, hiraditya, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67527 — cishida / detail

#14735 (Sep 20, 2019 7:32:20 AM)

  1. Use llvm::StringLiteral instead of StringRef in few places — maskray / detail
  2. [CUDA][HIP] Fix hostness of defaulted constructor
    Clang does not respect the explicit device host attributes of defaulted special members.
    Also clang does not respect the hostness of special members determined by their
    first declarations.
    Clang also adds duplicate implicit device or host attributes in certain cases.
    This patch fixes that.
    Differential Revision: https://reviews.llvm.org/D67509 — yaxunl / detail
  3. [SLPVectorizer] add tests for bogus reductions; NFC

    https://bugs.llvm.org/show_bug.cgi?id=42708
    https://bugs.llvm.org/show_bug.cgi?id=43146 — spatel / detail
  4. [Testing] Python 3 requires `print` to use parens — davezarzycki / detail
  5. [RISCV] Fix static analysis issues

    Unlikely to be problematic but still worth fixing.

    Differential Revision: https://reviews.llvm.org/D67640 — luismarques / detail
  6. [Alignment][NFC] migrate DataLayout internal struct 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

    With this patch the PointerAlignElem struct goes from 20B to 16B.

    Reviewers: courbet

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67400 — gchatelet / detail
  7. [FastISel] Fix insertion of unconditional branches during FastISel

    The insertion of an unconditional branch during FastISel can differ depending on
    building with or without debug information. This happens because FastISel::fastEmitBranch
    emits an unconditional branch depending on the size of the current basic block
    without distinguishing between debug and non-debug instructions.

    This patch fixes this issue by ignoring debug instructions when getting the size
    of the basic block.

    Reviewers: aprantl

    Reviewed By: aprantl

    Subscribers: ormris, aprantl, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67703 — tellenbach / detail
  8. [clang-tidy] Fix relative path in header-filter.

    Summary:
    Clang-tidy supports output diagnostics from header files if user
    specifies --header-filter. But it can't handle relative path well.
    For example, the folder structure of a project is:

    ```
    // a.h is in /src/a/a.h

    // b.h is in /src/b/b.h
    ...

    // c.cpp is in /src/c.cpp

    ```

    Now, we set --header-filter as --header-filter=/a/. That means we only
    want to check header files under /src/a/ path, and ignore header files
    uder /src/b/ path, but in current implementation, clang-tidy will check
    /src/b/b.h also, because the name of b.h used in clang-tidy is
    /src/a/../b/b.h.

    This change tries to fix this issue.

    Reviewers: alexfh, hokein, aaron.ballman, gribozavr

    Reviewed By: gribozavr

    Subscribers: MyDeveloperDay, xazax.hun, cfe-commits

    Tags: #clang, #clang-tools-extra

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

    Patch by Yubo Xie. — gribozavr / detail
  9. [SystemZ]  Add SystemZ as supporting target in help text for -mfentry.

    => "Insert calls to fentry at function entry (x86/SystemZ only)"

    Review: Ulrich Weigand — jonpa / detail
  10. [StaticAnalyzer] Use llvm::StringLiteral instead of StringRef in few places

    StringRef's constexpr constructor seems to be extremely slow in MSVC
    2017, so don't use it for generated tables. Should make PR43369 a bit
    better, no functionality change. — d0k / detail
  11. [AMDGPU] Use std::make_tuple to make some toolchains happy again

    My toolchain stopped working (LLVM 8.0 , libstdc++ 5.4.0) after
    r372338.

    The same problem was seen in clang-cuda-build buildbots:

    clang-cuda-build/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:763:12:
    error: chosen constructor is explicit in copy-initialization
        return {Reg, 0, nullptr};
               ^~~~~~~~~~~~~~~~~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/tuple:479:19:
    note: explicit constructor declared here
            constexpr tuple(_UElements&&... __elements)
                      ^

    This commit adds explicit calls to std::make_tuple to work around
    the problem. — bjope / detail
  12. Revert r372366 "Use getTargetConstant for BLENDI, and add a test to catch it."

    This reverts commit 52621307bcab2013e8833f3317cebd63a6db3885.

    Tests have been failing all night with

        [0/2] ACTION //llvm/test:check-llvm(//llvm/utils/gn/build/toolchain:unix)
        -- Testing: 33647 tests, 64 threads --
        Testing: 0 .. 10..
        UNRESOLVED: LLVM :: CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.ll (6943 of 33647)
        ******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/isel-blendi-gettargetconstant.ll' FAILED ********************
        Test has no run line!
        ********************

    Since there were other concerns on https://reviews.llvm.org/D67785,
    I'm just reverting for now. — nico / detail

#14734 (Sep 20, 2019 2:59:01 AM)

  1. [IntrinsicEmitter] Add overloaded types for SVE intrinsics (Subdivide2 & Subdivide4)

    Summary:
    Both match the type of another intrinsic parameter of a vector type, but where each element is subdivided to form a vector with more elements of a smaller type.

    Subdivide2Argument allows intrinsics such as the following to be defined:
    - declare <vscale x 4 x i32> @llvm.something.nxv4i32(<vscale x 8 x i16>)

    Subdivide4Argument allows intrinsics such as:
    - declare <vscale x 4 x i32> @llvm.something.nxv4i32(<vscale x 16 x i8>)

    Tests are included in follow up patches which add intrinsics using these types.

    Reviewers: sdesmalen, SjoerdMeijer, greened, rovka

    Reviewed By: sdesmalen

    Subscribers: rovka, tschuett, jdoerfert, cfe-commits, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67549 — kmclaughlin / detail
  2. [NFC] Test commit, deleting some whitespace — tellenbach / detail
  3. [llvm-dwarfdump] Adjust Windows path to be acceptable by JSON

    Backslash is a special character according to JSON specification,
    so we should avoid that when printing a file path with the
    --statistics option.

    Differential Revision: https://reviews.llvm.org/D67699 — djtodoro / detail
  4. [yaml2obj/obj2yaml] - Do not trigger llvm_unreachable when dumping/parsing relocations and e_machine is unsupported.

    Currently when e_machine is set to something that is not supported by YAML lib,
    then tools fail with llvm_unreachable.

    In this patch I allow them to handle relocations in this case.
    It can be used to dump and create objects for broken or unsupported targets.

    Differential revision: https://reviews.llvm.org/D67657 — grimar / detail
  5. [MachinePipeliner] Improve the TargetInstrInfo API analyzeLoop/reduceLoopCount

    The way MachinePipeliner uses these target hooks is stateful - we reduce trip
    count by one per call to reduceLoopCount. It's a little overfit for hardware
    loops, where we don't have to worry about stitching a loop induction variable
    across prologs and epilogs (the induction variable is implicit).

    This patch introduces a new API:

      /// Analyze loop L, which must be a single-basic-block loop, and if the
      /// conditions can be understood enough produce a PipelinerLoopInfo object.
      virtual std::unique_ptr<PipelinerLoopInfo>
      analyzeLoopForPipelining(MachineBasicBlock *LoopBB) const;

    The return value is expected to be an implementation of the abstract class:

      /// Object returned by analyzeLoopForPipelining. Allows software pipelining
      /// implementations to query attributes of the loop being pipelined.
      class PipelinerLoopInfo {
      public:
        virtual ~PipelinerLoopInfo();
        /// Return true if the given instruction should not be pipelined and should
        /// be ignored. An example could be a loop comparison, or induction variable
        /// update with no users being pipelined.
        virtual bool shouldIgnoreForPipelining(const MachineInstr *MI) const = 0;

        /// Create a condition to determine if the trip count of the loop is greater
        /// than TC.
        ///
        /// If the trip count is statically known to be greater than TC, return
        /// true. If the trip count is statically known to be not greater than TC,
        /// return false. Otherwise return nullopt and fill out Cond with the test
        /// condition.
        virtual Optional<bool>
        createTripCountGreaterCondition(int TC, MachineBasicBlock &MBB,
                                     SmallVectorImpl<MachineOperand> &Cond) = 0;

        /// Modify the loop such that the trip count is
        /// OriginalTC + TripCountAdjust.
        virtual void adjustTripCount(int TripCountAdjust) = 0;

        /// Called when the loop's preheader has been modified to NewPreheader.
        virtual void setPreheader(MachineBasicBlock *NewPreheader) = 0;

        /// Called when the loop is being removed.
        virtual void disposed() = 0;
      };

    The Pipeliner (ModuloSchedule.cpp) can use this object to modify the loop while
    allowing the target to hold its own state across all calls. This API, in
    particular the disjunction of creating a trip count check condition and
    adjusting the loop, improves the code quality in ModuloSchedule.cpp. — jamesm / detail
  6. [CallSiteSplitting] Remove unused includes (NFC). — fhahn / detail
  7. Reapply [llvm-ar] Include a line number when failing to parse an MRI script

    Reapply r372309

    Errors that occur when reading an MRI script now include a corresponding
    line number.

    Differential Revision: https://reviews.llvm.org/D67449 — gbreynoo / detail
  8. [X86] Convert tbm_bextri_u32/tbm_bextri_u64 intrinsics TargetConstant argument to a regular Constant during lowering.

    We reuse an ISD opcode here that can be reached from BMI that
    doesn't require it to be an immediate. Our isel patterns to match
    the TBM immediate form require a Constant and not a TargetConstant.

    We were accidentally getting the Constant due to a quirk of
    combineBEXTR calling SimplifyDemandedBits. The call to
    SimplifyDemandedBits ended up constant folding the TargetConstant
    to a regular Constant. But we should probably instead be asserting
    if SimplifyDemandedBits on a TargetConstant so we shouldn't rely
    on this behavior. — ctopper / detail
  9. [llvm-readobj] flush output before crash

    Otherwise the output could be lost. — yuanfang / detail
  10. [X86] Use timm in MMX pinsrw/pextrw isel patterns. Add missing test cases.

    This fixes an isel failure after r372338. — ctopper / detail

#14733 (Sep 19, 2019 10:42:52 PM)

  1. [llvm-ar] Removes repetition in the error message

    As per bug 40244, fixed an error where the error message was repeated.

    Differential Revision: https://reviews.llvm.org/D67038
    Patch by Yu Jian (wyjw) — maskray / detail
  2. [Object] Uncapitalize an error message

    Test case will be added by my next commit. — maskray / detail
  3. Finish building the full-expression for a static_assert expression
    before evaluating it rather than afterwards.

    This is groundwork for C++20's P0784R7, where non-trivial destructors
    can be constexpr, so we need ExprWithCleanups markers in constant
    expressions.

    No significant functionality change intended (though this fixes a bug
    only visible through libclang / -ast-dump / tooling: we now store the
    converted condition on the StaticAssertDecl rather than the original). — rsmith / detail
  4. llvm-undname: Delete an empty, unused method. — nico / detail
  5. Use getTargetConstant for BLENDI, and add a test to catch it.

    Summary: This fixes a crasher introduced by r372338.

    Reviewers: echristo, arsenm

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

    Tags: #llvm

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

    Tighten up the test case. — saugustine / detail
  6. [X86] Remove the special isBuildVectorOfConstantSDNodes handling from LowerBUILD_VECTORvXi1.

    The later code that generates a constant when there are
    some non-const elements works basically the same and doesn't
    require there to be any non-const elements. — ctopper / detail

#14732 (Sep 19, 2019 6:35:04 PM)

  1. [NFCI] Always initialize const members of AttributeCommonInfo

    Some compilers require that const fields of an object must be explicitly
    initialized by the constructor. I ran into this issue building with
    clang 3.8 on Ubuntu 16.04. — xiaobai / detail
  2. MachineScheduler: Fix missing dependency with multiple subreg defs

    If an instruction had multiple subregister defs, and one of them was
    undef, this would improperly conclude all other lanes are
    killed. There could still be other defs of those read-undef lanes in
    other operands. This would improperly remove register uses from
    CurrentVRegUses, so the visitation of later operands would not find
    the necessary register dependency. This would also mean this would
    fail or not depending on how different subregister def operands were
    ordered.

    On an undef subregister def, scan the instruction for other
    subregister defs and avoid killing those.

    This possibly should be deferring removing anything from
    CurrentVRegUses until the entire instruction has been processed
    instead. — arsenm / detail
  3. [Consumed] Treat by-value class arguments as consuming by default, like rvalue refs.

    Differential Revision: https://reviews.llvm.org/D67743 — comex / detail
  4. Fix for stringized function-macro args continued across lines

    In case of certain #define'd macros, there's a space just before line continuation
    that the minimized-source lexer was missing to include, resulting in invalid stringize.

    Patch by: kousikk (Kousik Kumar)

    Differential Revision: https://reviews.llvm.org/D67635 — arphaman / detail
  5. Model converted constant expressions as full-expressions.

    This is groundwork for C++20's P0784R7, where non-trivial destructors
    can be constexpr, so we need ExprWithCleanups markers in constant
    expressions.

    No functionality change intended. — rsmith / detail
  6. [AArch64] Fix formatting (NFC) — evandro / detail
  7. [CUDA][HIP] Re-apply part of r372318.

    - r372318 causes violation of `use-of-uninitialized-value` detected by
      MemorySanitizer. Once `Viable` field is set to false, `FailureKind`
      needs setting as well as it will be checked during destruction if
      `Viable` is not true.
    - Revert the part trying to skip `std::vector` erasing. — hliao / detail

#14731 (Sep 19, 2019 2:23:30 PM)

  1. Revert "[CUDA][HIP] Fix typo in `BestViableFunction`"

    Broke the msan buildbots (see comments on rL372318 for more details).

    This reverts commit eb231d15825ac345b546f4c99372d1cac8f14f02. — hctim / detail
  2. [ObjC][ARC] Skip debug instructions when computing the insert point of
    objc_release calls

    This fixes a bug where the presence of debug instructions would cause
    ARC optimizer to change the order of retain and release calls.

    rdar://problem/55319419 — ahatanak / detail
  3. [AMDGPU] fixed underflow in getOccupancyWithNumVGPRs

    The function could return zero if an extreme number or
    registers were used. Minimal possible occupancy is 1.

    Differential Revision: https://reviews.llvm.org/D67771 — rampitec / detail
  4. llvm-reduce: Follow-up to 372280, now with more-better msan fixing — dblaikie / detail
  5. [lsan] Fix deadlock in dl_iterate_phdr.

    Summary:
    Do not grab the allocator lock before calling dl_iterate_phdr. This may
    cause a lock order inversion with (valid) user code that uses malloc
    inside a dl_iterate_phdr callback.

    Reviewers: vitalybuka, hctim

    Subscribers: jfb, #sanitizers, llvm-commits

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67738 — eugenis / detail
  6. Don't use invalidated iterators in FlattenCFGPass

    Summary:
    FlattenCFG may erase unnecessary blocks, which also invalidates iterators to those erased blocks.
    Before this patch, `iterativelyFlattenCFG` could try to increment a BB iterator after that BB has been removed and crash.

    This patch makes FlattenCFGPass use `WeakVH` to skip over erased blocks.

    Reviewers: dblaikie, tstellar, davide, sanjoy, asbirlea, grosser

    Reviewed By: asbirlea

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67672 — kuhar / detail
  7. [Analysis] Allow -scalar-evolution-max-iterations more than once

    At present, `-scalar-evolution-max-iterations` is a `cl::Optional`
    option, which means it demands to be passed exactly zero or one times.
    Our build system makes it pretty tricky to guarantee this. We often
    accidentally pass the flag more than once (but always with the same
    value) which results in an error, after which compilation fails:

    ```
    clang (LLVM option parsing): for the -scalar-evolution-max-iterations option: may only occur zero or one times!
    ```

    It seems reasonable to allow -scalar-evolution-max-iterations to be
    passed more than once. Quoting the [[ http://llvm.org/docs/CommandLine.html#controlling-the-number-of-occurrences-required-and-allowed | documentation ]]:

    > The cl::ZeroOrMore modifier ... indicates that your program will allow the option to be specified zero or more times.
    > ...
    > If an option is specified multiple times for an option of the cl::opt class, only the last value will be retained.

    Original patch by: Enrico Bern Hardy Tanuwidjaja <etanuwid@fb.com>

    Differential Revision: https://reviews.llvm.org/D67512 — smeenai / detail
  8. [NFC][PowerPC] Fast-isel VSX support test

    We have fixed most of the VSX limitation in Fast-isel,
    so we can remove the -mattr=-vsx for most testcases now. — jsji / detail
  9. gn build: Merge r372343 — gnsyncbot / detail
  10. [SVFS] Vector Function ABI demangling.

    This patch implements the demangling functionality as described in the
    Vector Function ABI. This patch will be used to implement the
    SearchVectorFunctionSystem (SVFS) as described in the RFC:

    http://lists.llvm.org/pipermail/llvm-dev/2019-June/133484.html

    A fuzzer is added to test the demangling utility.

    Patch by Sumedh Arani <sumedh.arani@arm.com>

    Differential revision: https://reviews.llvm.org/D66024 — fpetrogalli / detail
  11. The LLD buildbot has some tests that are not reliable.
    Hopefully reducing the number of threads for the test will fix the issue.
    It seems that the quotes around the parameters means it tries to take everything as one argument. Bu using -j we can actually pass everything as one argument by attaching the j to the sv.

    Patch by Stefan Pintilie. — gkistanova / detail
  12. [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251)

    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.

    In this particular case, given
    ```
    char* test(char& base, unsigned long offset) {
      return &base - offset;
    }
    ```
    it will end up producing something like
    https://godbolt.org/z/luGEju
    which after optimizations reduces down to roughly
    ```
    declare void @use64(i64)
    define i1 @test(i8* dereferenceable(1) %base, i64 %offset) {
      %base_int = ptrtoint i8* %base to i64
      %adjusted = sub i64 %base_int, %offset
      call void @use64(i64 %adjusted)
      %not_null = icmp ne i64 %adjusted, 0
      %no_underflow = icmp ule i64 %adjusted, %base_int
      %no_underflow_and_not_null = and i1 %not_null, %no_underflow
      ret i1 %no_underflow_and_not_null
    }
    ```
    Without D67122 there was no `%not_null`,
    and in this particular case we can "get rid of it", by merging two checks:
    Here we are checking: `Base u>= Offset && (Base u- Offset) != 0`, but that is simply `Base u> Offset`

    Alive proofs:
    https://rise4fun.com/Alive/QOs

    The `@llvm.usub.with.overflow` pattern itself is not handled here
    because this is the main pattern, that we currently consider canonical.

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

    Reviewers: spatel, nikic, xbolva00, majnemer

    Reviewed By: xbolva00, majnemer

    Subscribers: vsk, majnemer, xbolva00, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67356 — lebedevri / detail

#14730 (Sep 19, 2019 10:12:00 AM)

  1. [AMDGPU] Unnecessary -amdgpu-scalarize-global-loads=false flag removed from min/max lit tests.

    Reviewers: arsenm

    Differential Revision: https://reviews.llvm.org/D67712 — alex-t / detail
  2. [Float2Int] avoid crashing on unreachable code (PR38502)

    In the example from:
    https://bugs.llvm.org/show_bug.cgi?id=38502
    ...we hit infinite looping/crashing because we have non-standard IR -
    an instruction operand is used before defined.
    This and other unusual constructs are allowed in unreachable blocks,
    so avoid the problem by using DominatorTree to step around landmines.

    Differential Revision: https://reviews.llvm.org/D67766 — spatel / detail
  3. Reapply r372285 "GlobalISel: Don't materialize immarg arguments to intrinsics"

    This reverts r372314, reapplying r372285 and the commits which depend
    on it (r372286-r372293, and r372296-r372297)

    This was missing one switch to getTargetConstant in an untested case. — arsenm / detail
  4. [MCA] Improved cost computation for loop carried dependencies in the bottleneck analysis.

    This patch introduces a cut-off threshold for dependency edge frequences with
    the goal of simplifying the critical sequence computation.  This patch also
    removes the cost normalization for loop carried dependencies.  We didn't really
    need to artificially amplify the cost of loop-carried dependencies since it is
    already computed as the integral over time of the delay (in cycle).

    In the absence of backend stalls there is no need for computing a critical
    sequence. With this patch we early exit from the critical sequence computation
    if no bottleneck was reported during the simulation. — adibiagio / detail
  5. Make appendCallNB lambda mutable

    Lambdas are by deafult const so that they produce the same output every time they are run. This lambda needs to set the value on a captured promise which is a mutating operation, so it must be mutable. — cbieneman / detail
  6. X86: Add missing test for vshli SimplifyDemandedBitsForTargetNode

    This would have caught this regression which triggered the revert of
    r372285: https://bugs.chromium.org/p/chromium/issues/detail?id=1005750 — arsenm / detail
  7. Revert r372325 - Reverting r372323 because it broke color tests on Linux.

    This corrects the testing issues. — aaronballman / detail
  8. [DAG][X86] Convert isNegatibleForFree/GetNegatedExpression to a target hook (PR42863)

    This patch converts the DAGCombine isNegatibleForFree/GetNegatedExpression into overridable TLI hooks and includes a demonstration X86 implementation.

    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.).

    I've only begun to replace X86's FNEG handling here, handling FMADDSUB/FMSUBADD negation and some low impact codegen changes (some FMA negatation propagation). We can build on this in future patches.

    Differential Revision: https://reviews.llvm.org/D67557 — rksimon / detail
  9. [DAGCombiner] Add node to the worklist in topological order in scalarizeExtractedVectorLoad

    Summary: As per title.

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

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66661 — deadalnix / detail
  10. [docs] Break long (>80) line. NFC — fpetrogalli / detail
  11. Reverting r372323 because it broke color tests on Linux.

    http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/17919 — aaronballman / detail
  12. [Float2Int] auto-generate complete test checks; NFC — spatel / detail
  13. Remove an unsafe member variable that wasn't needed; NFC.

    People use the AST dumping interface while debugging, so it's not safe to assume that a declaration will be dumped before a constant expression is dumped. This means the Context member may not get set properly and problems would happen. Rather than rely on the interface that requires the ASTContext, call the generic dump() interface instead; this allows us to remove the Context member variable. — aaronballman / detail
  14. [OpenCL] Add version handling and add vector ld/st builtins

    Allow setting a MinVersion, stating from which OpenCL version a
    builtin function is available, and a MaxVersion, stating from which
    OpenCL version a builtin function should not be available anymore.

    Guard some definitions of the "work-item" builtin functions according
    to the OpenCL versions from which they are available.

    Add the "vector data load and store" builtin functions (e.g.
    vload/vstore), whose signatures differ before and after OpenCL 2.0 in
    the pointer argument address spaces.

    Patch by Pierre Gondois and Sven van Haastregt.

    Differential Revision: https://reviews.llvm.org/D63504 — svenvh / detail
  15. [TableGen] Support encoding per-HwMode

    Much like ValueTypeByHwMode/RegInfoByHwMode, this patch allows targets
    to modify an instruction's encoding based on HwMode. When the
    EncodingInfos field is non-empty the Inst and Size fields of the Instruction
    are ignored and taken from EncodingInfos instead.

    As part of this promote getHwMode() from TargetSubtargetInfo to MCSubtargetInfo.

    This is NFC for all existing targets - new code is generated only if targets
    use EncodingByHwMode. — jamesm / detail
  16. Clean out unused diagnostics. NFC. — d0k / detail
  17. [CUDA][HIP] Fix typo in `BestViableFunction`

    Summary:
    - Should consider viable ones only when checking SameSide candidates.
    - Replace erasing with clearing viable flag to reduce data
      moving/copying.
    - Add one and revise another one as the diagnostic message are more
      relevant compared to previous one.

    Reviewers: tra

    Subscribers: cfe-commits, yaxunl

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67730 — hliao / detail
  18. [clang-tidy] Fix bugprone-argument-comment-check to correctly ignore implicit constructors.

    Summary:
    After revision 370919, this check incorrectly flags certain cases of implicit
    constructors. Specifically, if an argument is annotated with an
    argument-comment and the argument expression triggers an implicit constructor,
    then the argument comment is associated with argument of the implicit
    constructor.

    However, this only happens when the constructor has more than one argument.
    This revision fixes the check for implicit constructors and adds a regression
    test for this case.

    Note: r370919 didn't cause this bug, it simply uncovered it by fixing another
    bug that was masking the behavior.

    Reviewers: gribozavr

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67744 — ymandel / detail
  19. [DAG] Add SelectionDAG::MaxRecursionDepth constant

    As commented on D67557 we have a lot of uses of depth checks all using magic numbers.

    This patch adds the SelectionDAG::MaxRecursionDepth constant and moves over some general cases to use this explicitly.

    Differential Revision: https://reviews.llvm.org/D67711 — rksimon / detail

#14726 (Sep 18, 2019 9:55:38 PM)

  1. [Builtins] Delete setjmp_syscall and qsetjmp

    Similar to the resolution of gcc PR71876.
    Nobody uses them or needs the [-Wincomplete-setjmp-declaration]
    diagnostic. — maskray / detail
  2. AMDGPU/SILoadStoreOptimizer: Add const to more functions

    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/D65901 — tstellar / detail
  3. AMDGPU/GlobalISel: RegBankSelect llvm.amdgcn.ds.swizzle — arsenm / detail
  4. AMDGPU/GlobalISel: RegBankSelect tbuffer load/store

    These have the same operand structure as the non-t buffer operations. — arsenm / detail
  5. [CLANG][BPF] change __builtin_preserve_access_index() signature

    The clang intrinsic __builtin_preserve_access_index() currently
    has signature:
      const void * __builtin_preserve_access_index(const void * ptr)

    This may cause compiler warning when:
      - parameter type is "volatile void *" or "const volatile void *", or
      - the assign-to type of the intrinsic does not have "const" qualifier.
    Further, this signature does not allow dereference of the
    builtin result pointer as it is a "const void *" type, which
    adds extra step for the user to do type casting.

    Let us change the signature to:
      PointerT __builtin_preserve_access_index(PointerT ptr)
    such that the result and argument types are the same.
    With this, directly dereferencing the builtin return value
    becomes possible.

    Differential Revision: https://reviews.llvm.org/D67734 — yhs / detail
  6. AMDGPU/GlobalISel: Select llvm.amdgcn.raw.buffer.store.format

    This needs special handling due to some subtargets that have a
    nonstandard register layout for f16 vectors

    Also reject some illegal types on other targets. — arsenm / detail
  7. AMDGPU/GlobalISel: Select llvm.amdgcn.raw.buffer.store — arsenm / detail
  8. AMDGPU/GlobalISel: RegBankSelect struct buffer load/store — arsenm / detail
  9. AMDGPU/GlobalISel: RegBankSelect llvm.amdgcn.raw.buffer.{load|store} — arsenm / detail
  10. AMDGPU/GlobalISel: Attempt to RegBankSelect image intrinsics

    Images should always have 2 consecutive, mandatory SGPR arguments. — arsenm / detail
  11. Fix typo — arsenm / detail
  12. MachineScheduler: Fix assert from not checking subregs

    The assert would fail if there was a dead def of a subregister if
    there was a previous use of a different subregister. — arsenm / detail
  13. AMDGPU/GlobalISel: Fix RegBankSelect G_SMULH/G_UMULH pre-gfx9

    The scalar versions were only introduced in gfx9. — arsenm / detail
  14. GlobalISel: Don't materialize immarg arguments to intrinsics

    Encode them directly as an imm argument to G_INTRINSIC*.

    Since now intrinsics can now define what parameters are required to be
    immediates, avoid using registers for them. Intrinsics could
    potentially want a constant that isn't a legal register type. Also,
    since G_CONSTANT is subject to CSE and legalization, transforms could
    potentially obscure the value (and create extra work for the
    selector). The register bank of a G_CONSTANT is also meaningful, so
    this could throw off future folding and legalization logic for AMDGPU.

    This will be much more convenient to work with than needing to call
    getConstantVRegVal and checking if it may have failed for every
    constant intrinsic parameter. AMDGPU has quite a lot of intrinsics wth
    immarg operands, many of which need inspection during lowering. Having
    to find the value in a register is going to add a lot of boilerplate
    and waste compile time.

    SelectionDAG has always provided TargetConstant for constants which
    should not be legalized or materialized in a register. The distinction
    between Constant and TargetConstant was somewhat fuzzy, and there was
    no automatic way to force usage of TargetConstant for certain
    intrinsic parameters. They were both ultimately ConstantSDNode, and it
    was inconsistently used. It was quite easy to mis-select an
    instruction requiring an immediate. For SelectionDAG, start emitting
    TargetConstant for these arguments, and using timm to match them.

    Most of the work here is to cleanup target handling of constants. Some
    targets process intrinsics through intermediate custom nodes, which
    need to preserve TargetConstant usage to match the intrinsic
    expectation. Pattern inputs now need to distinguish whether a constant
    is merely compatible with an operand or whether it is mandatory.

    The GlobalISelEmitter needs to treat timm as a special case of a leaf
    node, simlar to MachineBasicBlock operands. This should also enable
    handling of patterns for some G_* instructions with immediates, like
    G_FENCE or G_EXTRACT.

    This does include a workaround for a crash in GlobalISelEmitter when
    ARM tries to uses "imm" in an output with a "timm" pattern source. — arsenm / detail
  15. gn build: Merge r372282 — gnsyncbot / detail
  16. llvm-reduce: Add pass to reduce instructions

    Patch by Diego Treviño!

    Differential Revision: https://reviews.llvm.org/D66263 — dblaikie / detail
  17. Initialize all fields in ABIArgInfo.

    Due to usage of an uninitialized fields, we end up with
    a Conditional jump or move depends on uninitialised value

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

    Commited on behalf of Martin Liska <mliska@suse.cz> — serge_sans_paille / detail

#14725 (Sep 18, 2019 5:45:58 PM)

  1. llvm-reduce: Avoid use-after-free when removing a branch instruction

    Found my msan buildbot & pointed out by Nico Weber - thanks Nico! — dblaikie / detail
  2. [Object] Extend MachOUniversalBinary::getObjectForArch

    Make the method MachOUniversalBinary::getObjectForArch return MachOUniversalBinary::ObjectForArch
    and add helper methods MachOUniversalBinary::getMachOObjectForArch, MachOUniversalBinary::getArchiveForArch
    for those who explicitly expect to get a MachOObjectFile or an Archive.

    Differential revision: https://reviews.llvm.org/D67700

    Test plan: make check-all — alexshap / detail
  3. [utils] Add minimal support for MIR inputs to update_llc_test_checks.py

    update_{llc,mir}_test_checks.py applicability is determined by the
    output (assembly or MIR), not the input, which makes
    update_llc_test_checks.py the right tool to generate tests that start at
    MIR and stop at the final assembly.

    This commit adds the minimal support for this path. Main limitation that
    remains:

    - MIR has to have LLVM IR section, and the CHECK lines will be inserted
      into the LLVM IR functions that correspond to the MIR functions.

    Running
      ../utils/update_llc_test_checks.py --llc-binary ./bin/llc
    on a slightly modified  ../test/CodeGen/X86/bad-tls-fold.mir

    produces the following diff:

    +# NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
    +# RUN: llc %s -o - | FileCheck %s
    --- |
       target triple = "x86_64-unknown-linux-gnu"

    @@ -6,17 +7,31 @@
       @i = external thread_local global i32

       define i32 @or() {
    +  ; CHECK-LABEL: or:
    +  ; CHECK:       # %bb.0: # %entry
    +  ; CHECK-NEXT:    movq {{.*}}(%rip), %rax
    +  ; CHECK-NEXT:    orq $7, %rax
    +  ; CHECK-NEXT:    movq i@{{.*}}(%rip), %rcx
    +  ; CHECK-NEXT:    orq %rax, %rcx
    +  ; CHECK-NEXT:    movl %fs:(%rcx), %eax
    +  ; CHECK-NEXT:    retq
       entry:
         ret i32 undef
       }
    -
       define i32 @and() {
    +  ; CHECK-LABEL: and:
    +  ; CHECK:       # %bb.0: # %entry
    +  ; CHECK-NEXT:    movq {{.*}}(%rip), %rax
    +  ; CHECK-NEXT:    orq $7, %rax
    +  ; CHECK-NEXT:    movq i@{{.*}}(%rip), %rcx
    +  ; CHECK-NEXT:    andq %rax, %rcx
    +  ; CHECK-NEXT:    movl %fs:(%rcx), %eax
    +  ; CHECK-NEXT:    retq
       entry:
         ret i32 undef
       }
    ...

    (not applied) — rtereshin / detail
  4. [utils] Amend update_llc_test_checks.py to non-llc tooling, NFC

    Very minor change aiming to make it easier to extend the script
    downstream to support non-llc, but llc-like tools. The main objective is
    to decrease the probability of merge conflicts. — rtereshin / detail
  5. [WebAssembly] Restore defaults for stores per memop

    Summary:
    Large slowdowns were observed in Rust due to many small, constant
    sized copies in conjunction with poorly-optimized memory.copy
    implementations. Since memory.copy cannot be expected to be inlined
    efficiently by engines at this time, stop using it for the smallest
    copies. We continue to lower all memcpy intrinsics to memory.copy,
    though.

    Reviewers: aheejin, alexcrichton

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67639 — tlively / detail
  6. [Docs] Moves topics to new categories

    This commit moves several topics to new categories. It also removes a few duplicate links in Subsystem Documentation. — dr87 / detail
  7. [AArch64][GlobalISel] Support lowering musttail calls

    Since we now lower most tail calls, it makes sense to support musttail.

    Instead of always falling back to SelectionDAG, only fall back when a musttail
    call was not able to be emitted as a tail call. Once we can handle most
    incoming and outgoing arguments, we can change this to a `report_fatal_error`
    like in ISelLowering.

    Remove the assert that we don't have varargs and a musttail, and replace it
    with a return false. Implementing this requires that we implement
    `saveVarArgRegisters` from AArch64ISelLowering, which is an entirely different
    patch.

    Add GlobalISel lines to vararg-tallcall.ll to make sure that we produce correct
    code. Right now we only fall back, but eventually this will be relevant.

    Differential Revision: https://reviews.llvm.org/D67681 — paquette / detail
  8. Remove the obsolete BlockByRefStruct flag from LLVM IR

    DIFlagBlockByRefStruct is an unused DIFlag that originally was used by
    clang to express (Objective-)C block captures in debug info. For the
    last year Clang has been emitting complex DIExpressions to describe
    block captures instead, which makes all the code supporting this flag
    redundant.

    This patch removes the flag and all supporting "dead" code, so we can
    reuse the bit for something else in the future.

    Since this only affects debug info generated by Clang with the block
    extension this mostly affects Apple platforms and I don't have any
    bitcode compatibility concerns for removing this. The Verifier will
    reject debug info that uses the bit and thus degrade gracefully when
    LTO'ing older bitcode with a newer compiler.

    rdar://problem/44304813

    Differential Revision: https://reviews.llvm.org/D67453 — Adrian Prantl / detail
  9. llvm-reduce: Remove inaccurate doxy comment about a return that isn't returned

    Addressing post-commit code review feedback from Dávid Bolvanský -
    thanks! — dblaikie / detail
  10. llvm-reduce: Fix inconsistencies between int/unsigned usage (standardize on int) — dblaikie / detail
  11. [analyzer] PR43102: Fix an assertion and an out-of-bounds error for diagnostic location construction

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

    In today's edition of "Is this any better now that it isn't crashing?", I'd like to show you a very interesting test case with loop widening.

    Looking at the included test case, it's immediately obvious that this is not only a false positive, but also a very bad bug report in general. We can see how the analyzer mistakenly invalidated `b`, instead of its pointee, resulting in it reporting a null pointer dereference error. Not only that, the point at which this change of value is noted at is at the loop, rather then at the method call.

    It turns out that `FindLastStoreVisitor` works correctly, rather the supplied explodedgraph is faulty, because `BlockEdge` really is the `ProgramPoint` where this happens.
    {F9855739}
    So it's fair to say that this needs improving on multiple fronts. In any case, at least the crash is gone.

    Full ExplodedGraph: {F9855743}

    Reviewers: NoQ, xazax.hun, baloghadamsoftware, Charusso, dcoughlin, rnkovacs, TWeaver

    Subscribers: JesperAntonsson, uabelho, Ka-Ka, bjope, whisperity, szepet, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, gamesh411, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D66716 — szelethus / detail
  12. gn build: Merge r372267 — gnsyncbot / detail
  13. Add AutoUpgrade function to add new address space datalayout string to existing datalayouts.

    Summary:
    Add function to AutoUpgrade to change the datalayout of old X86 datalayout strings.
    This adds "-p270:32:32-p271:32:32-p272:64:64" to X86 datalayouts that are otherwise valid
    and don't already contain it.

    This also removes the compatibility changes in https://reviews.llvm.org/D66843.
    Datalayout change in https://reviews.llvm.org/D64931.

    Reviewers: rnk, echristo

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67631 — akhuang / detail
  14. gn build: Merge r372264 — gnsyncbot / detail
  15. llvm-reduce: Add pass to reduce basic blocks

    Patch by Diego Treviño!

    Differential Revision: https://reviews.llvm.org/D66320 — dblaikie / detail
  16. fix build, adjust test also for Windows path separator

    Introduced in 1e9c1d2b7bfc. — llunak / detail
  17. [SimplifyCFG] mergeConditionalStoreToAddress(): try to pacify MSAN

    MSAN bot complains that there is use-of-uninitialized-value
    of this FreeStores later in IsWorthwhile().
    Perhaps FreeStores needs to be stored in a vector? — lebedevri / detail
  18. On PowerPC, Secure-PLT by default for FreeBSD 13 and higher

    Summary:
    In https://svnweb.freebsd.org/changeset/base/349351, FreeBSD 13 and
    higher transitioned to Secure-PLT for PowerPC.  This part contains the
    changes in clang's PPC architecture defaults.

    Reviewers: emaste, jhibbits, hfinkel

    Reviewed By: jhibbits

    Subscribers: wuzish, nemanjai, krytarowski, kbarton, MaskRay, jsji, shchenz, steven.zhang, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67119 — dim / detail
  19. On PowerPC, Secure-PLT by default for FreeBSD 13 and higher

    Summary:
    In https://svnweb.freebsd.org/changeset/base/349351, FreeBSD 13 and
    higher transitioned to Secure-PLT for PowerPC.  This part contains the
    changes in llvm's PPC subtarget.

    Reviewers: emaste, jhibbits, hfinkel

    Reviewed By: jhibbits

    Subscribers: wuzish, nemanjai, krytarowski, kbarton, MaskRay, jsji, shchenz, steven.zhang, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67118 — dim / detail
  20. [DAGCombine][ARM][X86] (sub Carry, X)  ->  (addcarry (sub 0, X), 0, Carry)  fold

    Summary:
    `DAGCombiner::visitADDLikeCommutative()` already has a sibling fold:
    `(add X, Carry) -> (addcarry X, 0, Carry)`

    This fold, as suggested by @efriedma, helps recover from //some//
    of the regressions of D62266

    Reviewers: efriedma, deadalnix

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D62392 — lebedevri / detail
  21. [CodeGen][X86][NFC] Tests for (sub Carry, X) -> (addcarry (sub 0, X), 0, Carry) fold (D62392) — lebedevri / detail

#14724 (Sep 18, 2019 1:35:25 PM)

  1. [InstCombine] foldUnsignedUnderflowCheck(): handle last few cases (PR43251)

    Summary:
    I don't have a direct motivational case for this,
    but it would be good to have this for completeness/symmetry.

    This pattern is basically the motivational pattern from
    https://bugs.llvm.org/show_bug.cgi?id=43251
    but with different predicate that requires that the offset is non-zero.

    The completeness bit comes from the fact that a similar pattern (offset != zero)
    will be needed for https://bugs.llvm.org/show_bug.cgi?id=43259,
    so it'd seem to be good to not overlook very similar patterns..

    Proofs: https://rise4fun.com/Alive/21b

    Also, there is something odd with `isKnownNonZero()`, if the non-zero
    knowledge was specified as an assumption, it didn't pick it up (PR43267)

    With this, i see no other missing folds for
    https://bugs.llvm.org/show_bug.cgi?id=43251

    Reviewers: spatel, nikic, xbolva00

    Reviewed By: spatel

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67412 — lebedevri / detail
  2. [AArch64] Don't implicitly enable global isel on Darwin if code-model==large.

    Summary:
    AArch64 GlobalISel doesn't support MachO's large code model, so this patch
    adds a check for that combination before implicitly enabling it.

    Reviewers: paquette

    Subscribers: kristof.beyls, ributzka, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67724 — Lang Hames / detail
  3. [SimplifyCFG] mergeConditionalStoreToAddress(): consider cost, not instruction count

    Summary:
    As it can be see in the changed test, while `div` is really costly,
    we were speculating it. This does not seem correct.

    Also, the old code would run for every single insturuction in BB,
    instead of eagerly bailing out as soon as there are too many instructions.

    This function still has a problem that `PHINodeFoldingThreshold` is
    per-basic-block, while it should be for all the basic blocks.

    Reviewers: efriedma, craig.topper, dmgreen, jmolloy

    Reviewed By: jmolloy

    Subscribers: xbolva00, hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67315 — lebedevri / detail
  4. [MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in inline immediate

    Summary:
    As discussed in https://reviews.llvm.org/D62341#1515637,
    for MIPS `add %x, -1` isn't optimal. Unlike X86 there
    are no fastpaths to matearialize such `-1`/`1` vector constants,
    and `sub %x, 1` results in better codegen,
    so undo canonicalization

    Reviewers: atanasyan, Petar.Avramovic, RKSimon

    Reviewed By: atanasyan

    Subscribers: sdardis, arichardson, hiraditya, jrtc27, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D66805 — lebedevri / detail
  5. [CodeGen][MIPS][NFC] Some standalone tests for D66805 "or vectors, select `add %x, C` as `sub %x, -C` if it results in inline immediate" — lebedevri / detail
  6. [OPENMP]Fix for PR43349: Crash for privatized loop bound.

    If the variable, used in the loop boundaries, is not captured in the
    construct, this variable must be considered as undefined if it was
    privatized. — abataev / detail
  7. [mips] Expand 'lw/sw' instructions for 32-bit GOT

    In case of using 32-bit GOT access to the table requires two instructions
    with attached %got_hi and %got_lo relocations. This patch implements
    correct expansion of 'lw/sw' instructions in that case.

    Differential Revision: https://reviews.llvm.org/D67705 — atanasyan / detail
  8. actually also compile output in tests for -frewrite-includes

    Checking that the created output matches something is nice, but
    this should also check whether the output makes sense.

    Differential Revision: https://reviews.llvm.org/D63979 — llunak / detail
  9. [clang-format][PR41899] PointerAlignment: Left leads to useless space in lambda intializer expression

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

    ```auto lambda = [&a = a]() { a = 2; };```

    is formatted as

    ```auto lambda = [& a = a]() { a = 2; };```

    With an extra space if PointerAlignment is set to Left

    > The space "& a" looks strange when there is no type in the lambda's intializer expression. This can be worked around with by setting "PointerAlignment: Right", but ideally "PointerAlignment: Left" would not add a space in this case.

    Reviewers: klimek, owenpan, krasimir, timwoj

    Reviewed By: klimek

    Subscribers: cfe-commits

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D67718 — paulhoad / detail
  10. make -frewrite-includes also rewrite conditions in #if/#elif

    Those conditions may use __has_include, which needs to be rewritten.
    The existing code has already tried to rewrite just __has_include,
    but it didn't work with macro expansion, so e.g. Qt's
    "#define QT_HAS_INCLUDE(x) __has_include(x)" didn't get handled
    properly. Since the preprocessor run knows what each condition evaluates
    to, just rewrite the entire condition. This of course requires that
    the -frewrite-include pass has the same setup as the following
    compilation, but that has always been the requirement.

    Differential Revision: https://reviews.llvm.org/D63508 — llunak / detail
  11. [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd

    Also, add a diagnostic under -Wformat for printing a boolean value as a
    character.

    rdar://54579473

    Differential revision: https://reviews.llvm.org/D66856 — epilk / detail
  12. [clang-format][PR41964] Fix crash with SIGFPE when TabWidth is set to 0 and line starts with tab

    Summary:
    clang-format 8.0 crashes with SIGFPE (floating point exception) when formatting following file:
    app.cpp:
    void a() {
    //line starts with '\t'
    }

    $ clang-format -style='{TabWidth: 0}' app.cpp

    Reviewers: owenpan, klimek, russellmcc, timwoj

    Reviewed By: klimek

    Subscribers: cfe-commits

    Tags: #clang-tools-extra, #clang

    Differential Revision: https://reviews.llvm.org/D67670 — paulhoad / detail
  13. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): some cleanup before upcoming patch — lebedevri / detail
  14. [NFC][InstCombine] More tests for PR42563 "Dropping pointless masking before left shift"

    For patterns c/d/e we too can deal with the pattern even if we can't
    just drop the mask, we can just apply it afterwars:
       https://rise4fun.com/Alive/gslRa — lebedevri / detail
  15. Fix compile-time regression caused by rL371928

    Summary:
    Also fixup rL371928 for cases that occur on our out-of-tree backend

    There were still quite a few intermediate APInts and this caused the
    compile time of MCCodeEmitter for our target to jump from 16s up to
    ~5m40s. This patch, brings it back down to ~17s by eliminating pretty
    much all of them using two new APInt functions (extractBitsAsZExtValue(),
    insertBits() but with a uint64_t). The exact conditions for eliminating
    them is that the field extracted/inserted must be <=64-bit which is
    almost always true.

    Note: The two new APInt API's assume that APInt::WordSize is at least
    64-bit because that means they touch at most 2 APInt words. They
    statically assert that's true. It seems very unlikely that someone
    is patching it to be smaller so this should be fine.

    Reviewers: jmolloy

    Reviewed By: jmolloy

    Subscribers: hiraditya, dexonsmith, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67686 — dsanders / detail
  16. Revert "Revert "Implement std::condition_variable via pthread_cond_clockwait() where available""

    With the fix for non-Linux.

    This reverts commit c1c519d2f1a66dd2eeaa4c321d8d7b50f623eb71. — danalbert / detail
  17. [DDG] Break a cyclic dependency from Analysis to ScalarOpts — d0k / detail
  18. gn build: Merge r372238 — gnsyncbot / detail
  19. Data Dependence Graph Basics

    Summary:
    This is the first patch in a series of patches that will implement data dependence graph in LLVM. Many of the ideas used in this implementation are based on the following paper:
    D. J. Kuck, R. H. Kuhn, D. A. Padua, B. Leasure, and M. Wolfe (1981). DEPENDENCE GRAPHS AND COMPILER OPTIMIZATIONS.
    This patch contains support for a basic DDGs containing only atomic nodes (one node for each instruction). The edges are two fold: def-use edges and memory-dependence edges.
    The implementation takes a list of basic-blocks and only considers dependencies among instructions in those basic blocks. Any dependencies coming into or going out of instructions that do not belong to those basic blocks are ignored.

    The algorithm for building the graph involves the following steps in order:

      1. For each instruction in the range of basic blocks to consider, create an atomic node in the resulting graph.
      2. For each node in the graph establish def-use edges to/from other nodes in the graph.
      3. For each pair of nodes containing memory instruction(s) create memory edges between them. This part of the algorithm goes through the instructions in lexicographical order and creates edges in reverse order if the sink of the dependence occurs before the source of it.

    Authored By: bmahjour

    Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert

    Reviewed By: Meinersbur, fhahn, myhsu

    Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto

    Tag: #llvm

    Differential Revision: https://reviews.llvm.org/D65350 — bmahjour / detail
  20. [c++20] P1331R2: Allow transient use of uninitialized objects in
    constant evaluation. — rsmith / detail
  21. [InstSimplify] add tests for fma/fmuladd; NFC — spatel / detail
  22. [OPENMP5.0]Allow multiple context selectors in the context selector
    sets.

    According to OpenMP 5.0, context selector set might include several
    context selectors, separated with commas. Patch fixes this problem. — abataev / detail

#14723 (Sep 18, 2019 9:22:50 AM)

  1. [Alignment][NFC] Align(1) to Align::None() conversions

    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/D67715 — gchatelet / detail
  2. [SampleFDO] Minimize performance impact when profile-sample-accurate
    is enabled.

    We can save memory and reduce binary size significantly by enabling
    ProfileSampleAccurate. However when ProfileSampleAccurate is true,
    function without sample will be regarded as cold and this could
    potentially cause performance regression.

    To minimize the potential negative performance impact, we want to be
    a little conservative here saying if a function shows up in the profile,
    no matter as outline instance, inline instance or call targets, treat
    the function as not being cold. This will handle the cases such as most
    callsites of a function are inlined in sampled binary (thus outline copy
    don't get any sample) but not inlined in current build (because of source
    code drift, imprecise debug information, or the callsites are all cold
    individually but not cold accumulatively...), so that the outline function
    showing up as cold in sampled binary will actually not be cold after current
    build. After the change, such function will be treated as not cold even
    profile-sample-accurate is enabled.

    At the same time we lower the hot criteria of callsiteIsHot check when
    profile-sample-accurate is enabled. callsiteIsHot is used to determined
    whether a callsite is hot and qualified for early inlining. When
    profile-sample-accurate is enabled, functions without profile will be
    regarded as cold and much less inlining will happen in CGSCC inlining pass,
    so we can worry less about size increase and be aggressive to allow more
    early inlining to happen for warm callsites and it is helpful for performance
    overall.

    Differential Revision: https://reviews.llvm.org/D67561 — wmi / detail
  3. [Alignment][NFC] Remove LogAlignment functions

    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: arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67620 — gchatelet / detail
  4. [Alignment][NFC] Use Align::None instead of 1

    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: sdardis, nemanjai, hiraditya, kbarton, jrtc27, MaskRay, atanasyan, jsji, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67704 — gchatelet / detail
  5. Recommit -r372180

    Commit message below, original caused the sphinx build bot to fail, this
    one should fix it.

    Create UsersManual section entitled 'Controlling Floating Point
    Behavior'

    Create a new section for documenting the floating point options. Move
    all the floating point options into this section, and add new entries
    for the floating point options that exist but weren't previously
    described in the UsersManual.

    Patch By: mibintc
    Differential Revision: https://reviews.llvm.org/D67517 — erichkeane / detail
  6. Revert "[AArch64][DebugInfo] Do not recompute CalleeSavedStackSize"

    Summary:
    This reverts commit r372204.

    This change causes build bot failures under msan:
    http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/35236/steps/check-llvm%20msan/logs/stdio:

    ```
    FAIL: LLVM :: DebugInfo/AArch64/asan-stack-vars.mir (19531 of 33579)
    ******************** TEST 'LLVM :: DebugInfo/AArch64/asan-stack-vars.mir' FAILED ********************
    Script:
    --
    : 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llc -O0 -start-before=livedebugvalues -filetype=obj -o - /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/DebugInfo/AArch64/asan-stack-vars.mir | /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llvm-dwarfdump -v - | /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/DebugInfo/AArch64/asan-stack-vars.mir
    --
    Exit Code: 2

    Command Output (stderr):
    --
    ==62894==WARNING: MemorySanitizer: use-of-uninitialized-value
        #0 0xdfcafb in llvm::AArch64FrameLowering::resolveFrameOffsetReference(llvm::MachineFunction const&, int, bool, unsigned int&, bool, bool) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1658:3
        #1 0xdfae8a in resolveFrameIndexReference /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1580:10
        #2 0xdfae8a in llvm::AArch64FrameLowering::getFrameIndexReference(llvm::MachineFunction const&, int, unsigned int&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1536
        #3 0x46642c1 in (anonymous namespace)::LiveDebugValues::extractSpillBaseRegAndOffset(llvm::MachineInstr const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:582:21
        #4 0x4647cb3 in transferSpillOrRestoreInst /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:883:11
        #5 0x4647cb3 in process /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:1079
        #6 0x4647cb3 in (anonymous namespace)::LiveDebugValues::ExtendRanges(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:1361
        #7 0x463ac0e in (anonymous namespace)::LiveDebugValues::runOnMachineFunction(llvm::MachineFunction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp:1415:18
        #8 0x4854ef0 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:13
        #9 0x53b0b01 in llvm::FPPassManager::runOnFunction(llvm::Function&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1648:27
        #10 0x53b15f6 in llvm::FPPassManager::runOnModule(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1685:16
        #11 0x53b298d in runOnModule /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1750:27
        #12 0x53b298d in llvm::legacy::PassManagerImpl::run(llvm::Module&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1863
        #13 0x905f21 in compileModule(char**, llvm::LLVMContext&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:601:8
        #14 0x8fdc4e in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/tools/llc/llc.cpp:355:22
        #15 0x7f67673632e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
        #16 0x882369 in _start (/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llc+0x882369)

    MemorySanitizer: use-of-uninitialized-value /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1658:3 in llvm::AArch64FrameLowering::resolveFrameOffsetReference(llvm::MachineFunction const&, int, bool, unsigned int&, bool, bool) const
    Exiting
    error: -: The file was not recognized as a valid object file
    FileCheck error: '-' is empty.
    FileCheck command line:  /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/DebugInfo/AArch64/asan-stack-vars.mir
    ```

    Reviewers: bkramer

    Reviewed By: bkramer

    Subscribers: sdardis, aprantl, kristof.beyls, jrtc27, atanasyan, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67710 — krasimir / detail
  7. [SimplifyLibCalls] fix crash with empty function name (PR43347)

    ...and improve some variable names while here.

    https://bugs.llvm.org/show_bug.cgi?id=43347 — spatel / detail
  8. Follow-up to r372209: Use single quotes for host_ldflags in the lit config

    HOST_LDFLAGS is now using double quotes, and that would break the lit
    config file. — hans / detail
  9. Revert r372082 "[Clang] Pragma vectorize_width() implies vectorize(enable)"

    This broke the Chromium build. Consider the following code:

      float ScaleSumSamples_C(const float* src, float* dst, float scale, int width) {
        float fsum = 0.f;
        int i;
      #if defined(__clang__)
      #pragma clang loop vectorize_width(4)
      #endif
        for (i = 0; i < width; ++i) {
          float v = *src++;
          fsum += v * v;
          *dst++ = v * scale;
        }
        return fsum;
      }

    Compiling at -Oz, Clang  now warns:

      $ clang++ -target x86_64 -Oz -c /tmp/a.cc
      /tmp/a.cc:1:7: warning: loop not vectorized: the optimizer was unable to
      perform the requested transformation; the transformation might be disabled or
      specified as part of an unsupported transformation ordering
      [-Wpass-failed=transform-warning]

    this suggests it's not actually enabling vectorization hard enough.

    At -Os it asserts instead:

      $ build.release/bin/clang++ -target x86_64 -Os -c /tmp/a.cc
      clang-10: /work/llvm.monorepo/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2734: void
      llvm::InnerLoopVectorizer::emitMemRuntimeChecks(llvm::Loop*, llvm::BasicBlock*): Assertion `
      !BB->getParent()->hasOptSize() && "Cannot emit memory checks when optimizing for size"' failed.

    Of course neither of these are what the developer expected from the pragma.

    > 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.
    >
    > Differential Revision: https://reviews.llvm.org/D66290 — hans / detail
  10. [SDA] Don't stop divergence propagation at the IPD.

    Summary:
    This fixes B42473 and B42706.

    This patch makes the SDA propagate branch divergence until the end of the RPO traversal. Before, the SyncDependenceAnalysis propagated divergence only until the IPD in rpo order. RPO is incompatible with post dominance in the presence of loops. This made the SDA crash because blocks were missed in the propagation.

    Reviewers: foad, nhaehnle

    Reviewed By: foad

    Subscribers: jvesely, llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D65274 — foad / detail
  11. [mips] Pass "xgot" flag as a subtarget feature

    We need "xgot" flag in the MipsAsmParser to implement correct expansion
    of some pseudo instructions in case of using 32-bit GOT (XGOT).
    MipsAsmParser does not have reference to MipsSubtarget but has a
    reference to "feature bit set". — atanasyan / detail
  12. [mips] Mark tests for lw/sw expansion in PIC by a separate "check prefix". NFC

    That simplify adding XGOT tests later. — atanasyan / detail
  13. [mips] Reduce code duplication in the `loadAndAddSymbolAddress`. NFC — atanasyan / detail
  14. [AST] CommentLexer - Remove (optional) Invalid parameter from getSpelling.

    The static analyzer noticed that we were dereferencing it even when the default null value was being used. Further investigation showed that we never explicitly set the parameter so I've just removed it entirely. — rksimon / detail

#14722 (Sep 18, 2019 4:54:25 AM)

  1. Fix -Wdocumentation warning. NFCI. — rksimon / detail
  2. Fix -Wdocumentation "empty paragraph passed to '\brief'" warning. NFCI. — rksimon / detail
  3. Fix -Wdocumentation "@returns in a void function" warning. NFCI. — rksimon / detail
  4. Fix -Wdocumentation "Unknown param" warning. NFCI. — rksimon / detail
  5. [cmake] Changes to get Windows self-host working with PGO

    Fixes quoting of profile arguments to work on Windows
    Suppresses adding profile arguments to linker flags when using lld-link
    Avoids -fprofile-instr-use being added to rc.exe flags
    Removes duplicated adding of -fprofile-instr-use to linker flags (since
    r355541)
    Move handling LLVM_PROFDATA_FILE to HandleLLVMOptions.cmake

    Differential Revision: https://reviews.llvm.org/D62063 — russell_gallop / detail
  6. [AMDGPU] Allow FP inline constant in v_madak_f16 and v_fmaak_f16

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

    Change-Id: Ic38f47cb2079c2c1070a441b5943854844d80a7c — tpr / detail
  7. [Alignment] Add a None() member function

    Summary:
    This will allow writing `if(A != llvm::Align::None())` which is clearer than `if(A > llvm::Align(1))`

    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/D67697 — gchatelet / detail
  8. [clang-tidy] Fix a potential infinite loop in readability-isolate-declaration check.

    Reviewers: ilya-biryukov

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: https://reviews.llvm.org/D67654 — hokein / detail
  9. tsan: allow the Go runtime to return multiple stack frames for a single PC

    This fix allows tsan to report stack traces correctly even in the
    presence of mid-stack inlining by the Go compiler.

    See https://go-review.googlesource.com/c/go/+/195781 for the Go runtime side of this change.

    Author: randall77 (Keith Randall)
    Reviewed: https://reviews.llvm.org/D67671 — dvyukov / detail
  10. [AArch64][DebugInfo] Do not recompute CalleeSavedStackSize

    This patch fixes a bug exposed by D65653 where a subsequent invocation
    of `determineCalleeSaves` ends up with a different size for the callee
    save area, leading to different frame-offsets in debug information.

    In the invocation by PEI, `determineCalleeSaves` tries to determine
    whether it needs to spill an extra callee-saved register to get an
    emergency spill slot. To do this, it calls 'estimateStackSize' and
    manually adds the size of the callee-saves to this. PEI then allocates
    the spill objects for the callee saves and the remaining frame layout
    is calculated accordingly.

    A second invocation in LiveDebugValues causes estimateStackSize to return
    the size of the stack frame including the callee-saves. Given that the
    size of the callee-saves is added to this, these callee-saves are counted
    twice, which leads `determineCalleeSaves` to believe the stack has
    become big enough to require spilling an extra callee-save as emergency
    spillslot. It then updates CalleeSavedStackSize with a larger value.

    Since CalleeSavedStackSize is used in the calculation of the frame
    offset in getFrameIndexReference, this leads to incorrect offsets for
    variables/locals when this information is recalculated after PEI.

    Reviewers: omjavaid, eli.friedman, thegameg, efriedma

    Reviewed By: efriedma

    Differential Revision: https://reviews.llvm.org/D66935 — s.desmalen / detail
  11. [lldb] Print better diagnostics for user expressions and modules

    Summary:
    Currently our expression evaluators only prints very basic errors that are not very useful when writing complex expressions.

    For example, in the expression below the user made a type error, but it's not clear from the diagnostic what went wrong:
    ```
    (lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3)
    error: invalid operands to binary expression ('int' and 'double')
    ```

    This patch enables full Clang diagnostics in our expression evaluator. After this patch the diagnostics for the expression look like this:

    ```
    (lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3)
    error: <user expression 1>:1:54: invalid operands to binary expression ('int' and 'float')
    printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3)
                                                   ~~~~~~^~~~
    ```

    To make this possible, we now emulate a user expression file within our diagnostics. This prevents that the user is exposed to
    our internal wrapper code we inject.

    Note that the diagnostics that refer to declarations from the debug information (e.g. 'note' diagnostics pointing to a called function)
    will not be improved by this as they don't have any source locations associated with them, so caret or line printing isn't possible.
    We instead just suppress these diagnostics as we already do with warnings as they would otherwise just be a context message
    without any context (and the original diagnostic in the user expression should be enough to explain the issue).

    Fixes rdar://24306342

    Reviewers: JDevlieghere, aprantl, shafik, #lldb

    Reviewed By: JDevlieghere, #lldb

    Subscribers: usaxena95, davide, jingham, aprantl, arphaman, kadircet, lldb-commits

    Tags: #lldb

    Differential Revision: https://reviews.llvm.org/D65646 — Raphael Isemann / detail
  12. Revert "r372201: [Support] Replace function with function_ref in writeFileAtomically. NFC"

    function_ref causes calls to the function to be ambiguous, breaking
    compilation.

    Reverting for now. — ibiryukov / detail
  13. [Support] Replace function with function_ref in writeFileAtomically. NFC

    Summary:
    The latter is slightly more efficient and communicates the intent of the
    API: writeFileAtomically does not own or copy the callback, it merely
    calls it at some point.

    Reviewers: jkorous

    Reviewed By: jkorous

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

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67584 — ibiryukov / detail

#14721 (Sep 18, 2019 12:36:19 AM)

  1. [X86] Break non-power of 2 vXi1 vectors into scalars for argument passing with avx512.

    This generates worse code, but matches what is done for avx2 and
    prevents crashes when more arguments are passed than we have
    registers for. — ctopper / detail
  2. [X86] Add test case for passing a v17i1 vector with avx512 — ctopper / detail
  3. [BPF] Permit all user instructed offset relocatiions

    Currently, not all user specified relocations
    (with clang intrinsic __builtin_preserve_access_index())
    will turn into relocations.

    In the current implementation, a __builtin_preserve_access_index()
    chain is turned into relocation only if the result of the clang
    intrinsic is used in a function call or a nonzero offset computation
    of getelementptr. For all other cases, the relocatiion request
    is ignored and the __builtin_preserve_access_index() is turned
    into regular getelementptr instructions.
    The main reason is to mimic bpf_probe_read() requirement.

    But there are other use cases where relocatable offset is
    generated but not used for bpf_probe_read(). This patch
    relaxed previous constraints when to generate relocations.
    Now, all user __builtin_preserve_access_index() will have
    relocations generated.

    Differential Revision: https://reviews.llvm.org/D67688 — yhs / detail

#14720 (Sep 17, 2019 8:25:33 PM)

  1. [X86] Prevent assertion when calling a function that returns double with -mno-sse2 on x86-64.

    As seen in the most recent updates to PR10498 — ctopper / detail
  2. [Remarks] Allow the RemarkStreamer to be used directly with a stream

    The filename in the RemarkStreamer should be optional to allow clients
    to stream remarks to memory or to existing streams.

    This introduces a new overload of `setupOptimizationRemarks`, and avoids
    enforcing the presence of a filename at different places. — thegameg / detail
  3. [Timers] Fix printing some `-ftime-report` sections twice. Fixes PR40328.

    Starting from r324788 timer groups aren't cleared automatically when
    printed out. As a result some timer groups were printed one more time.
    For example, "Pass execution timing report" was printed again in
    `ManagedStatic<PassTimingInfo>` destructor, "DWARF Emission" in
    `ManagedStatic<Name2PairMap> NamedGroupedTimers` destructor.

    Fix by clearing timer groups manually.

    Reviewers: thegameg, george.karpenkov

    Reviewed By: thegameg

    Subscribers: aprantl, jkorous, dexonsmith, ributzka, aras-p, cfe-commits

    Differential Revision: https://reviews.llvm.org/D67683 — vsapsai / detail
  4. [PGO] Change hardcoded thresholds for cold/inlinehint to use summary

    Summary:
    The PGO counter reading will add cold and inlinehint (hot) attributes
    to functions that are very cold or hot. This was using hardcoded
    thresholds, instead of the profile summary cutoffs which are used in
    other hot/cold detection and are more dynamic and adaptable. Switch
    to using the summary-based cold/hot detection.

    The hardcoded limits were causing some code that had a medium level of
    hotness (per the summary) to be incorrectly marked with a cold
    attribute, blocking inlining.

    Reviewers: davidxl

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D67673 — tejohnson / detail

#14719 (Sep 17, 2019 4:14:52 PM)

  1. [ARM] Update clang for removal of vfp2d16 and vfp2d16sp

    Matching fix for https://reviews.llvm.org/D67375 (r372186).

    Differential Revision: https://reviews.llvm.org/D67467 — efriedma / detail
  2. [ARM] VFPv2 only supports 16 D registers.

    r361845 changed the way we handle "D16" vs. "D32" targets; there used to
    be a negative "d16" which removed instructions from the instruction set,
    and now there's a "d32" feature which adds instructions to the
    instruction set.  This is good, but there was an oversight in the
    implementation: the behavior of VFPv2 was changed.  In particular, the
    "vfp2" feature was changed to imply "d32". This is wrong: VFPv2 only
    supports 16 D registers.

    In practice, this means if you specify -mfpu=vfpv2, the compiler will
    generate illegal instructions.

    This patch gets rid of "vfp2d16" and "vfp2d16sp", and fixes "vfp2" and
    "vfp2sp" so they don't imply "d32".

    Differential Revision: https://reviews.llvm.org/D67375 — efriedma /