LLVM/project 719a8ebllvm/lib/Target/RISCV RISCVCallingConv.cpp

[RISCV][llvm] Remove outdated FIXME in calling convention. NFC (#176350)

DeltaFile
+0-2llvm/lib/Target/RISCV/RISCVCallingConv.cpp
+0-21 files

LLVM/project f53c2e6clang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR] Upstream support for calling through method pointers (#176063)

This adds support to CIR for calling functions through pointer to method
pointers with the Itanium ABI for x86_64 targets. The ARM-specific
handling of method pointers is not-yet implemented.
DeltaFile
+151-2clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerItaniumCXXABI.cpp
+84-0clang/test/CIR/CodeGen/pointer-to-member-func.cpp
+54-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+47-0clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+44-0clang/lib/CIR/CodeGen/CIRGenExprCXX.cpp
+30-0clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+410-27 files not shown
+451-813 files

LLVM/project 56522e4libc/test/src/strings wide_read_memory_test.cpp CMakeLists.txt

Create a poor-developer's msan for libc wide read functions. (#170586)

Most libcs optimize functions like strlen by reading in chunks larger
than a single character. As part of "the implementation", they can
legally do this as long as they are careful not to read invalid memory.

However, such tricks prevents those functions from being tested under
the various sanitizers.

This PR creates a test framework that can report when one of these
functions read or write in an invalid way without using the sanitizers.
DeltaFile
+101-0libc/test/src/strings/wide_read_memory_test.cpp
+15-0libc/test/src/strings/CMakeLists.txt
+116-02 files

LLVM/project 8021b02lldb/source/Plugins/Platform/WebAssembly PlatformWasm.cpp, lldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp

[llvm][Support] Move llvm::createStringErrorV to a new ErrorExtras.h header (#176491)

Introducing `llvm::createStringErrorV` caused a `0.5%` compile-time
regression because it's an inline function in a core header. This moves
the API to a new header to prevent including this function in files that
don't need it.

Also includes the header in the source files that have been using
`createStringErrorV` (which currently is just LLDB).
DeltaFile
+34-0llvm/include/llvm/Support/ErrorExtras.h
+0-16llvm/include/llvm/Support/Error.h
+1-0lldb/source/Plugins/Platform/WebAssembly/PlatformWasm.cpp
+1-0lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+1-0lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+1-0lldb/source/Protocol/MCP/Server.cpp
+38-166 files not shown
+44-1612 files

LLVM/project 1f9c53cflang/lib/Parser program-parsers.cpp, flang/test/Semantics cuf-proc-attr-error.cuf

[flang][cuda] Emit better error when subprogram attribute is absent or bad (#176501)

this patch update the parser for CUDA Fortran subprogram attribute to
emit more precise error.

Instead of having error like: 

```
error: expected 'END'
      attributes(managed) integer function fooj()
      ^
```

The parser will emit: 
```
 expected DEVICE, GLOBAL, GRID_GLOBAL, or HOST attribute
  attributes(managed) integer function fooj()
             ^
```
DeltaFile
+12-7flang/lib/Parser/program-parsers.cpp
+9-0flang/test/Semantics/cuf-proc-attr-error.cuf
+21-72 files

LLVM/project 022888elibc/shared/math fsqrtf128.h, libc/src/__support/math fsqrtf128.h CMakeLists.txt

[libc][math] Refactor fsqrtf128 to Header Only. (#175686)

builds correctly with both Clang and GCC 12.2.

Closes #175333.
DeltaFile
+33-0libc/src/__support/math/fsqrtf128.h
+28-0libc/shared/math/fsqrtf128.h
+12-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+9-0libc/src/__support/math/CMakeLists.txt
+2-5libc/src/math/generic/fsqrtf128.cpp
+2-2libc/src/math/generic/CMakeLists.txt
+86-83 files not shown
+89-89 files

LLVM/project 6397207libc/shared/math ilogbl.h, libc/src/__support/math ilogbl.h CMakeLists.txt

[libc][math] Refactor ilogbl to Header Only. (#176500)

builds with both Clang and GCC 12.2.

Closes https://github.com/llvm/llvm-project/issues/175349.
DeltaFile
+28-0libc/src/__support/math/ilogbl.h
+23-0libc/shared/math/ilogbl.h
+12-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+10-0libc/src/__support/math/CMakeLists.txt
+2-6libc/src/math/generic/ilogbl.cpp
+3-0libc/test/shared/shared_math_test.cpp
+78-73 files not shown
+82-89 files

LLVM/project c70fc1allvm/lib/Target/X86 X86ISelLoweringCall.cpp X86ISelLowering.h, llvm/test/CodeGen/X86 nocf_check_musttail.ll

[X86] Separate sibcall checks from guaranteed TCO (#176479)

Rename IsEligibleForTailCallOptimization to isEligibleForSiblingCallOpt.
LLVM supports two other ways to bypass this logic: musttail and
ShouldGuaranteeTCO. The result of this function doesn't really control
tail call eligibility, and returning false from it is not sufficient to
block tail call emission. Rename it to clarify the code.

Move the calling convention match check, which is the only thing that
matters in the guaranteed TCO case, out of this sibcall eligibility
check.

Move the GOT early binding check into the sibcall eligibility check,
since it is bypassed in either guaranteed TCO case. When that [diff
landed](https://reviews.llvm.org/D9799), it did not have exceptions for
`musttail`, but later in 9ff2eb1ea596a the two guaranteed tail call
cases were made to override this check, forcing lazy binding, which I
agree is the right tradeoff.


    [3 lines not shown]
DeltaFile
+44-46llvm/lib/Target/X86/X86ISelLoweringCall.cpp
+17-0llvm/test/CodeGen/X86/nocf_check_musttail.ll
+5-5llvm/lib/Target/X86/X86ISelLowering.h
+66-513 files

LLVM/project 997fdeflibc/shared/math llogbf.h, libc/src/__support/math llogbf.h CMakeLists.txt

[libc][math] Refactor llogbf to Header Only. (#176494)

builds with both Clang and GCC 12.2.

Closes https://github.com/llvm/llvm-project/issues/175354.
DeltaFile
+28-0libc/src/__support/math/llogbf.h
+23-0libc/shared/math/llogbf.h
+12-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+10-0libc/src/__support/math/CMakeLists.txt
+2-4libc/src/math/generic/llogbf.cpp
+2-1libc/src/math/generic/CMakeLists.txt
+77-63 files not shown
+80-69 files

LLVM/project 0f739e7llvm/lib/Target/AMDGPU SIInstrInfo.cpp

[AMDGPU] Use lambda in fmaak/fmamk f16 folding. NFC (#176258)

DeltaFile
+23-38llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+23-381 files

LLVM/project bbafff1llvm/lib/Target/AMDGPU AMDGPULowerVGPREncoding.cpp SIInstrInfo.h

[AMDGPU] NFC: Add a comment (#176435)

DeltaFile
+8-5llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
+0-6llvm/lib/Target/AMDGPU/SIInstrInfo.h
+8-112 files

LLVM/project da34f9bllvm/lib/Target/AArch64 AArch64FrameLowering.cpp AArch64PrologueEpilogue.cpp, llvm/test/CodeGen/AArch64 arm64-windows-calls.ll wineh-pac.ll

[AArch64] Fix Windows prologue handling to pair more registers. (#170214)

Currently, there's code to suppress pairing, but we don't actually need
to suppress that; we just need to suppress the formation of
pre-decrement/post-increment instructions.

Pairing saves an instruction in some cases, and enables packed unwind in
some cases.
DeltaFile
+20-24llvm/test/CodeGen/AArch64/arm64-windows-calls.ll
+16-16llvm/test/CodeGen/AArch64/wineh-pac.ll
+9-16llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+8-16llvm/test/CodeGen/AArch64/win64_vararg2.ll
+12-12llvm/test/DebugInfo/COFF/AArch64/arm64-register-variables.ll
+13-1llvm/lib/Target/AArch64/AArch64PrologueEpilogue.cpp
+78-851 files not shown
+84-917 files

LLVM/project 08bcd7clibc/shared/math hypotf.h, libc/src/__support/math hypotf.h CMakeLists.txt

[libc][math] Refactor hypotf to Header Only. (#175679)

builds correctly with both Clang and GCC 12.2.

Closes #175338.
DeltaFile
+107-0libc/src/__support/math/hypotf.h
+2-83libc/src/math/generic/hypotf.cpp
+22-0libc/shared/math/hypotf.h
+17-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+13-0libc/src/__support/math/CMakeLists.txt
+2-6libc/src/math/generic/CMakeLists.txt
+163-913 files not shown
+166-919 files

LLVM/project 7950a88llvm/lib/Support Jobserver.cpp

[llvm/Support] Remove unnecessary includes from `Jobserver.cpp`, NFC (#176473)

DeltaFile
+0-5llvm/lib/Support/Jobserver.cpp
+0-51 files

LLVM/project a84d743lldb/source/Plugins/Instruction/RISCV EmulateInstructionRISCV.cpp, lldb/unittests/Instruction/RISCV TestRISCVEmulator.cpp

[lldb] Support both RISCV-32 and RISCV-64 in GetRegisterInfo (#176472)

`GetRegisterInfo` hardcodes to use `RegisterInfoPOSIX_riscv64` instead
of checking the triple to determine whether to use
`RegisterInfoPOSIX_riscv64` or `RegisterInfoPOSIX_riscv32`.

Someone put up a [PR](https://github.com/llvm/llvm-project/pull/175262)
for this, but seems to have removed their account and the associated PR
with it.

Fixes #175092
DeltaFile
+19-4lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+17-0lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp
+36-42 files

LLVM/project a3a8e82clang/cmake/caches Pico.cmake

CMake cache file for building Pico SDK toolchain (#113267)

This cache file demonstrates how to build a complete baremetal
Clang/LLVM toolchain that can be used to build the Pico SDK.
DeltaFile
+90-0clang/cmake/caches/Pico.cmake
+90-01 files

LLVM/project fae5760clang/lib/CIR/Dialect/Transforms CXXABILowering.cpp, clang/lib/CIR/Dialect/Transforms/TargetLowering LowerItaniumCXXABI.cpp CIRCXXABI.h

[CIR] Upstream handling for member ptr function compare (#176029)

This adds handling for compare expressions involving member pointer to
functions.
DeltaFile
+121-0clang/test/CIR/CodeGen/pointer-to-member-func-cmp.cpp
+52-0clang/lib/CIR/Dialect/Transforms/TargetLowering/LowerItaniumCXXABI.cpp
+9-5clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
+4-0clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRCXXABI.h
+186-54 files

LLVM/project 074653alldb/source/Plugins/Process/wasm ProcessWasm.cpp ProcessWasm.h

[lldb] Fix llvm_unreachable for invalid Wasm address (#176464)

We had an llvm_unreachable following a switch on the WasmAddress's type.
However, the type is encoded in a larger 64 bit address, and therefore
it's possible to create an invalid value that doesn't map back on one of
the enum types.

We could try to diagnose that in the wrapper, or treat all invalid types
the same. I took the latter approach because it makes it easier to show
the invalid type after the fact in an error message.

rdar://168314695
DeltaFile
+8-4lldb/source/Plugins/Process/wasm/ProcessWasm.cpp
+3-1lldb/source/Plugins/Process/wasm/ProcessWasm.h
+11-52 files

LLVM/project 716b547libc/shared/math logbf.h, libc/src/__support/math logbf.h CMakeLists.txt

[libc][math] Refactor logbf to Header Only. (#176222)

builds with both Clang and GCC 12.2.

Closes https://github.com/llvm/llvm-project/issues/175364.
DeltaFile
+26-0libc/src/__support/math/logbf.h
+22-0libc/shared/math/logbf.h
+15-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+8-0libc/src/__support/math/CMakeLists.txt
+2-4libc/src/math/generic/logbf.cpp
+2-1libc/src/math/generic/CMakeLists.txt
+75-63 files not shown
+78-69 files

LLVM/project 986b45cllvm/lib/Target/AMDGPU SIInstrInfo.cpp

[AMDGPU] Use lambda in fmaak/fmamk f16 folding. NFC
DeltaFile
+23-38llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+23-381 files

LLVM/project dac308clibc/shared/math logbf16.h, libc/src/__support/math logbf16.h CMakeLists.txt

[libc][math] Refactor logbf16 to Header Only. (#176231)

builds with both Clang and GCC 12.2.

Closes https://github.com/llvm/llvm-project/issues/175363.
DeltaFile
+34-0libc/src/__support/math/logbf16.h
+29-0libc/shared/math/logbf16.h
+14-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+10-0libc/src/__support/math/CMakeLists.txt
+2-4libc/src/math/generic/logbf16.cpp
+2-2libc/src/math/generic/CMakeLists.txt
+91-73 files not shown
+94-79 files

LLVM/project 37da38eclang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp, clang/test/CIR/CodeGenBuiltins/X86 rdrand-builtins.c

[CIR][X86] Implement rdrand/rdseed builtins (#175439)

Add support for rdrand and rdseed builtins.

Part of #167765
DeltaFile
+146-0clang/test/CIR/CodeGenBuiltins/X86/rdrand-builtins.c
+42-1clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+188-12 files

LLVM/project 6c496a1libc/shared/math logbf128.h, libc/src/__support/math logbf128.h CMakeLists.txt

[libc][math] Refactor logbf128 to Header Only. (#176234)

builds with both Clang and GCC 12.2.

Closes #175362.
DeltaFile
+34-0libc/src/__support/math/logbf128.h
+30-0libc/shared/math/logbf128.h
+12-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+9-0libc/src/__support/math/CMakeLists.txt
+4-4libc/src/math/generic/logbf128.cpp
+2-2libc/src/math/generic/CMakeLists.txt
+91-73 files not shown
+94-79 files

LLVM/project 762a44fclang/include/clang/Analysis/Analyses UnsafeBufferUsage.h, clang/include/clang/Basic DiagnosticGroups.td DiagnosticSemaKinds.td

[clang][Wunsafe-buffer-usage] Add -Wunsafe-buffer-usage-in-static-sized-array (#176466)

This PR adds support for toggling on/off warnings around static sized
arrays. This supports / addresses
https://github.com/llvm/llvm-project/issues/87284, for those who use
-fsanitize=array-bounds which inserts checks for fixed sized arrays
already.
DeltaFile
+159-0clang/test/SemaCXX/warn-unsafe-buffer-usage-in-static-sized-array.cpp
+17-2clang/lib/Analysis/UnsafeBufferUsage.cpp
+6-0clang/lib/Sema/AnalysisBasedWarnings.cpp
+5-0clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h
+2-1clang/include/clang/Basic/DiagnosticGroups.td
+2-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+191-31 files not shown
+192-47 files

LLVM/project 828261ellvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp CombinerHelper.cpp, llvm/test/CodeGen/RISCV/GlobalISel rv32p.ll rv64p.ll

[GISel] Add G_CTLS Opcode and combines, lower to cls(w) (#175069)

Fixes https://github.com/llvm/llvm-project/issues/174369

- Added a G_CTLS opcode and some pattern matching. This is the
GlobalISel equivalent to
https://github.com/llvm/llvm-project/pull/173417
- Add legalization for aarch64 and riscv

```
// Folds (ctlz (xor x, (sra x, bitwidth-1))) -> (add (ctls x), 1). 
// Folds (ctlz (or (shl (xor x, (sra x, bitwidth-1)), 1), 1) -> (ctls x) (clang aarch64)
```
DeltaFile
+431-0llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-ctls-rv32.mir
+395-0llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-ctls-rv64.mir
+141-0llvm/test/CodeGen/RISCV/GlobalISel/rv32p.ll
+114-0llvm/test/CodeGen/RISCV/GlobalISel/rv64p.ll
+82-5llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+67-0llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+1,230-518 files not shown
+1,325-3924 files

LLVM/project 2282f60lld/test/wasm debug-weak-unused.s, lld/wasm InputFiles.cpp

[lld][WebAssembly] Fix crash in debug info relocation against shared symbols (#176460)

When a weakly defined function is not include because its defined in
shared object we should use the tombstone value during relocation of
debug info.

Fixes: https://github.com/emscripten-core/emscripten/issues/26044
DeltaFile
+36-0lld/test/wasm/debug-weak-unused.s
+1-1lld/wasm/InputFiles.cpp
+37-12 files

LLVM/project e36ddffllvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[VPlan] Add scalable check to SinkStoreInfo helper.

Bail out on scalable vectors in helper. Currently this is not causing
issues, but fixes a potential crash that would be exposed by a follow-up
change.

Test would exposes the issue in the future has been added in
8c5352cf3e14ec0c56f592091899d229de8436a7.
DeltaFile
+2-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+2-01 files

LLVM/project 4a4fa0aclang/lib/Analysis UnsafeBufferUsage.cpp

[NFC][Clang][-Wunsafe-buffer-usage] Rename variable to upper camel case. (#176286)

Trivial renaming following the [style
guide](https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly).

This is mostly to familiarize myself with the workflow for contributing
to LLVM.
DeltaFile
+11-11clang/lib/Analysis/UnsafeBufferUsage.cpp
+11-111 files

LLVM/project 255af94clang/lib/CodeGen CGExpr.cpp, clang/test/CodeGenHLSL BoolMatrix.hlsl

[HLSL][Matrix] Update indexed matrix elements individually (#176216)

Fixes #174629

This PR is similar to that of #169144 but for matrices.

When storing to a matrix element or matrix row, `insertelement`
instructions have been replaced by GEPs followed by stores to individual
matrix elements. There is no longer storing of the entire matrix to
memory all at once, thus avoiding data races when writing to independent
matrix elements from multiple threads.
DeltaFile
+76-66clang/test/CodeGenHLSL/BasicFeatures/MatrixSingleSubscriptSetter.hlsl
+48-19clang/lib/CodeGen/CGExpr.cpp
+14-11clang/test/CodeGenHLSL/BasicFeatures/MatrixSingleSubscriptDynamicSwizzle.hlsl
+12-10clang/test/CodeGenHLSL/BasicFeatures/MatrixSingleSubscriptConstSwizzle.hlsl
+7-10clang/test/CodeGenHLSL/BoolMatrix.hlsl
+3-4clang/test/CodeGenHLSL/BasicFeatures/matrix-type-indexing.hlsl
+160-1206 files

LLVM/project 2042887llvm/docs MIRLangRef.rst, llvm/include/llvm/CodeGen MachineInstrBuilder.h

Reland "[NFC][MI] Tidy Up RegState enum use (1/2)" (#176277)

This Change is to prepare to make RegState into an enum class. It:
- Updates documentation to match the order in the code.
- Brings the `get<>RegState` functions together and makes them
`constexpr`.
- Adopts the `get<>RegState` where RegStates were being chosen with
ternary operators in backend code.
- Introduces `hasRegState` to make querying RegState easier once it is
an enum class.
- Adopts `hasRegState` where equivalent was done with bitwise
arithmetic.
- Introduces `RegState::NoFlags`, which will be used for the lack of
flags.
- Documents that `0x1` is a reserved flag value used to detect if
someone is passing `true` instead of flags (due to implicit bool to
unsigned conversions).
- Updates two calls to `MachineInstrBuilder::addReg` which were passing
`false` to the flags operand, to no longer pass a value.

    [6 lines not shown]
DeltaFile
+66-51llvm/include/llvm/CodeGen/MachineInstrBuilder.h
+17-17llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+15-15llvm/docs/MIRLangRef.rst
+14-10llvm/lib/CodeGen/MIRParser/MIParser.cpp
+8-9llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+8-8llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
+128-11017 files not shown
+156-14223 files