FailedChanges

Summary

  1. [LLD][COFF] Avoid overwriting inputs in tests (details)
  2. [LLD][COFF] Cover usage of LLD-as-a-library in tests (details)
  3. [PR47636] Fix tryEmitPrivate to handle non-constantarraytypes (details)
  4. Add support for setting the path to llvm-symbolizer through an environment variable (details)
  5. GlobalISel: Use unmerge when copying wide vectors to result registers (details)
  6. [Modules] Add stats to measure performance of building and loading modules. (details)
  7. [mlir][shape] Start a pass that lowers shape constraints. (details)
  8. [NFC][regalloc] Remove unused API in AllocationOrder (details)
  9. [SLP] clean up - use 'const' and ArrayRef constructor; NFC (details)
  10. Revert "[Modules] Add stats to measure performance of building and loading modules." (details)
  11. AArch64/GlobalISel: Add testcase for bug 47619 (details)
  12. [IRSim] Adding wrapper pass for IRSimilarityIdentfier (details)
  13. Remove dead branch identified by @rsmith on post-commit for D88236 (details)
  14. [flang][driver] Add missing dependency (shared library builds, NFC) (details)
  15. [OPENMP]Fix PR47621: Variable used by task inside a template function is not made firstprivate by default (details)
  16. [CMake][AIX] Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR appropriately for AIX (details)
  17. [AST] Use data-recursion when building ParentMap, avoid stack overflow. (details)
  18. Remove stale assert. (details)
  19. [mlir][NFC] Promote memory space to BaseMemRefType (details)
  20. [AArch64] __builtin_return_address for PAuth. (details)
  21. [CUDA] Added conversion functions to builtin vars. (details)
  22. [CodeGen] Postprocess PHI nodes for callbr (details)
  23. Fix testcase. (details)
  24. Revert "[CodeGen] Postprocess PHI nodes for callbr" (details)
  25. [NFCI][IR] ConstantRangeTest: refactor operation range gatherers (details)
  26. [NFCI][IR] ConstantRangeTest: add basic scaffolding for next-gen precision/correctness testing (details)
  27. Reland [CodeGen] emit CG profile for COFF object file (details)
  28. Temporary fix for D85085 debug_loc bug with basic block sections. (details)
  29. [DebugInfo] Fix bug in constructor homing with classes with trivial (details)
  30. [LLDB] Add a defensive check for member__f_ (details)
  31. [WebAssembly] Make SjLj lowering globals thread-local (details)
  32. [Instruction] Add dropLocation and updateLocationAfterHoist helpers (details)
  33. [lld-macho][re-land] Initial support for common symbols (details)
  34. [lld-macho][re-land] Implement and test resolution of common symbols (details)
  35. [lld] Make -z keep-text-section-prefix recognize .text.split. as a prefix. (details)
  36. Fix regex in test. (details)
  37. [OpenMP] OpenMPOpt Support for Globalization Remarks (details)
  38. [llvm] Add -bbsections-cold-text-prefix to emit cold clusters to a different section. (details)
  39. [RISCV] Merge the pipeline models for Rocket (details)
  40. [AMDGPU] Fixes typo in the test. NFC. (details)
  41. [MS] Simplify rules for passing C++ records (details)
  42. [MS] For unknown ISAs, pass non-trivially copyable arguments indirectly (details)
  43. [intel-pt] Refactor the JSON parsing (details)
  44. Add a static_assert confirming that DiagnosticBuilder is small (details)
  45. Revert "Add a static_assert confirming that DiagnosticBuilder is small" (details)
  46. Revert "[NFCI][IR] ConstantRangeTest: add basic scaffolding for next-gen precision/correctness testing" (details)
  47. [ValueTracking] Check uses of Argument if it is given to isGuaranteedNotToBeUndefOrPoison (details)
  48. [ValueTracking] Make isGuaranteedNotToBeUndefOrPoison exit early when MetadataAsValue is given (details)
  49. [lld] Clean up in lld::{coff,elf}::link after D70378 (details)
  50. [Hexagon] Avoid crash on CONCAT_VECTORS with illegal element types (details)
  51. Hint how to get a symbolized stack trace if llvm-symbolizer is not found on crashes (details)
  52. PR47176: Don't read from an inactive union member if a friend function (details)
  53. [xray] Function coverage groups (details)
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/wasm/Driver.cpp
The file was modifiedlld/include/lld/Common/ErrorHandler.h
The file was modifiedlld/tools/lld/lld.cpp
The file was modifiedlld/Common/ErrorHandler.cpp
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/lib/Driver/DarwinLdDriver.cpp
The file was modifiedlld/COFF/Writer.cpp
The file was modifiedlld/COFF/Writer.h
The file was modifiedlld/include/lld/Common/Driver.h
The file was modifiedlld/COFF/Driver.cpp
The file was modifiedlld/MachO/Driver.cpp
The file was addedlld/test/COFF/lit.local.cfg
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 modifiedclang/lib/CodeGen/CGExprConstant.cpp
The file was addedclang/test/CodeGenCXX/pr47636.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/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ssubo.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmul.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmaxnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-smin.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-uaddo.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fma.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-freeze.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ushlsat.mir
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-fminnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sext-inreg.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-fdiv.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-add.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ffloor.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-usubo.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-phi.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-xor.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-mul.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-saddo.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-intrinsic-round.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-bitcast.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-saddsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umin.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fcanonicalize.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-lshr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-build-vector.s16.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ashr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-bswap.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fneg.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-shl.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fsqrt.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fcos.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fsub.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-usubsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-implicit-def.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sub.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-or.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-zext.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-and.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-fabs.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-uaddsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fadd.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sshlsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ssubsat.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fsin.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umax.mir
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/MemoryBuffer.cpp
The file was modifiedllvm/lib/Support/Unix/Path.inc
The file was modifiedllvm/lib/Support/Path.cpp
The file was modifiedllvm/lib/Support/Windows/Path.inc
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
The file was modifiedclang/lib/Serialization/ASTReader.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 addedmlir/test/Conversion/ShapeToStandard/convert-shape-constraints.mlir
The file was modifiedmlir/include/mlir/Conversion/ShapeToStandard/ShapeToStandard.h
The file was modifiedmlir/lib/Conversion/ShapeToStandard/CMakeLists.txt
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was addedmlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp
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/Windows/Path.inc
The file was modifiedllvm/lib/Support/MemoryBuffer.cpp
The file was modifiedclang/lib/Serialization/ASTReader.cpp
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
The file was modifiedllvm/lib/Support/Unix/Path.inc
The file was modifiedllvm/lib/Support/Path.cpp
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/lib/Passes/PassRegistry.def
The file was addedllvm/test/Analysis/IRSimilarityIdentifier/basic.ll
The file was modifiedllvm/lib/Analysis/IRSimilarityIdentifier.cpp
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was addedllvm/test/Analysis/IRSimilarityIdentifier/nothing.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was addedllvm/test/Analysis/IRSimilarityIdentifier/different.ll
The file was modifiedllvm/lib/Analysis/Analysis.cpp
The file was modifiedllvm/include/llvm/Analysis/IRSimilarityIdentifier.h
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/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 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/a.h
The file was modifiedclang/lib/AST/Stmt.cpp
The file was addedclang/test/Modules/asm-goto.c
The file was addedclang/test/Modules/Inputs/asm-goto/module.modulemap
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/lib/IR/StandardTypes.cpp
The file was modifiedmlir/lib/IR/TypeDetail.h
The file was modifiedmlir/include/mlir/IR/StandardTypes.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/test/CodeGen/AArch64/returnaddr.ll
The file was addedllvm/test/CodeGen/AArch64/aarch64-signedreturnaddress.ll
The file was modifiedllvm/test/CodeGen/AArch64/arm64_32.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
The file was modifiedllvm/test/CodeGen/AArch64/arm64-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_builtin_vars.h
The file was modifiedclang/lib/Headers/__clang_cuda_runtime_wrapper.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 modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
The file was addedllvm/test/CodeGen/X86/callbr-asm-phi-nodes.ll
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 removedllvm/test/CodeGen/X86/callbr-asm-phi-nodes.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
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/Target/TargetLoweringObjectFile.cpp
The file was addedllvm/test/MC/COFF/cgprofile.ll
The file was modifiedllvm/include/llvm/Target/TargetLoweringObjectFile.h
The file was modifiedllvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
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/lib/CodeGen/CGDebugInfo.cpp
The file was modifiedclang/test/CodeGenCXX/debug-info-limited-ctor.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/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
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/include/llvm/IR/Instruction.h
The file was modifiedllvm/unittests/IR/InstructionsTest.cpp
The file was modifiedllvm/test/Transforms/LICM/hoisting-preheader-debugloc.ll
The file was modifiedllvm/test/DebugInfo/Generic/licm-hoist-debug-loc.ll
The file was modifiedllvm/test/Transforms/GVN/PRE/phi-translate.ll
The file was modifiedllvm/lib/Transforms/Scalar/LICM.cpp
The file was modifiedllvm/lib/IR/DebugInfo.cpp
The file was modifiedllvm/lib/Transforms/Scalar/GVN.cpp
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/InputFiles.cpp
The file was modifiedlld/MachO/SymbolTable.cpp
The file was modifiedlld/MachO/Symbols.h
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/SyntheticSections.h
The file was addedlld/test/MachO/common-symbol-coalescing.s
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/MachO/SymbolTable.cpp
The file was addedlld/test/MachO/common-symbol-resolution.s
The file was modifiedlld/test/MachO/nonweak-definition-override.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 addedllvm/test/Transforms/OpenMP/globalization_remarks.ll
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
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/BasicBlockSections.cpp
The file was modifiedllvm/include/llvm/CodeGen/BasicBlockSectionUtils.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-cold.ll
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 removedllvm/lib/Target/RISCV/RISCVSchedRocket64.td
The file was modifiedllvm/lib/Target/RISCV/RISCV.td
The file was removedllvm/lib/Target/RISCV/RISCVSchedRocket32.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/test/CodeGenCXX/inalloca-overaligned.cpp
The file was modifiedclang/lib/CodeGen/MicrosoftCXXABI.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/include/lldb/Target/Trace.h
The file was modifiedlldb/test/API/commands/trace/TestTraceLoad.py
The file was modifiedlldb/source/Target/TraceSettingsParser.cpp
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPTSettingsParser.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/include/lldb/Target/TraceSettingsParser.h
The file was modifiedlldb/source/Target/Trace.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/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/unittests/Analysis/ValueTrackingTest.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/COFF/Driver.cpp
The file was modifiedlld/ELF/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
Commit 960535d65a927b27ff883250094492842c33ca86 by joker.eph
Hint how to get a symbolized stack trace if llvm-symbolizer is not found on crashes

Most users of LLVM tools hit the raw traces and don't know how to get LLVM to
symbolize automatically for them.

When we print the non-symbolized stack trace, we will add information about
how to get it symbolized.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D88269
The file was modifiedllvm/lib/Support/Unix/Signals.inc
Commit 8c98c8803430804010da06a07cfb291dab59067c by richard
PR47176: Don't read from an inactive union member if a friend function
has default arguments and an exception specification.
The file was modifiedclang/lib/Parse/ParseDeclCXX.cpp
The file was modifiedclang/test/Parser/cxx0x-decl.cpp
The file was modifiedclang/include/clang/Parse/Parser.h
The file was modifiedclang/lib/Parse/ParseDecl.cpp
Commit 6f7fbdd2857fc8a7280afbb26fd4e1a6450069e4 by ianlevesque
[xray] Function coverage groups

Add the ability to selectively instrument a subset of functions by dividing the functions into N logical groups and then selecting a group to cover. By selecting different groups over time you could cover the entire application incrementally with lower overhead than instrumenting the entire application at once.

Differential Revision: https://reviews.llvm.org/D87953
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was addedclang/test/CodeGen/xray-function-groups.cpp
The file was modifiedllvm/docs/XRay.rst
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was modifiedclang/include/clang/Driver/XRayArgs.h
The file was modifiedclang/lib/Driver/XRayArgs.cpp
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def