Changes

Summary

  1. [llvm-readobj] Delete redundant 'static' from namespace scope 'static const'. NFC (details)
  2. [tools] Delete redundant 'static' from namespace scope 'static const'. NFC (details)
  3. [lldb] Fix nullptr dereference in AppleObjCRuntimeV2 (details)
  4. [libomptarget] Refactor DeviceRTL prior to AMDGPU bringup (details)
  5. first draft of a written policy around git repos (details)
  6. [Driver][Gnu] Support -shared -static: pass -shared to ld and use crtbeginS.o (details)
  7. [llvm-shlib] Fix windows build failed while llvm non-standalone building. (details)
  8. [lldb] [ABI/X86] Support combining xmm* and ymm*h regs into ymm* (details)
  9. [DebugInfo][InstrRef] Fix Wdangling-else warning in InstrRefLDVTest (details)
  10. [DebugInfo][NFC] Zero-initialize a class field (details)
  11. [mlir][RFC] Refactor layout representation in MemRefType (details)
  12. [lldb] Filter duplicates in Target::GetScratchTypeSystems (details)
  13. [lldb] change name demangling to be consistent between windows and linx (details)
  14. [lldb] Allow dumping the state of all scratch TypeSystems (details)
  15. [lldb] Reduce code duplication around inferior building (details)
  16. [DebugInfo][InstrRef] Avoid un-necessary densemap copies and comparisons (details)
  17. Revert "[lldb] [ABI/X86] Support combining xmm* and ymm*h regs into ymm*" (details)
  18. [lldb] Adjust udt-layout.test after MS mangling change (details)
  19. [clangd] Add code completion of param name on /* inside function calls. (details)
  20. [lldb] [Host] Make Terminal methods return llvm::Error (details)
  21. [lldb] [ABI/X86] Refactor ABIX86::AugmentRegisterInfo() (details)
  22. [MLIR][OpenMP] Added parseClauses (details)
  23. [fir] Add FIRBuilder utility functions (details)
  24. [runtimes] Make sure LLVM_LIT_ARGS is set before including individual runtimes (details)
  25. Canonicalize max/min operations on integers. (details)
  26. [lldb] [Process/Utility] Fix value_regs/invalidate_regs for ARM (details)
  27. [HWASan] Use tagged-globals feature on x86. (details)
  28. Revert "[lldb] [Process/Utility] Fix value_regs/invalidate_regs for ARM" (details)
  29. [ADT] Add APInt::isNegatedPowerOf2() helper (details)
  30. [lldb] [Process/Utility] clang-format RegisterInfos_arm.h (details)
  31. [lldb] [Process/Utility] Define sN regs on ARM via helper macro (details)
  32. [libc++][docs] Mark LWG3420 complete (details)
  33. [AArch64] Always add -tune-cpu argument to -cc1 driver (details)
  34. [PowerPC] Restrict various P10 options to P10 only. (details)
  35. [MLIR][OpenMP][NFC] Moved Synchronization Hint related functions (details)
  36. Fix documentation errors introduced by 607fb1bb8c91a2f284d8c63f3066ab8cc1a66955 (details)
  37. [AArch64] Split out processor/tuning features (details)
  38. Changes to print-changed classes in preparation for DotCfg change printer (details)
  39. [lldb] [Process/Utility] Define dN regs on ARM via helper macro (details)
  40. [Driver, Frontend] Use StringRef::contains (NFC) (details)
  41. [libunwind] Add a from-scratch config for running libunwind tests (details)
  42. [OpenMP] Remove macro guards for device debugging (details)
  43. [clang-tidy] Support globbing in NOLINT* expressions (details)
  44. Use reference type in for loop (details)
  45. [Verifier] Add context for assume operand bundles verifier errors (details)
  46. [debugserver] Fix BUILDING_FOR_ARM64_OSX (details)
  47. Remove unneeded variable num_found. (details)
  48. [libc++] [test] Add tests for converting array types in shared_ptr. (details)
  49. [x86] add tests for psubus; NFC (details)
  50. [AMDGPU] add test for usubsat; NFC (details)
  51. Fix clang-tidy warnings in MLIR Python bindings (NFC) (details)
  52. [runtimes] Trigger CI on changes to libunwind (details)
  53. [libc++][NFC] Mark LWG3573 as complete (details)
  54. [libc++] Make __weekday_from_days private in weekday (details)
  55. [LoopPredication] Calculate profitability without BPI (details)
  56. [RISCV] Use llvm::stable_sort instead of std::stable_sort. NFC (details)
  57. [indvars] Canonicalize exit conditions to unsigned using range info (details)
  58. Extend transform introduced in D111896 to multiple exits (details)
  59. [SCEV] Avoid compile time explosion in ScalarEvolution::isImpliedCond (details)
  60. Revert "Reland [clang] Pass -clear-ast-before-backend in Clang::ConstructJob()" (details)
  61. [SCEV] Fix formatting error introduced by D112080 (details)
  62. [lldb] improve the help strings for gdb-remote and kdp-remote (details)
  63. [cuda] Add address space predicate funuctions. (details)
  64. [lldb/test] Update test/API/functionalities/load_lazy to macOS 12 (details)
  65. [driver] Explicitly specify `-fbuild-session-timestamp` in seconds. (details)
  66. [fir] Add character utility functions in FIRBuilder (details)
  67. [x86] add tests for psubus; NFC (details)
  68. [clang][Driver] Make multiarch output file basenames reproducible (details)
  69. [x86] add special-case lowering for usubsat for pre-SSE4 (details)
  70. [Driver][Gnu] Delete unneeded -Bstatic dispatch for arm/thumb (details)
  71. [llvm-reduce] Add reduction passes to reduce operands to undef/1/0 (details)
  72. [WebAssembly] Emit clangast in custom section aligned by 4 bytes (details)
  73. Implementation of `ReshapeNoopOptimization` canonicalizer. (details)
  74. Add MLIR_INSTALL_AGGREGATE_OBJECTS and default it to ON. (details)
  75. [NVPTX] Add a late SROA pass which allows optimizing away more allocas. (details)
  76. BPF: set .BTF and .BTF.ext section alignment to 4 (details)
  77. [LLDB][NFC] Remove parameter names from forward declarations from hand written expressions used in heap.py part 2 (details)
  78. [WebAssembly] Add prototype relaxed swizzle instructions (details)
  79. [ORC-RT] Avoid switching out-of-band error value into __orc_rt::Error and back. (details)
  80. [ORC-RT] Use function pointer type (rather than reference) for traits class. (details)
  81. [ORC-RT] Add MethodWrapperHandler utility for WrapperFunction. (details)
  82. [NFC] Fix typos (details)
  83. [clang] Add option to disable -clear-ast-before-backend (details)
Commit b68bf98c0ace8c5ed39d958d0fd62016256b10d0 by i
[llvm-readobj] Delete redundant 'static' from namespace scope 'static const'. NFC

By default, such a non-template variable of non-volatile const-qualified type
having namespace-scope has internal linkage ([basic.link]), so no need for `static`.
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/tools/llvm-readobj/Win64EHDumper.cpp
The file was modifiedllvm/tools/llvm-readobj/XCOFFDumper.cpp
The file was modifiedllvm/tools/llvm-readobj/MachODumper.cpp
The file was modifiedllvm/tools/llvm-readobj/llvm-readobj.cpp
The file was modifiedllvm/tools/llvm-readobj/COFFDumper.cpp
The file was modifiedllvm/tools/llvm-readobj/WasmDumper.cpp
Commit 8189c4eee74959882f4f31c6c5f969cec5cca7eb by i
[tools] Delete redundant 'static' from namespace scope 'static const'. NFC
The file was modifiedllvm/tools/llvm-strings/llvm-strings.cpp
The file was modifiedllvm/tools/llvm-cvtres/llvm-cvtres.cpp
The file was modifiedllvm/tools/llvm-lipo/llvm-lipo.cpp
The file was modifiedllvm/tools/llvm-xray/xray-color-helper.cpp
The file was modifiedllvm/tools/llvm-objcopy/ConfigManager.cpp
The file was modifiedllvm/tools/llvm-rc/llvm-rc.cpp
The file was modifiedllvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
The file was modifiedllvm/tools/llvm-ml/llvm-ml.cpp
The file was modifiedllvm/tools/dsymutil/MachODebugMapParser.cpp
The file was modifiedllvm/tools/llvm-mt/llvm-mt.cpp
The file was modifiedllvm/tools/llvm-nm/llvm-nm.cpp
Commit 957a5e987444d3193575d6ad8afe6c75da00d794 by Jonas Devlieghere
[lldb] Fix nullptr dereference in AppleObjCRuntimeV2

Fix a potential nullptr dereference in AppleObjCRuntimeV2 by checking
the result of GetClassInfoUtilityFunction and returning a failure if
it's null.

The DynamicClassInfoExtractor was already doign the right thing, but the
SharedCacheClassInfoExtractor was missing this check.
The file was modifiedlldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
Commit 7272982e1dfe89d492de4aac3e23d9cdcb1198fa by jonathanchesterfield
[libomptarget] Refactor DeviceRTL prior to AMDGPU bringup

Subset of D111993. Fix typos, rename read to load.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D111999
The file was modifiedopenmp/libomptarget/DeviceRTL/src/Reduction.cpp
The file was modifiedopenmp/libomptarget/DeviceRTL/src/Utils.cpp
The file was modifiedopenmp/libomptarget/DeviceRTL/src/Synchronization.cpp
The file was modifiedopenmp/libomptarget/DeviceRTL/src/Mapping.cpp
The file was modifiedopenmp/libomptarget/DeviceRTL/include/Synchronization.h
Commit dcc91dd2a798b078ecabe63a51771978d92988e2 by kuhnel
first draft of a written policy around git repos

This is a frist draft of a set of policies around new git repos and how we grant write access to our GitHub organisation.

This proposal is based on the discussions in:
https://github.com/llvm/llvm-iwg/issues/40
https://github.com/llvm/llvm-iwg/issues/51

Differential Revision: https://reviews.llvm.org/D111723
The file was modifiedllvm/docs/GettingInvolved.rst
The file was addedllvm/docs/GitRepositoryPolicy.md
Commit 408e6de8c09fc7e71329199947e977fe1c40caf1 by i
[Driver][Gnu] Support -shared -static: pass -shared to ld and use crtbeginS.o

This mode never works (mismatching crtbeginT.o and crtendS.o) and probably
unsupported by GCC on glibc based Linux distro (incorrect crtbeginT.o causes
linker error) but makes sense (-shared means building a shared object, -static
means avoid shared object dependencies) and can be used on musl based Linux
distro.

mingw supports this mode as well.
The file was addedclang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0/crtendS.o
The file was modifiedclang/test/Driver/linux-ld.c
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was addedclang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/10.2.0/crtbeginS.o
Commit cf65271e462f0626157a06f2f3a9615b4987c24e by david.stuttard
[llvm-shlib] Fix windows build failed while llvm non-standalone building.

While build llvm-project as a sub-project on windows, met a build error:
libllvm-c.exports /llvm/bin\llvm-nm.exe: error: ...builds/rel64ninja/./lib/LLVMDemangle.lib: no such file or directory
The libllvm-c.exports, libllvm-c.args, and lib/*.lib should under LLVM_BINARY_DIR, using CMAKE_BINARY_DIR will cause 'no such file' error while llvm-project built as a sub-project.
The file was modifiedllvm/tools/llvm-shlib/CMakeLists.txt
Commit 5352ea4a721ef252129994111b83dc350ecc71da 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/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
The file was modifiedlldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py
The file was modifiedlldb/source/Plugins/ABI/X86/ABIX86.cpp
The file was modifiedlldb/source/Target/DynamicRegisterInfo.cpp
Commit 9da51402f477dd550847fac542c99416c5275388 by jeremy.morse
[DebugInfo][InstrRef] Fix Wdangling-else warning in InstrRefLDVTest

Fix a dangling else that gcc-11 warned about. The EXPECT_EQ macro
expands to an if-else, so the whole construction contains a hidden
dangling else.

Differential Revision: https://reviews.llvm.org/D112044
The file was modifiedllvm/unittests/CodeGen/InstrRefLDVTest.cpp
Commit cf033bb2d39c42818e3f13829b5ac6cc66b0ed6f by jeremy.morse
[DebugInfo][NFC] Zero-initialize a class field

This field gets assigned when the relevant object starts being used; but it
remains uninitialized beforehand. This risks introducing hard-to-detect
bugs if something changes, so zero-initialize the field.
The file was modifiedllvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
Commit e41ebbecf97ac70326dfa2c54e3ef5fa13df54eb by vlad.vinogradov
[mlir][RFC] Refactor layout representation in MemRefType

The change is based on the proposal from the following discussion:
https://llvm.discourse.group/t/rfc-memreftype-affine-maps-list-vs-single-item/3968

* Introduce `MemRefLayoutAttr` interface to get `AffineMap` from an `Attribute`
  (`AffineMapAttr` implements this interface).
* Store layout as a single generic `MemRefLayoutAttr`.

This change removes the affine map composition feature and related API.
Actually, while the `MemRefType` itself supported it, almost none of the upstream
can work with more than 1 affine map in `MemRefType`.

The introduced `MemRefLayoutAttr` allows to re-implement this feature
in a more stable way - via separate attribute class.

Also the interface allows to use different layout representations rather than affine maps.
For example, the described "stride + offset" form, which is currently supported in ASM parser only,
can now be expressed as separate attribute.

Reviewed By: ftynse, bondhugula

Differential Revision: https://reviews.llvm.org/D111553
The file was modifiedmlir/include/mlir/IR/BuiltinAttributeInterfaces.h
The file was modifiedmlir/include/mlir/IR/BuiltinAttributes.td
The file was modifiedmlir/lib/Transforms/Utils/Utils.cpp
The file was modifiedmlir/lib/IR/BuiltinTypes.cpp
The file was modifiedmlir/include/mlir/IR/BuiltinAttributeInterfaces.td
The file was modifiedmlir/include/mlir/IR/BuiltinTypes.h
The file was modifiedmlir/lib/Dialect/GPU/Transforms/AllReduceLowering.cpp
The file was modifiedmlir/unittests/IR/ShapedTypeTest.cpp
The file was modifiedmlir/test/CAPI/ir.c
The file was modifiedmlir/lib/Transforms/NormalizeMemRefs.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
The file was modifiedmlir/lib/IR/BuiltinAttributeInterfaces.cpp
The file was modifiedmlir/test/python/ir/builtin_types.py
The file was modifiedmlir/lib/CAPI/IR/BuiltinTypes.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/lib/Transforms/PipelineDataTransfer.cpp
The file was modifiedmlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
The file was modifiedmlir/test/Dialect/Vector/invalid.mlir
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
The file was modifiedmlir/include/mlir-c/BuiltinTypes.h
The file was modifiedmlir/test/IR/parser.mlir
The file was modifiedmlir/lib/Analysis/LoopAnalysis.cpp
The file was modifiedmlir/lib/Conversion/LLVMCommon/Pattern.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/lib/Parser/TypeParser.cpp
The file was modifiedmlir/lib/Bindings/Python/IRTypes.cpp
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
The file was modifiedmlir/test/IR/invalid.mlir
The file was modifiedmlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
The file was modifiedmlir/lib/Analysis/Utils.cpp
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/include/mlir/IR/BuiltinTypes.td
Commit cfaa5c344d5bc73aae0ec39d57d98acf7463fccf by Raphael Isemann
[lldb] Filter duplicates in Target::GetScratchTypeSystems

`Target::GetScratchTypeSystems` returns the list of scratch TypeSystems. The
current implementation is iterating over all LanguageType values and retrieves
the respective TypeSystem for each LanguageType.

All C/C++/Obj-C LanguageTypes are however mapped to the same
ScratchTypeSystemClang instance, so the current implementation adds this single
TypeSystem instance several times to the list of TypeSystems (once for every
LanguageType that we support).

The only observable effect of this is that `SBTarget.FindTypes` for builtin
types currently queries the ScratchTypeSystemClang several times (and also adds
the same result several times).

Reviewed By: bulbazord, labath

Differential Revision: https://reviews.llvm.org/D111931
The file was modifiedlldb/source/Target/Target.cpp
The file was addedlldb/test/API/lang/c/builtin-types/TestCBuiltinTypes.py
Commit 134e1817f62c08cde1ed1f7e94e51425536085ac by werat
[lldb] change name demangling to be consistent between windows and linx

When printing names in lldb on windows these names contain the full type information while on linux only the name is contained.

This change introduces a flag in the Microsoft demangler to control if the type information should be included.
With the flag enabled demangled name contains only the qualified name, e.g:
without flag -> with flag
int (*array2d)[10] -> array2d
int (*abc::array2d)[10] -> abc::array2d
const int *x -> x

For globals there is a second inconsistency which is not yet addressed by this change. On linux globals (in global namespace) are prefixed with :: while on windows they are not.

Reviewed By: teemperor, rnk

Differential Revision: https://reviews.llvm.org/D111715
The file was modifiedllvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
The file was modifiedllvm/test/Demangle/ms-options.test
The file was modifiedllvm/include/llvm/Demangle/Demangle.h
The file was modifiedllvm/tools/llvm-undname/llvm-undname.cpp
The file was modifiedllvm/lib/Demangle/MicrosoftDemangle.cpp
The file was modifiedllvm/lib/Demangle/MicrosoftDemangleNodes.cpp
The file was modifiedlldb/source/Core/Mangled.cpp
Commit 9a57d1e52680ac05c29d6d0d2cfbaf3b05a5cbce by Raphael Isemann
[lldb] Allow dumping the state of all scratch TypeSystems

This adds the `target dump typesystem'`command which dumps the TypeSystem of the
target itself (aka the 'scratch TypeSystem'). This is similar to `target modules
dump ast` which dumps the AST of lldb::Modules associated with a selected
target.

Unlike `target modules dump ast`, the new command is not a subcommand of `target
modules dump` as it's not touching the modules of a target at all. Also unlike
`target modules dump ast` I tried to keep the implementation language-neutral,
so this patch moves our Clang `Dump` to the `TypeSystem` interface so it will
also dump the state of any future/downstream scratch TypeSystems (e.g., Swift).
That's also why the command just refers to a 'typesystem' instead of an 'ast'
(which is only how Clang is necessarily modelling the internal TypeSystem
state).

The main motivation for this patch is that I need to write some tests that check
for duplicates in the ScratchTypeSystemClang of a target. There is currently no
way to check for this at the moment (beside measuring memory consumption of
course). It's probably also useful for debugging LLDB itself.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D111936
The file was modifiedlldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
The file was modifiedlldb/source/Commands/CommandObjectTarget.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
The file was addedlldb/test/API/commands/target/dump/TestTargetDumpTypeSystem.py
The file was addedlldb/test/API/commands/target/dump/main.cpp
The file was addedlldb/test/API/commands/target/dump/Makefile
The file was modifiedlldb/include/lldb/Symbol/TypeSystem.h
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
Commit 8bac18be0e45adc7b096375bf4f65635fb994df0 by pavel
[lldb] Reduce code duplication around inferior building

We had two sets of build<flavour> methods, whose bodies were largely
identical. This makes any kind of modification in their vicinity
repetitive and error-prone.

Replace each set with a single method taking an optional debug_info
parameter.

Differential Revision: https://reviews.llvm.org/D111989
The file was modifiedlldb/packages/Python/lldbsuite/test/builders/darwin.py
The file was modifiedlldb/packages/Python/lldbsuite/test/builders/builder.py
The file was modifiedlldb/docs/testsuite/a-detailed-walkthrough.txt
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
The file was modifiedlldb/test/API/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
The file was modifiedlldb/test/API/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
The file was modifiedlldb/test/API/commands/add-dsym/uuid/TestAddDsymCommand.py
The file was modifiedlldb/test/API/macosx/add-dsym/TestAddDsymDownload.py
The file was modifiedlldb/packages/Python/lldbsuite/test/README-TestSuite
Commit 849b17949f18b5753592588a2290f2f3dde73ac0 by jeremy.morse
[DebugInfo][InstrRef] Avoid un-necessary densemap copies and comparisons

This is purely a performance patch: InstrRefBasedLDV used to use three
DenseMaps to store variable values, two for long term storage and one as a
working set. This patch eliminates the working set, and updates the long
term storage in place, thus avoiding two DenseMap comparisons and two
DenseMap assignments, which can be expensive.

Differential Revision: https://reviews.llvm.org/D111716
The file was modifiedllvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
The file was modifiedllvm/unittests/CodeGen/InstrRefLDVTest.cpp
The file was modifiedllvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
Commit ee11612ee10edd0d1f219c302f1a0abe0b46ddb3 by mgorny
Revert "[lldb] [ABI/X86] Support combining xmm* and ymm*h regs into ymm*"

This reverts commit 5352ea4a721ef252129994111b83dc350ecc71da.  It seems
to have broken the arm buildbot.
The file was modifiedlldb/include/lldb/lldb-private-types.h
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/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py
The file was modifiedlldb/source/Plugins/ABI/X86/ABIX86.cpp
The file was modifiedlldb/source/Target/DynamicRegisterInfo.cpp
Commit 7dfb1395549c34f4b607055c01f8c510ead6b0db by Raphael Isemann
[lldb] Adjust udt-layout.test after MS mangling change

The demangled name no longer contains the redundant name since D111715.
The file was modifiedlldb/test/Shell/SymbolFile/PDB/udt-layout.test
Commit 8fbac4e88ac3dde30310bb63b234045075cd338b by adamcz
[clangd] Add code completion of param name on /* inside function calls.

For example, if you have:
  void foo(int bar);
  foo(/*^
it should auto-complete to "bar=".

Because Sema callbacks for code completion in comments happen before we
have an AST we need to cheat in clangd by detecting completion on /*
before, moving cursor back by two characters, then running a simplified
verion of SignatureHelp to extract argument name(s) from possible
overloads.

Differential Revision: https://reviews.llvm.org/D110823
The file was modifiedclang-tools-extra/clangd/test/initialize-params.test
The file was modifiedclang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
The file was modifiedclang-tools-extra/clangd/ClangdLSPServer.cpp
The file was modifiedclang-tools-extra/clangd/CodeComplete.cpp
Commit 39f2b059633ec1dc51b10b3fb48b616d87c273e3 by mgorny
[lldb] [Host] Make Terminal methods return llvm::Error

Differential Revision: https://reviews.llvm.org/D111890
The file was modifiedlldb/include/lldb/Host/Terminal.h
The file was modifiedlldb/source/Host/common/Terminal.cpp
The file was modifiedlldb/unittests/Host/posix/TerminalTest.cpp
The file was modifiedlldb/source/Target/Process.cpp
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
Commit c6d7f248bda3439a06c630c35360d40dbfc06abe by mgorny
[lldb] [ABI/X86] Refactor ABIX86::AugmentRegisterInfo()

Refactor ABIX86::AugmentRegisterInfo() and helper functions for better
readability.  This also fixes listing eax & co. as potential subregs
on 32-bit systems.

Differential Revision: https://reviews.llvm.org/D108937
The file was modifiedlldb/source/Plugins/ABI/X86/ABIX86.cpp
Commit d576f4501439860faa95e4f3b782cd6da5123ef1 by Shraiysh.Vaishay
[MLIR][OpenMP] Added parseClauses

Code reorganized in OpenMPDialect.cpp to have all functions corresponding to an operation together.

Added parseClauses function to avoid code duplication while parsing clauses in OpenMP operations. Also added printers and verifiers for clauses, which are being used for multiple operations.

Reviewed By: kiranchandramohan, peixin

Differential Revision: https://reviews.llvm.org/D110903
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
The file was modifiedmlir/test/Dialect/OpenMP/invalid.mlir
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
Commit 45503fc044499a5dc88be273a2d599f8ad5bccd3 by clementval
[fir] Add FIRBuilder utility functions

Extract some code from the big ptach D111337. This patch
contains some utility functions from the FIRBuidler.

List of utility functions added:
- getRegion
- getModule
- getKindMap
- getRefType
- getVarLenSeqTy
- getRealType
- createNullConstant
- createRealConstant
- createRealZeroConstant
- createGlobal
- createGlobalConstant
- createStringLitOp
- getNamedFunction
- getNamedGlobal
- createFunction
- addNamedFunction
- createBool

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: kiranchandramohan

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
The file was modifiedflang/include/flang/Optimizer/Builder/FIRBuilder.h
The file was modifiedflang/lib/Optimizer/Builder/FIRBuilder.cpp
The file was modifiedflang/unittests/Optimizer/Builder/FIRBuilderTest.cpp
The file was modifiedflang/lib/Optimizer/Dialect/FIROps.cpp
Commit 7a801138f8bddf17d7df52c1c3f1d4ce8da702ad by Louis Dionne
[runtimes] Make sure LLVM_LIT_ARGS is set before including individual runtimes

Otherwise, the individual `check-cxx`, `check-cxxabi` and similar targets
will not know about `LLVM_LIT_ARGS`, and we'll end up running lit without
any argument.

Differential Revision: https://reviews.llvm.org/D112035
The file was modifiedruntimes/CMakeLists.txt
Commit f97f946839d18ca88b4e8f32d45e458f124bdf6b by ezhulenev
Canonicalize max/min operations on integers.

Reviewed By: ezhulenev

Differential Revision: https://reviews.llvm.org/D112051
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/test/Dialect/Standard/canonicalize.mlir
Commit 1c2c67b46b55a2a81ebc988c829e2eee13a4fec6 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.

While at it, introduce helper macros for the definitions.

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 e1e2635327d74b6404d30521f9e09928e3919cec by mascasa
[HWASan] Use tagged-globals feature on x86.

Allows us to use the small code model when we disable relocation
relaxation.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D111344
The file was modifiedcompiler-rt/test/hwasan/lit.cfg.py
The file was modifiedcompiler-rt/test/hwasan/TestCases/global.c
The file was modifiedclang/lib/Driver/SanitizerArgs.cpp
Commit 7df912c65d1963c5403f1d645329b20f7e2d60ea by mgorny
Revert "[lldb] [Process/Utility] Fix value_regs/invalidate_regs for ARM"

This reverts commit 1c2c67b46b55a2a81ebc988c829e2eee13a4fec6.
Something's still wrong.
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterInfos_arm.h
Commit 71e39e3f1867032a2fc0c19fa8d4881b39fc5a49 by llvm-dev
[ADT] Add APInt::isNegatedPowerOf2() helper

Inspired by D111968, provide a isNegatedPowerOf2() wrapper instead of obfuscating code with (-Value).isPowerOf2() patterns, which I'm sure are likely avenues for typos.....

Differential Revision: https://reviews.llvm.org/D111998
The file was modifiedllvm/unittests/ADT/APIntTest.cpp
The file was modifiedllvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
The file was modifiedllvm/include/llvm/ADT/APInt.h
The file was modifiedllvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/include/llvm/IR/PatternMatch.h
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64FastISel.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
Commit 5cd28f71b1d96a4d4ed61e06751f52257da4df71 by mgorny
[lldb] [Process/Utility] clang-format RegisterInfos_arm.h
The file was modifiedlldb/source/Plugins/Process/Utility/RegisterInfos_arm.h
Commit 28e0c34216530087f62da66f3f19ce57211d8eed by mgorny
[lldb] [Process/Utility] Define sN regs on ARM via helper macro

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 ca889733a2271e3c4953cb097d212c834975596b by joeloser93
[libc++][docs] Mark LWG3420 complete

Mark LWG3420 as complete. Currently, the `cpp17_iterator` concept
checks that the type looks like an iterator first before checking if it
is copyable.

Reviewed By: ldionne, Quuxplusone, #libc

Differential Revision: https://reviews.llvm.org/D111598
The file was modifiedlibcxx/docs/Status/Cxx2bIssues.csv
Commit 607fb1bb8c91a2f284d8c63f3066ab8cc1a66955 by david.sherwood
[AArch64] Always add -tune-cpu argument to -cc1 driver

This patch ensures that we always tune for a given CPU on AArch64
targets when the user specifies the "-mtune=xyz" flag. In the
AArch64Subtarget if the tune flag is unset we use the CPU value
instead.

I've updated the release notes here:

  llvm/docs/ReleaseNotes.rst

and added tests here:

  clang/test/Driver/aarch64-mtune.c

Differential Revision: https://reviews.llvm.org/D110258
The file was modifiedclang/docs/ReleaseNotes.rst
The file was addedclang/test/Driver/aarch64-mtune.c
The file was modifiedllvm/unittests/Target/AArch64/InstSizes.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedllvm/docs/ReleaseNotes.rst
The file was modifiedllvm/unittests/Target/AArch64/MatrixRegisterAliasing.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64Subtarget.h
The file was modifiedllvm/lib/Target/AArch64/AArch64Subtarget.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp
Commit 5eaf5b916146dff0a02d8d937e88d8fb128640d2 by amy.kwan1
[PowerPC] Restrict various P10 options to P10 only.

This patch attempts to restrict the following P10 options:
```
-mprefixed
-mpcrel
-mpaired-vector-memops
```
To P10 only. This will prevent the use of these options on P9 and earlier.

The behaviour of this patch looks like the following on pre-P10:
```
$ clang -mcpu=pwr9 -mpaired-vector-memops test.c -o test
error: option '-mpaired-vector-memops' cannot be specified without '-mcpu=pwr10'
$ clang -mcpu=pwr9 -mprefixed test.c -o test
error: option '-mprefixed' cannot be specified without '-mcpu=pwr10'
$ clang -mcpu=pwr9 -mprefixed -mpcrel test.c -o test
error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed'
$ clang -mcpu=pwr9 -mpcrel -mprefixed test.c -o test
error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed'
$ clang -mcpu=pwr9 -mpcrel test.c -o test
error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed'
```

Differential Revision: https://reviews.llvm.org/D109652
The file was addedclang/test/Driver/ppc-p10-features-support-check.c
The file was modifiedclang/lib/Basic/Targets/PPC.cpp
Commit 10e08784ca27028c2f88e946d3cb0d2696f9b8f5 by Shraiysh.Vaishay
[MLIR][OpenMP][NFC] Moved Synchronization Hint related functions

The functions are moved above the parseClauses function as they
will be used inside it to parse `hint` clause

Reviewed By: clementval

Differential Revision: https://reviews.llvm.org/D112071
The file was modifiedmlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
Commit 23db763b7dadbf99cb46c66c855651ac760e56db by david.sherwood
Fix documentation errors introduced by 607fb1bb8c91a2f284d8c63f3066ab8cc1a66955
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedllvm/docs/ReleaseNotes.rst
Commit 5ea35791e6642f6160819c930f79b0f57ad0e907 by david.sherwood
[AArch64] Split out processor/tuning features

Following on from an earlier patch that introduced support for -mtune
for AArch64 backends, this patch splits out the tuning features
from the processor features. This gives us the ability to enable
architectural feature set A for a given processor with "-mcpu=A"
and define the set of tuning features B with "-mtune=B".

It's quite difficult to write a test that proves we select the
right features according to the tuning attribute because most
of these relate to scheduling. I have created a test here:

  CodeGen/AArch64/misched-fusion-addr-tune.ll

that demonstrates the different scheduling choices based upon
the tuning.

Differential Revision: https://reviews.llvm.org/D111551
The file was addedllvm/test/CodeGen/AArch64/misched-fusion-addr-tune.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64.td
The file was modifiedllvm/lib/Target/AArch64/AArch64Subtarget.h
The file was modifiedllvm/lib/Target/AArch64/AArch64SystemOperands.td
Commit 3af474c0a15a642e5d73981d5cdf465bbdfc3d51 by schmeise
Changes to print-changed classes in preparation for DotCfg change printer

Summary:
Break out non-functional changes to the print-changed classes that are needed
for reuse with the DotCfg change printer in https://reviews.llvm.org/D87202.

Various changes to the change printers to facilitate reuse with the
upcoming DotCfg change printer. This includes changing several of
the classes and their support classes to being templates. Also,
some template parameter names were simplified to avoid confusion
with planned identifiers in the DotCfg change printer to come. A
virtual function in the class for comparing functions was changed
to a lambda. The virtual function same was replaced with calls to
operator==. The only intentional functional change was to add the exe name
as the first parameter to llvm::sys::ExecuteAndWait

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: aeubanks (Arthur Eubanks)
Differential Revision: https://reviews.llvm.org/D110737
The file was modifiedllvm/include/llvm/Passes/StandardInstrumentations.h
The file was modifiedllvm/lib/Passes/StandardInstrumentations.cpp
Commit b492b0be95d9134bfb092eb2c73cf6996c4518f7 by mgorny
[lldb] [Process/Utility] Define dN regs on ARM via helper macro

Use FPU_REG macro to define dN registers, removing the wrong value_regs
while at it.  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 cf68e1b2fb4f6172b08f3430b2530dc2d193ab60 by kazu
[Driver, Frontend] Use StringRef::contains (NFC)
The file was modifiedclang/lib/Driver/ToolChain.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/lib/Driver/Distro.cpp
The file was modifiedclang/lib/Driver/ToolChains/Linux.cpp
The file was modifiedclang/lib/Driver/ToolChains/FreeBSD.cpp
The file was modifiedclang/lib/Frontend/LayoutOverrideSource.cpp
The file was modifiedclang/lib/Frontend/VerifyDiagnosticConsumer.cpp
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit 6fd55bba61bb4df98f9485b8d3cfc9e956d992b8 by Louis Dionne
[libunwind] Add a from-scratch config for running libunwind tests

Running tests for libunwind is a lot simpler than running tests for
libc++, so a simple Lit config file is sufficient. The benefit is that
we disentangle the libunwind test configuration from the libc++ and
libc++abi test configuration. The setup was too complicated, which led
to some bugs (notably we were running against the system libunwind on
Apple platforms).

Differential Revision: https://reviews.llvm.org/D111664
The file was addedlibunwind/test/configs/llvm-libunwind-shared.cfg.in
The file was modifiedlibunwind/test/libunwind_01.pass.cpp
The file was modifiedlibunwind/CMakeLists.txt
The file was modifiedlibunwind/test/unwind_leaffunction.pass.cpp
The file was modifiedlibunwind/test/forceunwind.pass.cpp
The file was modifiedlibunwind/test/signal_frame.pass.cpp
The file was modifiedlibunwind/test/signal_unwind.pass.cpp
The file was modifiedlibcxx/utils/ci/run-buildbot
The file was modifiedlibcxx/utils/libcxx/test/dsl.py
The file was modifiedlibunwind/test/frameheadercache_test.pass.cpp
The file was addedlibunwind/test/configs/llvm-libunwind-static.cfg.in
The file was modifiedlibunwind/test/libunwind_02.pass.cpp
Commit b1ce4549307d776a045d09c9d30433757ec36981 by jhuber6
[OpenMP] Remove macro guards for device debugging

The plugin currently uses a macro to check if this is a debug built
before assigning the debug kind variable to the device environment
struct. This is being deprecated because the new device runtime does not
maintain separate debug builds and should always be availible.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D112083
The file was modifiedopenmp/libomptarget/plugins/cuda/src/rtl.cpp
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Commit bf6b0d16747f6d1107de1a51d42ae3b0bf904537 by carlosgalvezp
[clang-tidy] Support globbing in NOLINT* expressions

To simplify suppressing warnings (for example, for
when multiple check aliases are enabled).

The globbing format reuses the same code as for
globbing when enabling checks, so the semantics
and behavior is identical.

Differential Revision: https://reviews.llvm.org/D111208
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
The file was modifiedclang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/infrastructure/nolintnextline.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-specific-end-global.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-begin-global-end-specific.cpp
The file was modifiedclang-tools-extra/clang-tidy/GlobList.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/infrastructure/nolint.cpp
The file was modifiedclang-tools-extra/clang-tidy/GlobList.h
The file was modifiedclang-tools-extra/docs/clang-tidy/index.rst
The file was modifiedclang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-mismatched-check-names.cpp
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
Commit 7812cb72a321c392a3b91b45b4780a0987818a36 by carlosgalvezp
Use reference type in for loop

To fix failing build job.
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
Commit ac0561ebb734e6241d76c4661507960e8a6dfb20 by aeubanks
[Verifier] Add context for assume operand bundles verifier errors

And fix a typo.
The file was modifiedllvm/test/Verifier/assume-bundles.ll
The file was modifiedllvm/lib/IR/Verifier.cpp
Commit 1529738b6619cdf817feb31771b57a893accf63b by Jonas Devlieghere
[debugserver] Fix BUILDING_FOR_ARM64_OSX

Check for TARGET_CPU_ARM64 (ARM instructions for 64-bit mode) rather
than TARGET_CPU_ARM (instructions for 32-bit mode).
The file was modifiedlldb/tools/debugserver/source/CMakeLists.txt
Commit a66798cd67fedc35efbb8986deef417631bbc88a by jingham
Remove unneeded variable num_found.
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
Commit b84da5ba6e31e9e264370ac2b47536a7b50ef4fd by Louis Dionne
[libc++] [test] Add tests for converting array types in shared_ptr.

The only possible kind of a conversion in initialization of a shared
pointer to an array is a qualification conversion (i.e., adding
cv-qualifiers). This patch adds tests for converting from `A[]` to
`const A[]` to the following functions:

```
template<class Y> explicit shared_ptr(Y* p);

template<class Y> shared_ptr(const shared_ptr<Y>& r);
template<class Y> shared_ptr(shared_ptr<Y>&& r);

template<class Y> shared_ptr& operator=(const shared_ptr<Y>& r);
template<class Y> shared_ptr& operator=(shared_ptr<Y>&& r);

template<class Y> void reset(Y* p);
template<class Y, class D> void reset(Y* p, D d);
template<class Y, class D, class A> void reset(Y* p, D d, A a);
```

Similar tests for converting functions that involve a `weak_ptr` should
be added once LWG issue [3001](https://cplusplus.github.io/LWG/issue3001)
is implemented.

Differential Revision: https://reviews.llvm.org/D112048
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y_rv.pass.cpp
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y_rv.pass.cpp
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/pointer.pass.cpp
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter_allocator.pass.cpp
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr_Y.pass.cpp
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer_deleter.pass.cpp
The file was modifiedlibcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_Y.pass.cpp
Commit 081bad1d4d4eacc2e638eb28ff7e0c8193ef2618 by spatel
[x86] add tests for psubus; NFC
The file was modifiedllvm/test/CodeGen/X86/psubus.ll
Commit c1ca9e3077cb8ac39a56ebe73dd2b080fbe56c4e by spatel
[AMDGPU] add test for usubsat; NFC
The file was modifiedllvm/test/CodeGen/AMDGPU/usubsat.ll
Commit e2f16be5991af84e508fcd197bb5deb841aa0dc2 by joker.eph
Fix clang-tidy warnings in MLIR Python bindings (NFC)
The file was modifiedmlir/lib/Bindings/Python/IRAffine.cpp
The file was modifiedmlir/lib/Bindings/Python/IRCore.cpp
Commit a039746e1c0b0eef878dfa1e6d611e79bec193c1 by Louis Dionne
[runtimes] Trigger CI on changes to libunwind
The file was modifiedlibcxx/utils/ci/buildkite-pipeline-premerge.sh
Commit 494dad6b72d499ea832ab4b9b9bb76e0330e4eeb by joeloser93
[libc++][NFC] Mark LWG3573 as complete

Mark LWG3573 as complete. It involves a change in wording around when
`basic_string_view`'s constructor for iterator/sentinel can throw. The
current implementation is not marked conditionally `noexcept`, so there
is nothing to do here. Add a test that binds this behavior to verify the
constructor is not marked `noexcept(true)` when `end - begin` throws.

Reviewed By: ldionne, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D111925
The file was modifiedlibcxx/docs/Status/Cxx2bIssues.csv
The file was modifiedlibcxx/test/std/strings/string.view/string.view.cons/from_iterator_sentinel.pass.cpp
Commit 622c40722e140239d14a19d1c3b7013de2863fe1 by joeloser93
[libc++] Make __weekday_from_days private in weekday

`weekday` has a static member function `__weekday_from_days` which is
not part of the mandated public interface of `weeekday` according to the
standard. Since it is only used internally in the constructors of
`weekday`, let's make it private.

Reviewed By: ldionne, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D112072
The file was modifiedlibcxx/include/chrono
Commit 9403514e764950a0dfcd627fc90c73432314bced by anna
[LoopPredication] Calculate profitability without BPI

Using BPI within loop predication is non-trivial because BPI is only
preserved lossily in loop pass manager (one fix exposed by lossy
preservation is up for review at D111448). However, since loop
predication is only used in downstream pipelines, it is hard to keep BPI
from breaking for incomplete state with upstream changes in BPI.
Also, correctly preserving BPI for all loop passes is a non-trivial
undertaking (D110438 does this lossily), while the benefit of using it
in loop predication isn't clear.

In this patch, we rely on profile metadata to get almost similar benefit as
BPI, without actually using the complete heuristics provided by BPI.
This avoids the compile time explosion we tried to fix with D110438 and
also avoids fragile bugs because BPI can be lossy in loop passes
(D111448).

Reviewed-By: asbirlea, apilipenko
Differential Revision: https://reviews.llvm.org/D111668
The file was modifiedllvm/test/Transforms/LoopPredication/profitability.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopPredication.cpp
Commit dc8a5f9419f5cc35fc3c9e8698ba3ebb6a3f974f by craig.topper
[RISCV] Use llvm::stable_sort instead of std::stable_sort. NFC
The file was modifiedclang/utils/TableGen/RISCVVEmitter.cpp
Commit fca0218875f5117110d38b9cd7503bc2789693d3 by listmail
[indvars] Canonicalize exit conditions to unsigned using range info

This patch duplicates a bit of logic we apply to comparisons encountered during the IV users walk to conditions which feed exit conditions. Why? simplifyAndExtend has a very limited list of users it walks. In particular, in the examples is stops at the zext and never visits the icmp. (Because we can't fold the zext to an addrec yet in SCEV.) Being willing to visit when we haven't simplified regresses multiple tests (seemingly because of less optimal results when computing trip counts).

Note that this can be trivially extended to multiple exiting blocks. I'm leaving that to a future patch (solely to cut down on the number of versions of the same code in review at once.)

Differential Revision: https://reviews.llvm.org/D111896
The file was modifiedllvm/test/Transforms/IndVarSimplify/finite-exit-comparisons.ll
The file was modifiedllvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Commit 0836a1059dcf8e4fbf408248bf5eed13dfd93f7b by listmail
Extend transform introduced in D111896 to multiple exits

This is trivial.  It was left out of the original review only because we had multiple copies of the same code in review at the same time, and keeping them in sync was easiest if the structure was kept in sync.
The file was modifiedllvm/lib/Transforms/Scalar/IndVarSimplify.cpp
The file was modifiedllvm/test/Transforms/IndVarSimplify/finite-exit-comparisons.ll
Commit 08619006a0c0694477f143dc1552eab35701e50b by bjorn.a.pettersson
[SCEV] Avoid compile time explosion in ScalarEvolution::isImpliedCond

As seen in PR51869 the ScalarEvolution::isImpliedCond function might
end up spending lots of time when doing the isKnownPredicate checks.

Calling isKnownPredicate for example result in isKnownViaInduction
being called, which might result in isLoopBackedgeGuardedByCond being
called, and then we might get one or more new calls to isImpliedCond.
Even if the scenario described here isn't an infinite loop, using
some random generated C programs as input indicates that those
isKnownPredicate checks quite often returns true. On the other hand,
the third condition that needs to be fulfilled in order to "prove
implications via truncation", i.e. the isImpliedCondBalancedTypes
check, is rarely fulfilled.
I also made some similar experiments to look at how often we would
get the same result when using isKnownViaNonRecursiveReasoning instead
of isKnownPredicate. So far I haven't seen a single case when codegen
is negatively impacted by using isKnownViaNonRecursiveReasoning. On
the other hand, it seems like we get rid of the compile time explosion
seen in PR51869 that way. Hence this patch.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D112080
The file was addedllvm/test/Analysis/ScalarEvolution/pr51869-scalar-evolution-prove-implications-via-truncation.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 57553ce43281a7c379e375161320cc09d8236839 by zequanwu
Revert "Reland [clang] Pass -clear-ast-before-backend in Clang::ConstructJob()"

This reverts commit 1fb24fe85a19ae71b00875ff6c96ef1831dcf7e3.

This causes clang crash on chromium. See repro at https://bugs.chromium.org/p/chromium/issues/detail?id=1261551#c1.
The file was modifiedclang/lib/Interpreter/Interpreter.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 9c44a0996c8cf87607807751be2315020c582c66 by bjorn.a.pettersson
[SCEV] Fix formatting error introduced by D112080

Accidentally pushed D112080 without this clang-format cleanup.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 8ac5a6641fa4d742fb4599b485c40700e773f01f by Lawrence D'Anna
[lldb] improve the help strings for gdb-remote and kdp-remote

The help string can be more helpful by explaining these are
aliases for 'process connect'

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D111965
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
Commit 6fe902daf931dedf6e958b43c043cb57bb612daf by michael.hliao
[cuda] Add address space predicate funuctions.

- Add the missing NVVM predicate builtins on address space checking
- Redefine them as pure functions so that they could be used in
  __builtin_assume.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D112053
The file was modifiedclang/include/clang/Basic/BuiltinsNVPTX.def
The file was modifiedclang/lib/Headers/__clang_cuda_runtime_wrapper.h
Commit 5e004b03f72a17f916b93792eb778dfa9e7a09cc by Vedant Kumar
[lldb/test] Update test/API/functionalities/load_lazy to macOS 12

In macOS 12, dyld switched to using chained fixups. As a result, all symbols
are bound at launch and there are no lazy pointers any more. Since we wish to
import/dlopen() a dylib with missing symbols, we need to use a weak import.
This applies to all macOS 12-aligned OS releases, e.g. iOS 15, etc.

rdar://81295101

Differential Revision: https://reviews.llvm.org/D112034
The file was modifiedlldb/test/API/functionalities/load_lazy/Makefile
Commit 91e19f66e51ac3fda2309f5e67b02fcccd4d58a0 by vsapsai
[driver] Explicitly specify `-fbuild-session-timestamp` in seconds.

Representation of the file's last modification time depends on the file
system and isn't guaranteed to be in seconds. Cast to seconds explicitly
and tighten the test case to check the magnitude of the calculated
value, so we can catch passing milliseconds or nanoseconds.

rdar://83915615

Differential Revision: https://reviews.llvm.org/D111205
The file was modifiedclang/test/Driver/modules.m
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit c983aeddcf5af992d2a807d3f4f8cdc27cbf63b1 by clementval
[fir] Add character utility functions in FIRBuilder

Extract part of D111337 in order to mke it smaller
and easier to review. This patch add some utility
functions to the FIRBuilder.

Add the following utility functions:
- getCharacterLengthType
- createStringLiteral
- locationToFilename
- characterWithDynamicLen
- sequenceWithNonConstantShape
- hasDynamicSize

These bring up the BoxValue implementation together with it.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: AlexisPerry

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
The file was modifiedflang/lib/Optimizer/Builder/CMakeLists.txt
The file was addedflang/lib/Optimizer/Builder/BoxValue.cpp
The file was modifiedflang/lib/Optimizer/Dialect/FIROps.cpp
The file was modifiedflang/unittests/Optimizer/Builder/FIRBuilderTest.cpp
The file was modifiedflang/lib/Optimizer/Dialect/FIRType.cpp
The file was addedflang/include/flang/Optimizer/Builder/BoxValue.h
The file was modifiedflang/include/flang/Optimizer/Dialect/FIRType.h
The file was modifiedflang/lib/Optimizer/Builder/FIRBuilder.cpp
The file was modifiedflang/include/flang/Optimizer/Builder/FIRBuilder.h
The file was addedflang/include/flang/Optimizer/Support/Matcher.h
Commit e2faf721b2b9597ed4a68f52fdffb14b6cb7db7c by spatel
[x86] add tests for psubus; NFC
The file was modifiedllvm/test/CodeGen/X86/psubus.ll
Commit 17386cb4dc89afad62623b9bc08516b99b9c6df7 by keithbsmiley
[clang][Driver] Make multiarch output file basenames reproducible

When building a multiarch MachO binary, previously the intermediate
output file names would contain random characters. On macOS this
filename, since it's used when linking, ended up being used as a
stable-ish identifier for the adhoc codesignature of the binary, leading
to non-reproducible binaries. This change uses the architecture, when
available, to create a stable, but unique, basename for the file.

Differential Revision: https://reviews.llvm.org/D111269
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/test/Driver/darwin-dsymutil.c
Commit 92a0389b0425a9535a99a0ce13ba0eeda2bce7ad by spatel
[x86] add special-case lowering for usubsat for pre-SSE4

usubsat X, SMIN --> (X ^ SMIN) & (X s>> BW-1)

This would be a regression with D112085 where we combine to
usubsat more aggressively, so avoid that by matching the
special-case where we are subtracting SMIN (signmask):
https://alive2.llvm.org/ce/z/4_3gBD

Differential Revision: https://reviews.llvm.org/D112095
The file was modifiedllvm/test/CodeGen/X86/psubus.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 922bf57fc8fe41ebcbbe581a7c8e730fbebf572f by i
[Driver][Gnu] Delete unneeded -Bstatic dispatch for arm/thumb

Historically -static and -Bstatic are synonym.
gold made the semantics of -static slightly stronger but that does not matter.
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
Commit 9660563950aaed54020bfdf0be07e7096a9553e4 by aeubanks
[llvm-reduce] Add reduction passes to reduce operands to undef/1/0

Having non-undef constants in a final llvm-reduce output is nicer than
having undefs.

This splits the existing reduce-operands pass into three, one which does
the same as the current pass of reducing to undef, and two more to
reduce to the constant 1 and the constant 0. Do not reduce to undef if
the operand is a ConstantData, and do not reduce 0s to 1s.

Reducing GEP operands very frequently causes invalid IR (since types may
not match up if we index differently into a struct), so don't touch GEPs.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D111765
The file was modifiedllvm/test/tools/llvm-reduce/remove-operands.ll
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceOperands.h
The file was modifiedllvm/tools/llvm-reduce/DeltaManager.cpp
The file was modifiedllvm/test/tools/llvm-reduce/remove-invoked-functions.ll
Commit 1813fde9cc0b56cee42d9b82e6f22fa00a59cdf9 by sbc
[WebAssembly] Emit clangast in custom section aligned by 4 bytes

Emit __clangast in custom section instead of named data segment
to find it while iterating sections.
This could be avoided if all data segements (the wasm sense) were
represented as their own sections (in the llvm sense).
This can be resolved by https://github.com/WebAssembly/tool-conventions/issues/138

And the on-disk hashtable in clangast needs to be aligned by 4 bytes,
so add paddings in name length field in custom section header.

The length of clangast section name can be represented in 1 byte
by leb128, and possible maximum pads are 3 bytes, so the section
name length won't be invalid in theory.

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

Differential Revision: https://reviews.llvm.org/D74531
The file was modifiedclang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was addedclang/test/PCH/pch-wasm.c
The file was addedllvm/test/MC/WebAssembly/custom-section-alignment.ll
Commit 9c62bb55f473a9d0db16b894708ed09f2346ae9d by rob.suderman
Implementation of `ReshapeNoopOptimization` canonicalizer.

This canonicalizer replaces reshapes of constant tensors that contain the updated shape (skipping the reshape operation).

Differential Revision: https://reviews.llvm.org/D112038
The file was modifiedmlir/test/Dialect/Tosa/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Tosa/IR/TosaOps.cpp
Commit a897590f11b6cb2bacf6cd317a5f96b1d39ed2f2 by stellaraccident
Add MLIR_INSTALL_AGGREGATE_OBJECTS and default it to ON.

* Package maintainers can opt to disable installation of these objects.
* Per discussion on https://reviews.llvm.org/D111504

Differential Revision: https://reviews.llvm.org/D112090
The file was modifiedmlir/cmake/modules/MLIRConfig.cmake.in
The file was modifiedmlir/CMakeLists.txt
The file was modifiedmlir/cmake/modules/AddMLIR.cmake
Commit b6b7fe60a444e03387b0e8be31bc1742ead36b25 by tra
[NVPTX] Add a late SROA pass which allows optimizing away more allocas.

Fixes performance regression https://bugs.llvm.org/show_bug.cgi?id=52037

Differential Revision: https://reviews.llvm.org/D111471
The file was addedllvm/test/CodeGen/NVPTX/b52037.ll
The file was modifiedllvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
Commit cd40b5a71290bab313cc431fb9a90ac3f9f3fa02 by yhs
BPF: set .BTF and .BTF.ext section alignment to 4

Currently, .BTF and .BTF.ext has default alignment of 1.
For example,
  $ cat t.c
    int foo() { return 0; }
  $ clang -target bpf -O2 -c -g t.c
  $ llvm-readelf -S t.o
    ...
    Section Headers:
    [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
    ...
    [ 7] .BTF              PROGBITS        0000000000000000 000167 00008b 00      0   0  1
    [ 8] .BTF.ext          PROGBITS        0000000000000000 0001f2 000050 00      0   0  1

But to have no misaligned data access, .BTF and .BTF.ext
actually requires alignment of 4. Misalignment is not an issue
for architecture like x64/arm64 as it can handle it well. But
some architectures like mips may incur a trap if .BTF/.BTF.ext
is not properly aligned.

This patch explicitly forced .BTF and .BTF.ext alignment to be 4.
For the above example, we will have
    [ 7] .BTF              PROGBITS        0000000000000000 000168 00008b 00      0   0  4
    [ 8] .BTF.ext          PROGBITS        0000000000000000 0001f4 000050 00      0   0  4

Differential Revision: https://reviews.llvm.org/D112106
The file was modifiedllvm/lib/Target/BPF/BTFDebug.cpp
The file was addedllvm/test/CodeGen/BPF/BTF/align.ll
Commit 320f65ee65f40fadbd2016036e538e28ae28614c by Shafik Yaghmour
[LLDB][NFC] Remove parameter names from forward declarations from hand written expressions used in heap.py part 2

heap.py has a lot of large hand written expressions and each name in the
expression will be looked up by clang during expression parsing. For
function parameters this will be in Sema::ActOnParamDeclarator(...) in order to
catch redeclarations of parameters. The names are not needed and we have seen
some rare cases where since we don't have symbols we end up in
SymbolContext::FindBestGlobalDataSymbol(...) which may conflict with other global
symbols.

There may be a way to make this lookup smarter to avoid these cases but it is
not clear how well tested this path is and how much work it would be to fix it.
So we will go with this fix while we investigate more.

This is a second try at getting all the cases we care about.

Ref: rdar://78265641
The file was modifiedlldb/examples/darwin/heap_find/heap.py
Commit 2542bfa43a9709982ee20f8d86f905f4115c41f9 by tlively
[WebAssembly] Add prototype relaxed swizzle instructions

Add i8x16 relaxed_swizzle instructions. These are only
exposed as builtins, and require user opt-in.

Differential Revision: https://reviews.llvm.org/D112022
The file was modifiedclang/include/clang/Basic/BuiltinsWebAssembly.def
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
The file was modifiedclang/test/CodeGen/builtins-wasm.c
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-intrinsics.ll
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedllvm/include/llvm/IR/IntrinsicsWebAssembly.td
The file was modifiedllvm/test/MC/WebAssembly/simd-encodings.s
Commit ea9826ff77195c12dfba698d5fcb90786c949aa2 by Lang Hames
[ORC-RT] Avoid switching out-of-band error value into __orc_rt::Error and back.

WrapperFunctionResult can already convey serialization errors as out-of-band
error values, so there's no need to wrap it in an Expected here. Removing the
wrapper simplifies the plumbing and call sites.
The file was modifiedcompiler-rt/lib/orc/wrapper_function_utils.h
Commit 21369d4b9d9233d0b58ea82b649435745d8dde70 by Lang Hames
[ORC-RT] Use function pointer type (rather than reference) for traits class.

Aligns this template with the corresponding one in LLVM.
The file was modifiedcompiler-rt/lib/orc/wrapper_function_utils.h
Commit b574c52db5335c7e68e5b77dfc40e954fe344d9a by Lang Hames
[ORC-RT] Add MethodWrapperHandler utility for WrapperFunction.

This is an ORC runtime counterpart to a01f772d19d, which introduced the same
functionality into LLVM.
The file was modifiedcompiler-rt/lib/orc/wrapper_function_utils.h
The file was modifiedcompiler-rt/lib/orc/unittests/wrapper_function_utils_test.cpp
Commit 9378ca52ca6ec39fa369349cf06f8ade47657570 by shaoce
[NFC] Fix typos
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/test/MC/RISCV/rv32i-invalid.s
The file was modifiedllvm/test/MC/RISCV/rv32zbbp-valid.s
Commit 063c2f89aa7f5b0b61a63d639d8124035f26935c by aeubanks
[clang] Add option to disable -clear-ast-before-backend

Some downstream users have plugins that -clear-ast-before-backend may
affect. Add an option to opt out.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D112100
The file was modifiedclang/lib/CodeGen/CodeGenAction.cpp
The file was modifiedclang/test/Misc/clear-ast-before-backend.c
The file was modifiedclang/include/clang/Driver/Options.td