SuccessChanges

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

Summary

  1. [PhaseOrdering] move an 'opt' test from x86 codegen; NFC (details)
  2. [PhaseOrdering] move test with target requirement to x86 dir (details)
  3. [MLIR][SPIRV] Fixed dialect loading in deserialization (details)
  4. OpaquePtr: Add helpers for sret to mirror byval (details)
  5. IR: Have byref imply dereferenceable (details)
  6. [AMDGPU] Fix v3f16 handling for getresinfo (details)
  7. [AMDGPU] Use cast instead of dyn_cast (details)
  8. [RegisterCoalescer] Fix IMPLICIT_DEF init removal for a register on joining (details)
  9. [NFC][ARM] Remove dead loop. (details)
  10. [OpenMP] Introduce GOMP teams support in runtime (details)
  11. [OpenMP] Introduce GOMP mutexinoutset in the runtime (details)
  12. [OpenMP] Introduce GOMP taskwait depend in the runtime (details)
  13. [OpenMP] Fix if0 task with dependencies in the runtime (details)
  14. [X86][SSE] combineVectorTruncation - enable (pre-SSSE3) vXi16->vXi8 truncation. (details)
  15. [clang] use string tables for static diagnostic descriptions (details)
  16. Sema: add support for `__attribute__((__swift_newtype__))` (details)
  17. [lldb/examples] Add missing declaration in heap.py (details)
  18. [OpenMP] cmake option LIBOMPTARGET_NVPTX_MAX_SM for nvptx device RTL (details)
  19. [IRSim][NFC] Removing dead variables from IRSimilarityIdentifier.cpp (details)
  20. [AArch64][GlobalISel] Implement __builtin_return_address for PAC-RET (details)
  21. [OPENMP]PR47606: Do not update the lastprivate item if it was captured by reference as firstprivate data member. (details)
  22. [AMDGPU] global-isel support for RT (details)
  23. [AArch64] Regenerate dag-numsignbits.ll checks (details)
  24. [Scalar] ConstantHoistingPass - iterate with const references. NFCI. (details)
  25. [OPENMP]Fix PR47621: Variable used by task inside a template function is not made firstprivate by default (details)
  26. [SLP] Remove LHS and RHS from OperationData. (details)
  27. [APFloat] prevent NaN morphing into Inf on conversion (PR43907) (details)
  28. Revert "Recommit "[CUDA][HIP] Defer overloading resolution diagnostics for host device functions"" (details)
  29. Revert "Recommit [NFC] Refactor DiagnosticBuilder and PartialDiagnostic" (details)
  30. [llvm-exegesis] Add whitespace between words in error message (details)
  31. Revert "[OPENMP]Fix PR47621: Variable used by task inside a template function is not made firstprivate by default" (details)
  32. Basic: add an extra newline for sphinx (NFC) (details)
  33. [LLD][COFF] Avoid overwriting inputs in tests (details)
  34. [LLD][COFF] Cover usage of LLD-as-a-library in tests (details)
  35. [PR47636] Fix tryEmitPrivate to handle non-constantarraytypes (details)
  36. Add support for setting the path to llvm-symbolizer through an environment variable (details)
  37. GlobalISel: Use unmerge when copying wide vectors to result registers (details)
  38. [Modules] Add stats to measure performance of building and loading modules. (details)
  39. [mlir][shape] Start a pass that lowers shape constraints. (details)
  40. [NFC][regalloc] Remove unused API in AllocationOrder (details)
  41. [SLP] clean up - use 'const' and ArrayRef constructor; NFC (details)
  42. Revert "[Modules] Add stats to measure performance of building and loading modules." (details)
  43. AArch64/GlobalISel: Add testcase for bug 47619 (details)
  44. [IRSim] Adding wrapper pass for IRSimilarityIdentfier (details)
  45. Remove dead branch identified by @rsmith on post-commit for D88236 (details)
  46. [flang][driver] Add missing dependency (shared library builds, NFC) (details)
  47. [OPENMP]Fix PR47621: Variable used by task inside a template function is not made firstprivate by default (details)
  48. [CMake][AIX] Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR appropriately for AIX (details)
  49. [AST] Use data-recursion when building ParentMap, avoid stack overflow. (details)
  50. Remove stale assert. (details)
  51. [mlir][NFC] Promote memory space to BaseMemRefType (details)
  52. [AArch64] __builtin_return_address for PAuth. (details)
  53. [CUDA] Added conversion functions to builtin vars. (details)
  54. [CodeGen] Postprocess PHI nodes for callbr (details)
  55. Fix testcase. (details)
  56. Revert "[CodeGen] Postprocess PHI nodes for callbr" (details)
  57. [NFCI][IR] ConstantRangeTest: refactor operation range gatherers (details)
  58. [NFCI][IR] ConstantRangeTest: add basic scaffolding for next-gen precision/correctness testing (details)
  59. Reland [CodeGen] emit CG profile for COFF object file (details)
  60. Temporary fix for D85085 debug_loc bug with basic block sections. (details)
  61. [DebugInfo] Fix bug in constructor homing with classes with trivial (details)
  62. [LLDB] Add a defensive check for member__f_ (details)
  63. [WebAssembly] Make SjLj lowering globals thread-local (details)
  64. [Instruction] Add dropLocation and updateLocationAfterHoist helpers (details)
  65. [lld-macho][re-land] Initial support for common symbols (details)
  66. [lld-macho][re-land] Implement and test resolution of common symbols (details)
  67. [lld] Make -z keep-text-section-prefix recognize .text.split. as a prefix. (details)
  68. Fix regex in test. (details)
  69. [OpenMP] OpenMPOpt Support for Globalization Remarks (details)
  70. [llvm] Add -bbsections-cold-text-prefix to emit cold clusters to a different section. (details)
  71. [RISCV] Merge the pipeline models for Rocket (details)
  72. [AMDGPU] Fixes typo in the test. NFC. (details)
  73. [MS] Simplify rules for passing C++ records (details)
  74. [MS] For unknown ISAs, pass non-trivially copyable arguments indirectly (details)
  75. [intel-pt] Refactor the JSON parsing (details)
  76. Add a static_assert confirming that DiagnosticBuilder is small (details)
  77. Revert "Add a static_assert confirming that DiagnosticBuilder is small" (details)
  78. Revert "[NFCI][IR] ConstantRangeTest: add basic scaffolding for next-gen precision/correctness testing" (details)
  79. [ValueTracking] Check uses of Argument if it is given to isGuaranteedNotToBeUndefOrPoison (details)
  80. [ValueTracking] Make isGuaranteedNotToBeUndefOrPoison exit early when MetadataAsValue is given (details)
  81. [lld] Clean up in lld::{coff,elf}::link after D70378 (details)
  82. [Hexagon] Avoid crash on CONCAT_VECTORS with illegal element types (details)
Commit 9cf647bb3f88434e3ecba8e108d56fa4e3ed56f9 by spatel
[PhaseOrdering] move an 'opt' test from x86 codegen; NFC

This file comes from 2007, and I'm not entirely sure of the
motivation, but it was going through all of opt and llc.
The llc part is almost certainly unnecessary as shown in
the now auto-generated FileCheck lines.

This test may be affected by a logic change suggested in:
D87835
The file was addedllvm/test/Transforms/PhaseOrdering/nancvt.ll
The file was removedllvm/test/CodeGen/X86/nancvt.ll
Commit 2625433e77ef5e161536f6fd01ea68840cfcb0dc by spatel
[PhaseOrdering] move test with target requirement to x86 dir

I'm not sure if the target is actually necessary,
but since it was specified, I'm moving to the
appropriate dir to avoid bot fallout.
The file was removedllvm/test/Transforms/PhaseOrdering/nancvt.ll
The file was addedllvm/test/Transforms/PhaseOrdering/X86/nancvt.ll
Commit 8f72717ebe27209a11be80629c667332cd5e4e60 by georgemitenk0v
[MLIR][SPIRV] Fixed dialect loading in deserialization

Fixed an error when deserializing the SPIR-V binary
to MLIR SPIR-V. Before, the SPIR-V dialect was not loaded
explicitly into the context, which resulted in unregistered
operation error.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D88223
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
Commit d65a7003c435de22b8e30dca292160fea822d887 by Matthew.Arsenault
OpaquePtr: Add helpers for sret to mirror byval

Sret should really have a type parameter like byval does.
The file was modifiedllvm/include/llvm/IR/Argument.h
The file was modifiedllvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
The file was modifiedllvm/include/llvm/IR/Function.h
The file was modifiedllvm/lib/IR/Value.cpp
The file was modifiedllvm/lib/IR/Function.cpp
The file was modifiedllvm/test/CodeGen/X86/vectorcall.ll
The file was modifiedllvm/lib/Analysis/Lint.cpp
Commit dc08185ca797a3bcd7721a0d55db876a6cc4de10 by Matthew.Arsenault
IR: Have byref imply dereferenceable

The langref already states it does, but this wasn't implemented. Also
covers inalloca and preallocated. Also helps fix a dependence on
pointer element types.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-amdgpu_kernel.ll
The file was modifiedllvm/test/Transforms/InstCombine/AMDGPU/memcpy-from-constant.ll
The file was modifiedllvm/test/Transforms/Attributor/readattrs.ll
The file was modifiedllvm/test/Transforms/Attributor/value-simplify.ll
The file was modifiedllvm/lib/IR/Value.cpp
Commit 6f7cd16d297155332ff2b4c7efb01ca592eb7753 by sebastian.neubauer
[AMDGPU] Fix v3f16 handling for getresinfo

v3f32 should not be expanded to v4f32. getresinfo with a dmask of 7
created an image sample with a v3f32 return value, which was bitcasted
to a v4f32 in constructRetValue.

Differential Revision: https://reviews.llvm.org/D88206
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.getresinfo.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.dim.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit c05cf1ca3c55362c5a8ef8a148c3b763cc8784e9 by jay.foad
[AMDGPU] Use cast instead of dyn_cast
The file was modifiedllvm/lib/Target/AMDGPU/R600ISelLowering.cpp
Commit d9beff04a30877c117e15c7fbc4d4e5c87e413ab by vpykhtin
[RegisterCoalescer] Fix IMPLICIT_DEF init removal for a register on joining

This patch removes redundant IMPLICIT_DEF for subregs which was leading to
incorrect register initialization on joining in some cases.

Reviewed by: qcolombet

Differential revision: https://reviews.llvm.org/D82258
The file was addedllvm/test/CodeGen/AMDGPU/coalescing_makes_lanes_undef.mir
The file was modifiedllvm/lib/CodeGen/RegisterCoalescer.cpp
Commit 00ee52ae0467f0bfa588d9797053a42c615d2332 by sam.parker
[NFC][ARM] Remove dead loop.

Remove a loop that just calculated a couple of values that were now
longer needed.
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
Commit ea34d95e0ad664fa879bb1d8b71f32928b1d6c0f by jonathan.l.peyton
[OpenMP] Introduce GOMP teams support in runtime

Implement GOMP_teams_reg() function which enables GOMP support of the
standalone teams construct. The GOMP_parallel* functions were modified
to call __kmp_fork_call() unconditionally so that the teams-specific
code could be reused within __kmp_fork_call() instead of reproduced
inside the GOMP_* functions.

Differential Revision: https://reviews.llvm.org/D87167
The file was modifiedopenmp/runtime/src/kmp_runtime.cpp
The file was modifiedopenmp/runtime/src/kmp_gsupport.cpp
The file was modifiedopenmp/runtime/src/kmp_ftn_os.h
The file was addedopenmp/runtime/test/teams/teams.c
Commit 72ada5ae6c5bcc53045eba559666a65a68149e4c by jonathan.l.peyton
[OpenMP] Introduce GOMP mutexinoutset in the runtime

Encapsulate GOMP task dependencies in separate class and introduce the
new mutexinoutset dependency type. This separate class allows
future GOMP task APIs easier access to the task dependency functionality
and better ability to propagate new dependency types to all existing GOMP
task APIs which use task dependencies.

Differential Revision: https://reviews.llvm.org/D87267
The file was addedopenmp/runtime/test/tasking/omp50_task_depend_mtx3.c
The file was modifiedopenmp/runtime/src/i18n/en_US.txt
The file was modifiedopenmp/runtime/src/kmp_gsupport.cpp
Commit 9089b4a5c5b4271e6b8300cf5d7471d4ddd93bec by jonathan.l.peyton
[OpenMP] Introduce GOMP taskwait depend in the runtime

This change introduces the GOMP_taskwait_depend() function. It implements
the OpenMP 5.0 feature of #pragma omp taskwait with depend() clause by
wrapping around __kmpc_omp_wait_deps().

Differential Revision: https://reviews.llvm.org/D87269
The file was modifiedopenmp/runtime/src/kmp_gsupport.cpp
The file was modifiedopenmp/runtime/src/kmp_ftn_os.h
The file was addedopenmp/runtime/test/tasking/omp50_taskwait_depend.c
Commit ee1c04a926904b34525e4577742d8c10a23db814 by jonathan.l.peyton
[OpenMP] Fix if0 task with dependencies in the runtime

The current GOMP interface for serialized tasks does not take into
account task dependencies. Add the check and wait for dependencies.

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

Differential Revision: https://reviews.llvm.org/D87271
The file was addedopenmp/runtime/test/tasking/taskdep_if0_2.c
The file was addedopenmp/runtime/test/tasking/taskdep_if0.c
The file was modifiedopenmp/runtime/src/kmp_gsupport.cpp
Commit 283036394ee606401ebb6601bb97b500e11a2830 by llvm-dev
[X86][SSE] combineVectorTruncation - enable (pre-SSSE3) vXi16->vXi8 truncation.

Shuffle combining can now handle this output, and by performing this early in combineVectorTruncation we avoid a scalarization that caused a regression on D87502.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/vector-trunc-math.ll
The file was modifiedllvm/test/CodeGen/X86/vector-trunc.ll
The file was modifiedllvm/test/CodeGen/X86/masked_store_trunc.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-and-bool.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-or-bool.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-xor-bool.ll
Commit 31a3c5fb45b78bdaa78d94ffcc9258e839002016 by froydnj
[clang] use string tables for static diagnostic descriptions

Using a pointer for the description string in StaticDiagInfoRec causes
several problems:

1. We don't need to use a whole pointer to represent the string;
2. The use of pointers incurs runtime relocations for those pointers;
   the relocations take up space on disk and represent runtime overhead;
3. The need to relocate data implies that, on some platforms, the entire
   array containing StaticDiagInfoRecs cannot be shared between processes.

This patch changes the storage scheme for the diagnostic descriptions to
avoid these problems.  We instead generate (effectively) one large
string and then StaticDiagInfoRec conceptually holds offsets into the
string.  We elected to also move the storage of those offsets into a
separate array to further reduce the space required.

On x86-64 Linux, this change removes about 120KB of relocations and
moves about 60KB from the non-shareable .data.rel.ro section to
shareable .rodata.  (The array is about 80KB before this, but we
eliminated 4 bytes/entry by using offsets rather than pointers.)  We
actually reap this benefit twice, because these tables show up in both
libclang.so and libclang-cpp.so and we get the reduction in both places.

Differential Revision: https://reviews.llvm.org/D81865
The file was modifiedclang/lib/Basic/DiagnosticIDs.cpp
Commit 296d8832a3b5fe97725be62c5bbc721cc0e2cd20 by Saleem Abdulrasool
Sema: add support for `__attribute__((__swift_newtype__))`

Add the `swift_newtype` attribute which allows a type definition to be
imported into Swift as a new type.  The imported type must be either an
enumerated type (enum) or an object type (struct).

This is based on the work of the original changes in
https://github.com/llvm/llvm-project-staging/commit/8afaf3aad2af43cfedca7a24cd817848c4e95c0c

Differential Revision: https://reviews.llvm.org/D87652
Reviewed By: Aaron Ballman
The file was modifiedclang/include/clang/Basic/Attr.td
The file was addedclang/test/SemaObjC/attr-swift_newtype.m
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was addedclang/test/AST/attr-swift_newtype.m
The file was modifiedclang/include/clang/Parse/Parser.h
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was modifiedclang/lib/Parse/ParseDecl.cpp
The file was modifiedclang/test/Misc/pragma-attribute-supported-attributes-list.test
Commit ada1e2ffa1172ede1790b4b42ef8ab01508d3a47 by davelee.com
[lldb/examples] Add missing declaration in heap.py

Add missing declaration for `malloc_get_all_zones` in heap.py.

Differential Revision: https://reviews.llvm.org/D88158
The file was modifiedlldb/examples/darwin/heap_find/heap.py
Commit ffd159d8e919435561a8c9eac0dcdd83aacdcf6a by tianshilei1992
[OpenMP] cmake option LIBOMPTARGET_NVPTX_MAX_SM for nvptx device RTL

It allows customizing MAX_SM for non-flagship GPU and reduces graphic memory usage.

In addition, so far the size is hard-coded up to __CUDA_ARCH__ 700 and is already a hassle for 800.
Introduce MAX_SM for 800 and protect future arch

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D88185
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
Commit 08d145e6d7a9b3085d433d05abac5c8a4392e09a by andrew.litteken
[IRSim][NFC] Removing dead variables from IRSimilarityIdentifier.cpp

As informed by danielkiss.

Follow up to Differential Revision: https://reviews.llvm.org/D86972
The file was modifiedllvm/lib/Analysis/IRSimilarityIdentifier.cpp
Commit bd44558001e978d93fbff5a4537f38b46b0e355a by momchil.velikov
[AArch64][GlobalISel] Implement __builtin_return_address for PAC-RET

This patch implements stripping of the PAC in the return address for GlobalISel.

Implementation for when not using GLobalISel is in
https://reviews.llvm.org/D75044 The analogous GCC patch is
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=a70d5d81c41048556fd86eaa1036018a6bfba115

Differential Revision: https://reviews.llvm.org/D84502
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/builtin-return-address-pacret.ll
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-returnaddress-liveins.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-returnaddr.ll
Commit a9fca98ee4f653278d84713caecd152fef8494f5 by a.bataev
[OPENMP]PR47606: Do not update the lastprivate item if it was captured by reference as firstprivate data member.

No need to make final copy from the firsptrivate/lastprivate copy to the original item if the item is a data memeber.
Firstprivate copy creates a copy by reference and the original item gets
updated correctly when updating the lastprivate shared variable.

Differential Revision: https://reviews.llvm.org/D88179
The file was modifiedclang/test/OpenMP/for_lastprivate_codegen.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
Commit 27a62f6317f3faa845d1cb67ec3f0ed357ee07e8 by Stanislav.Mekhanoshin
[AMDGPU] global-isel support for RT

Differential Revision: https://reviews.llvm.org/D87847
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was addedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.intersect_ray.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
Commit bdd6af3a58d55ba4518ecd3a13769f8c111a65e7 by llvm-dev
[AArch64] Regenerate dag-numsignbits.ll checks

To improve the codegen diff in D87502
The file was modifiedllvm/test/CodeGen/AArch64/dag-numsignbits.ll
Commit 81a408808f668c74ada3a1ed3d55f1feef334872 by llvm-dev
[Scalar] ConstantHoistingPass - iterate with const references. NFCI.

Fix some clang-tidy warnings.
The file was modifiedllvm/lib/Transforms/Scalar/ConstantHoisting.cpp
Commit d1419c9fdab141617b6aa9f028191b9bfc8be260 by a.bataev
[OPENMP]Fix PR47621: Variable used by task inside a template function is not made firstprivate by default

Need to fix a check for the variable if it is declared in the inner
OpenMP region to be able to firstprivatize it.

Differential Revision: https://reviews.llvm.org/D88240
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/OpenMP/task_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp
Commit 03f22b08e2a387a415dcbb3cf021e41e629c3d34 by craig.topper
[SLP] Remove LHS and RHS from OperationData.

These were only really used for 2 things. One was to check if the operand matches the phi if it exists. The other was for the createOp method to build the reduction.

For the first case we still have the operation we just need to know how to index its operands. So I've modified getLHS/getRHS to just use the opcode/kind to know how to find the right operands on an instruction that is now passed in.

For the other case we had to create an OperationData object to set the LHS/RHS values and copy the opcode/kind from another object. We would then just call createOp on that temporary object. Instead I've made LHS/RHS arguments to createOp and removed all these temporary objects.

Differential Revision: https://reviews.llvm.org/D88193
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit e34bd1e0b03d20a506ada156d87e1b3a96d82fa2 by spatel
[APFloat] prevent NaN morphing into Inf on conversion (PR43907)

We shift the significand right on a truncation, but that needs to be made NaN-safe:
always set at least 1 bit in the significand.
https://llvm.org/PR43907

See D88238 for the likely follow-up (but needs some plumbing fixes before it can proceed).

Differential Revision: https://reviews.llvm.org/D87835
The file was modifiedllvm/unittests/ADT/APFloatTest.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/cast.ll
The file was modifiedllvm/lib/Support/APFloat.cpp
Commit 3453b6928da332bb67f902add71f5cd80f61c136 by rnk
Revert "Recommit "[CUDA][HIP] Defer overloading resolution diagnostics for host device functions""

This reverts commit e39da8ab6a286ac777d5fe7799f1eb782cf99938.

This depends on a change that needs additional design review and needs
to be reverted.
The file was modifiedclang/tools/diagtool/DiagnosticNames.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSerialization.h
The file was modifiedclang/include/clang/Basic/DiagnosticRefactoring.h
The file was modifiedclang/include/clang/Basic/DiagnosticFrontend.h
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/lib/Driver/ToolChains/Cuda.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/TableGen/DiagnosticBase.inc
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticIDs.h
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticCrossTU.h
The file was modifiedclang/lib/Basic/DiagnosticIDs.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticComment.h
The file was modifiedclang/include/clang/Basic/DiagnosticParse.h
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/lib/Sema/SemaExprObjC.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaTemplateInstantiate.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSema.h
The file was modifiedclang/include/clang/Basic/Diagnostic.td
The file was modifiedclang/lib/Sema/SemaCUDA.cpp
The file was modifiedclang/lib/Sema/SemaStmtAsm.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/include/clang/Basic/DiagnosticDriver.h
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/include/clang/Basic/DiagnosticAST.h
The file was modifiedclang/lib/Sema/SemaTemplateVariadic.cpp
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticLex.h
The file was modifiedclang/lib/Sema/SemaAttr.cpp
The file was modifiedclang/lib/Sema/SemaSYCL.cpp
The file was modifiedclang/utils/TableGen/ClangDiagnosticsEmitter.cpp
The file was removedclang/test/TableGen/deferred-diag.td
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang-tools-extra/clangd/Diagnostics.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticAnalysis.h
The file was modifiedclang/lib/Sema/AnalysisBasedWarnings.cpp
The file was removedclang/test/SemaCUDA/deferred-oeverload.cu
Commit b62fd436a3e613cbfe0654305cbc0e4f142bfcf9 by rnk
Revert "Recommit [NFC] Refactor DiagnosticBuilder and PartialDiagnostic"

This reverts commit 8e780a1653e6f87755a447e921b8f929d8b70996.

DiagnosticBuilder is a value type, created on the stack everywhere. IMO
we should not be adding a vtable to it, and making very operator<< use a
virtual interface. There are other feasible designs for implementing
this. The original review, D84362, was approved by @tra, who is
responsible for Clang's CUDA support, but it wasn't reviewed by @rsmith
or anyone responsible for clang's diagnostic library.
The file was modifiedclang/lib/AST/TemplateName.cpp
The file was modifiedclang/include/clang/AST/Decl.h
The file was modifiedclang/include/clang/AST/DeclarationName.h
The file was modifiedclang/include/clang/AST/TemplateBase.h
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/include/clang/Basic/Diagnostic.h
The file was modifiedclang/include/clang/AST/CanonicalType.h
The file was modifiedclang/include/clang/Sema/ParsedAttr.h
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Basic/Diagnostic.cpp
The file was modifiedclang/include/clang/Basic/PartialDiagnostic.h
The file was modifiedclang/lib/AST/DeclCXX.cpp
The file was modifiedclang/include/clang/AST/DeclCXX.h
The file was modifiedclang/include/clang/AST/TemplateName.h
The file was modifiedclang/include/clang/Sema/Ownership.h
The file was modifiedclang/include/clang/AST/Attr.h
The file was modifiedclang/include/clang/AST/Type.h
The file was modifiedclang/include/clang/AST/NestedNameSpecifier.h
The file was modifiedclang/lib/AST/TemplateBase.cpp
The file was modifiedclang/include/clang/AST/ASTContext.h
Commit 29ec5901c9c515e34ed4299ac500f268dca1f62e by Jinsong Ji
[llvm-exegesis] Add whitespace between words in error message
The file was modifiedllvm/tools/llvm-exegesis/llvm-exegesis.cpp
Commit cde7d90cc7c20d73d14225517cf11ffc6073018a by a.bataev
Revert "[OPENMP]Fix PR47621: Variable used by task inside a template function is not made firstprivate by default"

This reverts commit d1419c9fdab141617b6aa9f028191b9bfc8be260 to fix the
buffer overflow detected by address sanitiizer.
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/OpenMP/task_codegen.cpp
Commit d34c8c70aae2a5421337c2ccac91130c70511f94 by Saleem Abdulrasool
Basic: add an extra newline for sphinx (NFC)

This should resolve the "Bullet list ends without a blank line" warning.
The file was modifiedclang/include/clang/Basic/AttrDocs.td
Commit 55624237be725a6feef84db7f46147335e68ebab by alexandre.ganea
[LLD][COFF] Avoid overwriting inputs in tests

Before this patch, these two tests were emitting both a .DLL and .LIB. The output .LIB file name also happens to be an input .LIB file name. This prevented the test from executing a second time when LLD is re-entrant (LLD_IN_TEST=2).

This is a support patch for https://reviews.llvm.org/D70378.
The file was modifiedlld/test/COFF/dll.test
The file was modifiedlld/test/COFF/guardcf-lto.ll
Commit f2efb5742cc9f74ad73987760651e3d23894a416 by alexandre.ganea
[LLD][COFF] Cover usage of LLD-as-a-library in tests

In lit tests, we run each LLD invocation twice (LLD_IN_TEST=2), without shutting down the process in-between. This ensures a full cleanup is properly done between runs.
Only active for the COFF driver for now. Other drivers still use LLD_IN_TEST=1 which executes just one iteration with full cleanup, like before.
When the environment variable LLD_IN_TEST is unset, a shortcut is taken, only one iteration is executed, no cleanup for faster exit, like before.
A public API, lld::safeLldMain(), is also available when using LLD as a library.

Differential Revision: https://reviews.llvm.org/D70378
The file was modifiedlld/lib/Driver/DarwinLdDriver.cpp
The file was addedlld/test/COFF/lit.local.cfg
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/COFF/Writer.cpp
The file was modifiedlld/include/lld/Common/Driver.h
The file was modifiedlld/tools/lld/lld.cpp
The file was modifiedlld/include/lld/Common/ErrorHandler.h
The file was modifiedlld/COFF/Writer.h
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/COFF/Driver.cpp
The file was modifiedlld/Common/ErrorHandler.cpp
The file was modifiedlld/wasm/Driver.cpp
Commit 606a734755d1fb6c35a17680d0c251f834b79334 by erich.keane
[PR47636] Fix tryEmitPrivate to handle non-constantarraytypes

As mentioned in the bug report, tryEmitPrivate chokes on the
MaterializeTemporaryExpr in the reproducers, since it assumes that if
there are elements, than it must be a ConstantArrayType. However, the
MaterializeTemporaryExpr (which matches exactly the AST when it is NOT a
global/static) has an incomplete array type.

This changes the section where the number-of-elements is non-zero to
properly handle non-CAT types by just extracting it as an array type
(since all we needed was the element type out of it).
The file was addedclang/test/CodeGenCXX/pr47636.cpp
The file was modifiedclang/lib/CodeGen/CGExprConstant.cpp
Commit 55bb1ba0fdd3c97d163f8115f818eafe11814623 by joker.eph
Add support for setting the path to llvm-symbolizer through an environment variable

This allows to point to an executable that isn't named exactly
"llvm-symbolizer" and not necessarily in the current PATH.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D88192
The file was modifiedllvm/lib/Support/Signals.cpp
Commit e75afc9acf9b6de511c0c90b8e8a06364de46e3e by Matthew.Arsenault
GlobalISel: Use unmerge when copying wide vectors to result registers

Avoid using G_EXTRACT and move towards a more consistent vector
legalization strategy.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.store.2d.d16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ssubo.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-xor.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-lshr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fma.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umin.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sshlsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fsin.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-implicit-def.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fcos.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-or.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umax.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fneg.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-llvm.amdgcn.image.load.2d.d16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ssubsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ffloor.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-phi.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fsub.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-and.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-mul.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-bswap.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmaxnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-usubsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-saddo.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sub.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fsqrt.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fadd.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fcanonicalize.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-smin.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmul.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umulh.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-smax.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fdiv.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sext-inreg.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-usubo.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-zext.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ashr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-build-vector.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ushlsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-uaddo.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-intrinsic-round.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-uaddsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fabs.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-bitcast.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fminnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-saddsat.mir
The file was modifiedllvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-shl.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-add.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-freeze.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Commit c4bacc3c9b333bb7032fb96f41d6f5b851623132 by vsapsai
[Modules] Add stats to measure performance of building and loading modules.

Measure amount of high-level or fixed-cost operations performed during
building/loading modules and during header search. High-level operations
like building a module or processing a .pcm file are motivated by
previous issues where clang was re-building modules or re-reading .pcm
files unnecessarily. Fixed-cost operations like `stat` calls are tracked
because clang cannot change how long each operation takes but it can
perform fewer of such operations to improve the compile time.

Also tracking such stats over time can help us detect compile-time
regressions. Added stats are more stable than the actual measured
compilation time, so expect the detected regressions to be less noisy.

rdar://problem/55715134

Reviewed By: aprantl, bruno

Differential Revision: https://reviews.llvm.org/D86895
The file was modifiedllvm/lib/Support/Windows/Path.inc
The file was modifiedllvm/lib/Support/Path.cpp
The file was modifiedllvm/lib/Support/Unix/Path.inc
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
The file was modifiedclang/lib/Serialization/ASTReader.cpp
The file was modifiedllvm/lib/Support/MemoryBuffer.cpp
Commit 9ed1e5873c19eb817fb9e36d0262c7effee5d35e by silvasean
[mlir][shape] Start a pass that lowers shape constraints.

This pass converts shape.cstr_* ops to eager (side-effecting)
error-handling code. After that conversion is done, the witnesses are
trivially satisfied and are replaced with `shape.const_witness true`.

Differential Revision: https://reviews.llvm.org/D87941
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/lib/Conversion/ShapeToStandard/CMakeLists.txt
The file was addedmlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp
The file was addedmlir/test/Conversion/ShapeToStandard/convert-shape-constraints.mlir
The file was modifiedmlir/include/mlir/Conversion/ShapeToStandard/ShapeToStandard.h
Commit 89aad892a596a0b54d1fcdb0b68cc5fa4d3e2932 by mtrofin
[NFC][regalloc] Remove unused API in AllocationOrder

Differential Revision: https://reviews.llvm.org/D88197
The file was modifiedllvm/lib/CodeGen/AllocationOrder.h
Commit 0a349d5827f6864ee89a5d0867d609339c07115d by spatel
[SLP] clean up - use 'const' and ArrayRef constructor; NFC

Follow-on tidying suggested in the post-commit review of 6a23668.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 9eba6b20a0579d3441e1b0f3cb3942f86d32679f by vsapsai
Revert "[Modules] Add stats to measure performance of building and loading modules."

This reverts commit c4bacc3c9b333bb7032fb96f41d6f5b851623132.

Test "LLVM :: ThinLTO/X86/funcimport-stats.ll" is failing. Reverting now
and will recommit after making the test not fail with the added stats.
The file was modifiedllvm/lib/Support/Path.cpp
The file was modifiedllvm/lib/Support/MemoryBuffer.cpp
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
The file was modifiedclang/lib/Serialization/ASTReader.cpp
The file was modifiedllvm/lib/Support/Unix/Path.inc
The file was modifiedllvm/lib/Support/Windows/Path.inc
Commit e55410f8b260a2868d600ca99fe5ee80f9cd4fc5 by Matthew.Arsenault
AArch64/GlobalISel: Add testcase for bug 47619

This is asserting on the 11 release branch, and wasn't covered by
exisiting tests at the time. This was fixed by
b98f902f1877c3d679f77645a267edc89ffcd5d6.
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/irtranslator-stack-evt-bug47619.ll
Commit f02c4c87b46c8203d7368cadc62607707d6f66b8 by andrew.litteken
[IRSim] Adding wrapper pass for IRSimilarityIdentfier

This introduces an analysis pass that wraps IRSimilarityIdentifier,
and adds a printer pass to examine in what function similarities are
being found.

Test for what the printer pass can find are in
test/Analysis/IRSimilarityIdentifier.

Reviewed by: paquette, jroelofs

Differential Revision: https://reviews.llvm.org/D86973
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was addedllvm/test/Analysis/IRSimilarityIdentifier/different.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/include/llvm/Analysis/IRSimilarityIdentifier.h
The file was addedllvm/test/Analysis/IRSimilarityIdentifier/nothing.ll
The file was addedllvm/test/Analysis/IRSimilarityIdentifier/basic.ll
The file was modifiedllvm/lib/Analysis/Analysis.cpp
The file was modifiedllvm/lib/Analysis/IRSimilarityIdentifier.cpp
Commit f8a92adfa242a94052f583ef7b483ae1b493ebdc by erich.keane
Remove dead branch identified by @rsmith on post-commit for D88236
The file was modifiedclang/lib/CodeGen/CGExprConstant.cpp
Commit b9a2837f1617ea94ae4b4be66d984ea9c7e7252c by andrzej.warzynski
[flang][driver] Add missing dependency (shared library builds, NFC)

`flang-new` depends on libclangFrontend (it uses DiagnosticConsumer
classes from there). This patch adds the missing dependency in CMake.

clang::TextDiagnosticBuffer is only reported as missing when compiling
`flang-new` with BUILD_SHARED_LIBS=ON. This symbol is linked in
statically with libflangFrontend when BUILD_SHARED_LIBS=OFF.
The file was modifiedflang/tools/flang-driver/CMakeLists.txt
Commit 579c42225ac373688dbdbe3a1ce62986a6bf638a by a.bataev
[OPENMP]Fix PR47621: Variable used by task inside a template function is not made firstprivate by default

Need to fix a check for the variable if it is declared in the inner
OpenMP region to be able to firstprivatize it.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D88240
The file was modifiedclang/test/OpenMP/task_codegen.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp
Commit 4b8cb665a13b1eef4df3e09080098b5f8f520016 by daltenty
[CMake][AIX] Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR appropriately for AIX

AIX by default usually folds 32-bit & 64-bit arch libraries into a single
archive, a behaviour we may want for the runtime libraries in the future,
so we don't necessarily want to opt into the multlib layout introduce in
D45604, which is currently the default for runtime builds.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D88169
The file was modifiedllvm/runtimes/CMakeLists.txt
Commit 1ad94624f8a092fbfcb74685e11243c186b04c8f by sam.mccall
[AST] Use data-recursion when building ParentMap, avoid stack overflow.

The following crashes on my system before this patch, but not after:

  void foo(int i) {
    switch (i) {
      case 1:
      case 2:
      ... 100000 cases ...
        ;
    }
  }

  clang-query -c="match stmt(hasAncestor(stmt()))" deep.c

I'm not sure it's actually a sane testcase to run though, it's pretty slow :-)

Differential Revision: https://reviews.llvm.org/D88222
The file was modifiedclang/lib/AST/ParentMapContext.cpp
Commit 34ca5b3392ced08e2320fb4236cca5c7df4ec6e9 by isanbard
Remove stale assert.

This is triggered during serialization. The test is for modules, but
will occur for any serialization effort using asm goto.

Reviewed By: nickdesaulniers, jyknight

Differential Revision: https://reviews.llvm.org/D88195
The file was addedclang/test/Modules/Inputs/asm-goto/module.modulemap
The file was addedclang/test/Modules/asm-goto.c
The file was modifiedclang/lib/AST/Stmt.cpp
The file was addedclang/test/Modules/Inputs/asm-goto/a.h
Commit 0a925a813a5003049bf12330111d61cb823b8814 by diego.caballero
[mlir][NFC] Promote memory space to BaseMemRefType

This patch moves the memory space field from MemRefType and UnrankedMemRefType
to their base class BaseMemRefType so that it can be retrieved from it without
downcasting it to the specific memref.

Reviewed By: silvas

Differential Revision: https://reviews.llvm.org/D87649
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/lib/IR/TypeDetail.h
Commit 2a96f47c5ffca84cd774ad402cacd137f4bf45e2 by daniel.kiss
[AArch64] __builtin_return_address for PAuth.

This change adds the support for __builtin_return_address
for ARMv8.3A Pointer Authentication.
Location of the authentication code in the pointer depends on
the system configuration, therefore a dedicated instruction is used for
effectively removing the authentication code without
authenticating the pointer.

Reviewed By: chill

Differential Revision: https://reviews.llvm.org/D75044
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
The file was modifiedllvm/test/CodeGen/AArch64/arm64_32.ll
The file was addedllvm/test/CodeGen/AArch64/aarch64-signedreturnaddress.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/arm64-returnaddr.ll
The file was modifiedllvm/test/CodeGen/AArch64/returnaddr.ll
Commit 30514f0afa3ee1e6da6bf9c41e83c28e884f0740 by tra
[CUDA] Added conversion functions to builtin vars.

This is needed to compile some headers in CUDA-11 that assume that threadIdx is
implicitly convertible to dim3. With NVCC, threadIdx is uint3 and there's
dim3(uint3) constructor. Clang uses a special type for the builtin variables, so
that path does not work. Instead, this patch adds conversion function to the
builtin variable classes. that will allow them to be converted to dim3 and uint3.

Differential Revision: https://reviews.llvm.org/D88250
The file was modifiedclang/lib/Headers/__clang_cuda_runtime_wrapper.h
The file was modifiedclang/lib/Headers/__clang_cuda_builtin_vars.h
Commit 7f4c940bd0b526f25e11c51bb4d58a85024330ae by isanbard
[CodeGen] Postprocess PHI nodes for callbr

When processing PHI nodes after a callbr, we need to make sure that the
PHI nodes on the default branch are resolved after the callbr
(inserted after INLINEASM_BR). The PHI node values on the indirect
branches are processed before the INLINEASM_BR.

Differential Revision: https://reviews.llvm.org/D86260
The file was addedllvm/test/CodeGen/X86/callbr-asm-phi-nodes.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit f97b68ef4ddd28a685e502653768c2a34c314cba by isanbard
Fix testcase.
The file was modifiedclang/test/Modules/asm-goto.c
Commit 0c0c57f7b21bee1cda0fce83d9919a57764bd74e by isanbard
Revert "[CodeGen] Postprocess PHI nodes for callbr"

Accidental commit.

This reverts commit 7f4c940bd0b526f25e11c51bb4d58a85024330ae.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was removedllvm/test/CodeGen/X86/callbr-asm-phi-nodes.ll
Commit 31177949cb1d88d7dd32078d09a265b828d40826 by lebedev.ri
[NFCI][IR] ConstantRangeTest: refactor operation range gatherers

We do the same dance to acquire the "exact" range of an op via
an exhaustive approach in many places.
Let's not invent the wheel each time.
The file was modifiedllvm/unittests/IR/ConstantRangeTest.cpp
Commit 9bcf7b1c7a139a455400df109d81c638b9e75150 by lebedev.ri
[NFCI][IR] ConstantRangeTest: add basic scaffolding for next-gen precision/correctness testing

I have long complained that while we have exhaustive tests
for ConstantRange, they are, uh, not good.

The approach of groking our own constant range
via exhaustive enumeration is, mysterious.

It neither tells us without doubt that the result is
conservatively correct, nor the precise match to the ConstantRange
result tells us that the result is precise.
But yeah, it's fast, i give it that.

In short, there are three things that we need to check:
1. That ConstantRange result is conservatively correct
2. That ConstantRange range is reasonable
3. That ConstantRange result is reasonably precise

So let's not just check the middle one, but all three.

This provides precision test coverage for D88178.
The file was modifiedllvm/unittests/IR/ConstantRangeTest.cpp
Commit 506b6170cb513f1cb6e93a3b690c758f9ded18ac by zequanwu
Reland [CodeGen] emit CG profile for COFF object file

This reverts commit 90242caca2074dab5a9b76e5bc36d9fafd2179a7.

Error fixed at f5435399e823746bbe1737b95c853d77a42e1ac3

Differential Revision: https://reviews.llvm.org/D87811
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
The file was modifiedllvm/lib/Target/TargetLoweringObjectFile.cpp
The file was modifiedllvm/include/llvm/Target/TargetLoweringObjectFile.h
The file was addedllvm/test/MC/COFF/cgprofile.ll
Commit e39286510deb59730c40fa662a44e73f484ea1c2 by tmsriram
Temporary fix for D85085 debug_loc bug with basic block sections.

Until then, this one line fix removes the assert fail with basic block sections
with debug info. Bug tracking this: #47549
This fix does not generate loc list or DW_AT_const_value if the argument is
mentioned in a different section than the start of the function.

Temporarily fixes bugzilla : https://bugs.llvm.org/show_bug.cgi?id=47549

Differential Revision: https://reviews.llvm.org/D87787
The file was addedllvm/test/DebugInfo/X86/basic-block-sections-debug-loc.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
Commit c8df781e54a43593eafd993a5a5cd647866955f8 by akhuang
[DebugInfo] Fix bug in constructor homing with classes with trivial
constructors.

This changes the code to avoid using constructor homing for aggregate
classes and classes with trivial default constructors, instead of trying
to loop through the constructors.

Differential Revision: https://reviews.llvm.org/D87808
The file was modifiedclang/test/CodeGenCXX/debug-info-limited-ctor.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit a079f619b5a1959af8af37cabdea27ae542903db by shafik
[LLDB] Add a defensive check for member__f_

I only have a crash log and was not able to come up with a test case for this.

rdar://problem/69403150
The file was modifiedlldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
Commit 1c5a3c4d382353e582ecf4913e338599028e267f by tlively
[WebAssembly] Make SjLj lowering globals thread-local

Emscripten's longjump and exception mechanism depends on two global variables,
`__THREW__` and `__threwValue`, which are changed to be defined as thread-local
in https://github.com/emscripten-core/emscripten/pull/12056. This patch updates
the corresponding code in the WebAssembly backend to properly declare these
globals as thread-local as well.

Differential Revision: https://reviews.llvm.org/D88262
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
Commit dfc5a9eb57aaaac972764bf731503419284bd3dc by Vedant Kumar
[Instruction] Add dropLocation and updateLocationAfterHoist helpers

Introduce a helper which can be used to update the debug location of an
Instruction after the instruction is hoisted. This can be used to safely
drop a source location as recommended by the docs.

For more context, see the discussion in https://reviews.llvm.org/D60913.

Differential Revision: https://reviews.llvm.org/D85670
The file was modifiedllvm/lib/Transforms/Scalar/GVN.cpp
The file was modifiedllvm/test/Transforms/GVN/PRE/phi-translate.ll
The file was modifiedllvm/unittests/IR/InstructionsTest.cpp
The file was modifiedllvm/test/DebugInfo/Generic/licm-hoist-debug-loc.ll
The file was modifiedllvm/include/llvm/IR/Instruction.h
The file was modifiedllvm/lib/IR/DebugInfo.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LICM.cpp
The file was modifiedllvm/test/Transforms/LICM/hoisting-preheader-debugloc.ll
Commit c32e69b2ce7abfb151a87ba363ac9e25abf7d417 by jezng
[lld-macho][re-land] Initial support for common symbols

Fix earlier build break via a static_cast.

This reverts commit 8112d494d344dc0935d5c078f066a43d7c984e0c.

Differential Revision: https://reviews.llvm.org/D86909
The file was modifiedlld/MachO/SymbolTable.cpp
The file was addedlld/test/MachO/common-symbol-coalescing.s
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/MachO/Symbols.h
The file was modifiedlld/MachO/SyntheticSections.h
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/SymbolTable.h
Commit 5213576fa25e6deb7c649032b2893726de2f8b6c by jezng
[lld-macho][re-land] Implement and test resolution of common symbols

Earlier build break fixed in c32e69b2ce7abfb151a87ba363ac9e25abf7d417.

This reverts commit c367f93e8539c4d0bcdc86ad7ea7923e06231a93.
The file was modifiedlld/test/MachO/nonweak-definition-override.s
The file was modifiedlld/MachO/SymbolTable.cpp
The file was addedlld/test/MachO/common-symbol-resolution.s
Commit 070555c6c008c57c408c1e99025b12c5d71c9848 by snehasishk
[lld] Make -z keep-text-section-prefix recognize .text.split. as a prefix.

".text.split." holds symbols which are split out from functions in
other input sections. For example, with -fsplit-machine-functions,
placing the cold parts in .text.split instead of .text.unlikely mitigates
against poor profile inaccuracy. Techniques such as hugepage remapping can
make conservative decisions at the section granularity.

Differential Revision: https://reviews.llvm.org/D87840
The file was modifiedlld/test/ELF/text-section-prefix.s
The file was modifiedlld/ELF/Writer.cpp
Commit c9b53b3bf20d20d5752876be32a9e5887c702e53 by isanbard
Fix regex in test.
The file was modifiedclang/test/Modules/asm-goto.c
Commit a22814194e8ea8d581a26992bb27f808e53bbbde by jhuber6
[OpenMP] OpenMPOpt Support for Globalization Remarks

Summary:
This patch add support for printing analysis messages relating to data
globalization on the GPU. This occurs when data is shared between the
threads in a GPU context and must be pushed to global or shared memory.

Reviewers: jdoerfert

Subscribers: guansong hiraditya llvm-commits ormris sstefan1 yaxunl

Tags: #OpenMP #LLVM

Differential Revision: https://reviews.llvm.org/D88243
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def
The file was addedllvm/test/Transforms/OpenMP/globalization_remarks.ll
Commit d2696dec45cdcff791cd53b8b8288d33a0d8dddb by snehasishk
[llvm] Add -bbsections-cold-text-prefix to emit cold clusters to a different section.

This change adds an option to basic block sections to allow cold
clusters to be assigned a custom text prefix. With a custom prefix such
as ".text.split." (D87840), lld can place them in a separate output section.
The benefits are -

* Empirically shown to improve icache and itlb metrics by 3-5%
(absolute) compared to placing split parts in .text.unlikely.
* Mitigates against poor profiles, eg samplePGO profiles used with the
machine function splitter. Optimizations such as hugepage remapping can
make different decisions at the section granularity.
* Enables section granularity hotness monitoring (checking on the
decisions made during compilation vs sample data from production).

Differential Revision: https://reviews.llvm.org/D87813
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-cold.ll
The file was modifiedllvm/include/llvm/CodeGen/BasicBlockSectionUtils.h
The file was modifiedllvm/lib/CodeGen/BasicBlockSections.cpp
Commit 1e66e723eb66c19080f259ca7b4c165bfc1f8d08 by ebahapo
[RISCV] Merge the pipeline models for Rocket

Merge the 32 and 64 bit pipeline models for Rocket into a single file.

Differential Revision: https://reviews.llvm.org/D87873
The file was modifiedllvm/lib/Target/RISCV/RISCV.td
The file was removedllvm/lib/Target/RISCV/RISCVSchedRocket32.td
The file was removedllvm/lib/Target/RISCV/RISCVSchedRocket64.td
The file was addedllvm/lib/Target/RISCV/RISCVSchedRocket.td
Commit 43804364e2bc2bd586740dbb0b7aae2137c130cc by Stanislav.Mekhanoshin
[AMDGPU] Fixes typo in the test. NFC.

denormal-fp-math-fp32 -> denormal-fp-math-f32
The file was modifiedllvm/test/CodeGen/AMDGPU/global-atomics-fp.ll
Commit b8a50e920704436ddcbe0cc9d2020935d7e37095 by rnk
[MS] Simplify rules for passing C++ records

Regardless of the target architecture, we should always use the C rules
(RAA_Default) for records that "canBePassedInRegisters". Those are
trivially copyable things, and things marked with [[trivial_abi]].

This should be NFC, although it changes where the final decision about
x86_32 overaligned records is made. The current x86_32 C rules say that
overaligned things are passed indirectly, so there is no functional
difference.
The file was modifiedclang/lib/CodeGen/MicrosoftCXXABI.cpp
The file was modifiedclang/test/CodeGenCXX/inalloca-overaligned.cpp
Commit ecfc9b971269a86b101cddf1fd9f0976be4096d0 by rnk
[MS] For unknown ISAs, pass non-trivially copyable arguments indirectly

Passing them directly is likely to be non-conforming, since it usually
involves copying the bytes of the record. For unknown architectures, we
don't know what MSVC does or will do, but we should at least try to
conform as well as we can.
The file was addedclang/test/CodeGenCXX/microsoft-abi-unknown-arch.cpp
The file was modifiedclang/lib/CodeGen/MicrosoftCXXABI.cpp
Commit bddebca61ea73d45d5eafc38aaf9fe7605f5a9b3 by walter erquinigo
[intel-pt] Refactor the JSON parsing

Recently https://reviews.llvm.org/D88103 introduced a nice API for
converting a JSON object into C++ types, which include nice error
messaging.

I'm using that new functioniality to perform the parsing in a much more
elegant way. As a result, the code looks simpler and more maintainable,
as we aren't parsing anymore individual fields manually.

I updated the test cases accordingly.

Differential Revision: https://reviews.llvm.org/D88264
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPTSettingsParser.h
The file was modifiedlldb/source/Target/Trace.cpp
The file was modifiedlldb/include/lldb/Target/Trace.h
The file was modifiedlldb/test/API/commands/trace/TestTraceLoad.py
The file was modifiedlldb/include/lldb/Target/TraceSettingsParser.h
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPTSettingsParser.cpp
The file was addedlldb/test/API/commands/trace/intelpt-trace/trace_bad5.json
The file was modifiedlldb/source/Target/TraceSettingsParser.cpp
The file was addedlldb/test/API/commands/trace/intelpt-trace/trace_bad4.json
Commit a32feed0dbeac7606d042d0d7e041c9eaf12cd51 by rnk
Add a static_assert confirming that DiagnosticBuilder is small
The file was modifiedclang/lib/Basic/Diagnostic.cpp
Commit 276f68eace7c27f6805d69a30a4b2f186e42c56c by rnk
Revert "Add a static_assert confirming that DiagnosticBuilder is small"

This reverts commit a32feed0dbeac7606d042d0d7e041c9eaf12cd51.

This assert doesn't hold in 32-bit builds, I didn't do the math right.
The file was modifiedclang/lib/Basic/Diagnostic.cpp
Commit 495a5e94baadefa6ed50390e6655021c127ea266 by rnk
Revert "[NFCI][IR] ConstantRangeTest: add basic scaffolding for next-gen precision/correctness testing"

This reverts commit 9bcf7b1c7a139a455400df109d81c638b9e75150.

Breaks build with MSVC.
The file was modifiedllvm/unittests/IR/ConstantRangeTest.cpp
Commit 1c45220028a8aa39ad2f26c8c3c6234d1a816086 by aqjune
[ValueTracking] Check uses of Argument if it is given to isGuaranteedNotToBeUndefOrPoison

This is a patch that allows isGuaranteedNotToBeUndefOrPoison to return more precise result
when an argument is given, by looking through its uses at the entry block (and following blocks as well, if it is checking poison only).

This is useful when there is a function call with noundef arguments at the entry block.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D88207
The file was modifiedllvm/unittests/Analysis/ValueTrackingTest.cpp
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 92106641ae297c24877085e0357e8095aa7b43c9 by aqjune
[ValueTracking] Make isGuaranteedNotToBeUndefOrPoison exit early when MetadataAsValue is given

It is set to conservatively return false, otherwise noundef attributes are added to function calls with metadata arguments.
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 1ca6bd261e0aebdd73e3af98fb97c444c2a339cd by i
[lld] Clean up in lld::{coff,elf}::link after D70378

Library users should not need to call errorHandler().reset() explicitly.

google/iree calls lld::elf::link and without the patch some global
variables are not cleaned up in the next invocation.
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/COFF/Driver.cpp
Commit 3185839bcf6614af28c255e90195f6b1cafee106 by kparzysz
[Hexagon] Avoid crash on CONCAT_VECTORS with illegal element types

Legal vector element types may not be legal as scalar types. When
CONCAT_VECTORS is converted to BUILD_VECTOR, the individual vector
elements become standalone operands to the build operation. If they
have illegal (scalar) types, they need to be made legal. In doing
so, the case of TRUNCATE was not handled, causing an assertion to
fail.
The file was addedllvm/test/CodeGen/Hexagon/autohvx/isel-hvx-concat-truncate.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp