LLVM/project 08215e5clang/docs ReleaseNotes.rst, clang/lib/Sema SemaDecl.cpp

[Clang] treat fixed-underlying enum constants as the enumerated type in C23 to follow the spec (#172211)

Fixes #172118

--- 

This patch resolves an issue where C23 fixed-underlying enum constants
were incorrectly treated as the underlying integer type instead of the
enumeration type.

According to C23 `6.7.2.2p15`:

> The enumeration member type of an enumerated type with a fixed
underlying type is the same as the type itself.
DeltaFile
+59-0clang/test/Sema/c23-fixed-underlying-enum.c
+20-0clang/test/Sema/c23-switch.c
+7-2clang/lib/Sema/SemaDecl.cpp
+3-3clang/test/SemaCXX/bitfield-preferred-type-sizing.cpp
+2-1clang/test/C/C23/n3029.c
+1-0clang/docs/ReleaseNotes.rst
+92-66 files

LLVM/project 423b2dallvm/test/CodeGen/AArch64 avg.ll, llvm/test/CodeGen/PowerPC vavg.ll

[AArch64][PPC][X86] Add test coverage for #128377 (#174661)

DeltaFile
+1,300-0llvm/test/CodeGen/X86/avgceils.ll
+1,073-3llvm/test/CodeGen/X86/avgceilu.ll
+168-0llvm/test/CodeGen/PowerPC/vavg.ll
+76-0llvm/test/CodeGen/AArch64/avg.ll
+2,617-34 files

LLVM/project 50281declang/test/CIR/CodeGen/X86 avx512-reduceIntrin.c avx512-reduceMinMaxIntrin.c, clang/test/CIR/CodeGenBuiltins/X86 avx512-reduceIntrin.c avx512-reduceMinMaxIntrin.c

[CIR][NFC] Move some builtin tests to the CodeGenBuitins folder (#174660)

This moves a few tests that were created in the wrong location.
DeltaFile
+71-0clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceIntrin.c
+0-71clang/test/CIR/CodeGen/X86/avx512-reduceIntrin.c
+0-69clang/test/CIR/CodeGen/X86/avx512-reduceMinMaxIntrin.c
+69-0clang/test/CIR/CodeGenBuiltins/X86/avx512-reduceMinMaxIntrin.c
+0-45clang/test/CIR/CodeGen/X86/cir-sqrt-builtins.c
+45-0clang/test/CIR/CodeGenBuiltins/X86/sqrt-builtins.c
+185-1856 files

LLVM/project 30fe41bflang/lib/Optimizer/Transforms CUFOpConversion.cpp CUFGPUToLLVMConversion.cpp, flang/lib/Optimizer/Transforms/CUDA CUFOpConversion.cpp CUFGPUToLLVMConversion.cpp

[flang][cuda][NFC] Move CUDA Fortran passes into CUDA directory (#174657)

Move CUDA Fortran related passes with others in CUDA directory.
DeltaFile
+0-613flang/lib/Optimizer/Transforms/CUFOpConversion.cpp
+613-0flang/lib/Optimizer/Transforms/CUDA/CUFOpConversion.cpp
+0-340flang/lib/Optimizer/Transforms/CUFGPUToLLVMConversion.cpp
+340-0flang/lib/Optimizer/Transforms/CUDA/CUFGPUToLLVMConversion.cpp
+0-186flang/lib/Optimizer/Transforms/CUFComputeSharedMemoryOffsetsAndSize.cpp
+186-0flang/lib/Optimizer/Transforms/CUDA/CUFComputeSharedMemoryOffsetsAndSize.cpp
+1,139-1,1395 files not shown
+1,474-1,47411 files

LLVM/project 7ae746fclang/docs OpenMPSupport.rst

Update PR number in OpenMPSupport RST.
DeltaFile
+1-1clang/docs/OpenMPSupport.rst
+1-11 files

LLVM/project c556f11clang/lib/Driver/ToolChains Clang.cpp

remove comments
DeltaFile
+0-20clang/lib/Driver/ToolChains/Clang.cpp
+0-201 files

LLVM/project 9c2b1baclang/include/clang/Basic SourceLocation.h, clang/unittests/Basic SourceManagerTest.cpp

[LLVM][ADT] Add specialization of `DenseMapInfo` for `SourceRange` (#174524)

So that `SourceRange` can be used in `DenseMap` and `DenseSet`.
DeltaFile
+19-0clang/include/clang/Basic/SourceLocation.h
+16-0clang/unittests/Basic/SourceManagerTest.cpp
+35-02 files

LLVM/project 8ed9a40clang-tools-extra/clang-doc/assets class-template.mustache namespace-template.mustache, clang-tools-extra/test/clang-doc basic-project.mustache.test typedef-alias.cpp

[clang-doc] Make sidebar sections collapsible (#174531)

Collapsible lists are achieved via `<details>` and their child
`<summary>` tags. `<details>` tags allow for a section to be designated
as collapsible, while the `<summary>` tag is used as the sidebar
section's header. This approach was chosen over making the lists
stateful through various CSS properties.

This patch also refactors the `<li>` tag structure of sidebar sections.
Previously, the section header and list items were in separate `<li>`
tags without sharing a parent. Now, the header and items are under a
single `<li>` tag which makes more sense semantically.
DeltaFile
+96-80clang-tools-extra/clang-doc/assets/class-template.mustache
+88-68clang-tools-extra/test/clang-doc/basic-project.mustache.test
+72-60clang-tools-extra/clang-doc/assets/namespace-template.mustache
+20-25clang-tools-extra/test/clang-doc/typedef-alias.cpp
+19-21clang-tools-extra/test/clang-doc/json/compound-constraints.cpp
+17-19clang-tools-extra/test/clang-doc/json/class.cpp
+312-2735 files not shown
+363-32211 files

LLVM/project e667c39clang/include/clang/Frontend CompilerInstance.h, clang/include/clang/Serialization ModuleManager.h ModuleCache.h

[clang] Reference-count `ModuleCache` non-intrusively (#164889)

The `ModuleCache` class is currently reference-counted intrusively. As
explained in https://github.com/llvm/llvm-project/pull/139584, this is
problematic. This PR uses `std::shared_ptr` to reference-count
`ModuleCache` instead, which clarifies what happens to its lifetime when
constructing `CompilerInstance`, for example. This also makes the
reference in `ModuleManager` non-owning, simplifying the ownership
relationship further. The
`ASTUnit::transferASTDataFromCompilerInstance()` function now accounts
for that by taking care to keep it alive.
DeltaFile
+5-4clang/lib/Frontend/CompilerInstance.cpp
+3-3clang/lib/DependencyScanning/DependencyScannerImpl.cpp
+2-3clang/include/clang/Serialization/ModuleManager.h
+3-2clang/include/clang/Frontend/CompilerInstance.h
+2-3clang/include/clang/Serialization/ModuleCache.h
+2-2clang/lib/Serialization/ModuleCache.cpp
+17-178 files not shown
+30-2814 files

LLVM/project 05ed785llvm/include/llvm/Frontend/OpenMP ConstructDecompositionT.h

[OpenMP] Remove special handling of implicit clauses in decomposition

Applying implicit clauses should not cause any issues. The only exception
is that "simd linear(x)" could imply a "firstprivate", and that clause is
not allowed on the simd construct.
Add a check for that specific case, and apply all implicit clauses as if
they were explicit.
DeltaFile
+15-11llvm/include/llvm/Frontend/OpenMP/ConstructDecompositionT.h
+15-111 files

LLVM/project 3e840d2bolt/include/bolt/Core MCPlusBuilder.h, bolt/lib/Target/AArch64 AArch64MCPlusBuilder.cpp

[BOLT] Remove unnecessary dependency. NFC (#174645)

There's no need for a full definition of `BinaryBasicBlock` in
`MCPlusBuilder.h`. Use `InstructionListType::iterator` instead of
`BinaryBasicBlock::iterator` in `findMemcpySizeInBytes()`.
DeltaFile
+1-2bolt/include/bolt/Core/MCPlusBuilder.h
+1-1bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
+2-32 files

LLVM/project a19b464flang/include/flang/Optimizer/Transforms Passes.td, flang/lib/Optimizer/Transforms CMakeLists.txt

[flang][cuda] Add CUFFunctionRewrite pass (#174650)

This rewrite some CUDA Fortran specific like `on_device` function to
constant boolean values.
DeltaFile
+103-0flang/lib/Optimizer/Transforms/CUDA/CUFFunctionRewrite.cpp
+44-0flang/test/Fir/CUDA/cuda-function-rewrite.mlir
+5-0flang/include/flang/Optimizer/Transforms/Passes.td
+1-0flang/lib/Optimizer/Transforms/CMakeLists.txt
+153-04 files

LLVM/project c2d060cllvm/lib/Transforms/Vectorize VPlanPatternMatch.h

[VPlan] Mark variable unused in release build [[maybe_unused]] (#174648)

To prevent compiler warnings when building without assertions turned on.
DeltaFile
+1-1llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+1-11 files

LLVM/project 320c706llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-fdiv.ll

ValueTracking: Improve sign bit handling for fdiv

This is the fdiv version of 5020e0ff1494137ff12b4ed7c8fa896f8088b17b for
fmul.
DeltaFile
+14-3llvm/lib/Analysis/ValueTracking.cpp
+3-3llvm/test/Transforms/Attributor/nofpclass-fdiv.ll
+17-62 files

LLVM/project 059276fllvm/test/Transforms/Attributor nofpclass-fdiv.ll nofpclass-frem.ll

ValueTracking: Add more baseline tests for fdiv sign tracking

This is the fmul version of 08b1403228953866cb052a3fdb34719a7f4e87e2
DeltaFile
+581-0llvm/test/Transforms/Attributor/nofpclass-fdiv.ll
+549-0llvm/test/Transforms/Attributor/nofpclass-frem.ll
+1,130-02 files

LLVM/project 1db7ae7llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass-fdiv.ll nofpclass-frem.ll

ValueTracking: Check if fdiv operand could be undef

In the special case for fdiv/frem with the same operands, make
sure the input isn't undef.
DeltaFile
+21-11llvm/test/Transforms/Attributor/nofpclass-fdiv.ll
+21-11llvm/test/Transforms/Attributor/nofpclass-frem.ll
+2-1llvm/lib/Analysis/ValueTracking.cpp
+1-1llvm/test/Transforms/InstSimplify/floating-point-compare.ll
+45-244 files

LLVM/project 1f0064eoffload/libomptarget omptarget.cpp, offload/test/mapping/use_device_addr target_data_use_device_addr_arrsec_ref_not_existing.cpp target_data_use_device_addr_var_ref_not_existing.cpp

Merge branch 'udp-fallback-preserve-by-default' into users/abhinavgaba/udp-fallback-0
DeltaFile
+33-3offload/libomptarget/omptarget.cpp
+7-21offload/test/mapping/use_device_addr/target_data_use_device_addr_arrsec_ref_not_existing.cpp
+8-19offload/test/mapping/use_device_ptr/target_data_use_device_ptr_ref_not_existing.cpp
+6-15offload/test/mapping/use_device_addr/target_data_use_device_addr_var_ref_not_existing.cpp
+6-15offload/test/mapping/use_device_addr/target_data_use_device_addr_var_not_existing.cpp
+5-15offload/test/mapping/use_device_addr/target_data_use_device_addr_arrsec_not_existing.cpp
+65-887 files not shown
+78-11813 files

LLVM/project 0aea22fcompiler-rt/test lit.common.configured.in

[compiler-rt] Support default-True lit config options (follow up to #174522) (#174642)

The option added in #174522 breaks simulator tests, since `set_default`
overrides `False` values with the default.

Since these options are either string or boolean, this patches
set_default to override only un-set or empty string values (empty string
is not truth-y and therefore would be overwritten by defaults currently,
so this is NFCI)
DeltaFile
+1-1compiler-rt/test/lit.common.configured.in
+1-11 files

LLVM/project ccca3b8clang/lib/Sema SemaAMDGPU.cpp, clang/test/CodeGenOpenCL builtins-amdgcn-gfx1250-wmma-w32.cl

[AMDGPU] Rework the clamp support for WMMA instructions (#174310)

Fixes #166989.
DeltaFile
+57-0llvm/lib/IR/AutoUpgrade.cpp
+26-26llvm/test/CodeGen/AMDGPU/wmma-coececution-valu-hazards.mir
+20-20llvm/test/CodeGen/AMDGPU/wmma-hazards-gfx1250-w32.mir
+34-0clang/lib/Sema/SemaAMDGPU.cpp
+23-4llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+24-2clang/test/CodeGenOpenCL/builtins-amdgcn-gfx1250-wmma-w32.cl
+184-5212 files not shown
+280-9018 files

LLVM/project 4de4d15clang/lib/Lex HeaderMap.cpp, llvm/lib/Support VirtualOutputBackends.cpp

undo commit fix
DeltaFile
+2-8llvm/lib/Support/VirtualOutputBackends.cpp
+0-1clang/lib/Lex/HeaderMap.cpp
+2-92 files

LLVM/project 29e544allvm/lib/Target/SystemZ SystemZAsmPrinter.cpp

Update MCSymbolAttr enum
DeltaFile
+5-6llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+5-61 files

LLVM/project fc589d2llvm/lib/Target/SystemZ SystemZAsmPrinter.cpp

Syntax fix and remove comment
DeltaFile
+0-1llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+0-11 files

LLVM/project 371fad2llvm/include/llvm/ADT GenericUniformityImpl.h, llvm/test/Analysis/UniformityAnalysis/AMDGPU incorrect-assertion-issue-170048.ll

[UniformityAnalysis] Remove an incorrect assertion in uniformity analysis (#174117)

The join block could be not a header of a cycle, as shown in the newly
added test case.
DeltaFile
+56-0llvm/test/Analysis/UniformityAnalysis/AMDGPU/incorrect-assertion-issue-170048.ll
+1-3llvm/include/llvm/ADT/GenericUniformityImpl.h
+57-32 files

LLVM/project 8a3a7e0llvm/lib/Target/SystemZ SystemZAsmPrinter.cpp SystemZAsmPrinter.h

implement more features
DeltaFile
+34-0llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+1-0llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
+35-02 files

LLVM/project 701040dllvm/include/llvm/Analysis FunctionPropertiesAnalysis.h, llvm/include/llvm/IR FunctionProperties.def

[LLVM] Successor count added to InstCount (#171670)

Counts the number of Basic Block successors when stats are enabled
We want to track this metric for a project in which we analyze the
effects of having LLVM Intermediate Representation (IR) code with a high
number of branches. We plan to use these capabilities to learn how
enabling memory safety features increases the branchiness in LLVM IR and
further how it affects binary compilation time and the resulting binary
performance.
DeltaFile
+105-0llvm/include/llvm/IR/FunctionProperties.def
+45-50llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp
+70-0llvm/test/Other/functionpropertiesanalysis.ll
+11-0llvm/include/llvm/Analysis/FunctionPropertiesAnalysis.h
+6-2llvm/lib/Passes/PassBuilderPipelines.cpp
+1-0llvm/lib/Passes/PassRegistry.def
+238-526 files

LLVM/project cda0806llvm/lib/Support VirtualOutputBackends.cpp

undo accdiental commit
DeltaFile
+8-3llvm/lib/Support/VirtualOutputBackends.cpp
+8-31 files

LLVM/project 231ff10clang/lib/Lex HeaderMap.cpp, llvm/lib/Support VirtualOutputBackends.cpp

Implement emitGlobalVariable and lowerConstant
DeltaFile
+73-0llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+2-0llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
+1-0clang/lib/Lex/HeaderMap.cpp
+1-0llvm/lib/Support/VirtualOutputBackends.cpp
+77-04 files

LLVM/project 64a224alldb/tools/lldb-dap/extension package-lock.json

[lldb-dap] Bump qs to 6.14.1
DeltaFile
+2-2lldb/tools/lldb-dap/extension/package-lock.json
+2-21 files

LLVM/project d12e993llvm/test/Transforms/LoopVectorize uniform_across_vf_induction1_div_urem.ll uniform_across_vf_induction2.ll, llvm/test/Transforms/LoopVectorize/AArch64 scalable-strict-fadd.ll partial-reduce.ll

Reland [VPlan] Simplify pow-of-2 (mul|udiv) -> (shl|lshr) (#174581)

The original patch, landed as a2db31b0 ([VPlan] Simplify pow-of-2
(mul|udiv) -> (shl|lshr), #172477) had a critical commutative matcher
bug, which has now been fixed. An assert has also been strengthened,
following a post-commit review.
DeltaFile
+49-49llvm/test/Transforms/LoopVectorize/uniform_across_vf_induction1_div_urem.ll
+47-47llvm/test/Transforms/LoopVectorize/uniform_across_vf_induction2.ll
+40-40llvm/test/Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll
+40-40llvm/test/Transforms/LoopVectorize/uniform_across_vf_induction1.ll
+36-36llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll
+32-32llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce.ll
+244-244125 files not shown
+893-879131 files

LLVM/project 93190f3llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-fmul.ll

InstCombine: Consider not-inf/nan context when simplifying fmul

Consider if the result can be nan, or if the inputs cannot
be infinity from the flag when trying to simplify fmul into
copysign.
DeltaFile
+18-12llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-fmul.ll
+12-6llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+30-182 files