Changes

Summary

  1. [llvm-profgen] Skip duplication factor outside of body sample computation (details)
  2. [NARY-REASSOCIATE] Fix infinite recursion optimizing min\max (details)
  3. [CSKY] Complete to add basic integer instruction set (details)
  4. [Flang][flang-omp-report] Switch from std::string to StringRef (where possible) (details)
  5. [flang] flang-omp-report replace std::map with llvm::DenseMap (details)
  6. [clang-format] git-clang-format throws an assertion when removing files as part of the commit (details)
  7. [clang-format] [PR52015] clang-format should put __attribute__((foo)) on its own line before @interface / @implementation / @protocol (details)
  8. [WebAssembly] Implementation of table.get/set for reftypes in LLVM IR (details)
  9. [AArch64] Improve div and rem costmodel tests. NFC (details)
  10. [SPARC] Recognize the prefetch instruction (details)
  11. [AArch64] Emit .cfi_negate_ra_state for PAC-auth instructions. (details)
  12. [lldb/DWARF] Ignore debug info pointing to the low addresses (details)
  13. [docs] Fix hyperlink (details)
  14. [lldb/test] Remove quote/unquote steps from the make invocations (details)
  15. [lldb] Improve assert message in TestCPPAccelerator (details)
  16. [X86] Remove X86ProcFamilyEnum::IntelSLM (details)
  17. [lldb] [Process/Utility] Define qN regs on ARM via helper macro (details)
  18. consteval if does not form a discarded statement (details)
  19. [CostModel][X86] Add costs for multiply-by-pow2 constants (details)
  20. [SLP][X86] Improve SLP tests for division/multiplication by +/- pow2 (details)
  21. [libunwind] Use the from-scratch testing configuration by default (details)
  22. [SelectionDAG] Fix getVectorSubVecPointer for scalable subvectors. (details)
  23. [lldb] [Process/Linux] Support arbitrarily-sized FPR writes on ARM (details)
  24. [lldb] [Process/Utility] Fix value_regs/invalidate_regs for ARM (details)
  25. [lldb] [ABI/X86] Support combining xmm* and ymm*h regs into ymm* (details)
  26. [NewPM][test] Avoid using -enable-new-pm=1 since -passes implies new PM (details)
  27. [NewPM][test] Use -passes syntax in SpeculativeExecution lit tests (details)
  28. [NewPM][test] Use -passes syntax in BoundsChecking lit tests (details)
  29. [NewPM][test] Use -passes syntax in VectorCombine lit tests (details)
  30. [NewPM][test] Only use -passes syntax in Scalarizer lit tests (details)
  31. [libc++] Move LIBCXX-DEBUG-FIXME to params.py (details)
  32. [libFuzzer] Update InputInfo.TimeOfUnit when replacing it in the corpus. (details)
  33. [mlir][Linalg] Add a first vectorization pattern for conv1d in NWCxWCF format. (details)
  34. [DebugInfo][InstrRef] Track a single variable at a time (details)
  35. [mlir] Expand prefixing to OpFormatGen (details)
  36. [x86] make helper for useVPTERNLOG; NFC (details)
  37. [clangd] Only publish preamble after rebuilds (details)
  38. [clangd] Fix use-after-free in HeaderIncluderCache (details)
  39. [RISCV][WebAssembly][TargetLowering] Allow expandCTLZ/expandCTTZ to rely on CTPOP expansion for vectors. (details)
  40. [Sema, StaticAnalyzer] Use StringRef::contains (NFC) (details)
  41. [NewPM][test] Use -passes syntax in Mem2Reg lit tests (details)
  42. [NewPM][test] Strickly use -passes in some more lit tests (details)
  43. [lld-macho] Fix dangling string reference when adding frameworks (details)
  44. [analyzer][NFC] Refactor llvm::isa<> usages in the StaticAnalyzer (details)
  45. [RISCV] Use clang_builtin_alias for all RISCV vector intrinsics. (details)
  46. [CodeGenPrepare] Avoid a scalable-vector crash in ctlz/cttz (details)
  47. [clang] Add plugin ActionType to run command line plugin before main action (details)
  48. [MLIR][OpenMP] Shifted hint from CriticalOp to CriticalDeclareOp (details)
  49. [InstCombine] add tests for casted insertelement; NFC (details)
  50. [OpenMP] Add GOMP allocator functions (details)
  51. [WebAssembly] Add prototype relaxed float min max instructions (details)
  52. Fix unused variable warning. (details)
  53. [mlir] fix region property generation in python bindings (details)
  54. InvalidPtrChecker - don't dereference a dyn_cast<> - use cast<> instead. (details)
  55. [IR] Refactor GlobalIFunc to inherit from GlobalObject, Remove GlobalIndirectSymbol (details)
  56. [Clang][AST] Resolve FIXME: Remove ObjCObjectPointer from (details)
  57. [NFC] De-template LazyCallGraph::visitReferences() and move into .cpp file (details)
  58. Raise compile error when using unimplemented functions (details)
  59. Precommit InstCombine/and-xor-or.ll test. NFC. (details)
  60. [clang] Disallow mixing SEH and Objective-C exceptions (details)
  61. [ORC-RT] Configure the ORC runtime for more architectures and platforms (details)
  62. [InstCombine] fold fake vector insert to bit-logic (details)
  63. [lld/mac] Remove else-after-return in ICF code (details)
  64. [MC] Recursively calculate symbol offset (details)
  65. [AMDGPU] Allow rematerialization of SOP with virtual registers (details)
  66. [AMDGPU] MachineLICM cannot hoist VALU (details)
  67. [lldb] Remove variable "any" which is set but not used (details)
  68. [AArch64][GlobalISel] combine (and (or x, c1), c2) => (and x, c2) iff c1 & c2 == 0 (details)
  69. Drop transfer_read inner most unit dimensions (details)
  70. Update ext-int test to have x86 linux/windows before ABI Impl (details)
  71. [fir] Add Character helper (details)
  72. Make dr177x.cpp test work with Windows-32 bit platfroms with 'thiscall'. (details)
  73. [mlir][sparse] make index type explicit in public API of support library (details)
  74. [IndVars] Invalidate SCEV when IR is changed in rewriteLoopExitValue. (details)
  75. Precommit updated InstCombine/and-xor-or.ll test. NFC. (details)
  76. Remove include of 'type_info' from ext-int test. (details)
  77. [InstCombine] Fold `(a & ~b) & ~c` to `a & ~(b | c)` (details)
  78. [libc++] Fix incorrect main() signatures in the tests (details)
  79. [x86] add special-case lowering for usubsat for AVX512 (details)
  80. Revert "[fir] Add Character helper" (details)
  81. [Tests] Add tests for non-speculatable ephemeral values (details)
  82. [libc++abi] Guard include of <unistd.h> behind __has_include (details)
  83. [libunwind] Revert "Use the from-scratch testing configuration by default" (details)
  84. [runtimes] Rename CI job from "Runtimes build" to "Bootstrapping build" (details)
  85. Revert "[ORC-RT] Configure the ORC runtime for more architectures and platforms" (details)
  86. [ARM] Fix inline assembly referencing floating point registers on soft-float targets (details)
  87. [SelectionDAG] Bail out of mergeTruncStores when not optimizing (details)
  88. [lld-macho] Temporarily disable lc-linker-option.ll on Windows (details)
  89. [msan] Add stat-family interceptors on Linux (details)
  90. [ARM] Use correct name of floating point ceil intrinsic in test. (details)
  91. [Driver][OpenBSD] Some improvements to the external assembler handling (details)
  92. [MLIR][OpenMP] Add support for ordered construct (details)
  93. [modules] While merging ObjCInterfaceDecl definitions, merge them as decl contexts too. (details)
  94. [Codegen] Set ARITH_FENCE as meta-instruction (details)
  95. [lld-macho][nfc] Added some notes on deliberate differences btw LD64 vs LLD-MACHO (details)
  96. [NFC][msan] Break the loop when done (details)
  97. [NFC][msan] Rerun update_test_checks.py for a test (details)
  98. [NFC][msan] Add NormalArgAfterNoUndef testcase (details)
  99. [ELF] Avoid adding an orphan section to a less suitable segment (details)
  100. Revert "[MLIR][OpenMP] Add support for ordered construct" (details)
Commit e8c245dcd3b9f4237cdfb9dbcc6669d0b81e7936 by wenlei
[llvm-profgen] Skip duplication factor outside of body sample computation

We incorrectly use duplication factor for total samples even though we already accumulate samples instead of taking MAX. It causes profile to have bloated total samples for functions with loop unrolled or vectorized. The change fix the issue for total sample, head sample and call target samples.

Differential Revision: https://reviews.llvm.org/D112042
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/test/tools/llvm-profgen/inline-noprobe2.test
Commit 269f563a2bcd88eba3fd4c25669713e64ab06f03 by ybrevnov
[NARY-REASSOCIATE] Fix infinite recursion optimizing min\max

To guarantee convergence of the algorithm each optimization step should decrease number of instructions when IR is modified. This property is not held in this test case. The problem is that SCEV Expander may do "unexpected" reassociation what results in creation of new min/max chains and introduction of extra instructions. As a result on each step we indefinitely optimize back and forth.

The solution is to restrict SCEV Expander to perform uncontrolled reassociations by means of "Unknown" expressions.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D112060
The file was modifiedllvm/lib/Transforms/Scalar/NaryReassociate.cpp
The file was modifiedllvm/test/Transforms/NaryReassociate/nary-req.ll
Commit de10a02fc067339224196735aa3ecec66e2d4845 by zixuan.wu
[CSKY] Complete to add basic integer instruction set

Complete the basic integer instruction set and add related predictor in CSKY.td.
And it includes the instruction definition and asm parser support.

Differential Revision: https://reviews.llvm.org/D111701
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYInstPrinter.cpp
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp
The file was modifiedllvm/lib/Target/CSKY/CSKY.td
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCExpr.h
The file was addedllvm/lib/Target/CSKY/CSKYSubtarget.cpp
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCTargetDesc.h
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCExpr.cpp
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYInstPrinter.h
The file was modifiedllvm/lib/Target/CSKY/CSKYInstrInfo.td
The file was modifiedllvm/lib/Target/CSKY/CSKYInstrFormats.td
The file was modifiedllvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCCodeEmitter.h
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYMCCodeEmitter.cpp
The file was modifiedllvm/test/MC/CSKY/basic.s
The file was modifiedllvm/lib/Target/CSKY/MCTargetDesc/CSKYFixupKinds.h
The file was modifiedllvm/lib/Target/CSKY/CMakeLists.txt
The file was addedllvm/lib/Target/CSKY/CSKYSubtarget.h
Commit 660c511e5b79d3724b8a139c8865c790d77b1f8f by andrzej.warzynski
[Flang][flang-omp-report] Switch from std::string to StringRef (where possible)

This patch makes the following changes to flang-omp-report:
- Update 'normalize_clause_name' parameter to use llvm::StringRef instead of
   std::sting.
- Change usages of std::tolower to llvm::toLower from
   "ADT/StringExtras.h".
This is a one of several patches focusing on switching containers from STL to LLVM's ADT library.

Reviewed By: Leporacanthicus, clementval

Differential Revision: https://reviews.llvm.org/D111980
The file was modifiedflang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
The file was modifiedflang/examples/flang-omp-report-plugin/flang-omp-report-visitor.cpp
Commit e9fe8ef4b0aa68be782a9139e08e9337ef79a462 by andrzej.warzynski
[flang] flang-omp-report replace std::map with llvm::DenseMap

This patch replaces the uses of std::map with llvm::DenseMap in the
flang-omp-report plugin. It also removed the 'constructClauseCount' map
due to no longer being needed after the plugin was stripped down.
This is a one of several patches focusing on switching containers from STL to LLVM's ADT library.

Reviewed By: kiranchandramohan, clementval

Differential Revision: https://reviews.llvm.org/D111977
The file was modifiedflang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h
The file was modifiedflang/examples/flang-omp-report-plugin/flang-omp-report-visitor.cpp
Commit 5e969125c6094b909493bcd8360497adcdf8f6f5 by mydeveloperday
[clang-format] git-clang-format throws an assertion when removing files as part of the commit

Following a change {D111273} to allow git-clang-format to see single lines being removed,
we introduced a regression such that if you are removing a whole file it will
assert in clang-format as its given the -lines=0:0  (lines are 1 based)

Reviewed By: HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D112056
The file was modifiedclang/tools/clang-format/git-clang-format
Commit 57e00810edd7c4359e3de9242bcbd8874d58dc64 by mydeveloperday
[clang-format] [PR52015] clang-format should put __attribute__((foo)) on its own line before @interface / @implementation / @protocol

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

A newline should be place between attribute and @ for objectivec

Reviewed By: benhamilton, HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D111975
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
The file was modifiedclang/unittests/Format/FormatTestObjC.cpp
Commit 6d0c7bc17de85807c286f78571235b6658999faf by pmatos
[WebAssembly] Implementation of table.get/set for reftypes in LLVM IR

This change implements new DAG nodes TABLE_GET/TABLE_SET, and lowering
methods for load and stores of reference types from IR arrays. These
global LLVM IR arrays represent tables at the Wasm level.

Differential Revision: https://reviews.llvm.org/D111154
The file was modifiedlld/test/wasm/lto/Inputs/thinlto.ll
The file was modifiedlld/test/wasm/lto/thinlto.ll
The file was modifiedlld/test/wasm/lto/libcall-archive.ll
The file was modifiedlld/test/wasm/lto/Inputs/libcall-truncsfhf2.ll
The file was addedllvm/test/CodeGen/WebAssembly/externref-tableset.ll
The file was modifiedclang/test/CodeGen/target-data.c
The file was modifiedlld/test/wasm/lto/cache.ll
The file was modifiedlld/test/wasm/lto/Inputs/save-temps.ll
The file was modifiedlld/test/wasm/lto/export.ll
The file was modifiedlld/test/wasm/lto/weak.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
The file was modifiedlld/test/wasm/lto/lto-start.ll
The file was modifiedlld/test/wasm/lto/save-temps.ll
The file was modifiedclang/lib/Basic/Targets/WebAssembly.h
The file was modifiedlld/test/wasm/lto/relocatable-undefined.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedlld/test/wasm/lto/used.ll
The file was modifiedlld/test/wasm/lto/Inputs/libcall-archive.ll
The file was modifiedlld/test/wasm/lto/weak-undefined.ll
The file was modifiedlld/test/wasm/lto/comdat.ll
The file was modifiedlld/test/wasm/lto/libcall-truncsfhf2.ll
The file was modifiedlld/test/wasm/lto/Inputs/cache.ll
The file was modifiedlld/test/wasm/lto/verify-invalid.ll
The file was modifiedlld/test/wasm/lto/relocatable.ll
The file was addedllvm/test/CodeGen/WebAssembly/funcref-tableset.ll
The file was addedllvm/test/CodeGen/WebAssembly/externref-tableget.ll
The file was modifiedlld/test/wasm/lto/archive.ll
The file was modifiedlld/test/wasm/lto/internalize-basic.ll
The file was modifiedlld/test/wasm/lto/parallel.ll
The file was modifiedlld/test/wasm/lto/Inputs/archive.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
The file was modifiedlld/test/wasm/lto/new-pass-manager.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISD.def
The file was modifiedlld/test/wasm/lto/undef.ll
The file was addedllvm/test/CodeGen/WebAssembly/funcref-tableget.ll
The file was modifiedlld/test/wasm/lto/import-attributes.ll
The file was modifiedlld/test/wasm/lto/opt-level.ll
The file was modifiedlld/test/wasm/lto/tls.ll
The file was modifiedlld/test/wasm/lto/diagnostics.ll
The file was modifiedlld/test/wasm/lto/Inputs/used.ll
The file was addedllvm/test/CodeGen/WebAssembly/funcref-table_call.ll
The file was modifiedlld/test/wasm/lto/atomics.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrTable.td
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
Commit 862e8d7e55206b6ae7270033cb5609477d0512ad by david.green
[AArch64] Improve div and rem costmodel tests. NFC

Copied from the X86 tests, these give a better test coveraged than the
existing tests.
The file was modifiedllvm/test/Analysis/CostModel/AArch64/div.ll
The file was addedllvm/test/Analysis/CostModel/AArch64/rem.ll
Commit ec428f7b780615769b7ca712ff67d05c2c957946 by cederman
[SPARC] Recognize the prefetch instruction

Reviewed By: LemonBoy

Differential Revision: https://reviews.llvm.org/D96311
The file was modifiedllvm/test/MC/Sparc/sparcv9-instructions.s
The file was modifiedllvm/lib/Target/Sparc/SparcInstrInfo.td
Commit f903c8505515f15e956febbd8cdfa0037fbaf689 by daniel.kiss
[AArch64] Emit .cfi_negate_ra_state for PAC-auth instructions.

autiasp, autibsp instructions are the counterpart of paciasp/pacibsp instructions
therefore let's emit .cfi_negate_ra_state for these too.
In case of Armv8.3 instruction set the retaa/retbb will do the return and authentication
in one step here we can't emit the . cfi_negate_ra_state because that would be point after
the ret* instruction.

Reviewed By: nickdesaulniers, MaskRay

Differential Revision: https://reviews.llvm.org/D111780
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-sp-mod.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-cfi.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-thunk.ll
The file was modifiedllvm/test/CodeGen/AArch64/sign-return-address.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-retaddr-sign-regsave.mir
Commit ffbff6c511ba230954013eca8d824a66f6b4f9a5 by pavel
[lldb/DWARF] Ignore debug info pointing to the low addresses

specifically, ignore addresses that point before the first code section.

This resurrects D87172 with several notable changes:
- it fixes a bug where the early exits in InitializeObject left
  m_first_code_address "initialized" to LLDB_INVALID_ADDRESS (0xfff..f),
  which caused _everything_ to be ignored.
- it extends the line table fix to function parsing as well, where it
  replaces a similar check which was checking the executable permissions
  of the section. This was insufficient because some
  position-independent elf executables can have an executable segment
  mapped at file address zero. (What makes this fix different is that it
  checks for the executable-ness of the sections contained within that
  segment, and those will not be at address zero.)
- It uses a different test case, with an elf file with near-zero
  addresses, and checks for both line table and function parsing.

Differential Revision: https://reviews.llvm.org/D112058
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
The file was addedlldb/test/Shell/SymbolFile/DWARF/x86/dead-code-filtering.yaml
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/lit.local.cfg
Commit f45d7407168d08c4d80216ca13feb1e1c21ad6bb by sven.vanhaastregt
[docs] Fix hyperlink
The file was modifiedclang/docs/UsersManual.rst
Commit 551d118805c808936956e464dc21e05acb478f78 by pavel
[lldb/test] Remove quote/unquote steps from the make invocations

None of the commands we run really rely on shell features. Running them
with shell=False, simplifies the code as there is no need for elaborate
quoting.

Differential Revision: https://reviews.llvm.org/D111990
The file was modifiedlldb/packages/Python/lldbsuite/test/builders/builder.py
The file was modifiedlldb/packages/Python/lldbsuite/test/builders/darwin.py
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
Commit 956df6fa620a0ca75fd6e62b5318fb4d14304a4f by Raphael Isemann
[lldb] Improve assert message in TestCPPAccelerator

`log` is just some IO object that gets printed as `<_io.TextIOWrapper = filename`
but the intention here was to print the actual found log contents.
The file was modifiedlldb/test/API/lang/cpp/accelerator-table/TestCPPAccelerator.py
Commit 9fc523d114085d194da90ef108c16c931c40ae38 by llvm-dev
[X86] Remove X86ProcFamilyEnum::IntelSLM

Replace X86ProcFamilyEnum::IntelSLM enum with a TuningUseSLMArithCosts flag instead, matching what we already do for Goldmont.

This just leaves X86ProcFamilyEnum::IntelAtom to replace with general Tuning/Feature flags and we can finally get rid of the old X86ProcFamilyEnum enum.

Differential Revision: https://reviews.llvm.org/D112079
The file was modifiedllvm/lib/Target/X86/X86.td
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.h
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/X86/X86Subtarget.h
Commit 6561c074c072beb6c8e400a62bd5943a1f26a72a by mgorny
[lldb] [Process/Utility] Define qN regs on ARM via helper macro

Add a FPU_QREG macro to define qN registers.  This is a piece-wise
attempt of reconstructing D112066 with the goal of figuring out which
part of the larger change breaks the buildbot.

Differential Revision: https://reviews.llvm.org/D112066
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterInfos_arm.h
Commit ab2ca8496d54573de1c8bec204009567ba2b4086 by aaron
consteval if does not form a discarded statement

When we added support for if consteval, we accidentally formed a discarded
statement evaluation context for the branch-not-taken. However, a discarded
statement is a property of an if constexpr statement, not an if consteval
statement (https://eel.is/c++draft/stmt.if#2.sentence-2). This turned out to
cause issues when deducing the return type from a function with a consteval if
statement -- we wouldn't consider the branch-not-taken when deducing the return
type.

This fixes PR52206.

Note, there is additional work left to be done. We need to track discarded
statement and immediate evaluation contexts separately rather than as being
mutually exclusive.
The file was modifiedclang/lib/Parse/ParseStmt.cpp
The file was addedclang/test/SemaCXX/cxx2b-consteval-if.cpp
Commit 5b395bd633632b9f87f4d853095cb1a090a1efe6 by llvm-dev
[CostModel][X86] Add costs for multiply-by-pow2 constants

These are folded to left shifts in the backend.

We should be able to extend this for multiply-by-negpow2 after D111968 has landed to resolve PR51436
The file was modifiedllvm/test/Analysis/CostModel/X86/mul.ll
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
Commit a3c05982ac05637a8f40207db83c04a1710033d5 by llvm-dev
[SLP][X86] Improve SLP tests for division/multiplication by +/- pow2

Add PR51436 test as well as some basic multiply tests, and include SSE2 division coverage
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/powof2div.ll
The file was addedllvm/test/Transforms/SLPVectorizer/X86/powof2mul.ll
Commit 5a8ad80b6fa5cbad58b78384f534b78fca863e7f by Louis Dionne
[libunwind] Use the from-scratch testing configuration by default

This commit switches libunwind from using the complicated logic in
libc++'s testing configuration to a from-scratch configuration.
I tried to make sure that all cases that were handled in the old
config were handled by this one too, so hopefully this shouldn't
break anyone. However, if you encounter issues with this change,
please let me know and feel free to revert if I don't reply quickly.

This change was engineered to be easily revertable.

Differential Revision: https://reviews.llvm.org/D112082
The file was modifiedlibunwind/CMakeLists.txt
Commit be6c8dc765c32a79c0c9b0e6720e3b22d226e478 by sander.desmalen
[SelectionDAG] Fix getVectorSubVecPointer for scalable subvectors.

When inserting a scalable subvector into a scalable vector through
the stack, the index to store to needs to be scaled by vscale.
Before this patch, that didn't yet happen, so it would generate the
wrong offset, thus storing a subvector to the incorrect address
and overwriting the wrong lanes.

For some insert:
  nxv8f16 insert_subvector(nxv8f16 %vec, nxv2f16 %subvec, i64 2)

The offset was not scaled by vscale:
  orr     x8, x8, #0x4
  st1h    { z0.h }, p0, [sp]
  st1h    { z1.d }, p1, [x8]
  ld1h    { z0.h }, p0/z, [sp]

And is changed to:
  mov x8, sp
  st1h { z0.h }, p0, [sp]
  st1h { z1.d }, p1, [x8, #1, mul vl]
  ld1h { z0.h }, p0/z, [sp]

Differential Revision: https://reviews.llvm.org/D111633
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sve-insert-vector.ll
Commit 192331b890e238a8ede4e61e6c5294e7eaa365fd by mgorny
[lldb] [Process/Linux] Support arbitrarily-sized FPR writes on ARM

Support arbitrarily-sized FPR writes on ARM in order to fix writing qN
registers directly.  Currently, writing them works only by accident
due to value_regs splitting them into smaller writes via dN and sN
registers.

Differential Revision: https://reviews.llvm.org/D112131
The file was modifiedlldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
Commit 99277a81f807e6f4c63ececdb6974d6d5f1f3562 by mgorny
[lldb] [Process/Utility] Fix value_regs/invalidate_regs for ARM

Fix incorrect values for value_regs, and incomplete values for
invalidate_regs in RegisterInfos_arm.  The value_regs entry needs
to list only one base (i.e. larger) register that needs to be read
to get the value for this register, while invalidate_regs needs to list
all other registers (including pseudo-register) whose values would
change when this register is written to.

7a8ba4ffbeecb5070926b80bb839a4d80539f1ac fixed a similar problem
for ARM64.

Differential Revision: https://reviews.llvm.org/D112066
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterInfos_arm.h
Commit f290efc32622cc59566ec7ac13e74a039b6047c2 by mgorny
[lldb] [ABI/X86] Support combining xmm* and ymm*h regs into ymm*

gdbserver does not expose combined ymm* registers but rather XSAVE-style
split xmm* and ymm*h portions.  Extend value_regs to support combining
multiple registers and use it to create user-friendly ymm* registers
that are combined from split xmm* and ymm*h portions.

Differential Revision: https://reviews.llvm.org/D108937
The file was modifiedlldb/source/Plugins/ABI/X86/ABIX86.cpp
The file was modifiedlldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py
The file was modifiedlldb/source/Target/DynamicRegisterInfo.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
The file was modifiedlldb/include/lldb/lldb-private-types.h
Commit a413663d8fea6700076010b7e4458b03a8bfb8b4 by bjorn.a.pettersson
[NewPM][test] Avoid using -enable-new-pm=1 since -passes implies new PM
The file was modifiedllvm/test/Transforms/LoopUnswitch/AMDGPU/uniform-unswitch.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/limit.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/openmp-opt-module.ll
The file was modifiedllvm/test/Transforms/FunctionAttrs/nofree-attributor.ll
The file was modifiedllvm/test/Transforms/SampleProfile/remarks-hotness.ll
The file was modifiedllvm/test/Transforms/LICM/no-hoist-prof.ll
The file was modifiedllvm/test/CodeGen/PowerPC/opt-builtins-ppc-xlcompat-cas.ll
Commit 57bd67abfcb8799cbee204e5fd92fe60bce3f9bf by bjorn.a.pettersson
[NewPM][test] Use -passes syntax in SpeculativeExecution lit tests

The legacy PM is deprecated, so use the new PM syntax in lit tests
running the speculative-execution pass.
The file was modifiedllvm/test/Transforms/SpeculativeExecution/spec-casts.ll
The file was modifiedllvm/test/Transforms/SpeculativeExecution/spec-calls.ll
The file was modifiedllvm/test/Transforms/SpeculativeExecution/spec-other-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SpeculativeExecution/PR46267.ll
The file was modifiedllvm/test/Transforms/SpeculativeExecution/spec-compares.ll
The file was modifiedllvm/test/Transforms/SpeculativeExecution/spec-other.ll
The file was modifiedllvm/test/Transforms/SpeculativeExecution/spec.ll
Commit 15f1fb5a302d7b4b1405c0414c661ef3de7ff18d by bjorn.a.pettersson
[NewPM][test] Use -passes syntax in BoundsChecking lit tests

The legacy PM is deprecated, so use the new PM syntax in lit tests
running the bounds-checking pass.
The file was modifiedllvm/test/Instrumentation/BoundsChecking/simple.ll
The file was modifiedllvm/test/Instrumentation/BoundsChecking/simple-32.ll
The file was modifiedllvm/test/Instrumentation/BoundsChecking/many-traps-2.ll
The file was modifiedllvm/test/Instrumentation/BoundsChecking/many-trap.ll
The file was modifiedllvm/test/Instrumentation/BoundsChecking/opt.ll
The file was modifiedllvm/test/Instrumentation/BoundsChecking/phi.ll
Commit 5e4dbd7a2fb095a6c25ec4758b806571c033e88e by bjorn.a.pettersson
[NewPM][test] Use -passes syntax in VectorCombine lit tests

The legacy PM is deprecated, so use the new PM syntax in lit tests
running the vector-combine pass.
The file was modifiedllvm/test/Transforms/VectorCombine/AArch64/load-extract-insert-store-scalarization.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/load-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/AArch64/extract-cmp-binop.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/load.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/insert-binop.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-binop-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/Hexagon/load-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-cmp.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/load-widening.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/shuffle-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/scalarize-cmp.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/insert-binop-with-constant-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/scalarize-cmp-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/no-sse-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-binop.ll
The file was modifiedllvm/test/Transforms/VectorCombine/AMDGPU/as-transition.ll
The file was modifiedllvm/test/Transforms/VectorCombine/load-insert-store.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-cmp-binop.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/no-sse.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/insert-binop-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/AArch64/vscale-bitcast-shuffle.ll
The file was modifiedllvm/test/Transforms/VectorCombine/AArch64/vscale-bitcast-shuffle-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/insert-binop-with-constant.ll
The file was modifiedllvm/test/Transforms/VectorCombine/Hexagon/load.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/shuffle.ll
The file was modifiedllvm/test/Transforms/VectorCombine/AMDGPU/as-transition-inseltpoison.ll
The file was modifiedllvm/test/Transforms/VectorCombine/X86/scalarize-vector-gep.ll
Commit e9320b1a95a69652bba9b3ba66900b1c0e8f6b0a by bjorn.a.pettersson
[NewPM][test] Only use -passes syntax in Scalarizer lit tests

With legacy PM being deprecated it should be enough to verify the
scalarizer pass using the new-PM syntax when invoking opt.
The file was modifiedllvm/test/Transforms/Scalarizer/cache-bug.ll
The file was modifiedllvm/test/Transforms/Scalarizer/dbginfo.ll
The file was modifiedllvm/test/Transforms/Scalarizer/order-bug-inseltpoison.ll
The file was modifiedllvm/test/Transforms/Scalarizer/global-bug.ll
The file was modifiedllvm/test/Transforms/Scalarizer/intrinsics.ll
The file was modifiedllvm/test/Transforms/Scalarizer/phi-bug-inseltpoison.ll
The file was modifiedllvm/test/Transforms/Scalarizer/variable-extractelement.ll
The file was modifiedllvm/test/Transforms/Scalarizer/store-bug.ll
The file was modifiedllvm/test/Transforms/Scalarizer/variable-insertelement.ll
The file was modifiedllvm/test/Transforms/Scalarizer/constant-extractelement.ll
The file was modifiedllvm/test/Transforms/Scalarizer/constant-insertelement.ll
The file was modifiedllvm/test/Transforms/Scalarizer/basic-inseltpoison.ll
The file was modifiedllvm/test/Transforms/Scalarizer/dbgloc-bug.ll
The file was modifiedllvm/test/Transforms/Scalarizer/order-bug.ll
The file was modifiedllvm/test/Transforms/Scalarizer/basic.ll
The file was modifiedllvm/test/Transforms/Scalarizer/crash-bug.ll
The file was modifiedllvm/test/Transforms/Scalarizer/vector-gep.ll
The file was modifiedllvm/test/Transforms/Scalarizer/global-bug-2.ll
The file was modifiedllvm/test/Transforms/Scalarizer/dbgloc-bug-inseltpoison.ll
The file was modifiedllvm/test/Transforms/Scalarizer/phi-bug.ll
The file was modifiedllvm/test/Transforms/Scalarizer/scatter-order.ll
The file was modifiedllvm/test/Transforms/Scalarizer/phi-unreachable-pred.ll
Commit cbe3b6b21f6d3e706edd9c825e2bfb6ee324945e by Louis Dionne
[libc++] Move LIBCXX-DEBUG-FIXME to params.py

This temporary FIXME really belongs to the testing config, not to the
specific CMake cache that enables that configuration.

Differential Revision: https://reviews.llvm.org/D112031
The file was modifiedlibcxx/utils/libcxx/test/params.py
The file was modifiedlibcxx/cmake/caches/Generic-debug-iterators.cmake
Commit 9e7b7303f1d3556756d7c4db8fa02969c8f11c58 by mascasa
[libFuzzer] Update InputInfo.TimeOfUnit when replacing it in the corpus.

Previously, when the fuzzing loop replaced an input in the corpus, it didn't update the execution time of the input. Therefore, some schedulers (e.g. Entropic) would adjust weights based on the incorrect execution time.

This patch updates the execution time of the input when replacing it.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D111479
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerCorpus.h
The file was modifiedcompiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerLoop.cpp
Commit 6bb7d2474fe4d3a68e2d1efefaa0bc8a244737bb by nicolas.vasilache
[mlir][Linalg] Add a first vectorization pattern for conv1d in NWCxWCF format.

This revision uses the newly refactored StructuredGenerator to create a simple vectorization for conv1d_nwc_wcf.

Note that the pattern is not specific to the op and is technically not even specific to the ConvolutionOpInterface (modulo minor details related to dilations and strides).

The overall design follows the same ideas as the lowering of vector::ContractionOp -> vector::OuterProduct: it seeks to be minimally complex, composable and extensible while avoiding inference analysis. Instead, we metaprogram the maps/indexings we expect and we match against them.

This is just a first stab and still needs to be evaluated for performance.
Other tradeoffs are possible that should be explored.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D111894
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was addedmlir/test/Dialect/Linalg/vectorize-convolution.mlir
The file was modifiedmlir/lib/Dialect/Vector/VectorTransforms.cpp
The file was modifiedmlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
Commit 89950ade216bcabf3cb9acf2cf7218763fd40a92 by jeremy.morse
[DebugInfo][InstrRef] Track a single variable at a time

Here's another performance patch for InstrRefBasedLDV: rather than
processing all variable values in a scope at a time, instead, process one
variable at a time. The benefits are twofold:
* It's easier to reason about one variable at a time in your mind,
* It improves performance, apparently from increased locality.

The downside is that the value-propagation code gets indented one level
further, plus there's some churn in the unit tests.

Differential Revision: https://reviews.llvm.org/D111799
The file was modifiedllvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
The file was modifiedllvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
The file was modifiedllvm/unittests/CodeGen/InstrRefLDVTest.cpp
Commit 6a99423390995f874ee4e345157523f4139ccbef by jpienaar
[mlir] Expand prefixing to OpFormatGen

Follow up to also use the prefixed emitters in OpFormatGen (moved
getGetterName(s) and getSetterName(s) to Operator as that is most
convenient usage wise even though it just depends on Dialect). Prefix
accessors in Test dialect and follow up on missed changes in
OpDefinitionsGen.

Differential Revision: https://reviews.llvm.org/D112118
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was modifiedmlir/test/lib/Transforms/TestInlining.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/lib/TableGen/Operator.cpp
The file was modifiedmlir/include/mlir/TableGen/Operator.h
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
Commit 3efd2a0bec0298d804f274fcc10ea14431b61de1 by spatel
[x86] make helper for useVPTERNLOG; NFC

See D112085 for another use case.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit c959da9ef344a22e3753e2e62af46a63a33cd80f by kadircet
[clangd] Only publish preamble after rebuilds

Don't invoke parsing callback for preamble if clangd is using a
previously built one.

Differential Revision: https://reviews.llvm.org/D112137
The file was modifiedclang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
The file was modifiedclang-tools-extra/clangd/TUScheduler.cpp
Commit 60e19f6752b7f19b022d8bdca0937c59b49811f9 by kadircet
[clangd] Fix use-after-free in HeaderIncluderCache

Includer cache could get into a bad state when a main file went bad and
added back afterwards. This patch adds a check to invalidate to prevent
that.

Differential Revision: https://reviews.llvm.org/D112130
The file was modifiedclang-tools-extra/clangd/TUScheduler.cpp
The file was modifiedclang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
Commit fe1f0de00335a8e59aa6c08d1cdae7cf20e14f87 by craig.topper
[RISCV][WebAssembly][TargetLowering] Allow expandCTLZ/expandCTTZ to rely on CTPOP expansion for vectors.

Our fallback expansion for CTLZ/CTTZ relies on CTPOP. If CTPOP
isn't legal or custom for a vector type we would scalarize the
CTLZ/CTTZ. This is different than CTPOP itself which would use a
vector expansion.

This patch teaches expandCTLZ/CTTZ to rely on the vector CTPOP
expansion instead of scalarizing. To do this I had to add additional
checks to make sure the operations used by CTPOP expansions are all
supported. Some of the operations were already needed for the CTLZ/CTTZ
expansion.

This is a huge improvement to the RISCV which doesn't have a scalar
ctlz or cttz in the base ISA.

For WebAssembly, I've added Custom lowering to keep the scalarizing
behavior. I've also extended the scalarizing to CTPOP.

Differential Revision: https://reviews.llvm.org/D111919
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-cttz.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-ctlz.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-unsupported.ll
Commit 0abb5d293cf7289780542fd9c5f0d84e5aadbdc8 by kazu
[Sema, StaticAnalyzer] Use StringRef::contains (NFC)
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/MemRegion.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/CheckerContext.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/CallEvent.cpp
Commit a3ca7dd0ab9947e0fdde6de5c0d6b1952ac8ac94 by bjorn.a.pettersson
[NewPM][test] Use -passes syntax in Mem2Reg lit tests

The legacy PM is deprecated, so use the new PM syntax in lit tests
verifying the mem2reg pass.
The file was modifiedllvm/test/Transforms/Mem2Reg/ignore-droppable.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/pr37632-unreachable-list-of-stores.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/undef-order.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/debug-alloca-vla-2.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/ConvertDebugInfo.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/debug-alloca-phi-2.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/debug-alloca-vla-1.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/pr24179.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/PromoteMemToRegister.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/alloca_addrspace.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/UndefValuesMerge.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/atomic.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/2003-10-05-DeadPHIInsertion.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/preserve-nonnull-load-metadata.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/2005-11-28-Crash.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/dbg-addr-inline-dse.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/ignore-lifetime.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/dbg-addr.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/dbg-inline-scope-for-phi.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/debug-alloca-phi.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/optnone.ll
The file was modifiedllvm/test/Transforms/Mem2Reg/crash.ll
Commit 3d152bc49ddc87350eb1c588b083b24858bf6d51 by bjorn.a.pettersson
[NewPM][test] Strickly use -passes in some more lit tests

Removed/replaced RUN lines using legacy PM syntax in favor of using
-passes in lit tests for Float2Int, MetaRenamer, StripDeadPrototypes
and StripSymbols.
The file was modifiedllvm/test/Transforms/Float2Int/toolarge.ll
The file was modifiedllvm/test/Transforms/Float2Int/basic.ll
The file was modifiedllvm/test/Transforms/StripDeadPrototypes/basic.ll
The file was modifiedllvm/test/Transforms/Float2Int/float2int-optnone.ll
The file was modifiedllvm/test/Transforms/StripSymbols/2010-08-25-crash.ll
The file was modifiedllvm/test/Transforms/StripSymbols/strip-cov.ll
The file was modifiedllvm/test/Transforms/MetaRenamer/metarenamer.ll
The file was modifiedllvm/test/Transforms/MetaRenamer/main.ll
The file was modifiedllvm/test/Transforms/StripSymbols/block-address.ll
The file was modifiedllvm/test/Transforms/StripSymbols/2007-01-15-llvm.used.ll
The file was modifiedllvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll
Commit aab0f2264aebe6cb89d5dcb30df664bfc4d8f1c3 by vyng
[lld-macho] Fix dangling string reference when adding frameworks

In Driver.cpp, addFramework used std::string instance to represent the path of a framework, which will be freed after the function returns. However, this string is stored in loadedArchive, which will be used later to compare with path of newly added frameworks. This caused https://bugs.llvm.org/show_bug.cgi?id=52133. A test is included in this commit to reproduce this bug.

Now resolveDylibPath returns a StringRef instance, and it uses StringSaver to save its data, then returns it to functions on the top. This ensures the resolved framework path is still valid after LC_LINKER_OPTION is parsed.

Reviewed By: int3, #lld-macho, oontvoo

Differential Revision: https://reviews.llvm.org/D111706
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/Driver.h
The file was modifiedlld/test/MachO/lc-linker-option.ll
The file was modifiedlld/MachO/DriverUtils.cpp
The file was modifiedlld/MachO/InputFiles.cpp
Commit 16be17ad4b13deb23c893c3c668076e70b07f289 by balazs.benics
[analyzer][NFC] Refactor llvm::isa<> usages in the StaticAnalyzer

It turns out llvm::isa<> is variadic, and we could have used this at a
lot of places.

The following patterns:
  x && isa<T1>(x) || isa<T2>(x) ...
Will be replaced by:
  isa_and_non_null<T1, T2, ...>(x)

Sometimes it caused further simplifications, when it would cause even
more code smell.

Aside from this, keep in mind that within `assert()` or any macro
functions, we need to wrap the isa<> expression within a parenthesis,
due to the parsing of the comma.

Reviewed By: martong

Differential Revision: https://reviews.llvm.org/D111982
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/SValBuilder.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/SymbolManager.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/CallEvent.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/Environment.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/RegionStore.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/CheckerContext.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngine.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/Store.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporter.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/LoopWidening.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/MemRegion.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
Commit a29dfc089d18b542694cd26a06bee822ab90fb56 by craig.topper
[RISCV] Use clang_builtin_alias for all RISCV vector intrinsics.

Previously we used builtin_alias for overloaded intrinsics, but
macros for the non-overloaded version. This patch changes the
non-overloaded versions to also use builtin_alias, but without
the overloadable attribute.

Reviewed By: khchen, HsiangKai

Differential Revision: https://reviews.llvm.org/D112020
The file was modifiedclang/utils/TableGen/RISCVVEmitter.cpp
Commit eabf11f9ea8d647d78e455664658b4faf8880029 by fraser
[CodeGenPrepare] Avoid a scalable-vector crash in ctlz/cttz

This patch fixes a crash when despeculating ctlz/cttz intrinsics with
scalable-vector types. It is not safe to speculatively get the size of
the vector type in bits in case the vector type is not a fixed-length type. As
it happens this isn't required as vector types are skipped anyway.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D112141
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was addedllvm/test/Transforms/CodeGenPrepare/RISCV/lit.local.cfg
The file was addedllvm/test/Transforms/CodeGenPrepare/RISCV/cttz-ctlz.ll
Commit fe66433fe119819a033827610f7eae4cdd8b1470 by aeubanks
[clang] Add plugin ActionType to run command line plugin before main action

Currently we have a way to run a plugin if specified on the command line
after the main action, and ways to unconditionally run the plugin before
or after the main action, but no way to run a plugin if specified on the
command line before the main action.

This introduces the missing option.

This is helpful because -clear-ast-before-backend clears the AST before
codegen, while some plugins may want access to the AST.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D112096
The file was addedclang/examples/PluginsOrder/PluginsOrder.cpp
The file was modifiedclang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
The file was addedclang/examples/PluginsOrder/CMakeLists.txt
The file was modifiedclang/lib/Frontend/FrontendAction.cpp
The file was modifiedclang/include/clang/Frontend/FrontendAction.h
The file was modifiedclang/test/CMakeLists.txt
The file was addedclang/test/Frontend/plugins-order.c
The file was modifiedclang/examples/CMakeLists.txt
Commit c4c7e06bd700aeccfbe5c1f075bd5897f54b68f2 by Shraiysh.Vaishay
[MLIR][OpenMP] Shifted hint from CriticalOp to CriticalDeclareOp

According to the OpenMP 5.0 standard, names and hints of critical operation are
closely related. The following are the restrictions on them:
- Unless the effect is as if `hint(omp_sync_hint_none)` was specified, the
   critical construct must specify a name.
- If the hint clause is specified, each of the critical constructs with the
   same name must have a hint clause for which the hint-expression evaluates to
   the same value.

These restrictions will be enforced by design if the hint expression is a part
of the `omp.critical.declare` operation.
- Any operation with no "name" will be considered to have
   `hint(omp_sync_hint_none)`.
- All the operations with the same "name" will have the same hint value.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D112134
The file was modifiedmlir/test/Dialect/OpenMP/ops.mlir
The file was modifiedmlir/test/Target/LLVMIR/openmp-llvm.mlir
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
The file was modifiedmlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
The file was modifiedmlir/test/Dialect/OpenMP/invalid.mlir
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
Commit ea9a0556b451a6c439299842ba71972e25dac6e6 by spatel
[InstCombine] add tests for casted insertelement; NFC
The file was addedllvm/test/Transforms/InstCombine/bitcast-inselt-bitcast.ll
Commit 99d1ce4a621aff2871f64c856545545f112051dc by nawrin.sultana
[OpenMP] Add GOMP allocator functions

This patch adds GOMP_alloc and GOMP_free functions of LIBGOMP.

Differential revision: https://reviews.llvm.org/D111673
The file was modifiedopenmp/runtime/src/kmp_gsupport.cpp
The file was modifiedopenmp/runtime/src/exports_so.txt
The file was modifiedopenmp/runtime/src/kmp_ftn_os.h
Commit e1fb13401e1b90a912ba83c6d1a82794cfdb8aec by tlively
[WebAssembly] Add prototype relaxed float min max instructions

Add relaxed. f32x4.min, f32x4.max, f64x2.min, f64x2.max. These are only
exposed as builtins, and require user opt-in.

Differential Revision: https://reviews.llvm.org/D112146
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedllvm/test/MC/WebAssembly/simd-encodings.s
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-intrinsics.ll
The file was modifiedllvm/include/llvm/IR/IntrinsicsWebAssembly.td
The file was modifiedclang/include/clang/Basic/BuiltinsWebAssembly.def
The file was modifiedclang/test/CodeGen/builtins-wasm.c
Commit 6b6564fcf9f5cce91630d1888d7e95b187bfc320 by saugustine
Fix unused variable warning.
The file was modifiedcompiler-rt/lib/fuzzer/tests/FuzzerUnittest.cpp
Commit 310736e098f874bb324d1b96d62682e9fb005015 by zinenko
[mlir] fix region property generation in python bindings
The file was modifiedmlir/test/mlir-tblgen/op-python-bindings.td
The file was modifiedmlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
Commit 7562f3df89066ab92a816dc23005c45fd642bdf9 by llvm-dev
InvalidPtrChecker - don't dereference a dyn_cast<> - use cast<> instead.

Avoid dereferencing a nullptr returned by dyn_cast<>, by using cast<> instead which asserts that the cast is valid.
The file was modifiedclang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp
Commit 08ed216000b6503a4a4be52f18394d008d5fb8f4 by i
[IR] Refactor GlobalIFunc to inherit from GlobalObject, Remove GlobalIndirectSymbol

As discussed in:
* https://reviews.llvm.org/D94166
* https://lists.llvm.org/pipermail/llvm-dev/2020-September/145031.html

The GlobalIndirectSymbol class lost most of its meaning in
https://reviews.llvm.org/D109792, which disambiguated getBaseObject
(now getAliaseeObject) between GlobalIFunc and everything else.
In addition, as long as GlobalIFunc is not a GlobalObject and
getAliaseeObject returns GlobalObjects, a GlobalAlias whose aliasee
is a GlobalIFunc cannot currently be modeled properly. Creating
aliases for GlobalIFuncs does happen in the wild (e.g. glibc). In addition,
calling getAliaseeObject on a GlobalIFunc will currently return nullptr,
which is undesirable because it should return the object itself for
non-aliases.

This patch refactors the GlobalIFunc class to inherit directly from
GlobalObject, and removes GlobalIndirectSymbol (while inlining the
relevant parts into GlobalAlias and GlobalIFunc). This allows for
calling getAliaseeObject() on a GlobalIFunc to return the GlobalIFunc
itself, making getAliaseeObject() more consistent and enabling
alias-to-ifunc to be properly modeled in the IR.

I exercised some judgement in the API clients of GlobalIndirectSymbol:
some were 'monomorphized' for GlobalAlias and GlobalIFunc, and
some remained shared (with the type adapted to become GlobalValue).

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D108872
The file was modifiedllvm/lib/Bitcode/Reader/MetadataLoader.cpp
The file was modifiedllvm/unittests/IR/ConstantsTest.cpp
The file was modifiedllvm/include/llvm/AsmParser/LLParser.h
The file was modifiedllvm/include/llvm-c/Core.h
The file was modifiedllvm/lib/Transforms/IPO/LowerTypeTests.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/lib/Transforms/Utils/SplitModule.cpp
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was removedllvm/include/llvm/IR/GlobalIndirectSymbol.h
The file was modifiedllvm/include/llvm/IR/Value.h
The file was modifiedllvm/lib/Object/ModuleSymbolTable.cpp
The file was modifiedllvm/include/llvm/IR/GlobalAlias.h
The file was modifiedllvm/lib/Linker/IRMover.cpp
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/ValueMapper.h
The file was modifiedllvm/lib/Transforms/Utils/ValueMapper.cpp
The file was modifiedllvm/include/llvm/IR/GlobalObject.h
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinter.h
The file was modifiedllvm/include/llvm/IR/GlobalIFunc.h
The file was modifiedllvm/lib/IR/AsmWriter.cpp
The file was modifiedllvm/lib/IR/Globals.cpp
Commit 2caf7571e1020ae1024ab3f2d52ecc9aea85687d by Akira
[Clang][AST] Resolve FIXME: Remove ObjCObjectPointer from
isSpecifierType

There is no reason to have this here, (since all tests pass) and it
isn't even a specifier anyway. We can just treat it as a pointer
instead.

Differential Revision: https://reviews.llvm.org/D110068
The file was modifiedclang/lib/AST/Type.cpp
The file was modifiedclang/lib/AST/DeclPrinter.cpp
Commit 00500d5bad2270ea244adfdc6a48171968f88901 by aeubanks
[NFC] De-template LazyCallGraph::visitReferences() and move into .cpp file

This makes changing it and recompiling it much faster.
The file was modifiedllvm/include/llvm/Analysis/LazyCallGraph.h
The file was modifiedllvm/lib/Analysis/LazyCallGraph.cpp
Commit 6b82adbb4980593f4661edf94e5539adfe1a9f4e by muiez
Raise compile error when using unimplemented functions

The path functions in this patch are unimplemented (as per the TODO comment from upstream). To avoid running into a linker error (missing symbol), this patch raises a compile error by commenting out the functions, which is more user friendly.

Differential Revision: https://reviews.llvm.org/D111892
The file was modifiedlibcxx/include/filesystem
Commit 503d061dc7a8b36dba1df4bf083021a2482c6fb6 by Stanislav.Mekhanoshin
Precommit InstCombine/and-xor-or.ll test. NFC.
The file was modifiedllvm/test/Transforms/InstCombine/and-xor-or.ll
Commit fb8829768d774689c368c49cb3ca17339378cd91 by thakis
[clang] Disallow mixing SEH and Objective-C exceptions

We already disallow mixing SEH and C++ exceptions, and
mixing SEH and Objective-C exceptions seems to not work (see PR52233).
Emitting an error is friendlier than crashing.

Differential Revision: https://reviews.llvm.org/D112157
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was addedclang/test/SemaCXX/exceptions-seh.mm
The file was modifiedclang/lib/Sema/ScopeInfo.cpp
The file was modifiedclang/include/clang/Sema/ScopeInfo.h
Commit 5692ed0cce8c9506eef40ffe6ca2d9629956c51c by blangmuir
[ORC-RT] Configure the ORC runtime for more architectures and platforms

Enable building the ORC runtime for 64-bit and 32-bit ARM architectures,
and for all Darwin embedded platforms (iOS, tvOS, and watchOS). This
covers building the cross-platform code, but does not add TLV runtime
support for the new architectures, which can be added independently.

Incidentally, stop building the Mach-O TLS support file unnecessarily on
other platforms.

Differential Revision: https://reviews.llvm.org/D112111
The file was modifiedcompiler-rt/cmake/config-ix.cmake
The file was modifiedcompiler-rt/lib/orc/elfnix_tls.x86-64.S
The file was modifiedcompiler-rt/lib/orc/macho_tlv.x86-64.S
The file was modifiedcompiler-rt/lib/orc/simple_packed_serialization.h
The file was modifiedcompiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
The file was modifiedcompiler-rt/lib/orc/CMakeLists.txt
Commit 80ab06c599a0f5a90951c36a57b2a9b492b19d61 by spatel
[InstCombine] fold fake vector insert to bit-logic

bitcast (inselt (bitcast X), Y, 0) --> or (and X, MaskC), (zext Y)

https://alive2.llvm.org/ce/z/Ux-662

Similar to D111082 / db231ebdb07f :
We want to avoid relatively opaque vector ops on types that are
likely supported by the backend as scalar integers. The bitwise
logic ops are more likely to allow further combining.

We probably want to generalize this to allow a shift too, but
that would oppose instcombine's general rule of not creating
extra instructions, so that's left as a potential follow-up.
Alternatively, we could do that transform in VectorCombine
with the help of the TTI cost model.

This is part of solving:
https://llvm.org/PR52057
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/test/Transforms/InstCombine/bitcast-inselt-bitcast.ll
Commit 1412719066a6efdfdb35a400d589d84a0ef83f28 by thakis
[lld/mac] Remove else-after-return in ICF code

No behavior change.
The file was modifiedlld/MachO/ICF.cpp
Commit 5d57578a4e48e4b4cdd41533670a012ad265c8a1 by thakis
[MC] Recursively calculate symbol offset

This is speculative since I'm not sure if there's some implicit contract that a
variable symbol must not have another variable symbol in its evaluation tree.

Downstream bug: https://bugs.chromium.org/p/chromium/issues/detail?id=471146#c23.

Test is based on alias.s (removed checks since we just need to know it didn't
crash).

Differential Revision: https://reviews.llvm.org/D109109
The file was addedllvm/test/MC/MachO/chained-alias-offset.s
The file was modifiedllvm/lib/MC/MCFragment.cpp
Commit 618583565687f5a494066fc902a977f6057fc93e by Stanislav.Mekhanoshin
[AMDGPU] Allow rematerialization of SOP with virtual registers

D106408 was doing this for all targets although it was
reverted due to couple performance regressions on some targets.
The difference for AMDGPU is the ability to rematerialize SOP
instructions with virtual register uses like we already do for VOP.

Differential Revision: https://reviews.llvm.org/D110743
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/remat-sop.mir
Commit c80d8a8ceabb5c42e0143d9507394068075538f9 by Stanislav.Mekhanoshin
[AMDGPU] MachineLICM cannot hoist VALU

MachineLoop::isLoopInvariant() returns false for all VALU
because of the exec use. Check TII::isIgnorableUse() to
allow hoisting.

That unfortunately results in higher register consumption
since MachineLICM does not adequately estimate pressure.
Therefor I think it shall only be enabled after D107677 even
though it does not depend on it.

Differential Revision: https://reviews.llvm.org/D107859
The file was modifiedllvm/test/CodeGen/AMDGPU/urem64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/global-atomics-fp.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/dag-divergence-atomic.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/indirect-call.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mul24-pass-ordering.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/wave32.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/srem64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/unstructured-cfg-def-use-issue.ll
The file was modifiedllvm/lib/CodeGen/MachineLoopInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/udiv64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fp64-atomics-gfx90a.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sdiv64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/infinite-loop.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/vgpr-descriptor-waterfall-loop-idom-update.ll
Commit 207998c242c8c8a270ff22a5136da87338546725 by Jonas Devlieghere
[lldb] Remove variable "any" which is set but not used
The file was modifiedlldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
Commit b046eb19b8a42ffa3b4742e765cc013d3eefd6b5 by Jon Roelofs
[AArch64][GlobalISel] combine (and (or x, c1), c2) => (and x, c2) iff c1 & c2 == 0

https://godbolt.org/z/h8ejrG4hb

rdar://83597585

Differential Revision: https://reviews.llvm.org/D111856
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/combine-and-or-disjoint-mask.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
Commit a3dd4e777095f9668215a3babab1041025819f64 by ataei
Drop transfer_read inner most unit dimensions

Add a pattern to take a rank-reducing subview and drop inner most
contiguous unit dim.
This is useful when lowering vector to backends with 1d vector types.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D111561
The file was addedmlir/test/Dialect/Vector/vector-transfer-collapse-inner-most-dims.mlir
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorTransforms.h
The file was modifiedmlir/lib/Dialect/Vector/VectorTransforms.cpp
The file was modifiedmlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
Commit 4e21caece0dd72450b6ac72d1bcedd697c666efc by erich.keane
Update ext-int test to have x86 linux/windows before ABI Impl

Writing a quick test to make sure we are aware of the change to the
_ExtInt/_BitInt ABI on x86 (32bit) OSes.
The file was modifiedclang/test/CodeGenCXX/ext-int.cpp
Commit 02d7089c239075a5c2e148087d2824d253fc3d5f by clementval
[fir] Add Character helper

This patch is extracted from D111337. It introduce the
CharacterExprHelper that helps dealing with character in FIR.

Reviewed By: schweitz, awarzynski

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
The file was modifiedflang/include/flang/Optimizer/Dialect/FIRType.h
The file was modifiedflang/unittests/Optimizer/CMakeLists.txt
The file was modifiedflang/include/flang/Optimizer/Dialect/FIROpsSupport.h
The file was addedflang/lib/Optimizer/Builder/Character.cpp
The file was modifiedflang/unittests/Optimizer/Builder/FIRBuilderTest.cpp
The file was modifiedflang/include/flang/Optimizer/Builder/FIRBuilder.h
The file was modifiedflang/lib/Optimizer/Builder/FIRBuilder.cpp
The file was addedflang/unittests/Optimizer/Builder/CharacterTest.cpp
The file was addedflang/include/flang/Optimizer/Builder/Character.h
The file was modifiedflang/lib/Optimizer/Builder/CMakeLists.txt
Commit 35037ae1971a92b07783339ee9d7a5da50a2ab4b by erich.keane
Make dr177x.cpp test work with Windows-32 bit platfroms with 'thiscall'.

My downstream noticed that the test failed on windows-32 bit machines
since the types have __attribute__((thiscall)) on them in a few places.
This patch just adds a wildcard to handle that, since it isn't
particularly important to the test.
The file was modifiedclang/test/CXX/drs/dr177x.cpp
Commit bd5494d127a39f619b7d0e5e967f190e0e61d6e7 by ajcbik
[mlir][sparse] make index type explicit in public API of support library

The current implementation used explicit index->int64_t casts for some, but
not all instances of passing values of type "index" in and from the sparse
support library. This revision makes the situation more consistent by
using new "index_t" type at all such places  (which allows for less trivial
casting in the generated MLIR code).  Note that the current revision still
assumes that "index" is 64-bit wide. If we want to support targets with
alternative "index" bit widths, we need to build the support library different.
But the current revision is a step forward by making this requirement explicit
and more visible.

Reviewed By: wrengr

Differential Revision: https://reviews.llvm.org/D112122
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
The file was modifiedmlir/lib/ExecutionEngine/SparseUtils.cpp
The file was modifiedmlir/test/Dialect/SparseTensor/conversion.mlir
Commit 8977bd58067d9dcd5e8cebd078c45ff629af9e1d by flo
[IndVars] Invalidate SCEV when IR is changed in rewriteLoopExitValue.

At the moment, rewriteLoopExitValue forgets the current phi node in the
loop that collects phis to rewrite. A few lines after the value is
forgotten, SCEV is used again to analyze incoming values and
potentially expand SCEV expression. This means that another SCEV is
created for PN, before the IR is actually updated in the next loop.

This leads to accessing invalid cached expression in combination with
D71539.

PN should only be changed once the actual incoming exit value is set in
the next loop. Moving invalidation there should ensure that PN is
invalidated in all relevant cases.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D111495
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedllvm/test/Transforms/IndVarSimplify/elim-extend.ll
The file was modifiedllvm/test/Transforms/IndVarSimplify/invalidate-modified-lcssa-phi.ll
Commit 3c59cdee5caabdfc7735579cb43fbb5af18b6103 by Stanislav.Mekhanoshin
Precommit updated InstCombine/and-xor-or.ll test. NFC.
The file was modifiedllvm/test/Transforms/InstCombine/and-xor-or.ll
Commit 8dc44d8dd872eadf112c43fa7784110a43ccb683 by erich.keane
Remove include of 'type_info' from ext-int test.

Originally I thought that I needed to do a #include to trick the
compiler into letting me use typeid I believe, but Aaron explained that
it was just looking for the type_info type.  I had to give it some
public/private members to make it emit the same as before, but this
ought to be a 'perfect' replacement.
The file was modifiedclang/test/CodeGenCXX/ext-int.cpp
Commit b92412fb286be26d6f033b9ec283b1b18cb57869 by Stanislav.Mekhanoshin
[InstCombine] Fold `(a & ~b) & ~c` to `a & ~(b | c)`

  %not1 = xor i32 %b, -1
  %not2 = xor i32 %c, -1
  %and1 = and i32 %a, %not1
  %and2 = and i32 %and1, %not2
=>
  %i1 = or i32 %b, %c
  %i2 = xor i32 %1, -1
  %and2 = and i32 %i2, %a

Differential Revision: https://reviews.llvm.org/D112108
The file was modifiedllvm/test/Transforms/InstCombine/and-xor-or.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Commit 048688fd80fadce1c72c365b0d74599a33389cfb by Louis Dionne
[libc++] Fix incorrect main() signatures in the tests

Those creep up from time to time. We need to use `int main(int, char**)`
because in freestanding mode, `main` doesn't get special treatment and
special mangling, so we setup a symbol alias from the mangled version of
`main(int, char**)` to `extern "C" main`. That only works if all the tests
are consistent about how they define their main function.
The file was modifiedlibcxx/test/std/utilities/utility/utility.intcmp/intcmp.in_range/in_range.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_not_equal/cmp_not_equal.pass.cpp
The file was modifiedlibcxx/test/std/utilities/function.objects/refwrap/refwrap.const/deduct.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_greater_equal/cmp_greater_equal.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp
The file was modifiedlibcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor.pass.cpp
The file was modifiedlibcxx/test/std/utilities/function.objects/refwrap/refwrap.const/type_conv_ctor2.pass.cpp
The file was modifiedlibcxx/test/std/utilities/tuple/tuple.tuple/PR38601.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_equal/cmp_equal.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_less/cmp_less.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_greater/cmp_greater.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_less_equal/cmp_less_equal.pass.cpp
Commit 40163f1df8c60f987e8adc0cb78edb289f73b771 by spatel
[x86] add special-case lowering for usubsat for AVX512

This is a small extension of D112095 to avoid another regression
seen with D112085.
In this case, we allow the same conversion from usubsat to ALU
ops if the target supports vpternlog.

That pattern will get converted later in X86DAGToDAGISel::tryVPTERNLOG().
This seems better than putting a magic immediate constant directly in
this code to create the exact vpternlog that we need. It's possible that
there are other special-cases along these lines, so we should try to
keep all of the vpternlog magic in one place.

Differential Revision: https://reviews.llvm.org/D112138
The file was modifiedllvm/test/CodeGen/X86/psubus.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 676d091c630c6a4d19a865a74260397ea661e5c3 by clementval
Revert "[fir] Add Character helper"

This reverts commit 02d7089c239075a5c2e148087d2824d253fc3d5f.
The file was removedflang/unittests/Optimizer/Builder/CharacterTest.cpp
The file was modifiedflang/include/flang/Optimizer/Builder/FIRBuilder.h
The file was modifiedflang/include/flang/Optimizer/Dialect/FIROpsSupport.h
The file was modifiedflang/unittests/Optimizer/CMakeLists.txt
The file was removedflang/lib/Optimizer/Builder/Character.cpp
The file was modifiedflang/lib/Optimizer/Builder/FIRBuilder.cpp
The file was modifiedflang/unittests/Optimizer/Builder/FIRBuilderTest.cpp
The file was removedflang/include/flang/Optimizer/Builder/Character.h
The file was modifiedflang/include/flang/Optimizer/Dialect/FIRType.h
The file was modifiedflang/lib/Optimizer/Builder/CMakeLists.txt
Commit 8e4ae603d6ec7658df86302d122fb24968524164 by nikita.ppv
[Tests] Add tests for non-speculatable ephemeral values

The loads in these examples are currently not considered ephemeral
because they are not speculatable.
The file was modifiedllvm/test/Transforms/SimplifyCFG/unprofitable-pr.ll
The file was modifiedllvm/test/Transforms/Inline/ephemeral.ll
Commit ff5050a3a4f2965aaddfce2f6b182476c11d78f3 by Louis Dionne
[libc++abi] Guard include of <unistd.h> behind __has_include

This doesn't change anything on platforms that have <unistd.h>, but
it will allow this file to compile on platforms that do not.
The file was modifiedlibcxxabi/src/cxa_guard_impl.h
Commit 070a2ddcb6657f1b497b8003384bae31e27e497d by Louis Dionne
[libunwind] Revert "Use the from-scratch testing configuration by default"

This reverts commit 5a8ad80b6fa5cbad58b78384f534b78fca863e7f, which broke
the Bootstrapping build. I'm reverting until we've fixed the issue.

Differential Revision: https://reviews.llvm.org/D112082
The file was modifiedlibunwind/CMakeLists.txt
Commit 3cea2505fd8d99a9ba0cb625aecfe28a47c4e3f8 by Louis Dionne
[runtimes] Rename CI job from "Runtimes build" to "Bootstrapping build"
The file was modifiedlibcxx/utils/ci/run-buildbot
The file was modifiedlibcxx/utils/ci/buildkite-pipeline.yml
Commit f3671de5500ff1f8210419226a9603a7d83b1a31 by blangmuir
Revert "[ORC-RT] Configure the ORC runtime for more architectures and platforms"

Broke on aarch64-linux. Reverting while I investigate.

This reverts commit 5692ed0cce8c9506eef40ffe6ca2d9629956c51c.
The file was modifiedcompiler-rt/lib/orc/simple_packed_serialization.h
The file was modifiedcompiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
The file was modifiedcompiler-rt/lib/orc/elfnix_tls.x86-64.S
The file was modifiedcompiler-rt/cmake/config-ix.cmake
The file was modifiedcompiler-rt/lib/orc/CMakeLists.txt
The file was modifiedcompiler-rt/lib/orc/macho_tlv.x86-64.S
Commit cb9a0dc293cf4ca451d625c6a54e491d8c11e591 by kosov.pavel
[ARM] Fix inline assembly referencing floating point registers on soft-float targets

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

Reviewed By: nickdesaulniers

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

OS Laboratory, Huawei Russian Research Institute, Saint-Petersburg
The file was modifiedclang/lib/Basic/Targets/ARM.cpp
The file was modifiedclang/lib/Basic/Targets/ARM.h
The file was addedclang/test/Sema/arm_inline_asm_constraints_no_fp_regs.c
Commit 6ea7437ca5a4f8aff895d940cd8b0e5b65419f86 by aeubanks
[SelectionDAG] Bail out of mergeTruncStores when not optimizing

With unoptimized code, we may see lots of stores and spend too much time in mergeTruncStores.

Fixes PR51827.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D111596
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 9ef55ddc3fe20bcf7d91cce5da67d2c483361272 by jezng
[lld-macho] Temporarily disable lc-linker-option.ll on Windows

It's currently using a symlink, which is not supported on Windows.
The file was modifiedlld/test/MachO/lc-linker-option.ll
Commit 4e1a6c07052b466a2a1cd0c3ff150e4e89a6d87a by eugenis
[msan] Add stat-family interceptors on Linux

Add following interceptors on Linux: stat, lstat, fstat, fstatat.

This fixes use-of-uninitialized value on platforms with GLIBC 2.33+.
In particular: Arch Linux, Ubuntu hirsute/impish.

The tests should have also been failing during the release on the mentioned platforms, but I cannot find any related discussion.

Most likely, the regression was introduced by glibc commit [[ https://github.com/bminor/glibc/commit/8ed005daf0ab03e142500324a34087ce179ae78e | 8ed005daf0ab03e14250032 ]]:
all stat-family functions are now exported as shared functions.

Before, some of them (namely stat, lstat, fstat, fstatat) were provided as a part of libc_noshared.a and called their __xstat dopplegangers. This is still true for Debian Sid and earlier Ubuntu's. stat interceptors may be safely provided for them, no problem with that.

Closes https://github.com/google/sanitizers/issues/1452.
See also https://jira.mariadb.org/browse/MDEV-24841

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D111984
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
The file was modifiedcompiler-rt/lib/msan/msan_interceptors.cpp
Commit b75f3dd88e25d73e75981dda1ccfa36a9a7a54ce by craig.topper
[ARM] Use correct name of floating point ceil intrinsic in test.

The intrinsic is called llvm.ceil not llvm.fceil. The checks weren't
strong enough to notice that a call to llvm.fceil was emitted in
the final assembly.
The file was modifiedllvm/test/CodeGen/ARM/vfloatintrinsics.ll
Commit 34188f237f2574dda2447d85fe2b1aa65b5321ce by brad
[Driver][OpenBSD] Some improvements to the external assembler handling

- Pass CPU variant for ARM
- Pass MIPS CPU in addition to the ABI
The file was modifiedclang/lib/Driver/ToolChains/OpenBSD.cpp
The file was modifiedclang/test/Driver/openbsd.c
Commit dc2be87ecf10f2f1cf05f638a72256387c78f1c1 by qiaopeixin
[MLIR][OpenMP] Add support for ordered construct

This patch supports the ordered construct in OpenMP dialect following
Section 2.19.9 of the OpenMP 5.1 standard. Also lowering to LLVM IR
using OpenMP IRBduiler. Lowering to LLVM IR for ordered simd directive
is not supported yet since LLVM optimization passes do not support it
for now.

Reviewed By: kiranchandramohan, clementval, ftynse, shraiysh

Differential Revision: https://reviews.llvm.org/D110015
The file was modifiedmlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
The file was modifiedmlir/test/Target/LLVMIR/openmp-llvm.mlir
The file was modifiedmlir/test/Dialect/OpenMP/invalid.mlir
The file was modifiedmlir/test/Dialect/OpenMP/ops.mlir
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
Commit c5931267db26d71351c634df06006d9c818ff158 by vsapsai
[modules] While merging ObjCInterfaceDecl definitions, merge them as decl contexts too.

While working on https://reviews.llvm.org/D110280 I've tried to merge
decl contexts as it seems to be correct and matching our handling of
decl contexts from different modules. It's not required for the fix in
https://reviews.llvm.org/D110280 but it revealed a missing diagnostic,
so separating this change into a separate commit.

Renamed some variables to distinguish diagnostic like "declaration of
'x' does not match" for different cases.

Differential Revision: https://reviews.llvm.org/D110287
The file was modifiedclang/test/Modules/odr_hash.mm
The file was modifiedclang/lib/Serialization/ASTReaderDecl.cpp
Commit edff0070a126d9a27263958dbb22133f4ed6526e by shengchen.kan
[Codegen] Set ARITH_FENCE as meta-instruction

ARITH_FENCE, which was added by https://reviews.llvm.org/D99675,
should be a meta-instruction b/c it only emits comments "ARITH_FENCE".

Reviewed By: pengfei, LuoYuanke

Differential Revision: https://reviews.llvm.org/D112127
The file was modifiedllvm/unittests/MIR/MachineMetadata.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineInstr.h
Commit 6b715e9c4d9cc00f59906d48cd57f4c767229093 by vyng
[lld-macho][nfc] Added some notes on deliberate differences btw LD64 vs LLD-MACHO

For future references and to help with debugging crashes, this could be useful.

Differential Revision: https://reviews.llvm.org/D110464
The file was addedlld/MachO/ld64-vs-lld.rst
Commit 6742c8a2d83a7f02312e49e02cce2b25d554ec95 by Vitaly Buka
[NFC][msan] Break the loop when done

We have nothing to do after the Argument
is found.
The file was modifiedllvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Commit 60a8db6dc5a4f4d3c309166ff68432aa13e710e1 by Vitaly Buka
[NFC][msan] Rerun update_test_checks.py for a test
The file was modifiedllvm/test/Instrumentation/MemorySanitizer/msan_eager.ll
Commit 66b650f3da70e45ca40ffa281df79e044c28fe04 by Vitaly Buka
[NFC][msan] Add NormalArgAfterNoUndef testcase
The file was modifiedllvm/test/Instrumentation/MemorySanitizer/msan_eager.ll
Commit 1302fdc233f424dbc8d15d7d88dc894dd6cdbb6c by ikudrin
[ELF] Avoid adding an orphan section to a less suitable segment

If segments are defined in a linker script, placing an orphan section
before the found closest-rank section can result in adding it in a
previous segment and changing flags of that segment. This happens if
the orphan section has a lower sort rank than the found section. To
avoid that, the patch forces orphan sections to be moved after the
found section if segments are explicitly defined.

Differential Revision: https://reviews.llvm.org/D111717
The file was modifiedlld/test/ELF/linkerscript/implicit-program-header.test
The file was addedlld/test/ELF/linkerscript/orphan-phdrs2.test
The file was modifiedlld/ELF/Writer.cpp
The file was modifiedlld/test/ELF/aarch64-thunk-pi.s
Commit cb11ddb96c47538545913de527906aa6f9cdc76f by joker.eph
Revert "[MLIR][OpenMP] Add support for ordered construct"

This reverts commit dc2be87ecf10f2f1cf05f638a72256387c78f1c1.

Seems like this broke all the CI bots.
The file was modifiedmlir/test/Target/LLVMIR/openmp-llvm.mlir
The file was modifiedmlir/test/Dialect/OpenMP/ops.mlir
The file was modifiedmlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
The file was modifiedmlir/test/Dialect/OpenMP/invalid.mlir