LLVM/project 2f076c3clang/bindings/python/clang cindex.py, clang/bindings/python/tests/cindex test_file.py

[libclang/python] Deprecate _CXUnsavedFile, introduce UnsavedFile instead (#187412)

To maintain consistency with other classes mirrored from libclang, the
`_CX` prefix should be removed.
The old name is introduced as a subclass of the renamed class, and
deprecation warnings are added on every attribute access.
DeltaFile
+22-3clang/bindings/python/clang/cindex.py
+12-1clang/bindings/python/tests/cindex/test_file.py
+4-0clang/docs/ReleaseNotes.rst
+38-43 files

LLVM/project 3991dcbllvm/utils/gn/secondary/clang/lib/Driver BUILD.gn

[gn] port 81e8a1e59ee28e54
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
+1-01 files

LLVM/project ea4955fclang/lib/Serialization ASTReader.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+1-1clang/lib/Serialization/ASTReader.cpp
+1-11 files

LLVM/project 8ccda46llvm/utils/gn/secondary/clang/lib/DependencyScanning BUILD.gn

[gn] port 02451f54d642ae

Also remove dependency on TargetsToBuild, which was apparently never
needed.
DeltaFile
+0-2llvm/utils/gn/secondary/clang/lib/DependencyScanning/BUILD.gn
+0-21 files

LLVM/project 8771fd9llvm/utils/gn/secondary/compiler-rt/lib/profile BUILD.gn

[gn build] Port d18a784d4106
DeltaFile
+1-0llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn
+1-01 files

LLVM/project d7dc03bllvm/utils/gn/secondary/lldb/source/Plugins/ExpressionParser/Clang BUILD.gn

[gn build] Port 4f298d4efa2f
DeltaFile
+1-0llvm/utils/gn/secondary/lldb/source/Plugins/ExpressionParser/Clang/BUILD.gn
+1-01 files

LLVM/project 7a54421llvm/utils/gn/secondary/clang/lib/Headers BUILD.gn

[gn build] Port b17db271d030
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
+1-01 files

LLVM/project 13d99cellvm/utils/gn/secondary/clang/lib/AST BUILD.gn

[gn build] Port 39b6a4d84ad8
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
+1-01 files

LLVM/project efc1138clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/CodeGen struct-init.cpp globals.cpp

[CIR] Add lowering for bool attributes (#187590)

When a boolean attribute was encountered in a constant global record or
constant global array, we were going to the default handler, which
returned a null value, and then trying to insert this null value in an
LLVM structure, which crashes.

This adds proper lowering for boolean attributes.
DeltaFile
+12-1clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+13-0clang/test/CIR/CodeGen/struct-init.cpp
+6-0clang/test/CIR/CodeGen/globals.cpp
+31-13 files

LLVM/project 9eb852cclang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/lib/CIR/CodeGen CIRGenModule.cpp CIRGenBuilder.cpp

[CIR] Implement global variable replacement in global view (#186168)

This change upstreams the CIR implementation of global variable
replacement handling for cases where the global was used in a
cir.global_view operation, either as an initializer for another global
or as a constant ptr.
DeltaFile
+99-2clang/lib/CIR/CodeGen/CIRGenModule.cpp
+48-1clang/test/CIR/CodeGen/replace-global.cpp
+22-0clang/lib/CIR/CodeGen/CIRGenBuilder.cpp
+12-0clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+5-0clang/lib/CIR/CodeGen/CIRGenBuilder.h
+186-35 files

LLVM/project 3fdc82cflang/lib/Lower OpenACC.cpp, flang/test/Lower/OpenACC acc-host-data-cuda-device.f90 acc-host-data.f90

[flang][openacc][cuda] Fix order of clause processing for host_data directive (#187600)

This was crashing lowering with `not yet implemented: lowering symbol to
HLFIR` because the symbol was not mapped correctly
DeltaFile
+31-29flang/lib/Lower/OpenACC.cpp
+13-0flang/test/Lower/OpenACC/acc-host-data-cuda-device.f90
+1-1flang/test/Lower/OpenACC/acc-host-data.f90
+45-303 files

LLVM/project 0e60574llvm/lib/Support raw_socket_stream.cpp

[raw_socket_stream] Fix a file descriptor leak when connect failed (#187574)

Close the socket file descriptor if `::connect` returns error. This
prevents leaking file descriptor on failure.
DeltaFile
+3-1llvm/lib/Support/raw_socket_stream.cpp
+3-11 files

LLVM/project 537e7b5clang/include/clang/DependencyScanning DependencyScannerImpl.h, clang/lib/Tooling DependencyScanningTool.cpp

[clang][DependencyScanning] Fix misplaced Driver includes (NFC) (#187599)

As pointed out in [the review of
#15277](https://github.com/llvm/llvm-project/pull/152770#discussion_r2962823008),
`DependencyScannerImpl.h` includes headers from the driver. However, the
dependency scanning library does not depend on the driver at all. This
PR fixes the include issue.

The dependency on the Driver was removed following the RFC:
https://discourse.llvm.org/t/rfc-new-clangoptions-library-remove-dependency-on-clangdriver-from-clangfrontend-and-flangfrontend/88773
DeltaFile
+0-2clang/include/clang/DependencyScanning/DependencyScannerImpl.h
+2-0clang/lib/Tooling/DependencyScanningTool.cpp
+2-22 files

LLVM/project ec3a719llvm/test/CodeGen/X86 bitreverse.ll

[X86] bitreverse.ll - add additional i128/i256/i512 GFNI test coverage for #187502 (#187552)
DeltaFile
+1,193-0llvm/test/CodeGen/X86/bitreverse.ll
+1,193-01 files

LLVM/project cbab7e6llvm/lib/Transforms/Utils AMDGPUEmitPrintf.cpp, offload/plugins-nextgen/amdgpu/src rtl.cpp

[AMDGPU] Minor cleanups in offload plugin and AMDGPUEmitPrintf. NFC. (#187587)

Use empty() in assert, brace-init instead of std::make_pair in the
AMDGPU offload plugin, and fix a comment typo in AMDGPUEmitPrintf.
DeltaFile
+2-2offload/plugins-nextgen/amdgpu/src/rtl.cpp
+1-1llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp
+3-32 files

LLVM/project 61b9fc1clang/test/CodeGenCUDA mangling.cu

[CIR] Upstream CUDA mangling test with LLVM and OGCG verification (#184444)

This PR upstreams the `mangling.cu` test from the ClangIR incubator. 

Building on the feedback from my previous upstreaming PR, I have
expanded the verification for this file to include:
1. **CIR checks:** Verifying the ClangIR generated functions.
2. **LLVM checks:** Verifying the LLVM IR generated via the ClangIR
pipeline.
3. **OGCG checks:** Verifying against the original CodeGen pipeline to
ensure name-mangling parity.

I have also moved the `Inputs/cuda.h` mock header to the upstream
`Inputs` directory to support this and future CUDA tests.

If this multi-stage verification approach looks correct to the
maintainers, I plan to follow up by upstreaming the other currently
passing CUDA test, `simple-nvptx-triple.cu`, using the same standard.

Verified locally with `llvm-lit`. Partially addresses #156747.
DeltaFile
+126-0clang/test/CodeGenCUDA/mangling.cu
+126-01 files

LLVM/project 002d42ellvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 externally-used-copyables.ll revec-reductions.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+157-74llvm/test/Transforms/SLPVectorizer/AArch64/externally-used-copyables.ll
+62-57llvm/test/Transforms/SLPVectorizer/X86/parent-node-non-schedulable.ll
+19-49llvm/test/Transforms/SLPVectorizer/AArch64/revec-reductions.ll
+42-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+11-12llvm/test/Transforms/SLPVectorizer/NVPTX/v2f16.ll
+291-1945 files

LLVM/project 9cb1e37clang/lib/Driver/ToolChains AMDGPU.cpp HIPAMD.cpp

[Clang][AMDGPU] Minor driver cleanups. NFC. (#187586)

Use empty() instead of size() checks, back() instead of [size()-1], and
brace-init instead of std::make_pair in the AMDGPU and HIP driver
toolchains.
DeltaFile
+3-4clang/lib/Driver/ToolChains/AMDGPU.cpp
+1-2clang/lib/Driver/ToolChains/HIPAMD.cpp
+4-62 files

LLVM/project 7efcd61libc/docs/dev modular_format.rst, libc/src/stdio sprintf_modular.cpp snprintf_modular.cpp

[libc] Modular printf option (float only) (#147426)

This adds LIBC_CONF_PRINTF_MODULAR, which causes floating point support
(later, others) to be weakly linked into the implementation.
__printf_modular becomes the main entry point of the implementaiton, an
printf itself wraps __printf_modular. printf it also contains a
BFD_RELOC_NONE relocation to bring in the float aspect.

See issue #146159 for context.
DeltaFile
+68-0libc/docs/dev/modular_format.rst
+54-0libc/src/stdio/sprintf_modular.cpp
+54-0libc/src/stdio/snprintf_modular.cpp
+51-0libc/src/stdio/vsnprintf_modular.cpp
+50-0libc/src/stdio/vsprintf_modular.cpp
+43-0libc/src/stdio/asprintf_modular.cpp
+320-046 files not shown
+735-2752 files

LLVM/project 4e19eeellvm/include/llvm/CodeGen MachineInstr.h, llvm/lib/Target/AMDGPU SIInstrInfo.h

[NFC] Annotate CommentFlag with underlying type (#186560)

This is stored in `uint8_t AsmPrinterFlags`, and `setAsmPrinterFlag` was
already using `uint8_t` in the API. This change doesn't use a scoped
enum as targets extend this enum by starting their enums with the
`TAsmComments` value.

This also introduces a typedef for the uint8_t for documentation purposes.
DeltaFile
+13-12llvm/include/llvm/CodeGen/MachineInstr.h
+1-1llvm/lib/Target/X86/X86InstrInfo.h
+1-1llvm/lib/Target/AMDGPU/SIInstrInfo.h
+1-1llvm/lib/Target/SPIRV/SPIRVInstrInfo.h
+16-154 files

LLVM/project e895a80lldb/include/lldb/Symbol CompilerType.h TypeSystem.h, lldb/source/Plugins/TypeSystem/Clang TypeSystemClang.cpp TypeSystemClang.h

[lldb][TypeSystem] Add CompilerType::IsMemberDataPointerType (#187172)

**Description:**

Adds `IsMemberDataPointerType()` to CompilerType / TypeSystem /
TypeSystemClang, mirroring the existing `IsMemberFunctionPointerType()`.

LLDB already has `IsMemberFunctionPointerType()` to identify member
function pointers but no counterpart for member data pointers. The only
way to check for member data pointers was the indirect `GetTypeClass()
== eTypeClassMemberPointer && !IsMemberFunctionPointerType()`, which is
awkward.

This pr is split out from a larger [fix,
186629](https://github.com/llvm/llvm-project/pull/186629) for LLDB
mishandling non-type template parameters (NTTPs) of pointer-to-member
types, where cleanly distinguishing member data pointers from member
function pointers is needed. The new API delegates to clang's
`QualType::isMemberDataPointerType()` via the same I`sTypeImpl` pattern

    [12 lines not shown]
DeltaFile
+29-0lldb/unittests/Symbol/TestTypeSystemClang.cpp
+9-0lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+7-0lldb/source/Symbol/CompilerType.cpp
+2-0lldb/include/lldb/Symbol/CompilerType.h
+2-0lldb/include/lldb/Symbol/TypeSystem.h
+2-0lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
+51-06 files

LLVM/project 178f4e6llvm/lib/Target/AMDGPU AMDGPULowerVGPREncoding.cpp, llvm/test/CodeGen/AMDGPU vgpr-setreg-mode-swar.mir hazard-setreg-vgpr-msb-gfx1250.mir

[AMDGPU] Fix setreg handling in the VGPR MSB lowering

There are multiple issues with it:

1. It can skip inserting S_SET_VGPR_MSB if we set the mode via
   piggybacking. We are now relying on the HW bug for correct
   behavior. If/when the bug is fixed lowering will be incorrect.
2. We should just unconditionally update MSBs if immediate allows it.
   We shall set correct bits and keep the rest of the immediate
   (that is done). There is no reasonable way for an user to change
   MSBs nor does it do anything good to set it with SETREG and then
   immediately overwrite with S_SET_VGPR_MSB.
3. We can always update immediate if Offset is zero.
4. Redundant mode changes created as seen in the
   hazard-setreg-vgpr-msb-gfx1250.mir.
5. Decoding of the immediate was also wrong with non-zero offset
   and did not factor MSB fixup offset handling.

With unconditional immediate update most of time and not relying on

    [12 lines not shown]
DeltaFile
+86-33llvm/test/CodeGen/AMDGPU/vgpr-setreg-mode-swar.mir
+30-38llvm/lib/Target/AMDGPU/AMDGPULowerVGPREncoding.cpp
+12-18llvm/test/CodeGen/AMDGPU/hazard-setreg-vgpr-msb-gfx1250.mir
+128-893 files

LLVM/project 59bc629llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.cpp, llvm/test/CodeGen/AMDGPU vgpr-setreg-mode-swar.mir

[AMDGPU] Fix decoding of SETREG MSBs (#187578)

Decoding of the immediate was wrong with non-zero offset
and did not factor MSB fixup offset handling.
DeltaFile
+40-0llvm/test/CodeGen/AMDGPU/vgpr-setreg-mode-swar.mir
+5-2llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+45-22 files

LLVM/project 33cfe28llvm/lib/Target/DirectX DXILShaderFlags.cpp, llvm/test/CodeGen/DirectX/ShaderFlags typed-srv-load.ll

[DirectX] Fix TypedBuffer load shader flag mismatch (#187393)

Fixes #187225.

The `TypedUAVLoadAdditionalFormats` shader flag was being set for all
TypedBuffer vector loads, so loading from a `Buffer<int64_t2>` was
incorrectly triggering this flag and causing the mismatch. This PR
changes it so the flag is only set for UAV loads.
DeltaFile
+43-0llvm/test/CodeGen/DirectX/ShaderFlags/typed-srv-load.ll
+1-1llvm/lib/Target/DirectX/DXILShaderFlags.cpp
+44-12 files

LLVM/project f276ad4llvm/unittests/Transforms/Vectorize VPlanTestBase.h

[VPlan] Make sure Inductions outlive returned VPlan.

Move Inductions to VPlanTestBase, to make sure it outlives
VPlanTestBase::getPlan(). Fixes a use-after-free issue.
DeltaFile
+3-1llvm/unittests/Transforms/Vectorize/VPlanTestBase.h
+3-11 files

LLVM/project 25f0d08clang/lib/Driver/ToolChains BareMetal.cpp, clang/test/Driver baremetal.cpp

[clang] add x86_64 baremetal triple include search paths (#183453)

when compiling for i386 / x86_64 baremetal targets, the include path for
the triple-specific directory is not added. This is the layout I'm
currently using, which from my understanding is the multi-target layout
that clang supports.

Sysroot layout:
```
sysroot 
    └── usr
        ├── bin
        ├── include
        │   ├── c++
        │   ├── [other dirs]
        │   ├── i386-pc-linux-musl
        │   │   ├── linux
        │   │   ├── c++
        │   │   │   └── v1

    [62 lines not shown]
DeltaFile
+46-0clang/test/Driver/baremetal.cpp
+7-1clang/lib/Driver/ToolChains/BareMetal.cpp
+53-12 files

LLVM/project 81e8a1eclang/include/clang/Basic DiagnosticDriverKinds.td, clang/lib/Driver ModulesDriver.cpp

[clang][modules-driver] Add dependency scan and dependency graph (#152770)

This patch is part of a series to support driver-managed module builds. 
It adds support for discovery of module dependencies from within the
driver and for generation of the module dependency graph.

Source inputs provided on the command line can import modules defined in
the Standard library module manifest, which are then scanned on demand.

The dependency scan and graph support both Clang modules and C++ named
modules.
The generated dependency graph can be output in Graphviz DOT format as a
remark.

RFC discussing linking the driver against additional libraries:
https://discourse.llvm.org/t/rfc-driver-link-the-driver-against-clangdependencyscanning-clangast-clangfrontend-clangserialization-and-clanglex

RFC for driver-managed module builds:
https://discourse.llvm.org/t/rfc-modules-support-simple-c-20-modules-use-from-the-clang-driver-without-a-build-system
DeltaFile
+1,327-7clang/lib/Driver/ModulesDriver.cpp
+101-0clang/test/Driver/modules-driver-dep-graph-stdlib-modules.cpp
+91-0clang/test/Driver/modules-driver-dep-graph.cpp
+25-0clang/test/Driver/modules-driver-dep-scan-diagnostics.cpp
+19-0clang/test/Driver/modules-driver-duplicate-named-module.cpp
+11-0clang/include/clang/Basic/DiagnosticDriverKinds.td
+1,574-72 files not shown
+1,577-98 files

LLVM/project b03e3d1lldb/docs/use map.rst symbolication.rst, lldb/docs/use/tutorials script-driven-debugging.md

[lldb] Fix Python 2 prints in the docs (#187553)

The Python example snippets on the lldb website were still using Python
2 syntax for printing.

rdar://123267107
DeltaFile
+7-7lldb/docs/use/tutorials/script-driven-debugging.md
+1-1lldb/docs/use/map.rst
+1-1lldb/docs/use/symbolication.rst
+9-93 files

LLVM/project a9ca888llvm/include/llvm-c Core.h, llvm/lib/IR Core.cpp

[IR][CAPI] Mark LLVMIsABranchInst as deprecated (#187576)

Follow-up of https://github.com/llvm/llvm-project/pull/187314.
DeltaFile
+6-3llvm/include/llvm-c/Core.h
+6-3llvm/lib/IR/Core.cpp
+12-62 files

LLVM/project ef0b5eclibc/utils/hdrgen/tests/expected_output test_small_proxy.h

Update test_small_proxy.h
DeltaFile
+1-0libc/utils/hdrgen/tests/expected_output/test_small_proxy.h
+1-01 files