Changes

Summary

  1. [M68k] Add new worker suse-gary-m68k-cross for Linux 32-bit M68k (details)
Commit d1284d3eadb950504c0dc8269291a4a0bcbe7f63 by gkistanova
[M68k] Add new worker suse-gary-m68k-cross for Linux 32-bit M68k

This adds a new builder called clang-m68k-linux-cross which will
cross-build LLVM and Clang on openSUSE Leap.

Reviewed By: gkistanova

Differential Revision: https://reviews.llvm.org/D104467
The file was modifiedbuildbot/osuosl/master/config/builders.py (diff)
The file was modifiedbuildbot/osuosl/master/config/workers.py (diff)

Summary

  1. Revert D103717 "[InstrProfiling] Make __profd_ unconditionally private for ELF" (details)
  2. [polly][GPGPU] Fixup related to overloading exponent type in llvm.powi (details)
  3. [InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X) (details)
  4. [libc] Add few macro definitions to make it easy to accommodate Windows. (details)
  5. Revert "[InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X)" (details)
  6. [Demangle][Rust] Parse dot suffix (details)
  7. [libc][Obvious] Add the new header file PlatformDefs.h to the fputil  target. (details)
  8. [Attributor] Don't print the call-graph in a hard-coded file. (details)
  9. [Polly][Isl] Refactoring IslAstInfo::getBuild() and IslAstInfo::IslAstUserPayload::Build to use isl++. NFC (details)
  10. [mlir][linalg] Fix PadTensorOp constructor (details)
  11. [NFC] Assert non-zero factor before division (details)
  12. [llvm][Inliner] Add an optional PriorityInlineOrder (details)
  13. [flang] Rewrite test for CPU_TIME (details)
  14. [Test] Add XFAIL unit test for PR50765 (details)
  15. [InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X) (details)
  16. [AMDGPU] Update generated checks. NFC. (details)
  17. [Attributor] Fix UB behavior on uninitalized bool variables. (details)
  18. [MLIR] Introduce scf.execute_region op (details)
  19. [LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration (try 3) (details)
  20. Revert D104028 "[llvm][Inliner] Add an optional PriorityInlineOrder" (details)
  21. [ORC] Add support for dumping objects to the C API. (details)
  22. [clang] Exclude function pointers on DefaultedComparisonAnalyzer (details)
  23. [ORC] Use uint8_t rather than char for RPC wrapper-function calls. (details)
  24. [ORC][C-bindings] Re-order object transform function arguments. (details)
  25. [libclang] Fix error handler in translateSourceLocation. (details)
  26. [analyzer] Handle NTTP invocation in CallContext.getCalleeDecl() (details)
  27. [DAG] SelectionDAG::computeKnownBits - use APInt::insertBits to merge subvector knownbits. NFCI. (details)
  28. [mlir] Add notes about using external interface application. (details)
  29. [clang] Implement P2266 Simpler implicit move (details)
  30. [HWASan] Run LAM tests with -hwasan-generate-tags-with-calls. (details)
  31. RISCV: simplify a test case for RISCV (NFCI) (details)
  32. Fix build failure on 32 bit Arm (details)
  33. [NFC][libomptarget] Fixed -DLLVM_ENABLE_RUNTIMES="openmp" build. (details)
  34. [NFC][libomptarget] Build elf_common with PIC. (details)
  35. [AArch64] Add TableGen patterns to generate uaddlv (details)
  36. Rename option -icf MODE to --icf=MODE (details)
  37. [lld/mac] Support -data_in_code_info, -function_starts flags (details)
  38. [lldb-vscode] attempt to fix flakiness (details)
  39. [flang] Runtime implementation for default derived type formatted I/O (details)
  40. [compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp (details)
  41. [hwasan] Clarify report for allocation-tail-overwritten. (details)
  42. [OpenMP] Update FAQ for enabling cuda offloading (details)
  43. Delay initialization of OptBisect (details)
  44. XFAIL a testcase on Hexagon (missing-abstract-variable.ll) (details)
  45. Revert "Delay initialization of OptBisect" (details)
  46. [DFSan] Cleanup code for platforms other than Linux x86_64. (details)
  47. [CSSPGO] Fix an invalid hash table reference issue in the CS preinliner. (details)
  48. [AMDGPU] [CodeGen] Fold negate llvm.amdgcn.class into test mask (details)
  49. [CSSPGO][llvm-profgen] Ignore LBR records after interrupt transition (details)
  50. [RISCV] Teach vsetvli insertion to remember when predecessors have same AVL and SEW/LMUL ratio if their VTYPEs otherwise mismatch. (details)
  51. [clang-tidy] performance-unnecessary-copy-initialization: Directly examine the initializing var's initializer. (details)
  52. [libc++] [P1518R2] Better CTAD behavior for containers with allocators. (details)
  53. [flang][OpenMP] Add semantic checks for occurrence of nested Barrier regions (details)
  54. [lld-macho] Handle non-extern symbols marked as private extern (details)
  55. [lld-macho] Have path-related functions return std::string, not StringRef (details)
  56. [NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into InitThreads (details)
  57. [Clang][Codegen] Add GNU function attribute 'no_profile' and lower it to noprofile (details)
  58. [GCOVProfiling] don't profile Fn's w/ noprofile attribute (details)
  59. [mlir] Add support to SourceMgrDiagnosticHandler for filtering FileLineColLocs (details)
  60. [CSSPGO][llvm-profgen] Fix an issue in findDisjointRanges (details)
  61. [LoopUnroll] Simplify optimization remarks (details)
  62. Partial rollback: Disable MLIR verifier parallelism. (details)
  63. Whitespace fixes for (details)
  64. [flang] Fix clang build (struct/class mismatch warning) (details)
  65. [CSSPGO] Undoing the concept of dangling pseudo probe (details)
  66. [OpenMP] Make bug49334.cpp more reproducible (details)
  67. AMDGPU: Fix assert on m0_lo16/m0_hi16 (details)
  68. Re-Revert "DirectoryWatcher: add an implementation for Windows" (details)
  69. AMDGPU: Fix infinite loop in DAG combine with fneg + fma (details)
  70. [profile][test] Delete profraw directory so that tests are immune to format version upgrade (details)
  71. [flang] Recode a switch() to dodge a sketchy warning (details)
  72. [InstrProfiling][ELF] Make __profd_ private if the function does not use value profiling (details)
  73. Revert "[lld-macho] Avoid force-loading the same archive twice" (details)
  74. [InstCombine] Don't transform code if DoTransform is false (details)
  75. [libfuzzer] Disable failing DFSan-related tests (details)
  76. [ORC][examples] Fix file name in comment. (details)
  77. [ORC][C-bindings] Add access to LLJIT IRTransformLayer, ThreadSafeModule utils. (details)
  78. [llvm][Inliner] Add an optional PriorityInlineOrder (details)
  79. Revert "[lld-macho] Have path-related functions return std::string, not StringRef" (details)
  80. [re-land][lld-macho] Avoid force-loading the same archive twice (details)
  81. [mlir][linalg] Lower subtensor(pad_tensor) to pad_tensor(subtensor) (details)
  82. [ORC][examples] Add missing library dependence (details)
  83. [RISCV][test] Add new tests for add-mul optimization in the zba extension with SH*ADD (details)
  84. [RISCV] Optimize add-mul in the zba extension with SH*ADD (details)
Commit 5798be84580be233e4cf34c08ceec8f79e80502e by i
Revert D103717 "[InstrProfiling] Make __profd_ unconditionally private for ELF"

This reverts commit 76d0747e0807307780ba84cbd7e5c80b20c26bd7.

If a group has `__llvm_prf_vals` due to static value profiler counters
(`NS!=0`), we cannot make `__llvm_prf_data` private, because a prevailing text
section may reference `__llvm_prf_data` and will cause a `relocation refers to a
discarded section` linker error.

Note: while a `__profc_` group is non-prevailing, it may be referenced by a
prevailing text section due to inlining.

```
group section [   66] `.group' [__profc__ZN5clang20EmitClangDeclContextERN4llvm12RecordKeeperERNS0_11raw_ostreamE] contains 4 sections:
   [Index]    Name
   [   67]   __llvm_prf_cnts
   [   68]   __llvm_prf_vals
   [   69]   __llvm_prf_data
   [   70]   .rela__llvm_prf_data
```
The file was modifiedllvm/test/Transforms/PGOProfile/indirect_call_profile.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
Commit 6aac2773d80b42bcf9da2414bbd410aa9f10095e by bjorn.a.pettersson
[polly][GPGPU] Fixup related to overloading exponent type in llvm.powi

Commit 4c7f820b2b206bb changed the llvm.powi intrinsic to support
different 'int' sizes for the exponent. That happened to break
the IntrinsicToLibdeviceFunc mapping in PPCGCodeGeneration, which
obviously should have been updated as part of commit 4c7f820b2b
(https://reviews.llvm.org/D99439).

The shortcoming was found by buildbots that use
   -DPOLLY_ENABLE_GPGPU_CODEGEN=ON

This patch should fixup the problem.
The file was modifiedpolly/lib/CodeGen/PPCGCodeGeneration.cpp
The file was modifiedpolly/test/GPGPU/libdevice-functions-copied-into-kernel.ll
Commit 31053338c97b36ffb582f9c04a74cec69cce3e70 by vdsered
[InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X)

InstCombine didn't perform (sext bool X) * (sext bool X) --> zext (and X, X) which can result in just (zext X). The patch adds regression tests to check this transformation and adds a check for equality of mul's operands for that case.

Differential Revision: https://reviews.llvm.org/D104193
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
The file was modifiedllvm/test/Transforms/InstCombine/mul.ll
Commit 37afd67c38cf85f1308505892e7999457d8769cd by sivachandra
[libc] Add few macro definitions to make it easy to accommodate Windows.

The new macro definitions have been used to add Windows specific
specializations.
The file was modifiedlibc/utils/FPUtil/SqrtLongDoubleX86.h
The file was modifiedlibc/utils/FPUtil/Sqrt.h
The file was modifiedlibc/utils/FPUtil/FPBits.h
The file was modifiedlibc/utils/FPUtil/ManipulationFunctions.h
The file was modifiedlibc/utils/FPUtil/NormalFloat.h
The file was addedlibc/utils/FPUtil/PlatformDefs.h
Commit 6de741de08a11048027cb4d4e4d5d4bd067319fa by vdsered
Revert "[InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X)"

This reverts commit 31053338c97b36ffb582f9c04a74cec69cce3e70.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
The file was modifiedllvm/test/Transforms/InstCombine/mul.ll
Commit 2a5bb9c877f23224ee6b789054b4edfa17b4fd30 by tomasz.miasko
[Demangle][Rust] Parse dot suffix

Allow mangled names to include an arbitrary dot suffix, akin to vendor
specific suffix in Itanium mangling.

Primary motivation is a support for symbols renamed during ThinLTO
import / promotion (ThinLTO is the default configuration for optimized
builds in rustc).

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D104358
The file was modifiedllvm/test/Demangle/rust.test
The file was modifiedllvm/lib/Demangle/RustDemangle.cpp
Commit 7a1e4f18468d0f25407b6ea9f7986cf2a4620f54 by sivachandra
[libc][Obvious] Add the new header file PlatformDefs.h to the fputil  target.
The file was modifiedlibc/utils/FPUtil/CMakeLists.txt
Commit 7670938bbad8755a34a282febc852651255c69b3 by hokein.wu
[Attributor] Don't print the call-graph in a hard-coded file.

This looks like not a practical pattern in our codebase (it could fail
in some sandbox environement).

Instead we print it via standard output, and it is controled by the
-attributor-print-call-graph, this follows a similiar pattern of attributor-print-dep.
The file was modifiedllvm/test/Transforms/Attributor/callgraph.ll
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
Commit 2a629efc74e5ad414f05e293f296b392f724bc9f by patacca
[Polly][Isl] Refactoring IslAstInfo::getBuild() and IslAstInfo::IslAstUserPayload::Build to use isl++. NFC

Polly uses algorithms from the Integer Set Library (isl), which is a library written in C and which is incompatible with the rest of the LLVM as it is written in C++.

Changes made:
- Refactoring the method `IslAstInfo::getBuild()`
- `IslAstInfo::IslAstUserPayload.Build` now uses C++ types instead of C types
- Removing destructor of `IslAstInfo::IslAstUserPayload`

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D104370
The file was modifiedpolly/lib/CodeGen/IslAst.cpp
The file was modifiedpolly/include/polly/CodeGen/IslAst.h
The file was modifiedpolly/lib/CodeGen/IslNodeBuilder.cpp
Commit 6f665cd53dfdb3a23ed10950113fd73a0f53c9e7 by springerm
[mlir][linalg] Fix PadTensorOp constructor

Differential Revision: https://reviews.llvm.org/D104510
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit fa5eb22ad4e127b1fa960b33da890afb5bca3f92 by mkazantsev
[NFC] Assert non-zero factor before division

This is to ensure that zero denominator leads to controlled
assertion failure rather than UB.
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Commit a740b707d1937621dcf56579001bcad87b81724f by taolq
[llvm][Inliner] Add an optional PriorityInlineOrder

This patch adds an optional PriorityInlineOrder, which uses the heap to order inlining.
The callsite which size is smaller would have a higher priority.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D104028
The file was modifiedllvm/test/Transforms/Inline/inline_call.ll
The file was modifiedllvm/test/Transforms/Inline/last-callsite.ll
The file was modifiedllvm/test/Transforms/Inline/monster_scc.ll
The file was modifiedllvm/test/Transforms/Inline/inline_invoke.ll
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
Commit 4498137bd7857c07921b4cd6313baac62ead24e2 by diana.picus
[flang] Rewrite test for CPU_TIME

Don't rely on volatile writes to keep the CPU busy - it seems MSVC
optimizes them out, so we don't get different values for 'start' and
'end' on Windows. Rewrite the test to loop until we get a different
value for 'end'.

Fix suggested by Michael Kruse in
https://reviews.llvm.org/rG57e85622bbdb2eb18cc03df2ea457019c58f6912#inline-6002

Committing to fix the Windows buildbot, post-commit comments welcome!
The file was modifiedflang/unittests/RuntimeGTest/Time.cpp
Commit 07bbfd9c1368a165952e74902016739287ce2299 by mkazantsev
[Test] Add XFAIL unit test for PR50765
The file was addedllvm/test/Transforms/LoopStrengthReduce/pr50765.ll
Commit 6643e51d79d776efc3f4469b6f90b73c71a8fc41 by vdsered
[InstCombine] Fold (sext bool X) * (sext bool X) to zext (and X, X)

InstCombine didn't perform (sext bool X) * (sext bool X) --> zext (and X, X) which can result in just (zext X). The patch adds regression tests to check this transformation and adds a check for equality of mul's operands for that case.

Differential Revision: https://reviews.llvm.org/D104193
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
The file was modifiedllvm/test/Transforms/InstCombine/mul.ll
Commit 1f9dcd2b7384780cb3e4ae34e58799ef2816192b by jay.foad
[AMDGPU] Update generated checks. NFC.
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-i16-to-i32.ll
Commit 3f5d53a525c62c507a482fd5f4c08451835b342d by hokein.wu
[Attributor] Fix UB behavior on uninitalized bool variables.

Found by ASAN.
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 18c8c934d8584f706dfca9e633f0f89cefe3688e by uday
[MLIR] Introduce scf.execute_region op

Introduce the execute_region op that is able to hold a region which it
executes exactly once. The op encapsulates a CFG within itself while
isolating it from the surrounding control flow. Proposal discussed here:
https://llvm.discourse.group/t/introduce-std-inlined-call-op-proposal/282

execute_region enables one to inline a function without lowering out all
other higher level control flow constructs (affine.for/if, scf.for/if)
to the flat list of blocks / CFG form. It thus allows the benefit of
transforms on higher level control flow ops available in the presence of
the inlined calls. The inlined calls continue to benefit from
propagation of SSA values across their top boundary. Functions won’t
have to remain outlined until later than desired.  Abstractions like
affine execute_regions, lambdas with implicit captures could be lowered
to this without first lowering out structured loops/ifs or outlining.
But two potential early use cases are of: (1) an early inliner (which
can inline functions by introducing execute_region ops), (2) lowering of
an affine.execute_region, which cleanly maps to an scf.execute_region
when going from the affine dialect to the scf dialect.

Differential Revision: https://reviews.llvm.org/D75837
The file was modifiedmlir/include/mlir/Dialect/SCF/SCFOps.td
The file was modifiedmlir/test/Dialect/SCF/canonicalize.mlir
The file was modifiedmlir/test/Dialect/SCF/ops.mlir
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
The file was modifiedmlir/test/Dialect/SCF/invalid.mlir
The file was modifiedmlir/utils/vim/syntax/mlir.vim
Commit de92287cf8d1b07516b7e006a54529f174d4f5ef by mkazantsev
[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration (try 3)

This patch handles one particular case of one-iteration loops for which SCEV
cannot straightforwardly prove BECount = 1. The idea of the optimization is to
symbolically execute conditional branches on the 1st iteration, moving in topoligical
order, and only visiting blocks that may be reached on the first iteration. If we find out
that we never reach header via the latch, then the backedge can be broken.

This implementation uses InstSimplify. SCEV version was rejected due to high
compile time impact.

Differential Revision: https://reviews.llvm.org/D102615
Reviewed By: nikic
The file was modifiedllvm/lib/Transforms/Scalar/LoopDeletion.cpp
The file was modifiedllvm/test/Transforms/LoopDeletion/unreachable-loops.ll
The file was modifiedllvm/test/Transforms/LoopDeletion/eval_first_iteration.ll
The file was modifiedllvm/test/Transforms/LoopDeletion/zero-btc.ll
Commit 93183a41b962ce21ea168357172aaf00cdca5bd9 by taolq
Revert D104028 "[llvm][Inliner] Add an optional PriorityInlineOrder"
The file was modifiedllvm/test/Transforms/Inline/last-callsite.ll
The file was modifiedllvm/test/Transforms/Inline/inline_invoke.ll
The file was modifiedllvm/test/Transforms/Inline/monster_scc.ll
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
The file was modifiedllvm/test/Transforms/Inline/inline_call.ll
Commit cec8e69f01c3374cb38c6683058381b96fab8f89 by Lang Hames
[ORC] Add support for dumping objects to the C API.

Provides ObjectTransformLayer APIs, a getter to access the
ObjectTransformLayer member of LLJIT, and the DumpObjects utility
to make construction of a dump-to-disk transform easy.

An example showing how the new APIs can be used has been added in
llvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects.
The file was modifiedllvm/include/llvm-c/LLJIT.h
The file was modifiedllvm/examples/OrcV2Examples/CMakeLists.txt
The file was addedllvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/CMakeLists.txt
The file was addedllvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/OrcV2CBindingsDumpObjects.c
The file was modifiedllvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
The file was modifiedllvm/include/llvm-c/Orc.h
Commit 7ddd15cd5dea76a19a9c5315e2a9903d74a49be8 by mizvekov
[clang] Exclude function pointers on DefaultedComparisonAnalyzer

This implements a more comprehensive fix than was done at D95409.
Instead of excluding just function pointer subobjects, we also
exclude any user-defined function pointer conversion operators.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D103855
The file was modifiedclang/test/CXX/class/class.compare/class.spaceship/p2.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
Commit cbfb12469ba312c8ff513397b29bef470f151caa by Lang Hames
[ORC] Use uint8_t rather than char for RPC wrapper-function calls.

This partially reverts 838490de7ed, which broke some Solaris bots. Apparently
Solaris defines int8_t as char rather than signed char, which made the
SerializationTypeName<char> specialization a redefinition.

This partial revert isolates use of uint8_t buffers to ORC-RPC handling of
wrapper functions only. The TargetProcessControl::runWrapper method will
continue to use char buffers.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/TargetProcess/OrcRPCTPCServer.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/Serialization.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/OrcRPCTargetProcessControl.h
Commit 8962c68ad007a525f9daa987c99eda57e0d0069a by Lang Hames
[ORC][C-bindings] Re-order object transform function arguments.

ObjInOut is an in-out parameter not a return value argument, so by convention
it should come after the context value (Ctx).
The file was modifiedllvm/include/llvm-c/Orc.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
The file was modifiedllvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/OrcV2CBindingsDumpObjects.c
Commit fd569a11b585d13cdceac2d890c2beda0fa5f0eb by simon.tatham
[libclang] Fix error handler in translateSourceLocation.

Given an invalid SourceLocation, translateSourceLocation will call
clang_getNullLocation, and then do nothing with the result. But
clang_getNullLocation has no side effects: it just constructs and
returns a null CXSourceLocation value.

Surely the intention was to //return// that null CXSourceLocation to
the caller, instead of throwing it away and pressing on anyway.

Reviewed By: miyuki

Differential Revision: https://reviews.llvm.org/D104442
The file was modifiedclang/tools/libclang/CXSourceLocation.h
Commit cc2ef195560999d0690a8d8805ea811270e38f26 by vsavchenko
[analyzer] Handle NTTP invocation in CallContext.getCalleeDecl()

This fixes a crash in MallocChecker for the situation when operator new (delete) is invoked via NTTP  and makes the behavior of CallContext.getCalleeDecl(Expr) identical to CallEvent.getDecl().

Reviewed By: vsavchenko

Differential Revision: https://reviews.llvm.org/D103025
The file was modifiedclang/lib/StaticAnalyzer/Core/CheckerContext.cpp
The file was modifiedclang/test/Analysis/NewDelete-checker-test.cpp
Commit 7353beda4aa13187d1c9ba03015589272b157c61 by llvm-dev
[DAG] SelectionDAG::computeKnownBits - use APInt::insertBits to merge subvector knownbits. NFCI.

As noticed on D104472 we can use APInt::insertBits which will avoid a lot of temporary APInt creations
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit 7f7be19e6a5e0ebb3af04a624996fbc7cd06f209 by silvasean
[mlir] Add notes about using external interface application.

Differential Revision: https://reviews.llvm.org/D104489
The file was modifiedmlir/docs/Interfaces.md
Commit ced6b204d18e6eed611f8ebf27122ec19147ea7a by mizvekov
[clang] Implement P2266 Simpler implicit move

This Implements [[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html|P2266 Simpler implicit move]].

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: Quuxplusone

Differential Revision: https://reviews.llvm.org/D99005
The file was modifiedclang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx14.cpp
The file was modifiedclang/test/SemaCXX/coroutines.cpp
The file was modifiedclang/test/CXX/drs/dr3xx.cpp
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
The file was modifiedclang/test/SemaCXX/return-stack-addr.cpp
The file was modifiedclang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx11.cpp
The file was modifiedclang/test/SemaCXX/warn-return-std-move.cpp
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/test/SemaObjCXX/block-capture.mm
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp
The file was modifiedclang/test/CXX/class/class.init/class.copy.elision/p3.cpp
The file was modifiedclang/test/SemaCXX/coroutine-rvo.cpp
The file was modifiedclang/test/SemaCXX/deduced-return-type-cxx14.cpp
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/www/cxx_status.html
Commit 493565a4aa7cc3b48e2b5c51b541a438fc449217 by mascasa
[HWASan] Run LAM tests with -hwasan-generate-tags-with-calls.

The default callback instrumentation in x86 LAM mode uses ASLR bits
to randomly choose a tag, and thus has a 1/64 chance of choosing a
stack tag of 0, causing stack tests to fail intermittently.  By using
__hwasan_generate_tag to pick tags, we guarantee non-zero tags and
eliminate the test flakiness.

aarch64 doesn't seem to have this problem using thread-local addresses
to pick tags, so perhaps we can remove this workaround once we implement
a similar mechanism for LAM.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D104470
The file was modifiedcompiler-rt/test/hwasan/lit.cfg.py
The file was modifiedcompiler-rt/lib/hwasan/hwasan.cpp
Commit b30bc8cc5d51a0c61651bafd977eb6b1729ca471 by Saleem Abdulrasool
RISCV: simplify a test case for RISCV (NFCI)

The output of the object file is unimportant and entirely discarded.
Simply redirect the output to `/dev/null` or `NUL` as the case may be.
Additionally, the space between the labels is unimportant.  There is no
need to add space between the labels.  Two labels at the same address
are sufficient to generate the difference expression and should still
test the same behaviour.
The file was modifiedllvm/test/MC/RISCV/hilo-constaddr-expr.s
Commit 9777f3fd06e20237992883b2b4668582228a1f90 by omair.javaid
Fix build failure on 32 bit Arm

This patch fixes build failure caused by commit
f27e4548fc42876f66dac260ca3b6df0d5fd5fd6 on 32 bit arm.

Differential Revision: https://reviews.llvm.org/D103292
The file was modifiedlld/MachO/InputFiles.cpp
Commit c5b7c7c8f7fc645a3755c6e2f97f8e8710ee5ff9 by vyacheslav.p.zakharin
[NFC][libomptarget] Fixed -DLLVM_ENABLE_RUNTIMES="openmp" build.

Differential Revision: https://reviews.llvm.org/D104535
The file was modifiedopenmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
The file was modifiedopenmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
Commit 836992ab9a42b8b5f6cb0339b98d31f46794af7e by vyacheslav.p.zakharin
[NFC][libomptarget] Build elf_common with PIC.

Differential Revision: https://reviews.llvm.org/D104545
The file was modifiedopenmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
Commit 78b75b452b08e4ce3ad468e426e6e4fa1c92f7bd by jingu.kang
[AArch64] Add TableGen patterns to generate uaddlv

uaddv(uaddlp(x)) ==> uaddlv(x)
addp(uaddlp(x))  ==> uaddlv(x)

Differential Revision: https://reviews.llvm.org/D104236
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td
The file was modifiedllvm/test/CodeGen/AArch64/arm64-vabs.ll
The file was addedllvm/test/CodeGen/AArch64/neon-uaddlv.ll
The file was modifiedllvm/test/CodeGen/AArch64/neon-sad.ll
Commit 8120c9e379c7cc1c91a6cecdc42760b3aa562f78 by gkm
Rename option -icf MODE to --icf=MODE

The `icf` command-line option is not present in ld64, so it should use the LLD option syntax, which begins with double dashes and separates primary option from any suboption with the equal sign.

Differential Revision: https://reviews.llvm.org/D104548
The file was modifiedlld/test/MachO/icf-options.s
The file was modifiedlld/test/MachO/icf-scale.s
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/test/MachO/icf.s
Commit f7366890c23f5be142a434879a3d42f46c4e4d92 by thakis
[lld/mac] Support -data_in_code_info, -function_starts flags

These are on by default, but there's also an explicit flag for them.

Differential Revision: https://reviews.llvm.org/D104543
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/test/MachO/data-in-code.s
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/test/MachO/function-starts.s
Commit f2c009dbcfd11fd1e8941513dcf49fffe43565a1 by walter erquinigo
[lldb-vscode] attempt to fix flakiness

There are many tests failing intermittently for lldb-vscode after
https://reviews.llvm.org/rGaa4685c0fb3aab5acb90be5fd3eb5ba8bf1e3211. I'm
unsure if this actually the culprit, so I'm softly removing that feature
to see if that fixes the issue.
The file was modifiedlldb/tools/lldb-vscode/lldb-vscode.cpp
Commit 79caf69cc08a72022f968020eab486b698fd4178 by pklausler
[flang] Runtime implementation for default derived type formatted I/O

This is *not* user-defined derived type I/O, but rather Fortran's
built-in capabilities for using derived type data in I/O lists
and NAMELIST groups.

This feature depends on having the derived type description tables
that are created by Semantics available, passed through compilation
as initialized static objects to which pointers can be targeted
in the descriptors of I/O list items and NAMELIST groups.

NAMELIST processing now handles component references on input
(e.g., "&GROUP x%component = 123 /").

The C++ perspectives of the derived type information records
were transformed into proper classes when it was necessary to add
member functions to them.

The code in Semantics that generates derived type information
was changed to emit derived type components in component order,
not alphabetic order.

Differential Revision: https://reviews.llvm.org/D104485
The file was modifiedflang/runtime/derived.cpp
The file was modifiedflang/lib/Semantics/runtime-type-info.cpp
The file was modifiedflang/runtime/descriptor.h
The file was modifiedflang/runtime/type-info.h
The file was modifiedflang/runtime/descriptor-io.h
The file was modifiedflang/runtime/descriptor.cpp
The file was modifiedflang/test/Semantics/typeinfo01.f90
The file was modifiedflang/runtime/namelist.cpp
The file was modifiedflang/runtime/CMakeLists.txt
The file was addedflang/runtime/type-info.cpp
The file was modifiedflang/runtime/tools.h
The file was modifiedflang/include/flang/Semantics/runtime-type-info.h
The file was modifiedflang/runtime/copy.cpp
Commit 88d93923e6653f02f5ece1faf9f49a7e309989a0 by leonardchan
[compiler-rt][hwasan] Move Thread::Init into hwasan_linux.cpp

This allows for other implementations to define their own version of `Thread::Init`.
This will be the case for Fuchsia where much of the thread initialization can be
broken up between different thread hooks (`__sanitizer_before_thread_create_hook`,
`__sanitizer_thread_create_hook`, `__sanitizer_thread_start_hook`). Namely, setting
up the heap ring buffer and stack info and can be setup before thread creation.
The stack ring buffer can also be setup before thread creation, but storing it into
`__hwasan_tls` can only be done on the thread start hook since it's only then we
can access `__hwasan_tls` for that thread correctly.

Differential Revision: https://reviews.llvm.org/D104248
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread.h
The file was modifiedcompiler-rt/lib/hwasan/hwasan_thread.cpp
The file was modifiedcompiler-rt/lib/hwasan/hwasan_linux.cpp
Commit e0b68f7149f9c66ba9e81878729225421f99a030 by fmayer
[hwasan] Clarify report for allocation-tail-overwritten.

Explain what the given stack trace means before showing it, rather than
only in the paragraph at the end.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D104523
The file was modifiedcompiler-rt/test/hwasan/TestCases/tail-magic.c
The file was modifiedcompiler-rt/lib/hwasan/hwasan_report.cpp
Commit 5c189d30e60ac044b5bb473648c5505b4acdeb08 by ashermancinelli
[OpenMP] Update FAQ for enabling cuda offloading

Add an FAQ entry and add a few lines to an existing one. Document
the use of `GCC_INSTALL_PREFIX` for pointing clang to correct
GCC installation for two-stage build.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D104474
The file was modifiedopenmp/docs/SupportAndFAQ.rst
Commit ec91df8d8195b8b759a89734dba227da1eaa729f by kparzysz
Delay initialization of OptBisect

When LLVM is used in other projects, it may happen that global cons-
tructors will execute before the call to ParseCommandLineOptions.
Since OptBisect is initialized via a constructor, and has no ability
to be updated at a later time, passing "-opt-bisect-limit" to the
parse function may have no effect.

To avoid this problem use a cl::cb (callback) to set the bisection
limit when the option is actually processed.

Differential Revision: https://reviews.llvm.org/D104551
The file was modifiedllvm/include/llvm/IR/OptBisect.h
The file was modifiedllvm/lib/IR/OptBisect.cpp
Commit c1e6d25a0285b7825ef74690c622c47fb0123245 by kparzysz
XFAIL a testcase on Hexagon (missing-abstract-variable.ll)

This seems to be a common problem among several architectures.
The file was modifiedllvm/test/DebugInfo/Generic/missing-abstract-variable.ll
Commit 4688d151572693bd9383639164b8ab84e6f59cb8 by kparzysz
Revert "Delay initialization of OptBisect"

This reverts commit ec91df8d8195b8b759a89734dba227da1eaa729f.

It was committed by accident.
The file was modifiedllvm/include/llvm/IR/OptBisect.h
The file was modifiedllvm/lib/IR/OptBisect.cpp
Commit 14407332de6185462ceda785c620bb1206e7ca40 by browneee
[DFSan] Cleanup code for platforms other than Linux x86_64.

These other platforms are unsupported and untested.
They could be re-added later based on MSan code.

Reviewed By: gbalats, stephan.yichao.zhao

Differential Revision: https://reviews.llvm.org/D104481
The file was modifiedllvm/test/Instrumentation/DataFlowSanitizer/basic.ll
The file was modifiedcompiler-rt/lib/dfsan/dfsan.cpp
The file was removedllvm/test/Instrumentation/DataFlowSanitizer/external_mask.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
The file was modifiedcompiler-rt/lib/dfsan/dfsan_platform.h
Commit c60f1d5d98ebf1cec20b80f5a94d733290dd6556 by hoy
[CSSPGO] Fix an invalid hash table reference issue in the CS preinliner.

We were using a `StringMap` object to store all profiles to be emitted. The object is basically an unordered hash table, therefore updating it in the process of trasvering it may cause issue since the underlying bucket array could change.

I'm also moving the `csspgo-preinliner` switch around so that no context tri will be constructed (by the constructor of `CSPreInliner`) when the switch is off.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D104267
The file was modifiedllvm/lib/ProfileData/SampleProf.cpp
The file was modifiedllvm/tools/llvm-profgen/CSPreInliner.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
Commit 2e5dc4a1efe18a411734abb05b03431b120b1fea by angandhi
[AMDGPU] [CodeGen] Fold negate llvm.amdgcn.class into test mask

Implemented the transformation of xor (llvm.amdgcn.class x, mask), -1 into
llvm.amdgcn.class(x, ~mask). Added LIT tests as well.

Differential Revision: https://reviews.llvm.org/D104049
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
The file was addedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-foldnegate.ll
Commit 8c2c97287eacda1ed9cbee893054d868e3b990c5 by hoy
[CSSPGO][llvm-profgen] Ignore LBR records after interrupt transition

If we have seen an inwards transition from external code to internal code, but not a following outwards transition, the inwards transition is likely due to interrupt which is usually unpaired. Ignore current  and subsequent entries since they are likely from an unrelated pre-interrupt context.

LBR records from different interrupt context are unrelated and they should not be mixed together. Currenlty the OS does this for task-scheduling interrupt but not for all interrupts.

Reviewed By: wenlei, wlei

Differential Revision: https://reviews.llvm.org/D104276
The file was addedllvm/test/tools/llvm-profgen/Inputs/cs-interrupt.perfscript
The file was addedllvm/test/tools/llvm-profgen/cs-interrupt.test
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
Commit ac87133f1de902bcc7ab4330e7ac79b2ba376d34 by craig.topper
[RISCV] Teach vsetvli insertion to remember when predecessors have same AVL and SEW/LMUL ratio if their VTYPEs otherwise mismatch.

Previously we went directly to unknown state on VTYPE mismatch.
If we instead remember the partial match, we can use this to
still use X0, X0 vsetvli in successors if AVL and needed SEW/LMUL
ratio match.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D104069
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-unaligned.ll
Commit bdd5da9dec61072f693726d9ed2a94c78e431ba2 by flx
[clang-tidy] performance-unnecessary-copy-initialization: Directly examine the initializing var's initializer.

This fixes false positive cases where a reference is initialized outside of a
block statement and then its initializing variable is modified. Another case is
when the looped over container is modified.

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

Reviewed-by: ymandel
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
Commit dd15c2723cd29574c341ec189409a6c83fbefb04 by arthur.j.odwyer
[libc++] [P1518R2] Better CTAD behavior for containers with allocators.

P1518 does the following in C++23 but we'll just do it in C++17 as well:
- Stop requiring `Alloc` to be an allocator on some container-adaptor deduction guides
- Stop deducing from `Allocator` on some sequence container constructors
- Stop deducing from `Allocator` on some other container constructors (libc++ already did this)

The affected constructors are the "allocator-extended" versions of
constructors where the non-allocator arguments are already sufficient
to deduce the allocator type. For example,

    std::pmr::vector<int> v1;
    std::vector v2(v1, std::pmr::new_delete_resource());
    std::stack s2(v1, std::pmr::new_delete_resource());

Differential Revision: https://reviews.llvm.org/D97742
The file was modifiedlibcxx/include/vector
The file was modifiedlibcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/sequences/list/list.cons/deduct.pass.cpp
The file was modifiedlibcxx/include/list
The file was modifiedlibcxx/include/stack
The file was modifiedlibcxx/include/forward_list
The file was modifiedlibcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.pass.cpp
The file was modifiedlibcxx/docs/Cxx2bStatusPaperStatus.csv
The file was modifiedlibcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/associative/multimap/multimap.cons/deduct.pass.cpp
The file was modifiedlibcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp
The file was modifiedlibcxx/include/deque
The file was modifiedlibcxx/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp
The file was modifiedlibcxx/include/queue
The file was modifiedlibcxx/test/std/containers/associative/map/map.cons/deduct.pass.cpp
Commit 8fdd475c85634c4a5e5cd83d7dc15ff56c458813 by arnamoy.bhattacharyya
[flang][OpenMP] Add semantic checks for occurrence of nested Barrier regions

This patch adds the following nesting check for `barrier` constructs:

```
A barrier region may not be closely nested inside a worksharing, loop, task, taskloop, critical, ordered, atomic, or master region.
```

Also adds a test case for the check,

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D99888
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
The file was modifiedflang/lib/Semantics/check-omp-structure.h
The file was addedflang/test/Semantics/omp-nested-barrier.f90
Commit 4c49f9ceafd6bdc261e0ee157a2ea0fa943d6921 by jezng
[lld-macho] Handle non-extern symbols marked as private extern

Previously, we asserted that such a case was invalid, but in fact
`ld -r` can emit such symbols if the input contained a (true) private
extern, or if it contained a symbol started with "L".

Non-extern symbols marked as private extern are essentially equivalent
to regular TU-scoped symbols, so no new functionality is needed.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D104502
The file was addedlld/test/MachO/local-private-extern.yaml
The file was modifiedlld/MachO/InputFiles.cpp
Commit 1d31fb8d122b1117cf20a9edc09812db8472e930 by jezng
[lld-macho] Have path-related functions return std::string, not StringRef

findLibrary() returned a StringRef while findFramework & other helper
functions returned std::strings. Standardize on std::string.

(I initially tried making the helper functions all return StringRefs,
but I realized we shouldn't return input StringRefs since their
lifetimes would not be obvious from the calling code.)
The file was modifiedlld/MachO/Driver.h
The file was modifiedlld/MachO/DriverUtils.cpp
The file was modifiedlld/MachO/Driver.cpp
Commit f7999e73caeff482a324ab0f9ac2fbeb99f8e3ec by leonardchan
[NFC][compiler-rt][hwasan] Move hwasanThreadList().CreateCurrentThread() into InitThreads

Once D104553 lands, CreateCurrentThread will be able to accept optional
parameters for initializing the hwasan thread object. On fuchsia, we can get
stack info in the platform-specific InitThreads and pass it through
CreateCurrentThread. On linux, this is a no-op.

Differential Revision: https://reviews.llvm.org/D104561
The file was modifiedcompiler-rt/lib/hwasan/hwasan_linux.cpp
The file was modifiedcompiler-rt/lib/hwasan/hwasan.cpp
Commit 193e41c987127aad86d0380df83e67a85266f1f1 by ndesaulniers
[Clang][Codegen] Add GNU function attribute 'no_profile' and lower it to noprofile

noprofile IR attribute already exists to prevent profiling with PGO;
emit that when a function uses the newly added no_profile function
attribute.

The Linux kernel would like to avoid compiler generated code in
functions annotated with such attribute. We already respect this for
libcalls to fentry() and mcount().

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Link: https://lore.kernel.org/lkml/CAKwvOdmPTi93n2L0_yQkrzLdmpxzrOR7zggSzonyaw2PGshApw@mail.gmail.com/

Reviewed By: MaskRay, void, phosek, aaron.ballman

Differential Revision: https://reviews.llvm.org/D104475
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was modifiedclang/test/Misc/pragma-attribute-supported-attributes-list.test
The file was modifiedclang/include/clang/Basic/Attr.td
The file was addedclang/test/CodeGen/no_profile.c
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was addedclang/test/Sema/no_profile-attribute.c
Commit bef299286104c2b6383a43b9d1eb0e47838cb5b6 by ndesaulniers
[GCOVProfiling] don't profile Fn's w/ noprofile attribute

Similar to D104475, the Linux kernel would like to avoid compiler
generated code in certain functions. The no_profile function
attribute can be used in C to generate the the noprofile fn attr in IR.
Respect that from GCOVProfiling.

Link: https://lore.kernel.org/lkml/CAKwvOdmPTi93n2L0_yQkrzLdmpxzrOR7zggSzonyaw2PGshApw@mail.gmail.com/

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D104257
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
The file was addedllvm/test/Transforms/GCOVProfiling/noprofile.ll
Commit d1baf2895467735ab14f4b3415fce204c0cc8e7f by riddleriver
[mlir] Add support to SourceMgrDiagnosticHandler for filtering FileLineColLocs

This revision adds support for passing a functor to SourceMgrDiagnosticHandler for filtering out FileLineColLocs when emitting a diagnostic. More specifically, this can be useful in situations where there may be large CallSiteLocs with locations that aren't necessarily important/useful for users.

For now the filtering support is limited to FileLineColLocs, but conceptually we could allow filtering for all locations types if a need arises in the future.

Differential Revision: https://reviews.llvm.org/D103649
The file was addedmlir/test/lib/IR/TestDiagnostics.cpp
The file was modifiedmlir/lib/IR/Diagnostics.cpp
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/include/mlir/IR/Diagnostics.h
The file was addedmlir/test/IR/diagnostic-handler-filter.mlir
The file was modifiedmlir/test/lib/IR/CMakeLists.txt
The file was modifiedmlir/docs/Diagnostics.md
Commit fb19aa0c74fdb864ddbd677a7b3585661966a098 by hoy
[CSSPGO][llvm-profgen] Fix an issue in findDisjointRanges

We were using 0 as an indicator of invalid offset when computing disjoint ranges. In reality, 0 can be an valid code offset which stands for the first function in .text section. I'm using UINT64_MAX as an invalid code offset instead.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D104497
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
Commit 3308205ae9dd3b42e19b377157c642a04312f7fd by nikita.ppv
[LoopUnroll] Simplify optimization remarks

Remove dependence on ULO.TripCount/ULO.TripMultiple from ORE and
debug code. For debug code, print information about all exits.
For optimization remarks, only include the unroll count and the
type of unroll (complete, partial or runtime), but omit detailed
information about exit folding, now that more than one exit may
be folded.

Differential Revision: https://reviews.llvm.org/D104482
The file was modifiedllvm/test/Transforms/LoopUnroll/loop-remarks-with-hotness.ll
The file was modifiedllvm/test/CodeGen/AArch64/loop-micro-op-buffer-size-t99.ll
The file was modifiedllvm/lib/Transforms/Utils/LoopUnroll.cpp
Commit 4b9d28bd530fd227a5db4da094d5a60577e1d1ac by stellaraccident
Partial rollback: Disable MLIR verifier parallelism.

Deadlocks have been found in several downstream projects as noted on the original patch: https://reviews.llvm.org/D104207

Disabling pending full root cause analysis.

Differential Revision: https://reviews.llvm.org/D104570
The file was modifiedmlir/lib/IR/Verifier.cpp
Commit 817218336aa3e3c0ca422ae00f8d8ca41b8fbd6d by ndesaulniers
Whitespace fixes for
193e41c987127aad86d0380df83e67a85266f1f1
which reportedly fails on the mac builds.
The file was modifiedclang/test/CodeGen/no_profile.c
Commit 36f93fc594ea168d541bb2fde95014a5502bef88 by pklausler
[flang] Fix clang build (struct/class mismatch warning)

A recent patch changed a struct into a class, but missed a
forward definition.  GCC didn't warn, but clang does.  Fix.
The file was modifiedflang/runtime/type-info.h
Commit bd52495518808bdbf24f4d8e9e20774d6d2e3333 by hoy
[CSSPGO] Undoing the concept of dangling pseudo probe

As a follow-up to https://reviews.llvm.org/D104129, I'm cleaning up the danling probe related code in both the compiler and llvm-profgen.

I'm seeing a 5% size win for the pseudo_probe section for SPEC2017 and 10% for Ciner. Certain benchmark such as 602.gcc has a 20% size win. No obvious difference seen on build time for SPEC2017 and Cinder.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D104477
The file was removedllvm/test/tools/llvm-profgen/Inputs/inline-cs-dangling-pseudoprobe.perfscript
The file was modifiedllvm/lib/CodeGen/BranchFolding.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/lib/CodeGen/MachineBasicBlock.cpp
The file was modifiedllvm/lib/CodeGen/PseudoProbeInserter.cpp
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/recursion-compression-pseudoprobe.perfbin
The file was modifiedllvm/test/tools/llvm-profgen/noinline-cs-pseudoprobe.test
The file was modifiedllvm/tools/llvm-profgen/PseudoProbe.h
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
The file was removedllvm/test/Transforms/SampleProfile/pseudo-probe-dangling.mir
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/test/Transforms/SampleProfile/pseudo-probe-dangle.ll
The file was modifiedllvm/test/tools/llvm-profgen/recursion-compression-pseudoprobe.test
The file was modifiedllvm/include/llvm/IR/PseudoProbe.h
The file was removedllvm/test/tools/llvm-profgen/inline-cs-dangling-pseudoprobe.test
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/noinline-cs-pseudoprobe.perfbin
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/truncated-pseudoprobe.perfscript
The file was modifiedllvm/test/tools/llvm-profgen/pseudoprobe-decoding.test
The file was modifiedllvm/test/Transforms/SampleProfile/pseudo-probe-dangle2.ll
The file was modifiedllvm/lib/Transforms/IPO/SampleProfileProbe.cpp
The file was modifiedllvm/lib/CodeGen/TailDuplicator.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineBasicBlock.h
The file was modifiedllvm/tools/llvm-profgen/PseudoProbe.cpp
The file was modifiedllvm/lib/IR/PseudoProbe.cpp
The file was removedllvm/test/Transforms/SampleProfile/pseudo-probe-dedup.ll
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was modifiedllvm/test/tools/llvm-profgen/fname-canonicalization.test
The file was modifiedllvm/include/llvm/MC/MCPseudoProbe.h
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/truncated-pseudoprobe.ll
The file was modifiedllvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test
The file was modifiedllvm/test/Transforms/SampleProfile/pseudo-probe-dangle3.ll
The file was modifiedllvm/test/tools/llvm-profgen/merge-cold-profile.test
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/unique-linkage-name-probe.perfbin
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/truncated-pseudoprobe.perfbin
Commit ec978664542d6202c05e809fcfd6ead62a43d41b by tianshilei1992
[OpenMP] Make bug49334.cpp more reproducible

`bug49334.cpp` cannot detect data race in `libomptarget` efficiently. It
is reported that with `N = 256` and `BS = 16`, the data race can be reproduced
more steadily. The next coming pathces will fix it so this patch is expected to
fail now.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D104552
The file was modifiedopenmp/libomptarget/test/offloading/bug49334.cpp
Commit ad4a18251a37a244e3d4375538abfc0894a1e6ac by Matthew.Arsenault
AMDGPU: Fix assert on m0_lo16/m0_hi16

These get added (redundantly) to the bundle expanded for indirect
register accesses. We hit this path only when there is a call in the
function.
The file was modifiedllvm/test/CodeGen/AMDGPU/indirect-addressing-si-gfx9.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
Commit fb32de9e97af0921242a021e30020ffacf7aa6e2 by thakis
Re-Revert "DirectoryWatcher: add an implementation for Windows"

This reverts commit 76f1baa7875acd88bdd4b431eed6e2d2decfc0fe.

Also reverts 2 follow-ups:

1. Revert "DirectoryWatcher: also wait for the notifier thread"
   This reverts commit 527a1821e6f8e115db3335a3341c7ac491725a0d.

2. Revert "DirectoryWatcher: close a possible window of race on Windows"
   This reverts commit a6948da86ad7e78d66b26263c2681ef6385cc234.

Makes tests hang, see comments on https://reviews.llvm.org/D88666
The file was modifiedclang/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp
The file was modifiedclang/unittests/DirectoryWatcher/CMakeLists.txt
Commit d6467e00dfccf10aa91e5a1d55d981a9b13642a3 by Matthew.Arsenault
AMDGPU: Fix infinite loop in DAG combine with fneg + fma

We were not reporting isFNegFree for v2f32, although it is effectively
free after legalization. The generic combine was pulling fneg out of
the fma source operands, and the AMDGPU combine was doing the
opposite.
The file was modifiedllvm/test/CodeGen/AMDGPU/fneg-combines.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Commit 5540470f642a3118439996cbcde7d90530588eb5 by i
[profile][test] Delete profraw directory so that tests are immune to format version upgrade
The file was modifiedcompiler-rt/test/profile/instrprof-gc-sections.c
The file was modifiedcompiler-rt/test/profile/instrprof-lto-pgogen.c
Commit b3c1f53c989f6aefad581955e3add222cfb5d890 by pklausler
[flang] Recode a switch() to dodge a sketchy warning

One of the buildbots uses a compiler (can't tell which) that
doesn't approve of a "default:" in a switch statement whose
cases appear to completely cover all possible values of an
enum class.  But this switch is in raw data dumping code that
needs to allow for incorrect values in memory.  So rewrite it
as a cascade of if statements; performance doesn't matter here.
The file was modifiedflang/runtime/type-info.cpp
Commit 3307240f057b856bfb01c1e42e260aa3f896c592 by i
[InstrProfiling][ELF] Make __profd_ private if the function does not use value profiling

On ELF, the D1003372 optimization can apply to more cases. There are two
prerequisites for making `__profd_` private:

* `__profc_` keeps `__profd_` live under compiler/linker GC
* `__profd_` is not referenced by code

The first is satisfied because all counters/data are in a section group (either
`comdat any` or `comdat noduplicates`). The second requires that the function
does not use value profiling.

Regarding the second point: `__profd_` may be referenced by other text sections
due to inlining. There will be a linker error if a prevailing text section
references the non-prevailing local symbol.

With this change, a stage 2 (`-DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_INSTRUMENTED=IR`)
clang is 4.2% smaller (1-169620032/177066968).
`stat -c %s **/*.o | awk '{s+=$1}END{print s}' is 2.5% smaller.

Reviewed By: davidxl, rnk

Differential Revision: https://reviews.llvm.org/D103717
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
The file was modifiedllvm/test/Transforms/PGOProfile/indirect_call_profile.ll
Commit c9b241efd68c5a0f1f67e9250960ade454f3bc11 by thakis
Revert "[lld-macho] Avoid force-loading the same archive twice"

This reverts commit 24706cd73cd150543753a2e169c68a2c68da46a1.
Test seems to fail flakily. See comments on https://reviews.llvm.org/D104353
for a hypothesis for why.
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/test/MachO/force-load.s
The file was modifiedlld/test/MachO/archive.s
Commit 575ba6f42560002807dd6382ffc83abc1b6b9b50 by carrot
[InstCombine] Don't transform code if DoTransform is false

In patch https://reviews.llvm.org/D72396, it doesn't check DoTransform before transforming the code, and generates wrong result for the attached test case.

Differential Revision: https://reviews.llvm.org/D104567
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/test/Transforms/InstCombine/zext.ll
Commit 070556237e29e8a804fbec1d416d431239384ab0 by gbalats
[libfuzzer] Disable failing DFSan-related tests

These have been broken by https://reviews.llvm.org/D104494.
However, `lib/fuzzer/dataflow/` is unused (?) so addressing this is not a priority.

Added TODOs to re-enable them in the future.

Reviewed By: stephan.yichao.zhao

Differential Revision: https://reviews.llvm.org/D104568
The file was modifiedcompiler-rt/lib/fuzzer/dataflow/DataFlow.cpp
The file was modifiedcompiler-rt/test/fuzzer/only-some-bytes.test
The file was modifiedcompiler-rt/test/fuzzer/only-some-bytes-fork.test
Commit 9b699450dd66df258cb424470fcb1ea737a99341 by Lang Hames
[ORC][examples] Fix file name in comment.
The file was modifiedllvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/OrcV2CBindingsBasicUsage.c
Commit 80f30a6b855b7aa96b99205c986972483d75822e by Lang Hames
[ORC][C-bindings] Add access to LLJIT IRTransformLayer, ThreadSafeModule utils.

This patch was derived from Valentin Churavy's work in
https://reviews.llvm.org/D104480. It adds support for setting the transform on
an IRTransformLayer, and for accessing the IRTransformLayer in LLJIT. It also
adds access to the ThreadSafeModule::withModuleDo method for thread-safe
access to modules.

A new example has been added to show how to use these APIs to optimize a module
during materialization.

Thanks Valentin!

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D103855
The file was addedllvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c
The file was addedllvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/CMakeLists.txt
The file was modifiedllvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
The file was modifiedllvm/include/llvm-c/LLJIT.h
The file was modifiedllvm/include/llvm-c/Orc.h
The file was modifiedllvm/examples/OrcV2Examples/CMakeLists.txt
Commit 671a87104b8132e45718a9584cbb7ed97916683f by taolq
[llvm][Inliner] Add an optional PriorityInlineOrder

This patch adds an optional PriorityInlineOrder, which uses the heap to order inlining.
The callsite which size is smaller would have a higher priority.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D104028
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
The file was modifiedllvm/test/Transforms/Inline/inline_call.ll
The file was modifiedllvm/test/Transforms/Inline/last-callsite.ll
The file was modifiedllvm/test/Transforms/Inline/inline_invoke.ll
Commit a79c01832553a8a192ab157098662a9e8f2c16af by jezng
Revert "[lld-macho] Have path-related functions return std::string, not StringRef"

This reverts commit 1d31fb8d122b1117cf20a9edc09812db8472e930.

Making `rerootPath` return a temporary std::string caused a
use-after-free:

https://ci.chromium.org/ui/p/chromium/builders/try/win_upload_clang/1608/overview
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/DriverUtils.cpp
The file was modifiedlld/MachO/Driver.h
Commit 4507f64165fd0c95f08b66d61db39549b22c50d3 by jezng
[re-land][lld-macho] Avoid force-loading the same archive twice

This reverts commit c9b241efd68c5a0f1f67e9250960ade454f3bc11, which was
a backout diff to fix the buildbots.

The real culprit of the crash is
https://github.com/llvm/llvm-project/commit/1d31fb8d122b1117cf20a9edc09812db8472e930,
which is being reverted.

Differential Revision: https://reviews.llvm.org/D104353
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/test/MachO/force-load.s
The file was modifiedlld/test/MachO/archive.s
Commit 24199f534f61d9ac7d2d9dcde7b9cac93c84d4f0 by springerm
[mlir][linalg] Lower subtensor(pad_tensor) to pad_tensor(subtensor)

Only high padding is supported at the moment. Low padding will be added in a separate commit.

Differential Revision: https://reviews.llvm.org/D104357
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
The file was addedmlir/test/Dialect/Linalg/subtensor-of-padtensor.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
Commit 382b3fe043380c02bcffc8e3fba928bea12c0f5a by Lang Hames
[ORC][examples] Add missing library dependence
The file was modifiedllvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/CMakeLists.txt
Commit 31190738c024298745d877a47ef95a5263ea5c9e by powerman1st
[RISCV][test] Add new tests for add-mul optimization in the zba extension with SH*ADD

These tests will show the following optimization by future patches.

Rx + Ry * 18  => (SH1ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 20  => (SH2ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 24  => (SH3ADD (SH1ADD Rx, Rx), Ry)
Rx + Ry * 36  => (SH2ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 40  => (SH3ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 72  => (SH3ADD (SH3ADD Rx, Rx), Ry)
Rx * (3 << C) => (SLLI (SH1ADD Rx, Rx), C)
Rx * (5 << C) => (SLLI (SH2ADD Rx, Rx), C)
Rx * (9 << C) => (SLLI (SH3ADD Rx, Rx), C)

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D104507
The file was modifiedllvm/test/CodeGen/RISCV/rv64zba.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv32zba.ll
Commit d934b72809cb3cbc9f646a2b505e781e0b8b3d7b by powerman1st
[RISCV] Optimize add-mul in the zba extension with SH*ADD

This patch does the following optimization.

Rx + Ry * 18 => (SH1ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 20 => (SH2ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 24 => (SH3ADD (SH1ADD Rx, Rx), Ry)
Rx + Ry * 36 => (SH2ADD (SH3ADD Rx, Rx), Ry)
Rx + Ry * 40 => (SH3ADD (SH2ADD Rx, Rx), Ry)
Rx + Ry * 72 => (SH3ADD (SH3ADD Rx, Rx), Ry)

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D104588
The file was modifiedllvm/test/CodeGen/RISCV/rv32zba.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoB.td
The file was modifiedllvm/test/CodeGen/RISCV/rv64zba.ll

Summary

  1. [M68k] Add new worker suse-gary-m68k-cross for Linux 32-bit M68k (details)
Commit d1284d3eadb950504c0dc8269291a4a0bcbe7f63 by gkistanova
[M68k] Add new worker suse-gary-m68k-cross for Linux 32-bit M68k

This adds a new builder called clang-m68k-linux-cross which will
cross-build LLVM and Clang on openSUSE Leap.

Reviewed By: gkistanova

Differential Revision: https://reviews.llvm.org/D104467
The file was modifiedbuildbot/osuosl/master/config/workers.py
The file was modifiedbuildbot/osuosl/master/config/builders.py