LLVM/project 6682681clang/lib/CIR/CodeGen CIRGenCall.cpp, clang/test/CIR/CodeGen misc-attrs.cpp

[CIR] Implement returns_twice, cold, hot, noduplicate, convergent func attrs (#178289)

Continuing my quest to get most of the attributes completed, this patch
implements 5 attributes for CIR/Clang CIR codegen.

4 of the 5 are also implemented in LLVM-MLIR, since 'convergent' was
already there.

As a part of this, we also had to make sure that attributes were handled
properly for Call operation lowering, like we do for function
attributes.
DeltaFile
+63-0clang/test/CIR/CodeGen/misc-attrs.cpp
+48-0mlir/test/Target/LLVMIR/Import/instructions.ll
+44-0mlir/test/Target/LLVMIR/llvmir.mlir
+24-0mlir/test/Dialect/LLVMIR/func.mlir
+24-0mlir/test/Target/LLVMIR/Import/function-attributes.ll
+18-6clang/lib/CIR/CodeGen/CIRGenCall.cpp
+221-68 files not shown
+307-814 files

LLVM/project 6fe246ellvm/include/llvm/CodeGen SDPatternMatch.h, llvm/unittests/CodeGen SelectionDAGPatternMatchTest.cpp

[DAG] SDPatternMatch - Add matchers for reassociatable additions with NSW/NUW flags (#177973)

Fixes #176809
DeltaFile
+71-0llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp
+21-1llvm/include/llvm/CodeGen/SDPatternMatch.h
+92-12 files

LLVM/project ef6d452llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 pr178410.ll

[X86] vectorizeExtractedCast - don't assume vector source type is simple (#178414)

Fixes #178410
DeltaFile
+38-0llvm/test/CodeGen/X86/pr178410.ll
+3-2llvm/lib/Target/X86/X86ISelLowering.cpp
+41-22 files

LLVM/project 47318f0mlir/python/mlir/dialects ext.py

Formatting
DeltaFile
+0-2mlir/python/mlir/dialects/ext.py
+0-21 files

LLVM/project bf7e2b8clang/docs ReleaseNotes.rst, clang/lib/Lex PPMacroExpansion.cpp

[Clang] prevent preprocessor crash on incomplete scoped __has_cpp_attribute arguments (#178273)

Fixes #178098

---

This patch addressed the issue when `__has_cpp_attribute` is expanded
with incomplete scoped attributes. The scoped name parsing can lex to
`eof`/`eod` at


https://github.com/llvm/llvm-project/blob/3f5a5d45d18a514f086f3e07c9676ca5fb95bbe9/clang/lib/Lex/PPMacroExpansion.cpp#L1877-L1881

and then proceed with


https://github.com/llvm/llvm-project/blob/3f5a5d45d18a514f086f3e07c9676ca5fb95bbe9/clang/lib/Lex/PPMacroExpansion.cpp#L1425-L1430



    [8 lines not shown]
DeltaFile
+17-0clang/test/Preprocessor/has_attribute_errors.cpp
+9-0clang/test/Preprocessor/has_c_attribute_errors.c
+2-2clang/lib/Lex/PPMacroExpansion.cpp
+1-0clang/docs/ReleaseNotes.rst
+29-24 files

LLVM/project 47e9c1dclang/include/clang/Analysis/Analyses/LifetimeSafety Facts.h, clang/lib/Analysis/LifetimeSafety Checker.cpp FactsGenerator.cpp

[LifetimeSafety] Detect dangling fields (#177363)

Detect dangling field references when stack memory escapes to class
fields. This change extends lifetime safety analysis to detect a common
class of temporal memory safety bugs where local variables or parameters
are stored in class fields but outlive their scope.

- Added a new `FieldEscapeFact` class to represent when an origin
escapes via assignment to a field
- Refactored `OriginEscapesFact` into a base class with specialized
subclasses for different escape scenarios
- Added detection for stack memory escaping to fields in constructors
and member functions
- Implemented new diagnostic for dangling field references with
appropriate warning messages

Importantly,
- Added `AddParameterDtors` option to CFG to add parameter dtors and
lifetime ends behind an option. In principle, parameters ctors and dtors

    [4 lines not shown]
DeltaFile
+175-0clang/test/Sema/warn-lifetime-safety-dangling-field.cpp
+49-21clang/lib/Analysis/LifetimeSafety/Checker.cpp
+50-17clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+48-4clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+25-4clang/lib/Sema/AnalysisBasedWarnings.cpp
+0-28clang/test/Analysis/lifetime-cfg-output.cpp
+347-7415 files not shown
+464-11221 files

LLVM/project c494b74mlir/lib/Dialect/EmitC/IR EmitC.cpp

[mlir][emitc] Remove unused #include
DeltaFile
+0-1mlir/lib/Dialect/EmitC/IR/EmitC.cpp
+0-11 files

LLVM/project f44ecfdlldb/include/lldb/Host FileAction.h, lldb/source/Host/common FileAction.cpp

[lldb][windows] fix an invalid cast from a file descriptor to a HANDLE (#178238)

DeltaFile
+12-0lldb/source/Host/common/FileAction.cpp
+3-2lldb/source/Host/windows/ProcessLauncherWindows.cpp
+4-0lldb/include/lldb/Host/FileAction.h
+19-23 files

LLVM/project 775f025llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp, llvm/test/CodeGen/AMDGPU release-vgprs.mir

[AMDGPU] Fix buggy insertion of DEALLOC_VGPRS message (#178401)

We inserted the DEALLOC_VGPRS message if there were no pending scratch
stores the first time an S_ENDPGM instruction was visited. But because
this pass uses a worklist to revisit blocks until it reaches a fixed
point, it is possible that pending scratch stores are only discovered on
the second or later visit to a block. Fix this by storing a flag for
each S_ENDPGM instruction which can be updated by later visits.
DeltaFile
+21-43llvm/test/CodeGen/AMDGPU/release-vgprs.mir
+18-20llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+39-632 files

LLVM/project 9e75d69llvm/docs ReleaseNotes.md, llvm/docs/CommandGuide FileCheck.rst

[FileCheck] Allow -check-prefix to take multiple prefixes (#178187)

There was no real benefit to disallowing this, and it sometimes caused
unnecessary churn in the RUN lines of tests which were updated from
single-to-multiple or multiple-to-single prefixes.

This effectively makes -check-prefixes the primary option and
-check-prefix just an alias of it. The documentation is upated
accordingly.
DeltaFile
+11-12llvm/docs/CommandGuide/FileCheck.rst
+7-8llvm/utils/FileCheck/FileCheck.cpp
+4-0llvm/test/FileCheck/check-multiple-prefixes-mixed.txt
+2-0llvm/docs/ReleaseNotes.md
+24-204 files

LLVM/project 69d03bemlir/include/mlir/Bindings/Python IRCore.h, mlir/lib/IR OperationSupport.cpp

Address Pragma's comments
DeltaFile
+8-4mlir/python/mlir/dialects/ext.py
+1-1mlir/include/mlir/Bindings/Python/IRCore.h
+1-1mlir/lib/IR/OperationSupport.cpp
+10-63 files

LLVM/project 52ace0bclang/include/clang/Analysis/Analyses/LifetimeSafety Facts.h, clang/lib/Analysis/LifetimeSafety Checker.cpp FactsGenerator.cpp

[LifetimeSafety] Detect dangling fields
DeltaFile
+175-0clang/test/Sema/warn-lifetime-safety-dangling-field.cpp
+49-21clang/lib/Analysis/LifetimeSafety/Checker.cpp
+50-17clang/lib/Analysis/LifetimeSafety/FactsGenerator.cpp
+48-4clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+25-4clang/lib/Sema/AnalysisBasedWarnings.cpp
+0-28clang/test/Analysis/lifetime-cfg-output.cpp
+347-7415 files not shown
+464-11221 files

LLVM/project dd76d33openmp README.rst, openmp/docs Building.md SupportAndFAQ.rst

[OpenMP][docs] Revise building manual (#176175)

Go into more detail on the two non-legacy build modes. 

I decided use create a dedicated document documention the build process.
`index.rst` only keeps the "Getting Started" part. `README.rst` is
vastly outdated with the still valid parts integrated into the new
documentation. `SupportAndFAQ.rst` is unstructured and keeps only the
non-building parts.

The the new building document is written in Meltdown, following the
decision from LLVM.
DeltaFile
+404-0openmp/docs/Building.md
+0-396openmp/README.rst
+0-73openmp/docs/SupportAndFAQ.rst
+44-1openmp/docs/_themes/llvm-openmp-theme/static/agogo.css_t
+16-14openmp/docs/index.rst
+2-23openmp/runtime/doc/doxygen/libomp_interface.h
+466-5072 files not shown
+484-5268 files

LLVM/project fb91d84openmp/runtime/cmake LibompGetArchitecture.cmake, openmp/runtime/src kmp_platform.h

Add checks for mingw arm64ec macros
DeltaFile
+1-1openmp/runtime/cmake/LibompGetArchitecture.cmake
+1-1openmp/runtime/src/kmp_platform.h
+2-22 files

LLVM/project 7d605b7openmp/runtime/src z_Linux_asm.S CMakeLists.txt

Switch to arm64 asm implementation for invoke_microtask
DeltaFile
+2-2openmp/runtime/src/z_Linux_asm.S
+1-1openmp/runtime/src/CMakeLists.txt
+1-1openmp/runtime/src/z_Windows_NT-586_util.cpp
+4-43 files

LLVM/project eb64fb6mlir/include/mlir/Dialect/EmitC/IR EmitC.td, mlir/lib/Dialect/EmitC/IR EmitC.cpp

[mlir][emitc] Fix recurring operands in expression (#178382)

Relanding #175535 which got reverted for failing the buildbot.
New canonicalization pattern moved to dialect code.
DeltaFile
+85-10mlir/lib/Dialect/EmitC/IR/EmitC.cpp
+23-1mlir/test/Dialect/EmitC/ops.mlir
+19-0mlir/test/Dialect/EmitC/form-expressions.mlir
+13-0mlir/test/Dialect/EmitC/invalid_ops.mlir
+1-0mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
+1-0mlir/lib/Dialect/EmitC/Transforms/Transforms.cpp
+142-116 files

LLVM/project 7c3a211clang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode InterpFrame.cpp

[clang][ExprConst] Fix rendering of explicit this parameters (#177551)

in compile-time backtraces.

The two test cases used to be rendered as `foo(s, 0)` and `foo2(s)`.
DeltaFile
+30-0clang/test/SemaCXX/cxx2b-deducing-this.cpp
+11-15clang/lib/AST/ExprConstant.cpp
+12-8clang/lib/AST/ByteCode/InterpFrame.cpp
+53-233 files

LLVM/project 16d8d4bllvm/lib/Target/WebAssembly WebAssemblyISelLowering.cpp, llvm/test/CodeGen/WebAssembly simd-shuffle-widen.ll

[WebAssembly] Fix crash in ReplaceNodeResults for ANY_EXTEND_VECTOR_INREG (#178374)

Fixes a crash during type legalization by allowing
ISD::ANY_EXTEND_VECTOR_INREG to fall back to default expansion instead
of hitting llvm_unreachable.

Fixed: #177209
DeltaFile
+50-0llvm/test/CodeGen/WebAssembly/simd-shuffle-widen.ll
+1-0llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+51-02 files

LLVM/project 11081ebllvm/lib/Target/X86 X86TargetTransformInfo.cpp, llvm/test/Transforms/SLPVectorizer/X86 pr176906.ll

[CostModel][X86] reduce_add(vXi1) will lower as a scalar ctpop (#178400)

Fixes #176906
DeltaFile
+13-118llvm/test/Transforms/SLPVectorizer/X86/pr176906.ll
+11-0llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+24-1182 files

LLVM/project 4476360flang/test/Lower const-arg-glob.f90

[flang][NFC] Separated test for --enable-constant-argument-globalisation (#178350)

The test for --enable-constant-argument-globalisation was added to
existing lowering test as part of
https://github.com/llvm/llvm-project/commit/de528ffb17ebce96e0bc4dde1749146c41ca1d0d

Decouple this test from the other lowering tests to ease conversion to
HLFIR lowering.

Co-authored-by: Jean Perier <jperier at nvidia.com>

Co-authored-by: Jean Perier <jperier at nvidia.com>
DeltaFile
+13-0flang/test/Lower/const-arg-glob.f90
+13-01 files

LLVM/project 51845a5llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 crash-on-out-of-bound-extract.ll

[SLP] Fix crash on extractelement with out-of-bounds index.....Fixes … (#176918)

…The cose modeling logic was attempting to set a bit in APInt for an
out-of-bounds index, causing an assertion failure. This patch ignores
OOB indices as they produce poison- which is already handled.
Fixes #176780  

this is the same test result which produces this bug 

<img width="1600" height="964" alt="image"
src="https://github.com/user-attachments/assets/80593902-9d15-4e18-850b-a558bca8518e"
/>
DeltaFile
+32-0llvm/test/Transforms/SLPVectorizer/X86/crash-on-out-of-bound-extract.ll
+8-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+40-12 files

LLVM/project 2b00a7allvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, polly/lib/External/isl/include/isl typed_cpp.h cpp.h

Merge branch 'users/chapuni/cov/single/switch' into users/chapuni/cov/single/trunk
DeltaFile
+47,161-55,379llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+52,760-0polly/lib/External/isl/include/isl/typed_cpp.h
+17,188-14,558llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+12,842-18,547llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+30,864-0polly/lib/External/isl/include/isl/cpp.h
+11,654-16,786llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+172,469-105,2703,670 files not shown
+558,802-337,9423,676 files

LLVM/project 3a1b1a7llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, polly/lib/External/isl/include/isl typed_cpp.h cpp.h

Merge branch 'users/chapuni/cov/single/binop-base' into users/chapuni/cov/single/binop
DeltaFile
+47,161-55,379llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+52,760-0polly/lib/External/isl/include/isl/typed_cpp.h
+17,188-14,558llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+12,842-18,547llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+30,864-0polly/lib/External/isl/include/isl/cpp.h
+11,654-16,786llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+172,469-105,2703,669 files not shown
+558,797-337,9403,675 files

LLVM/project be3b3a9llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, polly/lib/External/isl/include/isl typed_cpp.h cpp.h

Merge branch 'users/chapuni/cov/single/execskipexists' into users/chapuni/cov/single/binop-base
DeltaFile
+47,161-55,379llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+52,760-0polly/lib/External/isl/include/isl/typed_cpp.h
+17,188-14,558llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+12,842-18,547llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+30,864-0polly/lib/External/isl/include/isl/cpp.h
+11,654-16,786llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+172,469-105,2703,669 files not shown
+558,797-337,9403,675 files

LLVM/project 062798fclang/lib/CodeGen CoverageMappingGen.cpp

getSwitchImplicitDefaultCounterPair: Flatten expressions.

I believe the original form was already readable in this context,
but I rewrote it to match the requested style.
DeltaFile
+5-2clang/lib/CodeGen/CoverageMappingGen.cpp
+5-21 files

LLVM/project cd4ba2fllvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, polly/lib/External/isl/include/isl typed_cpp.h cpp.h

Merge branch 'users/chapuni/cov/single/execskipexists' into users/chapuni/cov/single/switch
DeltaFile
+47,161-55,379llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+52,760-0polly/lib/External/isl/include/isl/typed_cpp.h
+17,188-14,558llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+12,842-18,547llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+30,864-0polly/lib/External/isl/include/isl/cpp.h
+11,654-16,786llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+172,469-105,2703,680 files not shown
+558,838-338,0393,686 files

LLVM/project 2d33b6dllvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, polly/lib/External/isl/include/isl typed_cpp.h cpp.h

Merge branch 'users/chapuni/cov/single/execskipexists' into users/chapuni/cov/single/if

Conflicts:
        llvm/test/tools/llvm-cov/Inputs/showLineExecutionCounts-single.proftext
        llvm/test/tools/llvm-cov/Inputs/showLineExecutionCounts-single.yaml
DeltaFile
+47,161-55,379llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+52,760-0polly/lib/External/isl/include/isl/typed_cpp.h
+17,188-14,558llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+12,842-18,547llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+30,864-0polly/lib/External/isl/include/isl/cpp.h
+11,654-16,786llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+172,469-105,2703,680 files not shown
+558,838-338,0363,686 files

LLVM/project b06e786llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll amdgcn.bitcast.512bit.ll, polly/lib/External/isl/include/isl typed_cpp.h cpp.h

Merge branch 'users/chapuni/cov/single/execskipexists' into users/chapuni/cov/single/loop

Conflicts:
        llvm/test/tools/llvm-cov/Inputs/showLineExecutionCounts-single.proftext
        llvm/test/tools/llvm-cov/Inputs/showLineExecutionCounts-single.yaml
DeltaFile
+47,161-55,379llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+52,760-0polly/lib/External/isl/include/isl/typed_cpp.h
+17,188-14,558llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+12,842-18,547llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+30,864-0polly/lib/External/isl/include/isl/cpp.h
+11,654-16,786llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+172,469-105,2703,680 files not shown
+558,838-338,0363,686 files

LLVM/project 24bf018clang-tools-extra/clang-tidy/performance EnumSizeCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] performance-enum-size should ignore enums within extern "C" (#178233)

Closes [#178114](https://github.com/llvm/llvm-project/issues/178114)
DeltaFile
+16-2clang-tools-extra/clang-tidy/performance/EnumSizeCheck.cpp
+13-1clang-tools-extra/test/clang-tidy/checkers/performance/enum-size.cpp
+7-0clang-tools-extra/docs/ReleaseNotes.rst
+36-33 files

LLVM/project 7ed9563clang/lib/CodeGen CodeGenPGO.cpp CodeGenFunction.h

hasSkipCounter
DeltaFile
+6-8clang/lib/CodeGen/CodeGenPGO.cpp
+1-6clang/lib/CodeGen/CodeGenFunction.h
+1-1clang/lib/CodeGen/CodeGenPGO.h
+8-153 files