LLVM/project 88d303ecompiler-rt/cmake/Modules AddCompilerRT.cmake, compiler-rt/lib/profile CMakeLists.txt GCDAProfiling.c

[cmake][compiler-rt] Define _DEFAULT_SOURCE instead of enabling extensions (#163377)

GNU extensions are a bit of a hammer approach to enabling access to POSIX extensions.
Instead we can define _DEFAULT_SOURCE ourselves where necessary, which is what the extensions
mechanism does.

See: #110555
DeltaFile
+1-6compiler-rt/cmake/Modules/AddCompilerRT.cmake
+2-4compiler-rt/lib/profile/CMakeLists.txt
+5-0compiler-rt/lib/profile/GCDAProfiling.c
+5-0compiler-rt/lib/profile/InstrProfilingFile.c
+5-0compiler-rt/lib/profile/InstrProfilingUtil.c
+18-105 files

LLVM/project 14af435clang/lib/StaticAnalyzer/Frontend AnalysisConsumer.cpp, llvm/include/llvm/Support Timer.h

[NFC][support]Add operator- to TimeRecord (#163361)

A common use case for the Timer is to measure time duration between two
points. Lack of operator- forced an non-intuitive two-step duration
computation: get the end time, then decrement it by the start time.

Now, as demonstrated on the example of `SyntaxCheckTimer` and
`ExprEngineTimer` one can compute duration directly.
DeltaFile
+8-8clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+6-0llvm/include/llvm/Support/Timer.h
+14-82 files

LLVM/project a585448flang/lib/Semantics check-omp-structure.cpp check-omp-structure.h, flang/test/Semantics/OpenMP align-clause.f90

[flang][OpenMP] Move check of ALIGN clause to visitor function (#164261)

This replaces CheckAlignValue with an Enter function, and adds a check
that the alignment is a power of 2.
DeltaFile
+13-16flang/lib/Semantics/check-omp-structure.cpp
+20-0flang/test/Semantics/OpenMP/align-clause.f90
+0-2flang/lib/Semantics/check-omp-structure.h
+33-183 files

LLVM/project 573b624mlir/test/Target/SPIRV function-decorations-asserts.mlir

[mlir][spirv] Remove `function-decorations-asserts.mlir` (#164383)

The test is fragile as it relies on the `--debug` flag to test an
internal behaviour. This addresses discussion in #164319.
DeltaFile
+0-20mlir/test/Target/SPIRV/function-decorations-asserts.mlir
+0-201 files

LLVM/project c5f9a2aclang/lib/AST/ByteCode Compiler.cpp, clang/test/AST/ByteCode cxx14.cpp

[clang][bytecode] Don't emit checkNull for function pointers (#164376)

Diagnose them later when we try to call the function pointer.
DeltaFile
+9-0clang/test/AST/ByteCode/cxx14.cpp
+1-1clang/lib/AST/ByteCode/Compiler.cpp
+10-12 files

LLVM/project a592603flang/lib/Semantics check-omp-structure.cpp

Revert "Remove check for power-of-2"

This reverts commit f891449bc74a264bcac4a38beb2f5ceab7dcef3d.
DeltaFile
+3-0flang/lib/Semantics/check-omp-structure.cpp
+3-01 files

LLVM/project 79ab9b1flang/test/Semantics/OpenMP align-clause.f90

Revert "Update align-clause.f90"

This reverts commit 5e37b5f8bb84054ef224b7ea42220dff8632806d.
DeltaFile
+6-0flang/test/Semantics/OpenMP/align-clause.f90
+6-01 files

LLVM/project 95d1b4fclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/CodeGen CIRGenAtomic.cpp

[CIR] Add support for atomic test-and-set and atomic clear (#164162)

This patch adds support for the following atomic builtin functions:
  - `__atomic_test_and_set`
  - `__atomic_clear`
DeltaFile
+70-0clang/test/CIR/CodeGen/atomic.c
+62-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+40-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+22-4clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
+194-44 files

LLVM/project 5e37b5fflang/test/Semantics/OpenMP align-clause.f90

Update align-clause.f90
DeltaFile
+0-6flang/test/Semantics/OpenMP/align-clause.f90
+0-61 files

LLVM/project c8c5a38clang/lib/AST/ByteCode InterpHelpers.h Interp.h

[clang][bytecode] Move shared interp functions to InterpHelpers.h (#164215)

This drastically reduces the preprocessed size of Context.cpp and
InterpBuiltin.cpp.
DeltaFile
+141-0clang/lib/AST/ByteCode/InterpHelpers.h
+1-115clang/lib/AST/ByteCode/Interp.h
+4-1clang/lib/AST/ByteCode/Context.cpp
+2-1clang/lib/AST/ByteCode/InterpBuiltin.cpp
+148-1174 files

LLVM/project 6e9a5c9flang/include/flang/Optimizer/Transforms Passes.td, flang/include/flang/Tools CrossToolHelpers.h

[flang] Remove "unsafe-fp-math" attribute support (#162783)

These global flags block furthur improvements for clang, users should
always use fast-math flags
see also
https://discourse.llvm.org/t/rfc-honor-pragmas-with-ffp-contract-fast/80797
Remove them incrementally, this is the flang part.
DeltaFile
+0-4flang/lib/Optimizer/Transforms/FunctionAttr.cpp
+2-2flang/test/Driver/func-attr-fast-math.f90
+1-1flang/include/flang/Tools/CrossToolHelpers.h
+1-1flang/include/flang/Optimizer/Transforms/Passes.td
+4-84 files

LLVM/project d9556d3lldb/test/Shell/SymbolFile/NativePDB func-symbols.test

[LLDB][NativePDB] Require `target-windows` for `func-symbols.test` (#164406)

The test builds files for Windows, so the target has to be required. I
didn't add this in #163733.

Fixes the failure from
https://github.com/llvm/llvm-project/pull/163733#issuecomment-3426275296.
DeltaFile
+1-1lldb/test/Shell/SymbolFile/NativePDB/func-symbols.test
+1-11 files

LLVM/project 0232539llvm/lib/Analysis DependenceAnalysis.cpp, llvm/test/Analysis/DependenceAnalysis gcd-miv-overflow.ll GCD.ll

[DA] Check nsw when extracting a constant operand of SCEVMul
DeltaFile
+6-9llvm/test/Analysis/DependenceAnalysis/gcd-miv-overflow.ll
+3-3llvm/test/Analysis/DependenceAnalysis/GCD.ll
+3-2llvm/lib/Analysis/DependenceAnalysis.cpp
+2-2llvm/test/Analysis/DependenceAnalysis/SymbolicSIV.ll
+14-164 files

LLVM/project fbcd82allvm/utils extract_symbols.py

[Windows] Fix Registry static data members not exported by extract_symbols.py in static builds with plugin support (#163391)

When building LLVM statically (without BUILD_SHARED_LIBS) on Windows with
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON, external plugins cannot register through
llvm::Registry<clang::PluginASTAction> because:

Static data members (Head, Tail) are filtered out during symbol export by
extract_symbols.py because they don't match the function signature patterns
that the script looks for.

This patch fixes the issue by adding pattern matching to extract_symbols.py
to recognize and export Registry static data members.

Note: When LLVM is built with /Zc:dllexportInlines-, inlined functions
aren't exported as symbols, and the plugin must also compile with
/Zc:dllexportInlines- to inline them instead of referencing non-exported
symbols.

Fixes #163367
DeltaFile
+8-0llvm/utils/extract_symbols.py
+8-01 files

LLVM/project 9864535clang/test/CodeGen scoped-atomic-ops.c, clang/test/CodeGen/LoongArch/lasx builtin-alias.c builtin.c

Merge branch 'main' into users/kparzysz/check-align-value
DeltaFile
+4,293-190clang/test/CodeGen/scoped-atomic-ops.c
+1,971-1,971clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+1,967-1,967clang/test/CodeGen/LoongArch/lasx/builtin.c
+2,518-0clang/unittests/Analysis/FlowSensitive/UncheckedStatusOrAccessModelTestFixture.cpp
+1,758-0llvm/lib/CAS/OnDiskGraphDB.cpp
+836-836clang/test/Headers/__clang_hip_math.hip
+13,343-4,964577 files not shown
+40,754-15,178583 files

LLVM/project f891449flang/lib/Semantics check-omp-structure.cpp

Remove check for power-of-2
DeltaFile
+0-3flang/lib/Semantics/check-omp-structure.cpp
+0-31 files

LLVM/project 186182boffload/plugins-nextgen/amdgpu/src rtl.cpp

[Offload] Use `amd_signal_async_handler` for host function calls (#154131)

DeltaFile
+32-18offload/plugins-nextgen/amdgpu/src/rtl.cpp
+32-181 files

LLVM/project 531d45dlldb/test/Shell/SymbolFile/PDB pointers.test

[LLDB][PDB] Run `pointers.test` with both plugins (#163623)

The `pointers.test` was only run with the DIA plugin. I made the
following changes:

- Remove the check for the function type. 
  The types of the function are different in the plugins:
  ```
  Native:
Type{0x00010084} , size = 0, compiler_type = 0x00000209aff60060 int
(int) __attribute__((thiscall))
  DIA:
Type{0x0000000a} , name = "f", decl = PointerTypeTest.cpp:8,
compiler_type = 0x0000020bc22356c0 int (int) __attribute__((thiscall))
  ```
In DIA, each function gets its own type with a name and decl. In the
native plugin, only one unnamed type is created per signature. This
matches DWARF.
- The check for the `struct ST` fields was split, because the order of

    [18 lines not shown]
DeltaFile
+24-18lldb/test/Shell/SymbolFile/PDB/pointers.test
+24-181 files

LLVM/project 182bb0cmlir/lib/Dialect/Linalg/Transforms Transforms.cpp

Revert some unnecessary changes
DeltaFile
+2-4mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
+2-41 files

LLVM/project e9b6d35lldb/test/Shell/SymbolFile/NativePDB func-symbols.test, lldb/test/Shell/SymbolFile/PDB func-symbols.test

[LLDB][PDB] Split `func-symbols.test` between DIA and native (#163733)

The test checks that functions have the correct type assigned. Because
of the differences between the two PDB plugins, I split the test.
DIA creates one named `Type` per function and uses identical UIDs for
`Type` and `Function`, whereas native creates one unnamed type per
signature and has different UIDs.
The native test has the same input and checks the same functions.

I also removed the `target-windows` requirement from the test, since it
only uses `lldb-test`.
DeltaFile
+133-0lldb/test/Shell/SymbolFile/NativePDB/func-symbols.test
+1-1lldb/test/Shell/SymbolFile/PDB/func-symbols.test
+134-12 files

LLVM/project 026d35bllvm/test/Analysis/DependenceAnalysis symbolic-rdiv-overflow.ll weak-crossing-siv-overflow.ll

[DA] Add tests where dependencies are missed due to overflow
DeltaFile
+128-0llvm/test/Analysis/DependenceAnalysis/symbolic-rdiv-overflow.ll
+122-0llvm/test/Analysis/DependenceAnalysis/weak-crossing-siv-overflow.ll
+121-0llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-overflow.ll
+72-0llvm/test/Analysis/DependenceAnalysis/strong-siv-overflow.ll
+63-0llvm/test/Analysis/DependenceAnalysis/gcd-miv-overflow.ll
+506-05 files

LLVM/project be2c6c1flang/include/flang/Semantics dump-expr.h

[flang] Fix dumping type names for clang in DumpEvExpr (#164256)

The gcc/clang implementation uses __PRETTY_FUNCTION__ to generate
the full function name, and then extracts the type name from it. GCC
emits the type name in the form of
  [with T = <type-name>...]
whereas clang uses
  [T = <type-name>...]
The current code looked for "with T =" to get the location of the type
name, which did not work in clang-generated code.
DeltaFile
+5-2flang/include/flang/Semantics/dump-expr.h
+5-21 files

LLVM/project 33f812dmlir/test/Integration/Dialect/Linalg/CPU/ArmSVE pack-unpack-scalable-inner-tile.mlir lit.local.cfg, mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/td pack-unpack.mlir

[mlir][sve] Extend the e2e test for linalg.pack + linalg.unpack (#158094)

Adds vectorization of `linalg.unpack` to:
* test/Integration/Dialect/Linalg/CPU/ArmSVE/pack-unpack-scalable-inner-tile.mlir

The original configuration that didn't use vectorization is preserved as
reference and also to make sure we exercise all relevant code paths
(*). To this end, the TD sequence has be refactored out into a dedicated
file. The payload IR has not changed.

NOTE - ATM only vectorization of `linalg.unpack` is supported.
Vectorizing `linalg.pack` is left as a TODO.

(*) It remains valid to use scalable tile sizes in Linalg Ops even when
vectorization is not enabled.
DeltaFile
+52-64mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/pack-unpack-scalable-inner-tile.mlir
+106-0mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/td/pack-unpack.mlir
+3-0mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/lit.local.cfg
+161-643 files

LLVM/project a042f69flang/lib/Parser openmp-parsers.cpp

[flang][OpenMP] Remember to set source in OmpBlockConstruct (#164131)

Add "sourced" in a few places where OmpBlockConstruct was created.
DeltaFile
+5-5flang/lib/Parser/openmp-parsers.cpp
+5-51 files

LLVM/project 34cf8bbflang/lib/Semantics check-omp-atomic.cpp resolve-directives.cpp

[flang][OpenMP] Use parser::UnwrapRef instead of thing/value, NFC (#164087)

DeltaFile
+1-1flang/lib/Semantics/check-omp-atomic.cpp
+1-1flang/lib/Semantics/resolve-directives.cpp
+2-22 files

LLVM/project 443fde7llvm/test/Analysis/DependenceAnalysis symbolic-rdiv-overflow.ll weak-corssing-siv-overflow.ll

[DA] Add tests where dependencies are missed due to overflow
DeltaFile
+128-0llvm/test/Analysis/DependenceAnalysis/symbolic-rdiv-overflow.ll
+126-0llvm/test/Analysis/DependenceAnalysis/weak-corssing-siv-overflow.ll
+121-0llvm/test/Analysis/DependenceAnalysis/weak-zero-siv-overflow.ll
+72-0llvm/test/Analysis/DependenceAnalysis/strong-siv-overflow.ll
+63-0llvm/test/Analysis/DependenceAnalysis/gcd-miv-overflow.ll
+510-05 files

LLVM/project 26feb1allvm/lib/Target/PowerPC PPCISelLowering.cpp PPCInstrVSX.td, llvm/test/CodeGen/PowerPC vector-lrint.ll vector-llrint.ll

[PowerPC] Remove `UnsafeFPMath` uses (#154901)

Try to remove `UnsafeFPMath` uses in PowerPC backend. These global flags
block some improvements like
https://discourse.llvm.org/t/rfc-honor-pragmas-with-ffp-contract-fast/80797.
Remove them incrementally.

FP operations may raise exceptions are replaced by constrained
intrinsics. However, vector type is not supported by these intrinsics.
DeltaFile
+0-1,588llvm/test/CodeGen/PowerPC/vector-lrint.ll
+0-1,413llvm/test/CodeGen/PowerPC/vector-llrint.ll
+316-129llvm/test/CodeGen/PowerPC/scalar-rounding-ops.ll
+33-28llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+16-14llvm/lib/Target/PowerPC/PPCInstrVSX.td
+4-14llvm/test/CodeGen/PowerPC/i64_fp_round.ll
+369-3,1866 files

LLVM/project daca511llvm/lib/Target/X86 X86ISelLowering.cpp X86ISelLowering.h, llvm/test/CodeGen/X86 atomic-load-store.ll

[X86] Cast atomic vectors in IR to support floats

This commit casts floats to ints in an atomic load during AtomicExpand to support
floating point types. It also is required to support 128 bit vectors in SSE/AVX.
DeltaFile
+163-18llvm/test/CodeGen/X86/atomic-load-store.ll
+7-0llvm/lib/Target/X86/X86ISelLowering.cpp
+2-0llvm/lib/Target/X86/X86ISelLowering.h
+172-183 files

LLVM/project ad2ab36llvm/include/llvm/Target TargetSelectionDAG.td, llvm/lib/CodeGen AtomicExpandPass.cpp

[AtomicExpand] Add bitcasts when expanding load atomic vector

AtomicExpand fails for aligned `load atomic <n x T>` because it
does not find a compatible library call. This change adds appropriate
bitcasts so that the call can be lowered. It also adds support for
128 bit lowering in tablegen to support SSE/AVX.
DeltaFile
+92-0llvm/test/CodeGen/X86/atomic-load-store.ll
+66-0llvm/test/Transforms/AtomicExpand/X86/expand-atomic-non-integer.ll
+51-0llvm/test/CodeGen/ARM/atomic-load-store.ll
+12-3llvm/lib/CodeGen/AtomicExpandPass.cpp
+14-0llvm/include/llvm/Target/TargetSelectionDAG.td
+5-0llvm/lib/Target/X86/X86InstrCompiler.td
+240-36 files

LLVM/project 1bcf1f1llvm/lib/Target/X86 X86InstrCompiler.td, llvm/test/CodeGen/X86 atomic-load-store.ll

[X86] Remove extra MOV after widening atomic load

This change adds patterns to optimize out an extra MOV
present after widening the atomic load.
DeltaFile
+28-164llvm/test/CodeGen/X86/atomic-load-store.ll
+16-0llvm/lib/Target/X86/X86InstrCompiler.td
+44-1642 files