Started 1 mo 16 days ago
Took 18 hr on green-dragon-09

Failed Build #5454 (Aug 28, 2019 11:03:48 PM)

  • : 370295
  • : 370274
  • : 370288
  • : 364589
  • : 370240
  • : 370273
  1. [Attributor] Deduce "noalias" attribute

    This patch adds very basic deduction for noalias.

    Reviewers: jdoerfert, sstefan1

    Reviewed By: jdoerfert

    Tags: LLVM

    Differential Revision: (detail/ViewSVN)
    by uenoku
  2. [X86] Add a DAG combine to combine INSERTPS and VBROADCAST of a scalar load. Remove corresponding isel patterns.

    We had an isel pattern to perform this, but its better to
    do it in DAG combine as a simplification. This also fixes the lack
    of patterns for AVX512 targets. (detail/ViewSVN)
    by ctopper
  3. [X86] Make inline assembly 'x' and 'v' constraints work for f128.

    Including a type legalizer fix to make bitcast operand promotion
    work correctly when getSoftenedFloat returns f128 instead of i128.

    Fixes PR43157 (detail/ViewSVN)
    by ctopper
  4. [LoopUnroll] Use Lazy strategy for DTU used for MergeBlockIntoPredecessor.

    We do not access the DT in the loop, so we do not have to apply updates
    eagerly. We can apply them lazyly and flush them after we are done
    merging blocks.

    As follow-up work, we might be able to use the DTU above as well,
    instead of manually updating the DT.

    This brings the example from PR43134 from ~100s to ~4s for a relase +
    assertions build on my machine.

    Reviewers: efriedma, kuhar, asbirlea, brzycki

    Reviewed By: kuhar, brzycki

    Differential Revision: (detail/ViewSVN)
    by fhahn
  5. [ObjectYAML] Fix lifetime issue in dumpDebugLines

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by Vitaly Buka
  6. [sanitizer] Support monorepo layout in symbolizer build script (detail/ViewSVN)
    by Vitaly Buka
  7. [Attributor] Improve messages in iteration verify mode

    When we now verify the iteration count we will see the actual count
    and the expected count before the assertion is triggered. (detail/ViewSVN)
    by jdoerfert
  8. [Attributor][NFC] Add const to map key (detail/ViewSVN)
    by jdoerfert
  9. [Attributor][Fix] Indicate change correctly (detail/ViewSVN)
    by jdoerfert
  10. [Attributor] Fix typo (detail/ViewSVN)
    by jdoerfert
  11. AMDGPU: Don't use frame virtual registers

    SGPR spills aren't really handled after SILowerSGPRSpills. In order to
    directly control what happens if the scavenger needs to spill, the
    scavenger needs to be used directly. There is an alternative to
    spilling in these contexts anyway since the frame register can be
    increment and restored.

    This does present another possible issue if spilling is needed for the
    unused carry out if an add is needed. I think this can be avoided by
    using a scalar add (although that clobbers SCC, which happens anyway). (detail/ViewSVN)
    by arsenm
  12. GlobalISel/TableGen: Handle setcc patterns

    This is a special case because one node maps to two different G_
    instructions, and the operand order is changed.

    This mostly enables G_FCMP for AMDPGPU. G_ICMP is still manually
    selected for now since it has the SALU and VALU complication to deal
    with. (detail/ViewSVN)
    by arsenm
  13. Add requirement to test.

    -debug-only option for llc is only available in debug builds so
    "REQUIRES: asserts" is needed in the tes. (detail/ViewSVN)
    by rtrieu
  14. [sanitizer] Simplify COMPILER_RT setup in lint script (detail/ViewSVN)
    by Vitaly Buka
  15. [X86] Fix a couple isel patterns to not shrink a volatile load.

    Also add a FIXME because I'm not sure why these patterns exist. Looks like a missing combine.

    And another FIXME because the AVX512 equivalent one of the patterns is missing. (detail/ViewSVN)
    by ctopper
  16. [RISCV] Avoid generating AssertZext for LP64 ABI when lowering floating LibCall

    The patch fixed the issue that RV64 didn't clear the upper bits
    when return complex floating value with lp64 ABI.

    float _Complex
    complex_add(float _Complex a, float _Complex b)
       return a + b;

    RealResult = zero_extend(RealA + RealB)
    ImageResult = ImageA + ImageB
    Return (RealResult | (ImageResult << 32))

    The patch introduces shouldExtendTypeInLibCall target hook to suppress
    the AssertZext generation when lowering floating LibCall.

    Thanks to Eli's comments from the Bugzilla

    Differential Revision: (detail/ViewSVN)
    by shiva
  17. [Modules] Fix rebuilding an updated module for each of its consumers.

    Marking a module for a rebuild when its signature differs from the
    expected one causes redundant module rebuilds for incremental builds.
    When a module is updated, its signature changes. But its consumers still
    have the old signature and loading them will result in signature
    mismatches. It will correctly cause the rebuilds for the consumers but
    we don't need to rebuild the common module for each of them as it is
    already up to date.

    In practice this bug causes longer build times. We are doing more work
    than required and only a single process can build a module, so parallel
    builds degrade to a single-process mode where extra processes are just
    waiting on a file lock.

    Fix by not marking a module dependency for a rebuild on signature
    mismatch. We'll check if it is up to date when we load it.


    Reviewers: dexonsmith, bruno, rsmith

    Reviewed By: dexonsmith, bruno

    Subscribers: jkorous, ributzka, cfe-commits, aprantl

    Differential Revision: (detail/ViewSVN)
    by vsapsai
  18. [clangd] Fix ExtractFunction dependencies

    Summary: Without these dependencies, builds with `-DBUILD_SHARED_LIBS=ON` fail.

    Reviewers: SureYeaah

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

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by aheejin
  19. [WebAssembly] Add atomic.fence instruction

    This adds `atomic.fence` instruction:

    And we now emit the new `atomic.fence` instruction for multithread
    fences, rather than the prevous `atomic.rmw` hack.

    Reviewers: dschuff

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

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by aheejin
  20. [LLVM-C] Fix omission of INSTALL_WITH_TOOLCHAIN to llvm_add_library()

    Due to a misstake with r365902 that tried to simplify the install with
    toolchain logic LLVM-C.dll was no longer being installed.

    Patch By: Jakob Bornecrantz (detail/ViewSVN)
    by tstellar
  21. Fix a passing XFAIL test

    Now that we can gracefully handle stack exhaustion, this test was passing in
    darwin && asan. Instead, just unsupport it when threading is unavailable. (detail/ViewSVN)
    by epilk
  22. [mips] Add an empty line to separate different patterns. NFC (detail/ViewSVN)
    by atanasyan
  23. [mips] Fix 64-bit address loading in case of applying 32-bit mask to the result

    If result of 64-bit address loading combines with 32-bit mask, LLVM
    tries to optimize the code and remove "redundant" loading of upper
    32-bits of the address. It leads to incorrect code on MIPS64 targets.

    MIPS backend creates the following chain of commands to load 64-bit
    address in the `MipsTargetLowering::getAddrNonPICSym64` method:
    (add (shl (add (shl (add %highest(sym), %higher(sym)),

    If the mask presents, LLVM decides to optimize the chain of commands. It
    really does not make sense to load upper 32-bits because the 0x0fffffff
    mask anyway clears them. After removing redundant commands we get this
    (add (shl (%hi(sym), 16), %lo(%sym))

    There is no patterns matched `(MipsHi (i64 symbol))`. Due a bug in `SYM_32`
    predicate definition, backend incorrectly selects a pattern for a 32-bit
    symbols and uses the `lui` instruction for loading `%hi(sym)`.

    As a result we get incorrect set of instructions with unnecessary 16-bit
    left shifting:
    lui     at,0x0
        R_MIPS_HI16     foo
    dsll    at,at,0x10
    daddiu  at,at,0
        R_MIPS_LO16     foo

    This patch resolves two problems:
    - Fix `SYM_32/SYM_64` predicates to prevent selection of patterns dedicated
      to 32-bit symbols in case of using N64 ABI.
    - Add missed patterns for 64-bit symbols for `%hi/%lo`.

    Fix PR42736.

    Differential Revision: (detail/ViewSVN)
    by atanasyan
  24. Add tie-breaker for register class sorting in getSuperRegForSubReg

    llvm::stable_sort is apparently not sufficient.

    Use the same tie-breaker/sorting style as TopoOrderRC fix bot failures.

    E.g. (detail/ViewSVN)
    by paquette
  25. Fix for "DICompileUnit not listed in" verification error after ...

    ...cloning a function from a different module

    Currently when a function with debug info is cloned from a different module, the
    cloned function may have hanging DICompileUnits, so that the module with the
    cloned function fails debug info verification.

    The proposed fix inserts all DICompileUnits reachable from the cloned function
    to "" metadata operands of the cloned function module.

    Reviewed By: aprantl, efriedma

    Differential Revision:

    Patch by Oleg Pliss ( (detail/ViewSVN)
    by apilipenko
  26. [analyzer] Fix more analyzer warnings on analyzer and libAnalysis. (detail/ViewSVN)
    by dergachev
  27. Revert "[clangd] Migrate last tweak tests to TweakTesting.h and remove old helpers. NFC"

    This reverts commit 8f85685b5cf57eddea11fa444503ade220c724e4, which
    breaks on old gcc that have the macro + raw strings bug. (detail/ViewSVN)
    by sammccall
  28. Fix always_inline 'target' compatibility check code for Lambdas

    The previous version of this used CurFuncDecl in CodeGenFunction,
    however this doesn't include lambdas.  However, CurCodeDecl DOES. Switch
    the check to use CurCodeDecl so that the actual function being emitted
    gets checked, preventing an error in ISEL. (detail/ViewSVN)
    by erichkeane
  29. [llvm-readobj][XCOFF][NFC] Add return statement to avoid -Wimplicit-fallthrough warning

    This is to fix the commit in r370097. (detail/ViewSVN)
    by jasonliu
  30. [ASan] Make insertion of version mismatch guard configurable

    By default ASan calls a versioned function
    `__asan_version_mismatch_check_vXXX` from the ASan module constructor to
    check that the compiler ABI version and runtime ABI version are
    compatible. This ensures that we get a predictable linker error instead
    of hard-to-debug runtime errors.

    Sometimes, however, we want to skip this safety guard. This new command
    line option allows us to do just that.


    Reviewed By: kubamracek

    Differential Revision: (detail/ViewSVN)
    by yln
  31. Ignore object files that lack coverage information.

    Before this change, if multiple binary files were presented, all of them must have been instrumented or the load would fail with coverage_map_error::no_data_found.

    Patch by Dean Sturtevant.

    Differential Revision: (detail/ViewSVN)
    by jyknight
  32. Use the handle --check-prefixes mechanism to de-verbosify a couple atomics tests [NFC] (detail/ViewSVN)
    by reames
  33. [GlobalISel] Import patterns containing SUBREG_TO_REG

    Reuse the logic for INSERT_SUBREG to also import SUBREG_TO_REG patterns.

    - Split `inferSuperRegisterClass` into two functions, one which tries to use
      an existing TreePatternNode (`inferSuperRegisterClassForNode`), and one that
      doesn't. SUBREG_TO_REG doesn't have a node to leverage, which is the cause
      for the split.

    - Rename to and
      update it.

    - Update impacted tests in the AArch64 and X86 backends.

    This is kind of a hit/miss for code size improvements/regressions. E.g. in
    add-ext.ll, we now get some identity copies. This isn't really anything the
    importer can handle, since it's caused by a later pass introducing the copy for
    the sake of correctness.

    Differential Revision: (detail/ViewSVN)
    by paquette
  34. gn build: Merge r370249 (detail/ViewSVN)
    by nico
  35. [AMDGPU] Fix bug when calculating user_spgr_count for Code Object V3 assembler

    Stop counting explicitly disabled user_spgr's in the user_sgpr_count field of the kernel descriptor.

    Differential Revision: (detail/ViewSVN)
    by scott.linder
  36. [Clangd] Initial version of ExtractFunction

    - Only works for extraction from free functions
    - Basic analysis of the code being extracted.
    - Extract to void function
    - Bail out if extracting a return, continue or break.
    - Doesn't hoist decls yet

    Reviewers: kadircet, sammccall

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

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by sureyeaah
  37. [InstCombine] clean up wrap propagation for reassociated ops; NFCI

    Always true/false checks were flagged by static analysis;

    I have not confirmed the logic difference in propagating nsw vs. nuw,
    but presumably we would have noticed a bug by now if that was wrong. (detail/ViewSVN)
    by spatel
  38. [CFG] Make representation of destructor calls more accurate.

    Respect C++17 copy elision; previously it would generate destructor calls
    for elided temporaries, including in initialization and return statements.

    Don't generate duplicate destructor calls for statement expressions.

    Fix destructors in initialization lists and comma operators.

    Improve printing of implicit destructors.

    Patch by Nicholas Allegra!

    Differential Revision: (detail/ViewSVN)
    by dergachev
  39. [analyzer] Fix analyzer warnings on analyzer.

    Write tests for the actual crash that was found. Write comments and refactor
    code around 17 style bugs and suppress 3 false positives.

    Differential Revision: (detail/ViewSVN)
    by dergachev
  40. [analyzer] pr43036: Fix support for operator 'sizeof...'.

    It was known to be a compile-time constant so it wasn't evaluated during
    symbolic execution, but it wasn't evaluated as a compile-time constant either.

    Differential Revision: (detail/ViewSVN)
    by dergachev
  41. [analyzer] Trust global initializers when analyzing main().

    If the global variable has an initializer, we'll ignore it because we're usually
    not analyzing the program from the beginning, which means that the global
    variable may have changed before we start our analysis.

    However when we're analyzing main() as the top-level function, we can rely
    on global initializers to still be valid. At least in C; in C++ we have global
    constructors that can still break this logic.

    This patch allows the Static Analyzer to load constant initializers from
    global variables if the top-level function of the current analysis is main().

    Differential Revision: (detail/ViewSVN)
    by dergachev
  42. Further relax checks in asan-symbolize-bad-path.cpp

    It turns out that the DarwinSymbolizer does not print the "in" part for
    invalid files but instead prints
    #0 0xabcdabcd (.../asan-symbolize-bad-path.cpp.tmp/bad/path:i386+0x1234)
    This tests is only checking that doesn't hang or crash,
    so further relax the checks to ensure that the test passes on macOS. (detail/ViewSVN)
    by arichardson
  43. [libc++] Fix visibility of __vector_base_common on GCC

    Since we build the library with -fvisibility=hidden, the shared object
    wouldn't contain __vector_base_common<true>::__throw_length_error()
    and __vector_base_common<true>::__throw_out_of_range(), leading to
    link errors. This only happened on GCC for some reason. (detail/ViewSVN)
    by Louis Dionne
  44. [ValueMapper] NFC: Remove dead code to pause metadata mapping

    This functionality was added when Mapper::mapMetadata was recursive.  It
    is no longer needed after r265456, which switched it to be iterative.

    Reviewers: dexonsmith, srhines

    Subscribers: hiraditya, llvm-commits

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by pirama
  45. [X86][ReleaseNotes] Add a note about the switch to widening legalization for narrow vectors. (detail/ViewSVN)
    by ctopper
  46. [Attributor] Regularly clear dependences to remove spurious ones

    As dependences between abstract attributes can become stale, e.g., if
    one was sufficient to imply another one at some point but it has since
    been wakened to the point it is not usable for the formerly implied one.
    To weed out spurious dependences, and thereby eliminate unneeded
    updates, we introduce an option to determine how often the dependence
    cache is cleared and recomputed during the fixpoint iteration.

    Note that the initial value was determined such that we see a positive
    result on our tests.

    Differential Revision: (detail/ViewSVN)
    by jdoerfert
  47. [clangd] Migrate last tweak tests to TweakTesting.h and remove old helpers. NFC (detail/ViewSVN)
    by sammccall
  48. [FPEnv] Add fptosi and fptoui constrained intrinsics.

    This implements constrained floating point intrinsics for FP to signed and
    unsigned integers.

    Quoting from D32319:
    The purpose of the constrained intrinsics is to force the optimizer to
    respect the restrictions that will be necessary to support things like the
    STDC FENV_ACCESS ON pragma without interfering with optimizations when
    these restrictions are not needed.

    Reviewed by: Andrew Kaylor, Craig Topper, Hal Finkel, Cameron McInally, Roman Lebedev, Kit Barton
    Approved by: Craig Topper
    Differential Revision: (detail/ViewSVN)
    by kpn
  49. [AArch64][GlobalISel] Fall back when translating musttail calls

    These are currently translated as normal functions calls in AArch64.

    Until we have proper tail call lowering, we shouldn't translate these.

    Differential Revision: (detail/ViewSVN)
    by paquette
  50. Reduce scope of variable only used in a local pattern match. NFCI. (detail/ViewSVN)
    by rksimon
  51. [NFC] Added more tests for D66651 (detail/ViewSVN)
    by xbolva00
  52. [InstCombine] Disable recursion in foldGEPICmp for vector pointer GEPs

    Due to missing vector support in this function, recursion can
    generate worse code in some cases. (detail/ViewSVN)
    by ctopper
  53. Fix uninitialized variable warning in cppcheck. NFCI.

    InstCombiner::MaxArraySizeForCombine is set outside the constructor so we need to ensure it has a default initialization value. (detail/ViewSVN)
    by rksimon
  54. Try fixing CRLF issues in Git with [clang-scan-deps] Minimizer: Correctly handle multi-line content with CR+LF line endings

    Differential Revision: (detail/ViewSVN)
    by aganea
  55. [clangd][vscode] Don't leak the resources

    Summary: We miss a few places where we need to add them to the subscriptions.

    Reviewers: jvikstrom

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

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by hokein
  56. [NFC] Added a comment to avoid possible confusion (detail/ViewSVN)
    by xbolva00
  57. [AMDGPU] Adjust number of SGPRs available in Calling Convention

    This reduces the number of SGPRs due to some concerns about running
    out of SGPRs if you make all the SGPRs that aren't reserved available
    for the calling convention.

    Change-Id: Idb4ca4dc72f5b6808cb524ff7270915a8de5b4c1 (detail/ViewSVN)
    by rtayl
  58. [OPENMP][Analysis] Add analysis of the map clauses.

    Added basic analysis of map clauses. Only map clauses with to and tofrom
    map type must be analyzed since all other map types (alloc, delete, etc.) do not require to use the value of the initial variable, instead they create the new copy of the variable.

    Reviewers: NoQ

    Subscribers: guansong, cfe-commits, kkwli0, caomhin

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by abataev
  59. Remove duplicate 'BitWidth' variable. NFCI. (detail/ViewSVN)
    by rksimon
  60. [XRay] Fixing one test case for FreeBSD

    Reviewers: dberris

    Reviewed By: dberris

    Differential Revision: (detail/ViewSVN)
    by David CARLIER
  61. [Attributor] Restrict liveness and return information to functions

    Until we have proper call-site information we should not recompute
    liveness and return information for each call site. This patch directly
    uses the function versions and introduces TODOs at the usage sites.

    The required iterations to get to the fixpoint are most of the time
    reduced by this change and we always avoid work duplication.

    Reviewers: sstefan1, uenoku

    Subscribers: hiraditya, bollu, llvm-commits

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by jdoerfert
  62. InstCombiner::visitSelectInst - rename Pred to MinMaxPred to stop shadow variable warning. NFCI.

    We have a lot of Predicate variables, all similarly named.... (detail/ViewSVN)
    by rksimon
  63. Reland "[yaml2obj] - Don't allow setting StOther and Other/Visibility at the same time."

    This relands this commit, I mistakenly reverted the original change
    thinking it was the cause of the observed MSan failures but it was not. (detail/ViewSVN)
    by vlad.tsyrklevich
  64. [SelectionDAG] Don't generate libcalls for wide shifts on Windows (PR42711)

    Neither libgcc or compiler-rt are usually used on Windows, so these
    functions can't be called.

    Differential revision: (detail/ViewSVN)
    by hans
  65. [X86] Add test for rotate combining when add X, X is used instead of shl X, 1. NFC (detail/ViewSVN)
    by deadalnix
  66. [clangd] Cleans up the semantic highlighting resources if clangd stops.

    Summary: Disposes of the vscode listeners when clangd crashes and reuses the old highlighter when it restarts. The reason for reusing the highlighter is because this way the highlightings will not disappear as we won't have to dispose of them.

    Reviewers: hokein, ilya-biryukov

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

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by jvikstrom
  67. [clang-tidy] Fix the potential infinite loop in recordIsTriviallyDefaultConstructible.

    The recordIsTriviallyDefaultConstructible may cause an infinite loop when
    running on an ill-formed decl.

    Reviewers: gribozavr

    Subscribers: nemanjai, xazax.hun, kbarton, cfe-commits

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by hokein
  68. Revert "[yaml2obj] - Don't allow setting StOther and Other/Visibility at the same time."

    This reverts commit r370032, it was causing check-llvm failures on
    sanitizer-x86_64-linux-bootstrap-msan (detail/ViewSVN)
    by vlad.tsyrklevich
  69. [DAGCombine] Fix cppcheck shadow variable warning. NFCI.

    We already have an outer Ops variable. (detail/ViewSVN)
    by rksimon
  70. [mips] Use less registers to load address of TargetExternalSymbol

    There is no pattern matched `add hi, (MipsLo texternalsym)`. As a result,
    loading an address of 32-bit symbol requires two registers and one more
    additional instruction:
    addiu $1, $zero, %lo(foo)
    lui   $2, %hi(foo)
    addu  $25, $2, $1

    This patch adds the missed pattern and enables generation more effective
    set of instructions:
    lui   $1, %hi(foo)
    addiu $25, $1, %lo(foo)

    Differential Revision: (detail/ViewSVN)
    by atanasyan
  71. [clang-tidy] readability-identifier-naming shouldn't complain about CRTP pseudo-overrides

    Reviewers: ilya-biryukov

    Subscribers: xazax.hun, cfe-commits

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by sammccall
  72. [clangd] Fix SelectionTree to allow selection range expression in foreach loops.

    Reviewers: hokein

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

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by sammccall
  73. [TargetLowering] Add buildLegalVectorShuffle facility to help build legal shuffles

    Summary: There are at least 2 ways to express the same shuffle. Various pieces of code explicit check for both option, but other places do not when they would benefit from doing it. This patches refactor the codebase to use buildLegalVectorShuffle in order to make that behavior more consistent.

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

    Subscribers: javed.absar, llvm-commits

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by deadalnix
  74. [DAGCombine] Remove LoadedSlice::Cost default 'ForCodeSize' constructor arguments. NFCI.

    These were always being passed in and it allowed me to add the explicit tag to stop a cppcheck warning about 1 argument constructors. (detail/ViewSVN)
    by rksimon
  75. gn build: Merge r370187 (detail/ViewSVN)
    by nico
  76. [ARM] Move MVEVPTBlockPass to a separate file. NFC

    This just pulls the MVEVPTBlockPass into a separate file, as opposed to being
    wrapped up in Thumb2ITBlockPass.

    Differential revision: (detail/ViewSVN)
    by dmgreen
  77. [MVE] VMOVX patterns

    This adds fp16 VMOVX patterns, using the same patterns as rL362482 with some
    adjustments for MVE. It allows us to move fp16 registers without going into and
    out of gprs.

    VMOVX is able to move the top bits from a fp16 in a fp reg into the bottom bits
    of another register, zeroing the rest. This can be used for odd MVE register
    lanes. The top bits are not read by fp16 instructions, so no move is required
    there if we are dealing with even lanes.

    Differential revision: (detail/ViewSVN)
    by dmgreen
  78. [clangd] Surface errors from command-line parsing

    Those errors are exposed at the first character of a file,
    for a lack of a better place.

    Previously, all errors were stored inside the AST and report
    accordingly. However, errors in command-line argument parsing could
    result in failure to produce the AST, so we need an alternative ways to
    report those errors.

    We take the following approach in this patch:
      - buildCompilerInvocation() now requires an explicit DiagnosticConsumer.
      - TUScheduler and TestTU now collect the diagnostics produced when
        parsing command line arguments.
        If pasing of the AST failed, diagnostics are reported via a new
        ParsingCallbacks::onFailedAST method.
        If parsing of the AST succeeded, any errors produced during
        command-line parsing are stored alongside the AST inside the
        ParsedAST instance and reported as previously by calling the
        ParsingCallbacks::onMainAST method;
      - The client code that uses ClangdServer's DiagnosticConsumer
        does not need to change, it will receive new diagnostics in the
        onDiagnosticsReady() callback

    Errors produced when parsing command-line arguments are collected using
    the same StoreDiags class that is used to collect all other errors. They
    are recognized by their location being invalid. IIUC, the location is
    invalid as there is no source manager at this point, it is created at a
    later stage.

    Although technically we might also get diagnostics that mention the
    command-line arguments FileID with after the source manager was created
    (and they have valid source locations), we choose to not handle those
    and they are dropped as not coming from the main file. AFAICT, those
    diagnostics should always be notes, therefore it's safe to drop them
    without loosing too much information.

    Reviewers: kadircet

    Reviewed By: kadircet

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

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by ibiryukov
  79. [LLVM-C] Fix ByVal Attribute crashing

    With the introduction of the typed byval attribute change there was no
    way that the LLVM-C API could create the correct class Attribute. If a
    program that uses the C API creates a ByVal attribute and annotates a
    function with that attribute LLVM will crash when it assembles or write
    that module containing the function out as bitcode.

    This change is a minimal fix to at least allow code to work, this is
    because the byval change is on the 9.0 and I don't want to introduce new
    LLVM-C API this late in the release cycle.

    By Jakob Bornecrantz!

    Differential revision: (detail/ViewSVN)
    by hans
  80. Delete minimize_source_to_dependency_directives_invalid_error.c

    It was added in r370129 with a .gitattributes file that means the file
    always shows up as having a local diff in Git checkouts (at least on
    Linux). Deleting it until we can figure out the right way to do this. (detail/ViewSVN)
    by hans
  81. [LV] Fold tail by masking - handle reductions

    Allow vectorizing loops that have reductions when tail is folded by masking.
    A select is introduced in VPlan, choosing between the last value carried by the
    loop-exit/live-out instruction of the reduction, and the penultimate value
    carried by the reduction phi, according to the "i < n" mask of fold-tail.
    This select replaces the last value as the live-out value of the loop.

    Differential Revision: (detail/ViewSVN)
    by ayalz
  82. [ARM][ParallelDSP] Change search for muls

    rL369567 reverted a couple of recent changes made to ARMParallelDSP
    because of a miscompilation error: PR43073.

    The issue stemmed from an underlying bug that was caused by adding
    muls into a reduction before it was proved that they could be executed
    in parallel with another mul.

    Most of the changes here are from the previously reverted commits.
    The additional changes have been made area:
    1) The Search function now doesn't insert any muls into the Reduction
       object. That now happens once the search has successfully finished.
    2) For any muls added into the reduction but that weren't paired, we
       accumulate their values as an input into the smlad.

    Differential Revision: (detail/ViewSVN)
    by sam_parker
  83. [NFC] Unbreak tests (detail/ViewSVN)
    by xbolva00
  84. [NFC] Updated test (detail/ViewSVN)
    by xbolva00
  85. Annotate return values of allocation functions with dereferenceable_or_null

    define dso_local noalias i8* @_Z6maixxnv() local_unnamed_addr #0 {
      %call = tail call noalias dereferenceable_or_null(64) i8* @malloc(i64 64) #6
      ret i8* %call

    Reviewers: jdoerfert

    Reviewed By: jdoerfert

    Subscribers: aaron.ballman, llvm-commits

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by xbolva00
  86. [llvm-objdump] Add the missing ARMv8 subarch detection

    Differential Revision: (detail/ViewSVN)
    by kongyi
  87. [LoopFusion] Fix another -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build (detail/ViewSVN)
    by maskray
  88. [clang-doc] Use llvm::createStringError and canonicalize error messages

    "Bad block found.\n" -> "bad block found"

    The lower cased form with no full stop or newline is more common in LLVM

    Reviewed By: juliehockett

    Differential Revision: (detail/ViewSVN)
    by maskray
  89. [compiler-rt] Don't use libcxx if it's not enabled by LLVM_ENABLE_PROJECTS

    This fixes sanitizer-x86_64-linux-fuzzer which switched to new layout and not it
    can't link as libcxx is always there.
    We should support and tests libcxx but still it was unexpected that libfuzzer
    ignored LLVM_ENABLE_PROJECTS_USED. (detail/ViewSVN)
    by Vitaly Buka
  90. Fixup build of clang-interpreter example after change in r370122.

    This should fix the build failure on llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast. (detail/ViewSVN)
    by dyung
  91. AMDGPU/GlobalISel: Fix constraining scalar and/or/xor

    If the result register already had a register class assigned, the
    sources may not have been properly constrained. (detail/ViewSVN)
    by arsenm
  92. Revert r370105 - Update two x86 datalayouts for r370083, looks like racing commits

    r370083 has been reverted, which this change depends on. (detail/ViewSVN)
    by rtrieu
  93. [test] Speculative fix for r369966 on llvm-clang-x86_64-win

    Run the MIR pipeline in this test to completion to try and avoid a "Bad
    machine code" error.

    Build failure: (detail/ViewSVN)
    by Vedant Kumar
  94. [Clang][Bundler] Do not require host triple for extracting device bundles

    Bundler currently requires host triple to be provided no matter if you are performing bundling or unbundling, but for unbundling operation such requirement is too restrictive. You may for example want to examine device part of the object for a particular offload target, but you have to extract host part as well even though you do not need it. Host triple isn't really needed for unbundling, so this patch removes that requirement.

    Differential Revision: (detail/ViewSVN)
    by sdmitriev
  95. Revert "Change the X86 datalayout to add three address spaces for 32 bit signed,"

    This reverts commit r370083 because it caused check-lld failures on
    sanitizer-x86_64-linux-fast. (detail/ViewSVN)
    by vlad.tsyrklevich
  96. Fix "commas at the end of enumerator lists are a C99-specific" (detail/ViewSVN)
    by Vitaly Buka
  97. AMDGPU/GlobalISel: Implement addrspacecast for 32-bit constant addrspace (detail/ViewSVN)
    by arsenm
  98. [ObjC] Fix type checking for qualified id block parameters.

    When checking if block types are compatible, we are checking for
    compatibility their return types and parameters' types. As these types
    have different variance, we need to check them in different order.


    Reviewers: erik.pilkington, arphaman

    Reviewed By: arphaman

    Subscribers: jkorous, dexonsmith, ributzka, cfe-commits

    Differential Revision: (detail/ViewSVN)
    by vsapsai
  99. Re-land [clang-scan-deps] Minimizer: Correctly handle multi-line content with CR+LF line endings

    Previously, an #error directive with quoted, multi-line content, along with CR+LF line endings wasn't handled correctly.

    Differential Revision: (detail/ViewSVN)
    by aganea
  100. [NFC] Assert preconditions and merge all users into one codepath in Loads.cpp (detail/ViewSVN)
    by reames
  101. [preprocessor] Add an opportunity to retain excluded conditional blocks

    It is handy for clang tooling, for instance, in source to source transformation.

    Reviewers: vpykhtin (Valery Pykhtin), erichkeane (Erich Keane)

    Subscribers: rsmith (Richard Smith), akyrtzi (Argyrios Kyrtzidis)

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by emankov
  102. ArrayRef'ized CompilerInvocation::CreateFromArgs

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by gribozavr
  103. [sanitizer_common] Close superfluous file descriptors in spawned process

    Use attribute flag `POSIX_SPAWN_CLOEXEC_DEFAULT` in the call to

    If this flag is set, then only file descriptors explicitly described by
    the file_actions argument are available in the spawned process; all of
    the other file descriptors are automatically closed in the spawned

    POSIX_SPAWN_CLOEXEC_DEFAULT is an Apple-specific extension. (detail/ViewSVN)
    by yln
  104. [clang][Index][NFC] Move IndexDataConsumer default implementation (detail/ViewSVN)
    by Jan Korous
  105. [Clang][Bundler] Fix for a hang when unbundling fat binary

    clang-offload-bundler tool may hang under certain conditions when it extracts a subset of all available device bundles from the fat binary that is handled by the BinaryFileHandler. This patch fixes this problem.

    Differential Revision: (detail/ViewSVN)
    by sdmitriev
  106. [InstCombine] Disable some portions of foldGEPICmp for GEPs that return a vector of pointers. Fix other portions. (detail/ViewSVN)
    by ctopper
  107. [RISCV] Implement RISCVRegisterInfo::getPointerRegClass

    Fixes bug 43041

    Differential Revision: (detail/ViewSVN)
    by luismarques
  108. [Analysis] Improve EmitGEPOffset handling of vector GEPs with scalar indices.

    This patch splats the scalar index if necessary before using it
    in any integer casts or other arithmetic. (detail/ViewSVN)
    by ctopper
  109. Fix asan-symbolize-bad-path.cpp on Darwin

    I accidentally made the CHECK line stricter when committing D65322.
    While it happens to work for Linux and FreeBSD, it broke on Darwin.
    This commit restores the previous behaviour. (detail/ViewSVN)
    by arichardson
  110. [libc++] Add yet another test for inverted character classes

    This was reported as part of a bug report that ended up being a
    duplicate for r340609, but I'm adding the test case since it's
    ever so slightly different from what we had before. (detail/ViewSVN)
    by Louis Dionne
  111. Diagnose _Bool as a C99 extension. (detail/ViewSVN)
    by aaronballman
  112. Debug Info: Support for DW_AT_export_symbols for anonymous structs

    This implements the DWARF 5 feature described in:

    To support recognizing anonymous structs:

      struct A {
        struct { // Anonymous struct
            int y;
      } a;

    This patch adds support in CGDebugInfo::CreateLimitedType(...) for this new flag and an accompanying test to verify this feature.

    Differential Revision: (detail/ViewSVN)
    by shafik
  113. Update two x86 datalayouts for r370083, looks like racing commits (detail/ViewSVN)
    by rnk
  114. [GlobalISel] Replace hard coded dynamic alloca handling with G_DYN_STACKALLOC.

    This change moves the actual stack pointer manipulation into the legalizer,
    available to targets via lower(). The codegen is slightly different because
    we're using explicit masks instead of G_PTRMASK, and using G_SUB rather than
    adding a negative amount via G_GEP.

    Differential Revision: (detail/ViewSVN)
    by aemerson
  115. [clangd] Add a distinct highlighting for local variables

    It's useful to be able to distinguish local variables from namespace
    scope variables.

    Reviewers: hokein, jvikstrom

    Reviewed By: hokein

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

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by nridge
  116. [Loads/SROA] Remove blatantly incorrect code and fix a bug revealed in the process

    The code we had isSafeToLoadUnconditionally was blatantly wrong. This function takes a "Size" argument which is supposed to describe the span loaded from. Instead, the code use the size of the pointer passed (which may be unrelated!) and only checks that span. For any Size > LoadSize, this can and does lead to miscompiles.

    Worse, the generic code just a few lines above correctly handles the cases which *are* valid. So, let's delete said code.

    Removing this code revealed two issues:
    1) As noted by jdoerfert the removed code incorrectly handled external globals.  The test update in SROA is to stop testing incorrect behavior.
    2) SROA was confusing bytes and bits, but this wasn't obvious as the Size parameter was being essentially ignored anyway.  Fixed.

    Differential Revision: (detail/ViewSVN)
    by reames
  117. AMDGPU: Always emit amdgpu-flat-work-group-size

    The backend default maximum should be the hardware maximum, so the
    frontend should set the implementation defined default maximum. (detail/ViewSVN)
    by arsenm
  118. Diagnose both _Complex and _Imaginary as C99 extensions. (detail/ViewSVN)
    by aaronballman
  119. DAG: computeNumSignBits for MUL

    Copied directly from the IR version.

    Most of the testcases I've added for this are somewhat problematic
    because they really end up testing the yet to be implemented version
    for MUL_I24/MUL_U24. (detail/ViewSVN)
    by arsenm
  120. AMDGPU: Add baseline test for num sign bits of mul (detail/ViewSVN)
    by arsenm
  121. [XCOFF][AIX] Generate symbol table entries with llvm-readobj


    This patch implements main entry and auxiliary entries of symbol table generation for llvm-readobj on AIX.
    The source code of aix_xcoff_xlc_test8.o (compile with xlc) is:

    -bash-4.2$ cat test8.c
    extern int i;
    extern int TestforXcoff;
    extern int fun(int i);
    static int static_i;
    char* p="abcd";
    int fun1(int j) {
      return j;
    int main() {
      return fun1(i);

    Patch provided by DiggerLin

    Differential Revision: (detail/ViewSVN)
    by jasonliu
  122. Remove clang-tidy-vs from clang-tools-extra (PR41791)

    The clang-tidy-vs visual studio plugin in clang-tools-extra contains a
    security vulnerability in the YamlDotNet package [1]. I posted to cfe-dev [2],
    asking if there was anyone who was interested in updating the the plugin
    to address the vulnerability. Reid mentioned that Zach (the original committer),
    said that there's another plugin (Clang Power Tools) that provides clang-tidy support,
    with additional extra features, so it would be ok to remove clang-tidy-vs.

    This commit removes the plugin to address the security vulnerability, and adds
    a section to the release notes that mentions that the plugin was removed, and
    suggests to use Clang Power Tools.

    Fixes PR 41791.


    Differential Revision: (detail/ViewSVN)
    by arphaman
  123. Revert Autogenerate the shebang lines for tools/opt-viewer

    This reverts r369486 (git commit 8d18384809957cc923752e10a86adab129e3df48)

    The opt-viewer tests don't pass after this change, and fixing them isn't
    trivial. imports optmap, which requires adjusting
    pythonpath, which is more work than I'm willing to do to fix forward. (detail/ViewSVN)
    by rnk
  124. Add GWP-ASan fuzz target to compiler-rt/tools.

    @eugenis to approve addition of //compiler-rt/tools.
    @pree-jackie please confirm that this WFY.

    D66494 introduced the GWP-ASan stack_trace_compressor_fuzzer. Building fuzz
    targets in compiler-rt is a new affair, and has some challenges:
    - If the host compiler doesn't have compiler-rt, the -fsanitize=fuzzer may not
      be able to link against `libclang_rt.fuzzer*`.
    - Things in compiler-rt generally aren't built when you want to build with
      sanitizers using `-DLLVM_USE_SANITIZER`. This tricky to work around, so
      we create the new tools directory so that we can build fuzz targets with
      sanitizers. This has the added bonus of fixing the problem above as well, as
      we can now just guard the fuzz target build to only be done with

    Reviewers: eugenis, pree-jackie

    Reviewed By: eugenis, pree-jackie

    Subscribers: dberris, mgorny, #sanitizers, llvm-commits, eugenis, pree-jackie, lebedev.ri, vitalybuka, morehouse

    Tags: #sanitizers, #llvm

    Differential Revision: (detail/ViewSVN)
    by hctim
  125. [driver][xray] fix the macOS support checker by supporting -macos
    triple in addition to -darwin

    The previous check incorrectly checked for macOS support by
    allowing -darwin triples only, and -macos triple was not supported.

    Differential Revision: (detail/ViewSVN)
    by arphaman
  126. [ORCv2] - New Speculate Query Implementation

    This patch introduces, SequenceBBQuery - new heuristic to find likely next callable functions it tries to find the blocks with calls in order of execution sequence of Blocks.

    It still uses BlockFrequencyAnalysis to find high frequency blocks. For a handful of hottest blocks (plan to customize), the algorithm traverse and discovered the caller blocks along the way to Entry Basic Block and Exit Basic Block. It uses Block Hint, to stop traversing the already visited blocks in both direction. It implicitly assumes that once the block is visited during discovering entry or exit nodes, revisiting them again does not add much. It also branch probability info (cached result) to traverse only hot edges (planned to customize) from hot blocks. Without BPI, the algorithm mostly return's all the blocks in the CFG with calls.

    It also changes the heuristic queries, so they don't maintain states. Hence it is safe to call from multiple threads.

    It also implements, new instrumentation to avoid jumping into JIT on every call to the function with the help _orc_speculate.decision.block and _orc_speculate.block.

    "Speculator Registration Mechanism is also changed" - kudos to @lhames

    Open to review, mostly looking to change implementation of SequeceBBQuery heuristics with good data structure choices.

    Reviewers: lhames, dblaikie

    Reviewed By: lhames

    Subscribers: mgorny, hiraditya, mgrang, llvm-commits, lhames

    Tags: #speculative_compilation_in_orc, #llvm

    Differential Revision: (detail/ViewSVN)
    by pree-jackie
  127. [Tblgen][MCA] Add the ability to mark groups as LoadQueue and StoreQueue. NFCI

    Before this patch, users were not allowed to optionally mark processor resource
    groups as load/store queues. That is because tablegen class MemoryQueue was
    originally declared as expecting a ProcResource template argument (instead of a
    more generic ProcResourceKind).

    That was an oversight, since the original intention from D54957 was to let user
    mark any processor resource as either load/store queue.  This patch adds the
    ability to use processor resource groups in MemoryQueue definitions. This is not
    a user visible change.

    Differential Revision: (detail/ViewSVN)
    by adibiagio
  128. AMDGPU: Add amdgpu-32bit-address-high-bits to MIR serialization (detail/ViewSVN)
    by arsenm
  129. [JITLink] Fix bogus TimerGroup constructor call. (detail/ViewSVN)
    by Lang Hames
  130. Move EH spec mismatches under -fms-compatibility

    -fms-extensions is intended to enable conforming language extensions and
    -fms-compatibility is intended to language rule relaxations, so a user
    could plausibly compile with -fno-ms-compatibility on Windows while
    still using dllexport, for example.  This exception specification
    validation behavior has been handled as a warning since before
    -fms-compatibility was added in 2011. I think it's just an oversight
    that it hasn't been moved yet.

    This will help users find conformance issues in their code such as those
    found in _com_ptr_t as described in

    Reviewers: hans

    Subscribers: STL_MSFT, cfe-commits

    Differential Revision: (detail/ViewSVN)
    by rnk
  131. AMDGPU: Fix crash from inconsistent register types for v3i16/v3f16

    This is something of a workaround since computeRegisterProperties
    seems to be doing the wrong thing. (detail/ViewSVN)
    by arsenm
  132. [ORC] NFC remove unimplemented query

    Summary: CFGWalk Query is unimplemented for valid reasons. But the declaration got included in commit file.

    Reviewers: lhames, dblaikie

    Reviewed By: dblaikie

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by pree-jackie
  133. Recommit  "[GlobalISel] Import patterns containing INSERT_SUBREG"

    I thought `llvm::sort` was stable for some reason but it's not.

    Use `llvm::stable_sort` in `CodeGenTarget::getSuperRegForSubReg`.

    Original patch: (detail/ViewSVN)
    by paquette
  134. Change the X86 datalayout to add three address spaces for 32 bit signed,
    32 bit unsigned, and 64 bit pointers. (detail/ViewSVN)
    by akhuang
  135. Use FileEntryRef for PPCallbacks::HasInclude

    This fixes the issue where a filename dependendency was missing if the file that
    was referenced with __has_include() was accessed through a symlink in an earlier run,
    if the file manager was reused between runs. (detail/ViewSVN)
    by arphaman
  136. Revert "[GlobalISel] Import patterns containing INSERT_SUBREG"

    When EXPENSIVE_CHECKS are enabled, doesn't get
    stable output.

    Reverting while I debug it.

    See: (detail/ViewSVN)
    by paquette
  137. [X86] Remove encoding information from the TAILJMP instructions that are lowered by MCInstLowering. Fix LowerPATCHABLE_TAIL_CALL to also convert them to regular JMP/JCC instructions

    There are 5 instructions here that are converted from TAILJMP opcodes to regular JMP/JCC opcodes during MCInstLowering. So normally there encoding information isn't used. The exception being when XRay wraps them in PATCHABLE_TAIL_CALL.

    For the ones that weren't already handled in MCInstLowering, add handling for those and remove their encoding information.

    This patch fixes PATCHABLE_TAIL_CALL to do the same opcode conversion as the regular lowering patch. Then removes the encoding information.

    Differential Revision: (detail/ViewSVN)
    by ctopper
  138. [JITLink] Add timers and -show-times option to llvm-jitlink.

    The timers track time spent loading objects, linking, and (if applicable)
    running JIT-link'd code. (detail/ViewSVN)
    by Lang Hames
  139. [JITLink][ORC] Track eh-frame section size for registration/deregistration.

    On MachO, processing of the eh-frame section should stop if the end of the
    __eh_frame section is reached, regardless of whether or not there is a null CFI
    length field at the end of the section. This patch tracks the eh-frame section
    size and threads it through the appropriate APIs so that processing can be
    terminated correctly.

    No testcase yet: This patch is all API plumbing (rather than modification of
    linked memory) which the existing infrastructure does not provide a way of
    testing. Committing without a testcase until I have an idea of how to write
    one. (detail/ViewSVN)
    by Lang Hames
  140. [RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 targets with atomics

    Summary: This ensures that libcalls aren't generated when the target supports atomics. Atomics aren't in the base RV32I/RV64I instruction sets, so MaxAtomicInlineWidth and MaxAtomicPromoteWidth are set only when the atomics extension is being targeted. This must be done in setMaxAtomicWidth, as this should be done after handleTargetFeatures has been called.

    Reviewers: jfb, jyknight, wmi, asb

    Reviewed By: asb

    Subscribers: pzheng, MaskRay, s.egerton, lenary, dexonsmith, psnobl, benna, Jim, JohnLLVM, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, lewis-revill, cfe-commits

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by lenary
  141. [JITLink] Don't under-align zero-fill sections.

    If content sections have lower alignment than zero-fill sections then bump the
    overall segment alignment to avoid under-aligning the zero-fill sections. (detail/ViewSVN)
    by Lang Hames
  142. [DAGCombiner] cancel fnegs from multiplied operands of FMA

    (-X) * (-Y) + Z --> X * Y + Z

    This is a missing optimization that shows up as a potential regression in D66050,
    so we should solve it first. We appear to be partly missing this fold in IR as well.

    We do handle the simpler case already:
    (-X) * (-Y) --> X * Y

    And it might be beneficial to make the constraint less conservative (eg, if both
    operands are cheap, but not necessarily cheaper), but that causes infinite looping
    for the existing fmul transform.

    Differential Revision: (detail/ViewSVN)
    by spatel
  143. Handle local commons for XCOFF object file writing

    Adds support for emitting common local global symbols to an XCOFF object file.
    Local commons are emitted into the .bss section with a storage class of

    Patch by: daltenty

    Reviewers: sfertile, hubert.reinterpretcast

    Differential Revision: (detail/ViewSVN)
    by jasonliu
  144. Revert "[CodeGen] Do the Simple Early Return in block-placement pass to optimize the blocks"

    This reverts commit b3d258fc44b588f06eb35f8e4b9a6d1fc859acec.

    @skatkov is reporting crash in D63972#1646303
    Contacted @ZhangKang, and revert the commit on behalf of him. (detail/ViewSVN)
    by jsji
  145. Update the SARIF exporter to SARIF 2.1

    This updates the SARIF exporter to produce SARIF 2.1 output. The bulk of the diffs come from two changes to SARIF:

    Differential Revision: (detail/ViewSVN)
    by jranieri
  146. [MIPS GlobalISel] ClampScalar G_SHL, G_ASHR and G_LSHR

    ClampScalar G_SHL, G_ASHR and G_LSHR to s32 for MIPS32.

    Differential Revision: (detail/ViewSVN)
    by petar.avramovic
  147. Replace some custom C11 extension warnings with the generic warning. (detail/ViewSVN)
    by aaronballman
  148. [GlobalISel] Factor narrowScalar for G_ASHR and G_LSHR. NFC

    Main difference is in the way Hi for Long shift (HiL) is made.
    G_LSHR fills HiL with zeros, while G_ASHR fills HiL with sign bit value.

    Differential Revision: (detail/ViewSVN)
    by petar.avramovic
  149. [GlobalISel] Fix narrowScalar for shifts to match algorithm from SDAG

    Fix typos. Use Hi and Lo prefixes for Or instead of LHS and RHS
    to match names of surrounding variables.

    Differential Revision: (detail/ViewSVN)
    by petar.avramovic
  150. Fix a SARIF exporter crash with macro expansions

    Differential Revision: (detail/ViewSVN)
    by jranieri
  151. Fix text range end columns in SARIF to be exclusive

    According to the SARIF specification, "a text region does not include the character specified by endColumn".

    Differential Revision: (detail/ViewSVN)
    by jranieri
  152. Quote the token being diagnosed for C11 extensions. (detail/ViewSVN)
    by aaronballman
  153. Speculatively fix the build bots after r370052. (detail/ViewSVN)
    by aaronballman
  154. [DAGCombiner] Add node to the worklist in topological order in parallelizeChainedStores

    Summary: As per title.

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

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by deadalnix
  155. [X86][AVX] Add SimplifyDemandedVectorElts support for KSHIFTL/KSHIFTR

    Differential Revision: (detail/ViewSVN)
    by rksimon
  156. [IntrinsicEmitter] Support scalable vectors in intrinsics

    This patch adds support for scalable vectors in intrinsics, enabling
    intrinsics such as the following to be defined:

        declare <vscale x 4 x i32> @llvm.something.nxv4i32(<vscale x 4 x i32>)

    Support for this is implemented by defining a new type descriptor for
    scalable vectors and adding mangling support for scalable vector types
    in the name mangling scheme used by 'any' types in intrinsic signatures.

    Tests have been added for IRBuilder to test scalable vectors work as
    expected when using intrinsics through this interface. This required
    implementing an intrinsic that is explicitly defined with scalable
    vectors, e.g.  LLVMType<nxv4i32>, an SVE floating-point convert
    intrinsic was used for this.  The behaviour of the overloaded type
    LLVMScalarOrSameVectorWidth with scalable vectors is tested using the
    existing masked load intrinsic. Also added an .ll test to test the
    Verifier catches a bad intrinsic argument when passing a fixed-width
    predicate (mask) to the masked.load intrinsic where a scalable is

    Patch by Paul Walker

    Reviewed By: sdesmalen

    Differential Revision: (detail/ViewSVN)
    by c-rhodes
  157. Implement codegen for MSVC unions with reference members.

    Currently, clang accepts a union with a reference member when given the -fms-extensions flag. This change fixes the codegen for this case.

    Patch by Dominic Ferreira. (detail/ViewSVN)
    by aaronballman
  158. Testing commit access; NFC (detail/ViewSVN)
    by jranieri
  159. [NFC] Added tests for D66651 (detail/ViewSVN)
    by xbolva00
  160. [ASTImporter] Fix name conflict handling with different strategies

    There are numorous flaws about the name conflict handling, this patch
    attempts fixes them. Changes in details:

    * HandleNameConflict return with a false DeclarationName

    Hitherto we effectively never returned with a NameConflict error, even
    if the preceding StructuralMatch indicated a conflict.
    Because we just simply returned with the parameter `Name` in
    HandleNameConflict and that name is almost always `true` when converted to

    * Add tests which indicate wrong NameConflict handling

    * Add to ConflictingDecls only if decl kind is different

    Note, we might not indicate an ODR error when there is an existing record decl
    and a enum is imported with same name.  But there are other cases. E.g. think
    about the case when we import a FunctionTemplateDecl with name f and we found a
    simple FunctionDecl with name f. They overload.  Or in case of a
    ClassTemplateDecl and CXXRecordDecl, the CXXRecordDecl could be the 'templated'
    class, so it would be false to report error.  So I think we should report a
    name conflict error only when we are 100% sure of that.  That is why I think it
    should be a general pattern to report the error only if the kind is the same.

    * Fix failing ctu test with EnumConstandDecl

    In ctu-main.c we have the enum class 'A' which brings in the enum
    constant 'x' with value 0 into the global namespace.
    In ctu-other.c we had the enum class 'B' which brought in the same name
    ('x') as an enum constant but with a different enum value (42). This is clearly
    an ODR violation in the global namespace. The solution was to rename the
    second enum constant.

    * Introduce ODR handling strategies

    Reviewers: a_sidorin, shafik

    Differential Revision: (detail/ViewSVN)
    by martong
  161. [clang] Ensure that statements, expressions and types are trivially destructible

    Since statements, expressions and types are allocated with the BumpPtrAllocator
    from ASTContext their destructor is not executed. Two classes are currently
    exempted from the check : InitListExpr due to its ASTVector and
    ConstantArrayType due to its APInt.

    No functional changes.

    Differential Revision:

    Reviewed By: lebedev.ri, gribozavr (detail/ViewSVN)
    by brunoricci
  162. Add error handling to the DataExtractor class

    This is motivated by D63591, where we realized that there isn't a really
    good way of telling whether a DataExtractor is reading actual data, or
    is it just returning default values because it reached the end of the

    This patch resolves that by providing a new "Cursor" class. A Cursor
    object encapsulates two things:
    - the current position/offset in the DataExtractor
    - an error object

    Storing the error object inside the Cursor enables one to use the same
    pattern as the std::{io}stream API, where one can blindly perform a
    sequence of reads and only check for errors once at the end of the
    operation. Similarly to the stream API, as soon as we encounter one
    error, all of the subsequent operations are skipped (return default
    values) too, even if the would suceed with clear error state. Unlike the
    std::stream API (but in line with other llvm APIs), we force the error
    state to be checked through usage of llvm::Error.

    Reviewers: probinson, dblaikie, JDevlieghere, aprantl, echristo

    Subscribers: kristina, llvm-commits

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by labath
  163. [clang] Ensure that comment classes are trivially destructible

    As in D66646, these classes are also allocated with a BumpPtrAllocator,
    and therefore should be trivially destructible.

    Differential Revision:

    Reviewed By: Mordante, gribozavr (detail/ViewSVN)
    by brunoricci
  164. [DAGCombiner] Add node to the worklist in topological order after relegalization.

    Summary: As per title.

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

    Subscribers: llvm-commits

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by deadalnix
  165. Refactor GlobList from an ad-hoc linked list to a vector

    Summary: I think it makes method implementations more obvious.

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by gribozavr
  166. [InstCombine] Fold select with ctlz to cttz

    Handle pattern [0]:

    int ctz(unsigned int a)
      int c = __clz(a & -a);
      return a ? 31 - c : c;

    In reality, the compiler can generate much better code for cttz, so fold away this pattern.


    Reviewers: spatel, nikic, lebedev.ri, dmgreen, hfinkel

    Reviewed By: hfinkel

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

    Tags: #llvm

    Differential Revision: (detail/ViewSVN)
    by xbolva00
  167. AArch64: avoid creating cycle in DAG for post-increment NEON ops.

    Inserting a value into Visited has the effect of terminating a search for
    predecessors if that node is seen. This is legitimate for the base address, and
    acts as a slight performance optimization, but the vector-building node can be
    paert of a legitimate cycle so we shouldn't stop searching there.

    PR43056. (detail/ViewSVN)
    by Tim Northover
  168. [ReleaseNotes] MemorySanitizer support of ASLR on FreeBSD

    Reviewers: sylvestre.ledru, kcc

    Reviewed By: sylvestre.ledru

    Differential Revision: (detail/ViewSVN)
    by David CARLIER
  169. [llvm-objdump] - Remove one overload of reportError. NFCI.

    There is a problem with reportError we have.
    Declaration says we have ArchiveName
    that follows the FileName:

    reportError(Error E, StringRef FileName, StringRef ArchiveName,...

    Though implementation have them reversed. I cleaned it up and
    removed an excessive reportError(Error E, StringRef File) version.

    Rebased on top of D66418.

    Differential revision: (detail/ViewSVN)
    by grimar
  170. [Driver] Add an option for createInvocationFromCommandLine to recover on errors

    Previously, it would always return nullptr on any error.
    This change adds a parameter, controlling whether the function should
    attempt to return a non-null result even if unknown arguments (or other
    errors were encountered).

    The new behavior is only used in clangd.

    Considered an alternative of changing the return value instead of adding
    a new parameter, but that would require updating all callsites. Settled
    with the parameter to minimize the code changes.

    Reviewers: gribozavr

    Reviewed By: gribozavr

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

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by ibiryukov
  171. [yaml2obj] - Don't allow setting StOther and Other/Visibility at the same time.

    This is a follow up discussed in the comments of D66583.

    Currently, if for example, we have both StOther and Other set in YAML document for a symbol,
    then yaml2obj reports an "unknown key 'Other'" error.
    It happens because 'mapOptional()' is never called for 'Other/Visibility' in this case,
    leaving those unhandled.

    This message does not describe the reason of the error well. This patch fixes it.

    Differential revision: (detail/ViewSVN)
    by grimar
  172. [clangd] Fix for r370029 test that got left in my client (detail/ViewSVN)
    by sammccall
  173. [clangd] Fix toHalfOpenFileRange where start/end endpoints are in different files due to #include


    Reviewers: SureYeaah

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

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by sammccall
  174. GlobList: added a clear test for pattern priority

    The last glob that matches the string decides whether that string is
    included or excluded.

    Subscribers: cfe-commits

    Tags: #clang

    Differential Revision: (detail/ViewSVN)
    by gribozavr

Started by upstream project Clang Stage 2: cmake, R -g Tsan, using Stage 1 RA build number 18198
originally caused by:

Started by upstream project Clang Stage 2: cmake, R -g Tsan, using Stage 1 RA build number 18199
originally caused by:

This run spent:

  • 1 hr 27 min waiting;
  • 18 hr build duration;
  • 19 hr total from scheduled to completion.

Identified problems

Missing test results

The test result file Jenkins is looking for does not exist after the build.
Indication 1

Ninja target failed

Below is a link to the first failed ninja target.
Indication 2

Regression test failed

This build failed because a regression test in the test suite FAILed. See the test report for details.
Indication 3

Compile Error

This build failed because of a compile error. Below is a list of all errors in the build log:
Indication 4