LLVM/project 0902a6bllvm/lib/TargetParser XtensaTargetParser.cpp

Add missing #include (fix for  #166997)
DeltaFile
+1-0llvm/lib/TargetParser/XtensaTargetParser.cpp
+1-01 files

LLVM/project 15e3b49llvm/lib/IR EHPersonalities.cpp

[llvm] Allow Rust personality name to contain arbitrary prefix (#166095)

LLVM needs to figure out the type of EH personality for various reasons.
To do this, it currently matches against a hardcoded list of names. In
Rust, we would like to mangle our personality function to better support
linking multiple Rust standard libraries via staticlib. We have
currently mangled all symbols except the personality, which remains
unmangled because of this LLVM hardcoding.

Instead, this now does a suffix match of the personality name, which
will work with the mangling scheme used for these internal symbols (e.g.
`_RNvCseCSg29WUqSe_7___rustc12___rust_alloc`).

Companion Rust PR: https://github.com/rust-lang/rust/pull/148413
DeltaFile
+4-2llvm/lib/IR/EHPersonalities.cpp
+4-21 files

LLVM/project 02976f5llvm/utils/TableGen FastISelEmitter.cpp RegisterInfoEmitter.cpp, llvm/utils/TableGen/Common CodeGenRegisters.h

[TableGen] Use "using" instead of "typedef" (NFC) (#167168)

Identified with modernize-use-using.
DeltaFile
+13-14llvm/utils/TableGen/Common/CodeGenRegisters.h
+7-7llvm/utils/TableGen/FastISelEmitter.cpp
+5-5llvm/utils/TableGen/RegisterInfoEmitter.cpp
+5-5llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h
+5-5llvm/utils/TableGen/AsmMatcherEmitter.cpp
+4-4llvm/utils/TableGen/X86InstrMappingEmitter.cpp
+39-4017 files not shown
+78-8123 files

LLVM/project 26bb121llvm/benchmarks FormatVariadicBM.cpp, llvm/unittests/DebugInfo/PDB NativeSessionTest.cpp

Remove unused <vector> inclusion (#166997)

DeltaFile
+13-14llvm/benchmarks/FormatVariadicBM.cpp
+0-2llvm/unittests/Support/DynamicLibrary/PipSqueak.h
+2-0llvm/unittests/Support/DynamicLibrary/PipSqueak.cpp
+0-2llvm/unittests/ExecutionEngine/Orc/MapperJITLinkMemoryManagerTest.cpp
+0-2llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp
+0-1llvm/unittests/TextAPI/TextStubV4Tests.cpp
+15-2126 files not shown
+15-4732 files

LLVM/project 3673cc7llvm/test/tools/llvm-rc octal.test tokenizer.test, llvm/test/tools/llvm-rc/Inputs octal-in-range.rc octal-out-of-range.rc

[llvm-rc] Don't interpret integer literals as octal numbers in rc.exe mode (#166915)

It turns out that rc.exe doesn't interpret integer literals as octal
numbers - but GNU windres does. Previously, llvm-rc did interpret them
as octal.

Fix the issue by stripping away the leading zeros during tokenization.
The alternative (which would be somewhat cleaner, as visible in
tokenizer.test) would be to retain them in the RCToken object, but strip
them out before calling
StringRef::getAsInteger. Alternatively to handle the radix detection
locally in llvm-rc code and not rely on getAsInteger to autodetect it.
Both of those solutions require propagating the IsWindres flag so that
it is available within RCToken, or at least when calling
RCToken::intValue().

Fixes: https://github.com/llvm/llvm-project/issues/144723
DeltaFile
+35-9llvm/tools/llvm-rc/ResourceScriptToken.cpp
+38-0llvm/test/tools/llvm-rc/octal.test
+4-1llvm/test/tools/llvm-rc/tokenizer.test
+4-0llvm/test/tools/llvm-rc/Inputs/octal-in-range.rc
+4-0llvm/test/tools/llvm-rc/Inputs/octal-out-of-range.rc
+2-1llvm/tools/llvm-rc/llvm-rc.cpp
+87-113 files not shown
+90-149 files

LLVM/project afc8368libcxxabi/test/native/x86_64 lpstart-zero.pass.sh.s, libunwind/test remember_state_leak.pass.sh.s

[libc++abi][libunwind] Enable AT&T syntax explicitly (#166818)

Implementation files using the Intel syntax typically explicitly specify
it. Do the same for the few files where applicable for AT&T.

This enables building LLVM with `-mllvm -x86-asm-syntax=intel` in one's
Clang config files (i.e. a global preference for Intel syntax).
DeltaFile
+1-0libcxxabi/test/native/x86_64/lpstart-zero.pass.sh.s
+1-0libunwind/test/remember_state_leak.pass.sh.s
+2-02 files

LLVM/project 825943e.github/workflows libcxx-build-and-test.yaml, libcxx/utils/ci run-buildbot

[libc++] Run macOS buildbot under xcrun (#167072)

This ensures that run-buildbot can find the appropriate build tools
without having to go through a bunch of hoops inside run-buildbot
itself. When we eventually run the bootstrapping build on macOS, it also
allows the bootstrapped Clang to find the SDK headers it requires.

This also allows simplifying run-buildbot a bunch since we should be
able to find build tools in the current $PATH.
DeltaFile
+35-60libcxx/utils/ci/run-buildbot
+1-1.github/workflows/libcxx-build-and-test.yaml
+36-612 files

LLVM/project 070f331clang/lib/Driver/ToolChains Gnu.cpp

[Driver] Remove extraneous c_str() (NFC) (#167156)

Note that addMultilibFlag takes StringRef for its second parameter.

Identified with readability-redundant-string-cstr.
DeltaFile
+2-2clang/lib/Driver/ToolChains/Gnu.cpp
+2-21 files

LLVM/project 6b42c91llvm/lib/Target/WebAssembly WebAssemblyMachineFunctionInfo.h

[WebAssembly] Clean up CustomMappingTraits<BBNumberMap> (NFC) (#167155)

This patch does two things for readability:

- Use structured bindings.
- Remove extraneous .c_str().

Note that YamlIO.mapRequired takes StringRef as the key type.  As
such, we can implicitly construct StringRef from std::string.
DeltaFile
+2-2llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
+2-21 files

LLVM/project 1e18747llvm/lib/ObjectYAML CodeViewYAMLSymbols.cpp DXContainerYAML.cpp

[ObjectYAML] Remove redundant .str().c_str() (NFC) (#167154)

We can drop .str().c_str() here because all of the following are of
type StringRef:

- E.Name
- the second parameter of llvm::yaml::IO::enumCase
- the second parameter of llvm::yaml::IO::bitSetCase

Identified with readability-redundant-string-cstr.
DeltaFile
+14-24llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
+15-15llvm/lib/ObjectYAML/DXContainerYAML.cpp
+29-392 files

LLVM/project ae1622allvm/lib/Target/NVPTX NVPTXGenericToNVVM.cpp NVPTX.h

[NVPTX] Remove redundant declarations (NFC) (#167153)

initializeNVPTXCtorDtorLoweringLegacyPass is declared twice in
NVPTX.h.

initializeGenericToNVVMLegacyPassPass is declared in NVPTX.h.

Identified with readability-redundant-declaration.
DeltaFile
+0-4llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
+0-1llvm/lib/Target/NVPTX/NVPTX.h
+0-52 files

LLVM/project c06f864llvm/lib/ExecutionEngine/Orc/TargetProcess LibraryScanner.cpp

[ExecutionEngine] Use StringRef::starts_with (NFC) (#167152)

Identified with modernize-use-starts-ends-with.
DeltaFile
+2-2llvm/lib/ExecutionEngine/Orc/TargetProcess/LibraryScanner.cpp
+2-21 files

LLVM/project 18b8e3bllvm/include/llvm/ADT StringSwitch.h

[ADT] Add a missing std::move to StringSwitch::EndsWithLower (#167151)

All others seem to use std::move in StringSwitch.
DeltaFile
+1-1llvm/include/llvm/ADT/StringSwitch.h
+1-11 files

LLVM/project ace77c2clang-tools-extra/clang-tidy/readability SuspiciousCallArgumentCheck.cpp SimplifyBooleanExprCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (9/N) (#167124)

DeltaFile
+26-26clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp
+26-25clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
+19-18clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp
+12-10clang-tools-extra/clang-tidy/readability/NamespaceCommentCheck.cpp
+8-8clang-tools-extra/clang-tidy/readability/OperatorsRepresentationCheck.cpp
+5-5clang-tools-extra/clang-tidy/readability/UseStdMinMaxCheck.cpp
+96-9215 files not shown
+130-12321 files

LLVM/project 5896a25clang-tools-extra/clang-tidy/bugprone NotNullTerminatedResultCheck.cpp NarrowingConversionsCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (13/N) (#167130)

DeltaFile
+48-46clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
+20-20clang-tools-extra/clang-tidy/bugprone/NarrowingConversionsCheck.cpp
+16-14clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp
+8-7clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp
+6-6clang-tools-extra/clang-tidy/bugprone/MisplacedWideningCastCheck.cpp
+5-5clang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp
+103-9813 files not shown
+135-12719 files

LLVM/project 385dbc1clang-tools-extra/clang-tidy/bugprone EasilySwappableParametersCheck.cpp ArgumentCommentCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (12/N) (#167129)

DeltaFile
+54-49clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp
+23-20clang-tools-extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp
+13-12clang-tools-extra/clang-tidy/bugprone/ImplicitWideningOfMultiplicationResultCheck.cpp
+7-7clang-tools-extra/clang-tidy/bugprone/DefaultOperatorNewOnOveralignedTypeCheck.cpp
+5-4clang-tools-extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp
+4-4clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
+106-9615 files not shown
+132-12121 files

LLVM/project 545c302clang-tools-extra/clang-tidy/readability IdentifierNamingCheck.cpp ImplicitBoolConversionCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (8/N) (#167123)

DeltaFile
+47-44clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
+16-16clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
+13-13clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp
+10-10clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStaticCheck.cpp
+11-7clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
+8-8clang-tools-extra/clang-tidy/readability/IsolateDeclarationCheck.cpp
+105-9816 files not shown
+151-14422 files

LLVM/project 01bea27clang-tools-extra/clang-tidy/modernize LoopConvertCheck.cpp UseAutoCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (10/N) (#167127)

DeltaFile
+24-23clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
+23-20clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
+19-19clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
+18-18clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp
+16-16clang-tools-extra/clang-tidy/modernize/UseConstraintsCheck.cpp
+13-11clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp
+113-10715 files not shown
+177-16521 files

LLVM/project ce7f9f9llvm/docs Coroutines.rst AMDGPUUsage.rst

[llvm] Proofread *.rst (#167108)

This patch is limited to single-word replacements to fix spelling
and/or grammar to ease the review process.  Punctuation and markdown
fixes are specifically excluded.
DeltaFile
+6-6llvm/docs/Coroutines.rst
+5-5llvm/docs/AMDGPUUsage.rst
+2-2llvm/docs/CompileCudaWithLLVM.rst
+2-2llvm/docs/GetElementPtr.rst
+2-2llvm/docs/Docker.rst
+2-2llvm/docs/BranchWeightMetadata.rst
+19-1911 files not shown
+32-3217 files

LLVM/project 2844d86mlir/lib/Dialect/Affine/Utils Utils.cpp, mlir/lib/Dialect/Linalg/Transforms TilingInterfaceImpl.cpp

[mlir] Remove unused local variables (NFC) (#167107)

Identified with bugprone-unused-local-non-trivial-variable.
DeltaFile
+0-3mlir/lib/Dialect/Affine/Utils/Utils.cpp
+0-2mlir/lib/Dialect/Linalg/Transforms/TilingInterfaceImpl.cpp
+0-1mlir/lib/Dialect/SCF/Transforms/ParallelForToNestedFors.cpp
+0-1mlir/lib/Dialect/OpenACC/Transforms/ACCImplicitData.cpp
+0-74 files

LLVM/project 0028ef6llvm/lib/CAS UnifiedOnDiskCache.cpp, llvm/lib/CodeGen WindowsSecureHotPatching.cpp

[llvm] Remove unused local variables (NFC) (#167106)

Identified with bugprone-unused-local-non-trivial-variable.
DeltaFile
+0-2llvm/lib/CAS/UnifiedOnDiskCache.cpp
+0-2llvm/lib/CodeGen/WindowsSecureHotPatching.cpp
+0-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+0-1llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
+0-1llvm/lib/Transforms/IPO/SampleProfile.cpp
+0-85 files

LLVM/project ee0652bflang/lib/Optimizer/CodeGen LowerRepackArrays.cpp, flang/lib/Optimizer/OpenMP DoConcurrentConversion.cpp

[flang] Remove unused local variables (NFC) (#167105)

Identified with bugprone-unused-local-non-trivial-variable.
DeltaFile
+0-3flang/lib/Optimizer/OpenMP/DoConcurrentConversion.cpp
+0-1flang/lib/Optimizer/CodeGen/LowerRepackArrays.cpp
+0-1flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
+0-53 files

LLVM/project d838ca2clang-tools-extra/clang-doc HTMLMustacheGenerator.cpp

[clang-doc] Remove an unused local variable (NFC) (#167104)

Identified with bugprone-unused-local-non-trivial-variable.
DeltaFile
+0-1clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
+0-11 files

LLVM/project 6313830lldb/include/lldb lldb-private-interfaces.h

Fix missing include from #166664
DeltaFile
+1-0lldb/include/lldb/lldb-private-interfaces.h
+1-01 files

LLVM/project c6ffc93clang-tools-extra/clang-tidy/bugprone VirtualNearMissCheck.cpp TooSmallLoopVariableCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (14/N) (#167131)

DeltaFile
+20-20clang-tools-extra/clang-tidy/bugprone/VirtualNearMissCheck.cpp
+16-16clang-tools-extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.cpp
+10-10clang-tools-extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp
+10-8clang-tools-extra/clang-tidy/bugprone/SuspiciousSemicolonCheck.cpp
+7-5clang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp
+4-4clang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp
+67-6313 files not shown
+99-9219 files

LLVM/project 6deb50dclang-tools-extra/clang-tidy/modernize UseTrailingReturnTypeCheck.cpp UseOverrideCheck.cpp

[clang-tidy][NFC] Fix misc-const-correctness warnings (11/N) (#167128)

DeltaFile
+26-25clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
+16-15clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp
+14-13clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
+5-5clang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
+5-5clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
+4-3clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
+70-669 files not shown
+87-8215 files

LLVM/project fa98c8dutils/bazel/llvm-project-overlay/libc/test/src/stdlib BUILD.bazel

Fix bazel build for #166719
DeltaFile
+1-0utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+1-01 files

LLVM/project b9ea93cllvm/lib/Transforms/InstCombine InstructionCombining.cpp, llvm/test/Transforms/InstCombine binop-select.ll

[InstCombine] Fold operation into select, when one operand is zext of select's condition (#166816)

Proof https://alive2.llvm.org/ce/z/oCQyTG
DeltaFile
+6-23llvm/test/Transforms/InstCombine/binop-select.ll
+3-0llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+9-232 files

LLVM/project 21c1b78clang/lib/CodeGen/Targets AArch64.cpp, clang/test/CodeGen arm64-microsoft-arguments.cpp

fix: C++ empty record with align lead to va_list out of sync (#72197)

Fix AArch64 argument passing for C++ empty classes with large explicitly specified  alignment

reproducer: https://godbolt.org/z/qsze8fqra 
rel issue: https://github.com/llvm/llvm-project/issues/69872 
rel commit: https://github.com/llvm/llvm-project/commit/1711cc930bda8d27e87a2092bd220c18e4600c98
DeltaFile
+19-1clang/test/CodeGen/AArch64/args.cpp
+6-4clang/test/CodeGen/AArch64/struct-coerce-using-ptr.cpp
+6-3clang/lib/CodeGen/Targets/AArch64.cpp
+2-2clang/test/CodeGen/arm64-microsoft-arguments.cpp
+1-1clang/test/CodeGenCXX/arm64-darwinpcs.cpp
+1-1clang/test/CodeGenCXX/aarch64-arguments.cpp
+35-121 files not shown
+36-127 files

LLVM/project a0e222fllvm/lib/Transforms/Utils SimplifyCFG.cpp, llvm/test/Transforms/SimplifyCFG switch_create.ll switch-transformations-no-lut.ll

[SimplifyCFG] Simplify uncond br with icmp & select (#165580)

Previously, SimplifyCFG only simplified unconditional branches when they
met a pattern (`swicth` -> `icmp` -> `br` -> `phi`) as follows:
```LLVM
   switch i8 %A, label %DEFAULT [ i8 1, label %end    i8 2, label %end ]
DEFAULT:
   %tmp = icmp eq i8 %A, 92
   br label %end
end:
   ... = phi i1 [ true, %entry ], [ %tmp, %DEFAULT ], [ true, %entry ]
```

This PR supports a new and more generic pattern (`switch` -> `icmp` ->
`select` -> `br` -> `phi` ) to simplify unconditional branches as
follows:
```LLVM
; BEFORE
case1:

    [36 lines not shown]
DeltaFile
+111-22llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+130-0llvm/test/Transforms/SimplifyCFG/switch_create.ll
+2-3llvm/test/Transforms/SimplifyCFG/switch-transformations-no-lut.ll
+2-2llvm/test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table.ll
+245-274 files