SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [libc] add option to use SCUDO as the allocator (details)
  2. [AbstractAttributor] Refine logic to indicate pessimistic fixed point when folding `__kmpc_is_spmd_exec_mode` (details)
  3. [mlir][linalg] Add pooling_nchw_max, conv_2d_nchw as yaml ops. (details)
  4. [NFC][MLGO] Just use the underlying protobuf object for logging (details)
  5. Delete PrintingPolicy's copy constructor/operator. (details)
  6. Revert "Delete PrintingPolicy's copy constructor/operator." (details)
  7. [llvm][NFC] Fix typos in Errc.h description (details)
  8. [FPEnv][InstSimplify] Enable more folds for constrained fadd (details)
  9. Revert "[FPEnv][InstSimplify] Enable more folds for constrained fadd" (details)
  10. [libunwind] Allow restoring SP while unwinding. (details)
  11. [lld/mac] Implement support for section$start and section$ end symbols (details)
  12. [llvm-rc] Allow dashes as part of resource name strings (details)
  13. [CMake] Add version to libLLVM also on non-UNIX (details)
  14. [OpenMP][Offloading] Fix data race in data mapping by using two locks (details)
  15. [MergeICmps] Relax sinking check (details)
  16. [NFC][compiler-rt] tidy up some whitespace in lit config (details)
  17. [MLIR][NFC] Minor cleanup in liveness. (details)
  18. [compiler-rt][NFC] add debugging options to iossim_run (details)
  19. [Libomptarget] Add unroll flag to shared variables loop (details)
  20. [OpenMP] Fix bug 50022 (details)
  21. [lld/mac] Fix start-stop.s test with expensive checks enabled (details)
  22. [libc] Clean up Windows macros (details)
  23. [NewPM] Add CrossDSOCFI pass irrespective of LTO optimization level (details)
  24. [NFC][BasicBlockUtils] Refactor GetIfCondition() to return the branch, not it's condition (details)
  25. [NFC][SimplifyCFG] FoldTwoEntryPHINode(): make better use of GetIfCondition() returning dom block (details)
  26. [NFC][SimplifyCFG] Make 'conditional block' handling more straight-forward (details)
  27. [OpenMP] always compile with c++14 instead of gnu++14 (details)
  28. [WebAssembly][NFC] Simplify SIMD bitconvert pattern (details)
  29. [WebAssembly] Codegen for pmin and pmax (details)
  30. [ConstantFold] Extract GEP of GEP fold (NFCI) (details)
  31. [ConstantFold] Fix GEP of GEP fold with opaque pointers (details)
  32. [NFC][SimplifyCFG] Add tests for `FoldTwoEntryPHINode()` with prof md (details)
  33. [Bazel] Swap stray td_srcs to deps (details)
  34. [lld/mac] Fix comment typo in new start-end.s test (details)
  35. [libc] Accommodate Fuchsia's death test framework in fenv tests. (details)
  36. [SCEV] Fix bug involving zero step and non-invariant RHS in trip count logic (details)
  37. [cmake] Export LLVM_HOST_TRIPLE in the LLVMConfig.cmake (details)
  38. [Attributor][FIX] checkForAllInstructions, correctly handle declarations (details)
  39. [LangRef] Clarify comdat (details)
  40. Style tweaks for SCEV's computeMaxBECountForLT [NFC] (details)
  41. [tests] SCEV trip count w/ neg step and varying rhs (details)
  42. [source maps] fix source mapping when there are multiple matching rules (details)
  43. [LLDB][GUI] Add Platform Plugin Field (details)
  44. [LLDB][GUI] Check fields validity in actions (details)
  45. [flang] Runtime: Reset list-directed input state for each NAMELIST item (details)
  46. [flang] runtime: fix problems with I/O around EOF & delimited characters (details)
  47. [AMDGPU] Deduce attributes with the Attributor (details)
  48. [gn build] Port 96709823ec37 (details)
  49. Re-re-re-apply "[ORC][ORC-RT] Add initial native-TLV support to MachOPlatform." (details)
Commit da06d1795ab0e004ec90d24b053a82a3db94df49 by michaelrj
[libc] add option to use SCUDO as the allocator

This patch adds LLVM_LIBC_INCLUDE_SCUDO as a flag. When enabled it
should link in the standalone version of SCUDO as the allocator for LLVM
libc.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D106502
The file was modifiedlibc/lib/CMakeLists.txt
The file was modifiedlibc/cmake/modules/LLVMLibCLibraryRules.cmake
The file was modifiedlibc/CMakeLists.txt
Commit ae69f46867cd99d18ec7e23509eb1d71a098d48f by tianshilei1992
[AbstractAttributor] Refine logic to indicate pessimistic fixed point when folding `__kmpc_is_spmd_exec_mode`

Since we are using assumed information now, the logic should be refined to avoid
unncessary assertion.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106630
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
Commit deebf18512266e0e6917508052f6d9bbd06c7d5e by gysit
[mlir][linalg] Add pooling_nchw_max, conv_2d_nchw as yaml ops.

- Add pooling_nchw_max.
- Move conv_2d_nchw to yaml ops and add strides and dilation attributes.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D106658
The file was modifiedmlir/test/Dialect/Linalg/named-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOpsSpec.tc
The file was modifiedmlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nchw-call.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
Commit 55e12f7080df4f2adb43e6aa8151d59e981c724a by mtrofin
[NFC][MLGO] Just use the underlying protobuf object for logging

Avoid buffering just to copy the buffered data, in 'development
mode', when logging. Instead, just populate the underlying protobuf.

Differential Revision: https://reviews.llvm.org/D106592
The file was modifiedllvm/include/llvm/Analysis/Utils/TFUtils.h
The file was modifiedllvm/lib/Analysis/TFUtils.cpp
The file was modifiedllvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
The file was modifiedllvm/unittests/Analysis/TFUtilsTest.cpp
Commit 68ef916659b9cd4127276f9502fc2870ca6cfdea by erich.keane
Delete PrintingPolicy's copy constructor/operator.

This type is 'fat' now thanks to the callbacks, so it should never be
copied as far as I know.  Delete the copy operations so that we don't do
so accidentially.
The file was modifiedclang/include/clang/AST/PrettyPrinter.h
Commit e7afaadd8b7a41cf9fab15786e863e78a8cc1473 by erich.keane
Revert "Delete PrintingPolicy's copy constructor/operator."

My test that showed we don't copy it was wrong!

This reverts commit 68ef916659b9cd4127276f9502fc2870ca6cfdea.
The file was modifiedclang/include/clang/AST/PrettyPrinter.h
Commit 8594a24d63d8606fff344d72b6754547fb04c9b6 by Cyndy Ishida
[llvm][NFC] Fix typos in Errc.h description
The file was modifiedllvm/include/llvm/Support/Errc.h
Commit 64c2b2c69d61dbb6459037a7bfddf29e1f280c8f by kevin.neal
[FPEnv][InstSimplify] Enable more folds for constrained fadd

Precommit tests.
The file was addedllvm/test/Transforms/InstSimplify/strictfp-fadd.ll
Commit aee8457b8d4123d087c45aef95d14f24934fed53 by kevin.neal
Revert "[FPEnv][InstSimplify] Enable more folds for constrained fadd"

Build bots have started failing.

This reverts commit 64c2b2c69d61dbb6459037a7bfddf29e1f280c8f.
The file was removedllvm/test/Transforms/InstSimplify/strictfp-fadd.ll
Commit a085c23aa3c8f91866d7f4588d4f683407dc775d by mvanotti
[libunwind] Allow restoring SP while unwinding.

This commit modifies stepWithDwarf allowing for CFI directives to
specify the value of the stack pointer.

Previously, the SP would be unconditionally set to the CFA, because it
(wrongly) stated that the CFA is the stack pointer at the call site of a
function, but that is not always true.

One situation in which that is false, is for example if you have
switched stacks. In that case if you set the CFA to the SP before
switching the stack, the CFA would be far away from where the current
call frame is located.

The CFA always points to the current call frame, and that call frame
could have a CFI directive that specifies how to restore the stack
pointer. If not, it is OK to fallback and set the SP = CFA.

This change sets SP = CFA before restoring the registers during
unwinding, allowing the stack frame to be restored with a value
different than the CFA.

Reviewed By: #libunwind, phosek

Differential Revision: https://reviews.llvm.org/D106626
The file was modifiedlibunwind/src/DwarfInstructions.hpp
Commit 04e8d0b62dca05c396422048b467bea31988cac3 by thakis
[lld/mac] Implement support for section$start and section$ end symbols

With this, libclang_rt.profile_osx.a can be linked, that is coverage
and PGO-instrumented builds should now work with lld.

section$start and section$end symbols can create non-existing sections.
They're also undefined symbols that are only magic if there isn't a
regular symbol with their name, which means the need to be handled
in treatUndefined() instead of just looping over all existing
sections and adding start and end symbols like the ELF port does.

To represent the actual symbols, this uses absolute symbols that
get their value updated once an output section is layed out.

segment$start and segment$end are still missing for now, but they produce a
nicer error message after this patch.

Main part of PR50760.

Differential Revision: https://reviews.llvm.org/D106629
The file was addedlld/test/MachO/start-end.s
The file was modifiedlld/MachO/OutputSection.h
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/OutputSection.cpp
The file was modifiedlld/MachO/SymbolTable.cpp
Commit 0a1683f8cc0df2889f1d86da7a795914f07e5599 by martin
[llvm-rc] Allow dashes as part of resource name strings

This matches what MS rc.exe allows in practice. I'm not aware of
any legal syntax case that are broken by allowing dashes as part
of what the tokenizer considers an Identifier - but I'm not
very well versed in the RC syntax either, can @amccarth think of
any case that would be broken by this?

This fixes downstream bug
https://github.com/msys2/MINGW-packages/issues/9180.

Additionally, rc.exe allows such resource name strings to be surrounded
by quotes, ending up with e.g.

    Resource name (string): "QUOTEDNAME"

(i.e., the quotes end up as part of the string), which llvm-rc doesn't
support yet either. (I'm not aware of such cases in the wild though,
but resource string names with dashes do exist.)

This also allows including files with unquoted paths, with filenames
containing dashes (which fixes
https://github.com/msys2/MINGW-packages/issues/9130, which has been
worked around differently so far).

Differential Revision: https://reviews.llvm.org/D106598
The file was modifiedllvm/tools/llvm-rc/ResourceScriptToken.cpp
The file was addedllvm/test/tools/llvm-rc/resname-string.test
The file was modifiedllvm/test/tools/llvm-rc/Inputs/tokens.rc
The file was modifiedllvm/test/tools/llvm-rc/tokenizer.test
The file was addedllvm/test/tools/llvm-rc/Inputs/resname-string.rc
Commit b22bf7e82ae06acb91a248c69c5fa44393d49906 by martin
[CMake] Add version to libLLVM also on non-UNIX

As discussed in https://reviews.llvm.org/D87521

llvm-config expects versioned library regardless of platform.

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D89009
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
Commit 18ce3d3f2c362b7fda33ebd7b4d544e9cae23ad4 by tianshilei1992
[OpenMP][Offloading] Fix data race in data mapping by using two locks

This patch tries to partially fix one of the two data race issues reported in
[1] by introducing a per-entry mutex. Additional discussion can also be found in
D104418, which will also be refined to fix another data race problem.

Here is how it works. Like before, `DataMapMtx` is still being used for mapping
table lookup and update. In any case, we will get a table entry. If we need to
make a data transfer (update the data on the device), we need to lock the entry
right before releasing `DataMapMtx`, and the issue of data transfer should be
after releasing `DataMapMtx`, and the entry is unlocked afterwards. This can
guarantee that: 1) issue of data movement is not in critical region, which will
not affect performance too much, and also will not affect other threads that don't
touch the same entry; 2) if another thread accesses the same entry, the state of
data movement is consistent (which requires that a thread must first get the
update lock before getting data movement information).

For a target that doesn't support async data transfer, issue of data movement is
data transfer. This two-lock design can potentially improve concurrency compared
with the design that guards data movement with `DataMapMtx` as well. For a target
that supports async data movement, we could simply attach the event between the
issue of data movement and unlock the entry. For a thread that wants to get the
event, it must first get the lock. This can also get rid of the busy wait until
the event pointer is valid.

Reference:
[1] https://bugs.llvm.org/show_bug.cgi?id=49940

Reviewed By: grokos

Differential Revision: https://reviews.llvm.org/D104555
The file was modifiedopenmp/libomptarget/src/device.cpp
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/src/device.h
Commit f502683750f4240c48a3e24bf023294e4a27929e by nikita.ppv
[MergeICmps] Relax sinking check

The check for sinking instructions past the load + cmp sequence
currently checks for side-effects, which includes writing to memory
and unwinding. However, I don't believe we care about sinking the
instructions past an unwind (as they don't have any side-effects
themselves).

Differential Revision: https://reviews.llvm.org/D106591
The file was modifiedllvm/test/Transforms/MergeICmps/X86/split-block-does-work.ll
The file was modifiedllvm/lib/Transforms/Scalar/MergeICmps.cpp
Commit 3c2c9851634ab5889377b0457fac0b7bb79a935b by code
[NFC][compiler-rt] tidy up some whitespace in lit config
The file was modifiedcompiler-rt/test/lit.common.cfg.py
Commit 17de7ed556ad8df3d2dcaa9322a792fc70243194 by jurahul
[MLIR][NFC] Minor cleanup in liveness.

- Rename isLastUse to isDeadAfter to reflect what the function does.
- Avoid a second walk over all operations in BlockInfoBuilder constructor.
- use std::move() to save the new in set.

Differential Revision: https://reviews.llvm.org/D106702
The file was modifiedmlir/include/mlir/Analysis/Liveness.h
The file was modifiedmlir/lib/Analysis/Liveness.cpp
Commit d71fc323f998b0d2f063cfedf53a8d89f8857279 by code
[compiler-rt][NFC] add debugging options to iossim_run

Add the ability to:
1. tell simctl to wait for debugger when spawning process
2. print the command that is called to launch the process

Reviewed By: delcypher

Differential Revision: https://reviews.llvm.org/D106700
The file was modifiedcompiler-rt/test/sanitizer_common/ios_commands/iossim_run.py
Commit e1dedecaa6f83223efde5e0bf98a8f070aa5d6a5 by huberjn
[Libomptarget] Add unroll flag to shared variables loop

Unrolling this loop provides better performance in practice because it is
executed on the device and is likely to be very small.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D106692
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/parallel.cu
Commit c2c43132f69c6f7e89d97c0c2ce32b0cf2f30e90 by tianshilei1992
[OpenMP] Fix bug 50022

Bug 50022 [0] reports target nowait fails in certain case, which is added in this
patch. The root cause of the failure is, when the second task is created, its
parent's `td_incomplete_child_tasks` will not be incremented because there is no
parallel region here thus its team is serialized. Therefore, when the initial
thread is waiting for its unfinished children tasks, it thought there is only
one, the first task, because it is hidden helper task, so it is tracked. The
second task will only be pushed to the queue when the first task is finished.
However, when the first task finishes, it first decrements the counter of its
parent, and then release dependences. Once the counter is decremented, the thread
will move on because its counter is reset, but actually, the second task has not
been executed at all. As a result, since in this case, the main function finishes,
then `libomp` starts to destroy. When the second task is pushed somewhere, all
some of the structures might already have already been destroyed, then anything
could happen.

This patch simply moves `__kmp_release_deps` ahead of decrement of the counter.
In this way, we can make sure that the initial thread is aware of the existence
of another task(s) so it will not move on. In addition, in order to tackle
dependence chain starting with hidden helper thread, when hidden helper task is
encountered, we force the task to release dependences.

Reference:
[0] https://bugs.llvm.org/show_bug.cgi?id=50022

Reviewed By: AndreyChurbanov

Differential Revision: https://reviews.llvm.org/D106519
The file was modifiedopenmp/runtime/src/kmp_tasking.cpp
The file was addedopenmp/libomptarget/test/offloading/bug50022.cpp
Commit 04f5eb407c74d433589739a719c3fc75a08859b3 by thakis
[lld/mac] Fix start-stop.s test with expensive checks enabled

See e.g. https://lab.llvm.org/buildbot/#/builders/16/builds/14317
Not 100% sure why this fails yet, but this fixes it. Let's get
the bots green again first :)

Differential Revision: https://reviews.llvm.org/D106711
The file was modifiedlld/MachO/OutputSegment.cpp
Commit 5d679fc502c78eba4758d034cdffc44bc6d48efb by caitlyncano
[libc] Clean up Windows macros

This clean-up removes checks for _WIN64, as the _WIN32 macro returns 1
whenever the compilation targe is 32- or 64-bit ARM.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D106706
The file was modifiedlibc/utils/FPUtil/TestHelpers.cpp
The file was modifiedlibc/utils/FPUtil/PlatformDefs.h
The file was modifiedlibc/utils/UnitTest/PlatformDefs.h
Commit c45e17f11f508d1aea97eded3f1bda2a448f2032 by pirama
[NewPM] Add CrossDSOCFI pass irrespective of LTO optimization level

This pass is not an optimization and is needed for CFI functionality
(cross-dso verification).

Differential Revision: https://reviews.llvm.org/D106699
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Other/new-pm-O0-defaults.ll
The file was modifiedllvm/test/Other/new-pm-lto-defaults.ll
Commit 2aa2fdeed9dc8af922e424545eae56d81c10599f by lebedev.ri
[NFC][BasicBlockUtils] Refactor GetIfCondition() to return the branch, not it's condition

Otherwise e.g. the FoldTwoEntryPHINode() has to do a lot of legwork
to re-deduce what is the dominant block (i.e. for which block
is this branch the terminator).
The file was modifiedllvm/lib/Transforms/Utils/FlattenCFG.cpp
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 418dba06064ffe9c5e6433e0045bd88966b5ed12 by lebedev.ri
[NFC][SimplifyCFG] FoldTwoEntryPHINode(): make better use of GetIfCondition() returning dom block
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 943f85123b72720c1c960c6dee7d20ff1c37ea52 by lebedev.ri
[NFC][SimplifyCFG] Make 'conditional block' handling more straight-forward

This will simplify making use of profile weights
to not perform the speculation when obviously unprofitable.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 4079037a3e11506e035b98b906a907cc5b60c1e7 by tianshilei1992
[OpenMP] always compile with c++14 instead of gnu++14

Fixes PR 51174. c++14 should be a more portable option than gnu++14.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D106632
The file was modifiedopenmp/cmake/HandleOpenMPOptions.cmake
The file was modifiedopenmp/cmake/config-ix.cmake
Commit 39c0e4afce5d1ac5e5ae4012c1201fc461218ae4 by tlively
[WebAssembly][NFC] Simplify SIMD bitconvert pattern

Differential Revision: https://reviews.llvm.org/D106680
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
Commit 85157c0079031b51c0446b222894aec4aad71b53 by tlively
[WebAssembly] Codegen for pmin and pmax

Replace the clang builtins and LLVM intrinsics for {f32x4,f64x2}.{pmin,pmax}
with standard codegen patterns. Since wasm_simd128.h uses an integer vector as
the standard single vector type, the IR for the pmin and pmax intrinsic
functions contains bitcasts that would not be there otherwise. Add extra codegen
patterns that can still select the pmin and pmax instructions in the presence of
these bitcasts.

Differential Revision: https://reviews.llvm.org/D106612
The file was modifiedclang/test/Headers/wasm.c
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-arith.ll
The file was modifiedclang/test/CodeGen/builtins-wasm.c
The file was modifiedclang/lib/Headers/wasm_simd128.h
The file was modifiedllvm/include/llvm/IR/IntrinsicsWebAssembly.td
The file was modifiedclang/include/clang/Basic/BuiltinsWebAssembly.def
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-intrinsics.ll
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit 923727e8bedac0257f5603ca3a1032737b01be96 by nikita.ppv
[ConstantFold] Extract GEP of GEP fold (NFCI)

Move this fold into a separate function and clean up the control
flow a bit.
The file was modifiedllvm/lib/IR/ConstantFold.cpp
Commit f623b3a29aa9932fedf5b043b0f3b7535a19fdb7 by nikita.ppv
[ConstantFold] Fix GEP of GEP fold with opaque pointers

This was previously combining indices even though they operate on
different types. For non-opaque pointers, the condition is
automatically satisfied based on the pointer types being equal.
The file was modifiedllvm/test/Other/force-opaque-ptrs.ll
The file was modifiedllvm/lib/IR/ConstantFold.cpp
Commit 1f341aedc923ad5bc7654eabc07429a388c0fc0c by lebedev.ri
[NFC][SimplifyCFG] Add tests for `FoldTwoEntryPHINode()` with prof md
The file was addedllvm/test/Transforms/SimplifyCFG/fold-two-entry-phi-node-with-one-block-profmd.ll
The file was addedllvm/test/Transforms/SimplifyCFG/fold-two-entry-phi-node-with-two-blocks-profmd.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/speculatively-execute-block-profmd.ll
Commit 3f2c1e99e44d028d5e9dd685f3c568f2661f2f68 by gcmn
[Bazel] Swap stray td_srcs to deps

This is the last instance of td_srcs in MLIR core build files. `deps` is
generally preferred. There are still some cases where `td_srcs` is
useful where creating a td_library would just be another layer of
indirection, so not (yet) dropping it entirely.

Differential Revision: https://reviews.llvm.org/D106716
The file was modifiedutils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
Commit 92c085e7c45298a4f4e96f50b21f39ce309279fa by thakis
[lld/mac] Fix comment typo in new start-end.s test
The file was modifiedlld/test/MachO/start-end.s
Commit c24c18bba61fa4e9e5513b70cd133ec39eaf9e25 by sivachandra
[libc] Accommodate Fuchsia's death test framework in fenv tests.

Fuchsia's death test framework runs the closure which can die in a
different thread. Hence, the FP exceptions which cause the closure to
die should be enalbed in the closure.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D106683
The file was modifiedlibc/test/src/fenv/feholdexcept_test.cpp
The file was modifiedlibc/test/src/fenv/enabled_exceptions_test.cpp
Commit 4a3dc7dc9a03ff4864a0e2cd31b15848481c322b by listmail
[SCEV] Fix bug involving zero step and non-invariant RHS in trip count logic

Eli pointed out the issue when reviewing D104140. The max trip count logic makes an assumption that the value of IV changes. When the step is zero, the nowrap fact becomes trivial, and thus there's nothing preventing the loop from being nearly infinite. (The "nearly" part is because mustprogress may disallow an infinite loop while still allowing 999999999 iterations before RHS happens to allow an exit.)

This is very difficult to see in practice. You need a means to produce a loop varying RHS in a mustprogress loop which doesn't allow the loop to be infinite. In most cases, LICM or SCEV are smart enough to remove the loop varying expressions.

Differential Revision: https://reviews.llvm.org/D106327
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/test/Analysis/ScalarEvolution/trip-count-unknown-stride.ll
Commit 328bb2caae810d484422a13c279939c03ac8c6b3 by stilis
[cmake] Export LLVM_HOST_TRIPLE in the LLVMConfig.cmake

This is referenced in several of the cmake files that are part of an llvm install and it is also useful by downstream components such as onnx-mlir.

Differential Revision: https://reviews.llvm.org/D106686
The file was modifiedllvm/cmake/modules/LLVMConfig.cmake.in
Commit 0cd964ff254888d563659f4f8f39c934732aa487 by kuterdinel
[Attributor][FIX] checkForAllInstructions, correctly handle declarations

checkForAllInstructions was not handling declarations correctly.
It should have been returning false when it gets called on a declaration

The patch also fixes a test case for AAFunctionReachability for it to be able
to pass after the changes to the checkForAllinstructions.

Differential Revision: https://reviews.llvm.org/D106625
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/unittests/Transforms/IPO/AttributorTest.cpp
Commit d5401315cd29b67607b5914997c99d34427ac354 by i
[LangRef] Clarify comdat

* ELF supports `nodeduplicate`.
* ELF calls the concept "section group". `GRP_COMDAT` emulates the PE COMDAT deduplication feature.
* "COMDAT group" is an ELF term. Avoid it for PE/COFF.
* WebAssembly supports comdat but only supports the `any` selection kind. https://bugs.llvm.org/show_bug.cgi?id=50531
* A comdat must be included or omitted as a unit. Both the compiler and the linker must obey this rule.
* A global object can be a member of at most one comdat.
* COFF requires a non-local linkage for non-`nodeduplicate` selection kinds.
* llvm.global_ctors/.llvm.global_dtors: if the third field is used on ELF, it must reference a global variable or function in a comdat

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D106300
The file was modifiedllvm/docs/LangRef.rst
Commit ec43def7003db38640597b94fee38f6bc53379f9 by listmail
Style tweaks for SCEV's computeMaxBECountForLT [NFC]
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit e9d4bb43f8432c58d87ff6c725f4b92db084d650 by listmail
[tests] SCEV trip count w/ neg step and varying rhs
The file was modifiedllvm/test/Analysis/ScalarEvolution/trip-count-negative-stride.ll
Commit ef8c6849a235e97b8b981e0f998d430fdbd7bc2a by walter erquinigo
[source maps] fix source mapping when there are multiple matching rules

D104406 introduced an error in which, if there are multiple matchings rules for a given path, lldb was only checking for the validity in the filesystem of the first match instead of looking exhaustively one by one until a valid file is found.

Besides that, a call to consume_front was being done incorrectly, as it was modifying the input, which renders subsequent matches incorrect.

I added a test that checks for both cases.

Differential Revision: https://reviews.llvm.org/D106723
The file was modifiedlldb/include/lldb/Target/PathMappingList.h
The file was modifiedlldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
The file was modifiedlldb/source/Target/PathMappingList.cpp
Commit e160b3987e734ba834cbd985315765ea7f468680 by gclayton
[LLDB][GUI] Add Platform Plugin Field

This patch adds a new Platform Plugin Field. It is a choices field that
lists all the available platform plugins and can retrieve the name of the
selected plugin. The default selected plugin is the currently selected
one. This patch also allows for arbitrary scrolling to make scrolling
easier when setting choices.

Differential Revision: https://reviews.llvm.org/D106483
The file was modifiedlldb/source/Core/IOHandlerCursesGUI.cpp
Commit 80ac12b70b16a51fac9918c4b25e3bdfad05eee5 by gclayton
[LLDB][GUI] Check fields validity in actions

This patch adds a virtual method HasError to fields, it can be
overridden by fields that have errors. Additionally, a form method
CheckFieldsValidity was added to be called by actions that expects all
the field to be valid.

Differential Revision: https://reviews.llvm.org/D106459
The file was modifiedlldb/source/Core/IOHandlerCursesGUI.cpp
Commit e093cbb7ae1448379cad5520db5dfa5cf0b06bdf by pklausler
[flang] Runtime: Reset list-directed input state for each NAMELIST item

NAMELIST I/O formatting uses the runtime infrastructure for
list-directed I/O.  List-directed input processing has same state
that requires reinitialization for each successive NAMELIST input
item.  This patch fixes bugs with "null" items and repetition counts
on NAMELIST input items after the first in the group.

Differential Revision: https://reviews.llvm.org/D106694
The file was modifiedflang/runtime/io-stmt.h
The file was modifiedflang/runtime/namelist.cpp
Commit 4d42e16eb8f7bb1484a1970324aa3391809188de by pklausler
[flang] runtime: fix problems with I/O around EOF & delimited characters

When a WRITE overwrites an endfile record, we need to forget
that there was an endfile record.  When doing a BACKSPACE
after an explicit ENDFILE statement, the position afterwards
must be upon the endfile record.

Attempts to join list-directed delimited character input across
record boundaries was due to a bad reading of the standard
and has been deleted, now that the requirements are better understood.
This problem would cause a read attempt past EOF if a delimited
character input value was at the end of a record.

It turns out that delimited list-directed (and NAMELIST) character
output is required to emit contiguous doubled instances of the
delimiter character when it appears in the output value.  When
fixed-size records are being emitted, as is the case with internal
output, this is not possible when the problematic character falls
on the last position of a record.  No two other Fortran compilers
do the same thing in this situation so there is no good precedent
to follow.

Because it seems least wrong, with this patch we now emit one copy
of the delimiter as the last character of the current record and
another as the first character of the next record.  (The
second-least-wrong alternative might be to flag a runtime error,
but that seems harsh since it's not an explicit error in the standard,
and the output may not have to be usable later as input anyway.)
Consequently, the output is not suitable for use as list-directed or
NAMELIST input.

If a later standard were to clarify this case, this behavior will of
course change as needed to conform.

Differential Revision: https://reviews.llvm.org/D106695
The file was modifiedflang/runtime/edit-input.cpp
The file was modifiedflang/runtime/unit.cpp
The file was modifiedflang/unittests/RuntimeGTest/Namelist.cpp
The file was modifiedflang/docs/Extensions.md
The file was modifiedflang/runtime/edit-output.cpp
Commit 96709823ec37e98b16332f4ce19523b3f6798bdf by kuterdinel
[AMDGPU] Deduce attributes with the Attributor

This patch introduces a pass that uses the Attributor to deduce AMDGPU specific attributes.

Reviewed By: jdoerfert, arsenm

Differential Revision: https://reviews.llvm.org/D104997
The file was modifiedllvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa-call.ll
The file was modifiedllvm/lib/Target/AMDGPU/CMakeLists.txt
The file was modifiedllvm/test/CodeGen/AMDGPU/addrspacecast-constantexpr.ll
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/uniform-work-group-prevent-attribute-propagation.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/uniform-work-group-recursion-test.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/pal-simple-indirect-call.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/uniform-work-group-nested-function-calls.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/uniform-work-group-test.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/uniform-work-group-propagate-attribute.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/direct-indirect-call.ll
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/annotate-kernel-features.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPU.h
The file was modifiedllvm/test/CodeGen/AMDGPU/uniform-work-group-attribute-missing.ll
The file was addedllvm/test/CodeGen/AMDGPU/uniform-work-group-multistep.ll
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
The file was modifiedllvm/test/CodeGen/AMDGPU/duplicate-attribute-indirect.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
The file was addedllvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/annotate-kernel-features-hsa.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/simple-indirect-call.ll
Commit 698fef3eb68bdce46f2f629dec6c3f39db78399e by llvmgnsyncbot
[gn build] Port 96709823ec37
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
Commit eda6afdad62cd79b05191c3cbeb62e99d0f986fa by Lang Hames
Re-re-re-apply "[ORC][ORC-RT] Add initial native-TLV support to MachOPlatform."

The ccache builders have recevied a config update that should eliminate the
build issues seen previously.
The file was addedcompiler-rt/test/orc/TestCases/Darwin/x86-64/trivial-tlv.S
The file was addedcompiler-rt/lib/orc/macho_tlv.x86-64.S
The file was modifiedllvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
The file was modifiedcompiler-rt/lib/orc/CMakeLists.txt
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
The file was modifiedcompiler-rt/lib/orc/macho_platform.h
The file was modifiedcompiler-rt/lib/orc/macho_platform.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp