SuccessChanges

Summary

  1. [ORC] Add a CPU getter to JITTargetMachineBuilder. (details)
  2. [ORC-RT] Add ORC runtime error and expected types. (details)
  3. Treat implicit deduction guides as being equivalent to their (details)
  4. [CSSPGO] Avoid deleting probe instruction in FoldValueComparisonIntoPredecessors (details)
  5. [mlir][CAPI] Expose [u]int8 DenseElementsAttr. (details)
  6. [mlir] Harmonize TOSA include guards (details)
  7. [mlir] Properly align StorageUniquer::BaseStorage to fix 32 bit build (details)
  8. [mlir][sparse] skip sparsification for unannotated (or unhandled) cases (details)
  9. [NFC][tsan] clang-format the test (details)
  10. Revert "[Driver] Delete -mimplicit-it=" (details)
  11. [mlir][docs] Fix minor typos in vector dialect docs (details)
  12. [CMake] Don't LTO optimize targets that aren't part of any distribution (details)
  13. [MC][ARM] Reject Thumb "ror rX, #0" (details)
  14. [Remarks] Add analysis remarks for memset/memcpy/memmove lengths (details)
  15. [docs] Describe reporting security issues on the chromium tracker. (details)
  16. [lld][WebAssembly] Fix for string tail merging and -r/--relocatable (details)
  17. [gn build] Port 4bf69fb52b3c (details)
  18. PR50402: Use proper constant evaluation rules for checking constraint (details)
  19. -fno-semantic-interposition: Don't set dso_local on GlobalVariable (details)
  20. [test] Fix test (details)
  21. [mlir] Add a new `print-ir-after-failure` IR pass printing flag (details)
  22. [mlir] Refactor the implementation of pass crash reproducers (details)
Commit ef6e1213b1c0af387fe13754e02a14f3d31018a0 by Lang Hames
[ORC] Add a CPU getter to JITTargetMachineBuilder.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
Commit 1dfa47910a2332a351ebc5236b4e2bfb3562c23b by Lang Hames
[ORC-RT] Add ORC runtime error and expected types.

These will be used for error propagation and handling in the ORC runtime.

The implementations of these types are cut-down versions of the error
support in llvm/Support/Error.h. Most advice on llvm::Error and llvm::Expected
(e.g. from the LLVM Programmer's manual) applies equally to __orc_rt::Error
and __orc_rt::Expected. The primary difference is the mechanism for testing
and handling error types: The ORC runtime uses a new 'error_cast' operation
to replace the handleErrors family of functions. See error_cast comments in
error.h.
The file was addedcompiler-rt/lib/orc/error.h
The file was modifiedcompiler-rt/lib/orc/unittests/CMakeLists.txt
The file was addedcompiler-rt/lib/orc/unittests/error_test.cpp
The file was modifiedcompiler-rt/lib/orc/CMakeLists.txt
Commit d38057f3ecb080e0ae4aba367a737226221327f2 by richard
Treat implicit deduction guides as being equivalent to their
corresponding constructor for access checking purposes.
The file was modifiedclang/lib/Serialization/ASTWriterDecl.cpp
The file was modifiedclang/include/clang/AST/DeclCXX.h
The file was modifiedclang/lib/Serialization/ASTReaderDecl.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was modifiedclang/lib/AST/DeclCXX.cpp
The file was modifiedclang/test/SemaTemplate/ctad.cpp
The file was modifiedclang/lib/Sema/SemaAccess.cpp
Commit 6539a80bc9e8a8587a199e10caa843b40e2f2c71 by wlei
[CSSPGO] Avoid deleting probe instruction in FoldValueComparisonIntoPredecessors

This change tries to fix a place missing `moveAndDanglePseudoProbes `. In FoldValueComparisonIntoPredecessors, it folds the BB into predecessors and then marked the BB unreachable. However, the original logic from the BB is still alive, deleting the probe will mislead the SampleLoader mark it as zero count sample.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D102721
The file was addedllvm/test/Transforms/SampleProfile/pseudo-probe-dangle3.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 35454268cf93f5561439980d6baeb27a874a380c by silvasean
[mlir][CAPI] Expose [u]int8 DenseElementsAttr.

Also, fix a small typo where the "unsigned" splat variants were not
being created with an unsigned type.

Differential Revision: https://reviews.llvm.org/D102797
The file was modifiedmlir/include/mlir-c/BuiltinAttributes.h
The file was modifiedmlir/lib/CAPI/IR/BuiltinAttributes.cpp
The file was modifiedmlir/test/CAPI/ir.c
Commit f878e1af9faa318830d4169e91422a0777c54db7 by marius.brehler
[mlir] Harmonize TOSA include guards

Reviewed By: sjarus

Differential Revision: https://reviews.llvm.org/D102802
The file was modifiedmlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
The file was modifiedmlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h
Commit 3b7f8daed4b2ce9f2d3ba6c4668f7b21d015f27c by riddleriver
[mlir] Properly align StorageUniquer::BaseStorage to fix 32 bit build

We allow stealing up to 3 bits of pointers to BaseStorage, so we need to make sure that we align by at least 8.
The file was modifiedmlir/include/mlir/Support/StorageUniquer.h
Commit bf9ef3efaa99c02e7bfc4c57207301b8de39a278 by ajcbik
[mlir][sparse] skip sparsification for unannotated (or unhandled) cases

Skip the sparsification pass for Linalg ops without annotated tensors
(or cases that are not properly handled yet).

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D102787
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
The file was modifiedmlir/test/Dialect/SparseTensor/sparse_3d.mlir
The file was modifiedmlir/test/Dialect/SparseTensor/sparse_parallel.mlir
Commit 09a8372726597d3c34e76e015906fc035913d29c by Vitaly Buka
[NFC][tsan] clang-format the test
The file was modifiedcompiler-rt/test/tsan/pthread_atfork_deadlock3.c
Commit 688b917b4b3cbe09bf4954b2c10b01ef57386c0a by martin
Revert "[Driver] Delete -mimplicit-it="

This reverts commit 2919222d8017f2425a85765b95e4b7c6f8e70ca4.

That commit broke backwards compatibility. Additionally, the
replacement, -Wa,-mimplicit-it, isn't yet supported by any stable
release of Clang.

See D102812 for a fix for the error cases when callers specify both
-mimplicit-it and -Wa,-mimplicit-it.
The file was addedclang/test/Driver/arm-implicit-it.s
The file was modifiedclang/test/Driver/as-options.s
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Driver/arm-target-as-mimplicit-it.s
Commit 0316f3e64972c919d8bfa2d15b9a4be858530f85 by ajcbik
[mlir][docs] Fix minor typos in vector dialect docs

Updates a minor typo in vector dialect documentation.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D101203
The file was modifiedmlir/docs/Dialects/Vector.md
Commit 757a851a2c273c93fa3a5b69c3d9baa1132eaf72 by phosek
[CMake] Don't LTO optimize targets that aren't part of any distribution

When using distributions, targets that aren't included in any
distribution don't need to be as optimized as targets that are
included since those targets are typically only used for tests.

We might consider avoiding LTO for these targets altogether, see
https://lists.llvm.org/pipermail/llvm-dev/2021-April/149843.html

Differential Revision: https://reviews.llvm.org/D102732
The file was modifiedllvm/CMakeLists.txt
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
The file was modifiedllvm/cmake/modules/LLVMDistributionSupport.cmake
Commit 65d0264ba2e5770cceeda7ff8c3509c626cf0109 by rprichard
[MC][ARM] Reject Thumb "ror rX, #0"

The ROR instruction can only handle immediates between 1 and 31. The
would-be encoding for ROR #0 is actually the RRX instruction.

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D102455
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td
The file was modifiedllvm/test/MC/ARM/thumb2-diagnostics.s
Commit 4bf69fb52b3c445ddcef5043c6b292efd14330e0 by jonathan_roelofs
[Remarks] Add analysis remarks for memset/memcpy/memmove lengths

Differential revision: https://reviews.llvm.org/D102452
The file was removedllvm/lib/Transforms/Utils/AutoInitRemark.cpp
The file was addedllvm/lib/Transforms/Utils/MemoryOpRemark.cpp
The file was modifiedllvm/test/Transforms/Util/trivial-auto-var-init-store.ll
The file was modifiedllvm/include/llvm/Analysis/OptimizationRemarkEmitter.h
The file was addedllvm/test/CodeGen/AArch64/memsize-remarks.ll
The file was addedllvm/include/llvm/Transforms/Utils/MemoryOpRemark.h
The file was removedllvm/include/llvm/Transforms/Utils/AutoInitRemark.h
The file was modifiedllvm/test/Transforms/Util/trivial-auto-var-init-call.ll
The file was modifiedllvm/lib/Transforms/Utils/CMakeLists.txt
The file was modifiedllvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
Commit c9dbaa4c86d29f891e2c30af787dfb74b9e83ed9 by Ahmed Bougacha
[docs] Describe reporting security issues on the chromium tracker.

To track security issues, we're starting with the chromium bug tracker
(using the llvm project there).

We considered using Github Security Advisories.  However, they are
currently intended as a way for project owners to publicize their
security advisories, and aren't well-suited to reporting issues.

This also moves the issue-reporting paragraph to the beginning of the
document, in part to make it more discoverable, in part to allow the
anchor-linking to actually display the paragraph at the top of the page.

Note that this doesn't update the concrete list of security-sensitive
areas, which is still an open item.  When we do, we may want to move the
list of security-sensitive areas next to the issue-reporting paragraph
as well, as it seems like relevant information needed in the reporting
process.

Finally, when describing the discission medium, this splits the topics
discussed into two: the concrete security issues, discussed in the
issue tracker, and the logistics of the group, in our mailing list,
as patches on public lists, and in the monthly sync-up call.

While there, add a SECURITY.md page linking to the relevant paragraph.

Differential Revision: https://reviews.llvm.org/D100873
The file was addedSECURITY.md
The file was modifiedllvm/docs/GettingInvolved.rst
The file was modifiedllvm/docs/Security.rst
Commit 356b85edd78311ae7376f4b271c48b9f0156aeea by sbc
[lld][WebAssembly] Fix for string tail merging and -r/--relocatable

Ensure that both SyntheticMergedChunk and all MergeInfoChunks that it
comprises are assigned the correct output section.  Without this we
would crash when outputting relocations in --relocatable mode.

Fixes: https://github.com/emscripten-core/emscripten/issues/14220

Differential Revision: https://reviews.llvm.org/D102806
The file was modifiedlld/wasm/OutputSections.cpp
The file was modifiedlld/test/wasm/merge-string-debug.s
Commit f2c97605a00d45a4bf54eb4bdaaca74ed7ab78df by llvmgnsyncbot
[gn build] Port 4bf69fb52b3c
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
Commit 2f8ac0758bbfad72e52ef8602fbbd796e1347784 by richard
PR50402: Use proper constant evaluation rules for checking constraint
satisfaction.

Previously we used the rules for constant folding in a non-constant
context, meaning that we'd incorrectly accept foldable non-constant
expressions and that std::is_constant_evaluated() would evaluate to
false.
The file was modifiedclang/lib/Sema/SemaConcept.cpp
The file was modifiedclang/test/SemaTemplate/cxx2a-constraint-caching.cpp
The file was modifiedclang/test/SemaTemplate/concepts.cpp
The file was modifiedclang/test/SemaTemplate/instantiate-requires-clause.cpp
Commit 37561ba89b7de57bd8ff5ae0691d02604885d4ee by i
-fno-semantic-interposition: Don't set dso_local on GlobalVariable

`clang -fpic -fno-semantic-interposition` may set dso_local on variables for -fpic.

GCC folks consider there are 'address interposition' and 'semantic interposition',
and 'disabling semantic interposition' can optimize function calls but
cannot change variable references to use local aliases
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100483).

This patch removes dso_local for variables in
`clang -fpic -fno-semantic-interposition` mode so that the built shared objects can
work with copy relocations. Building llvm-project tiself with
-fno-semantic-interposition (D102453) should now be safe with trunk Clang.

Example:
```
// a.c
int var;
int *addr() { return var; }

// old: cannot be interposed
movslq  .Lvar$local(%rip), %rax
// new: can be interposed
movq    var@GOTPCREL(%rip), %rax
movslq  (%rax), %rax
```

The local alias lowering for `GlobalVariable`s is kept in case there is a
future option allowing local aliases.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D102583
The file was modifiedclang/test/CodeGenCUDA/device-stub.cu
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/test/CodeGen/SystemZ/builtins-systemz-zvector-constrained.c
The file was modifiedclang/test/CodeGen/semantic-interposition.c
The file was modifiedclang/test/CodeGen/attr-weakref2.c
The file was modifiedclang/test/CodeGenCUDA/device-var-linkage.cu
The file was modifiedclang/test/CodeGenCUDA/managed-var.cu
The file was modifiedclang/test/CodeGenCUDA/static-device-var-rdc.cu
The file was modifiedclang/test/OpenMP/declare_target_only_one_side_compilation.cpp
Commit ac06f6d06de408c00923708dd8a795b6ba9d23d7 by i
[test] Fix test
The file was modifiedclang/test/CodeGenOpenCLCXX/addrspace-constructors.clcpp
Commit 64ce90e1af5c38822b7730bb6f21ed3d99f2f364 by riddleriver
[mlir] Add a new `print-ir-after-failure` IR pass printing flag

This flag will print the IR after a pass only in the case where the pass failed. This can be useful to more easily view the invalid IR, without needing to print after every pass in the pipeline.

Differential Revision: https://reviews.llvm.org/D101853
The file was modifiedmlir/test/lib/Pass/TestPassManager.cpp
The file was modifiedmlir/docs/PassManagement.md
The file was modifiedmlir/test/Pass/ir-printing.mlir
The file was modifiedmlir/lib/Pass/PassManagerOptions.cpp
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/lib/Pass/IRPrinting.cpp
Commit 92469ca027b2e794aa9162931665b379445ca711 by riddleriver
[mlir] Refactor the implementation of pass crash reproducers

The current implementation has several key limitations and weirdness, e.g local reproducers don't support dynamic pass pipelines, error messages don't include the passes that failed, etc. This revision refactors the implementation to support more use cases, and also be much cleaner.

The main change in this revision, aside from moving the implementation out of Pass.cpp and into its own file, is the addition of a crash recovery pass instrumentation. For local reproducers, this instrumentation handles setting up the recovery context before executing each pass. For global reproducers, the instrumentation is used to provide a more detailed error message, containing information about which passes are running and on which operations.

Example of new message:

```
error: Failures have been detected while processing an MLIR pass pipeline
note: Pipeline failed while executing [`TestCrashRecoveryPass` on 'module' operation: @foo]: reproducer generated at `crash-recovery.mlir.tmp`
```

Differential Revision: https://reviews.llvm.org/D101854
The file was modifiedmlir/lib/Pass/CMakeLists.txt
The file was modifiedmlir/docs/PassManagement.md
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was addedmlir/lib/Pass/PassCrashRecovery.cpp
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/lib/Pass/PassDetail.h
The file was modifiedmlir/test/Pass/crash-recovery.mlir