LLVM/project 7e275f8flang/lib/Parser openmp-parsers.cpp

[flang][OpenMP] Fix build with gcc 7.5.0
DeltaFile
+1-1flang/lib/Parser/openmp-parsers.cpp
+1-11 files

LLVM/project 1f865ebllvm/lib/Passes PassBuilderPipelines.cpp, llvm/test/Other new-pm-thinlto-postlink-defaults.ll new-pm-thinlto-postlink-pgo-defaults.ll

Revert "Revert "[DFAJumpThreading] Enable DFAJumpThread by default." (#167352)"

This reverts commit 7e043364cf1f267380b2be955901b28ede9ca8eb.
DeltaFile
+1-1llvm/lib/Passes/PassBuilderPipelines.cpp
+1-0llvm/test/Other/new-pm-thinlto-postlink-defaults.ll
+1-0llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
+1-0llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
+1-0llvm/test/Other/new-pm-thinlto-prelink-defaults.ll
+1-0llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
+6-12 files not shown
+8-18 files

LLVM/project 8baa5bfllvm/lib/Transforms/Scalar DFAJumpThreading.cpp, llvm/test/Transforms/DFAJumpThreading dfa-jump-threading-transform.ll dfa-jump-threading-analysis.ll

[DFAJumpThreading] Try harder to avoid cycles in paths. (#169151)

If a threading path has cycles within it then the transformation is not
correct. This patch fixes a couple of cases that create such cycles.

Fixes https://github.com/llvm/llvm-project/issues/166868
DeltaFile
+136-0llvm/test/Transforms/DFAJumpThreading/dfa-jump-threading-transform.ll
+77-0llvm/test/Transforms/DFAJumpThreading/dfa-jump-threading-analysis.ll
+10-1llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
+223-13 files

LLVM/project e37a530flang/test/Semantics/OpenMP loop-transformation-construct03.f90

Update loop-transformation-construct03.f90
DeltaFile
+0-1flang/test/Semantics/OpenMP/loop-transformation-construct03.f90
+0-11 files

LLVM/project 4a0b1a0flang/test/Semantics/OpenMP loop-transformation-construct02.f90

Update loop-transformation-construct02.f90
DeltaFile
+0-1flang/test/Semantics/OpenMP/loop-transformation-construct02.f90
+0-11 files

LLVM/project 1dd9d2bclang/lib/CIR/CodeGen CIRGenBuiltin.cpp, libcxx/test/std/utilities/any/any.nonmembers/any.cast any_cast_reference.pass.cpp

Merge branch 'main' into users/kparzysz/n03-invalid-directive
DeltaFile
+1,005-1,005llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+498-488llvm/test/Analysis/CostModel/AMDGPU/shufflevector.ll
+705-88clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+28-592llvm/lib/Analysis/DependenceAnalysis.cpp
+387-219llvm/lib/ExecutionEngine/Orc/Debugging/ELFDebugObjectPlugin.cpp
+235-238libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp
+2,858-2,630275 files not shown
+8,309-5,991281 files

LLVM/project c2d659bflang/lib/Parser openmp-parsers.cpp parse-tree.cpp, flang/lib/Semantics canonicalize-omp.cpp check-omp-loop.cpp

[flang][OpenMP] Implement loop nest parser (#168884)

Previously, loop constructs were parsed in a piece-wise manner: the
begin directive, the body, and the end directive were parsed separately.
Later on in canonicalization they were all coalesced into a loop
construct. To facilitate that end-loop directives were given a special
treatment, namely they were parsed as OpenMP constructs. As a result
syntax errors caused by misplaced end-loop directives were handled
differently from those cause by misplaced non-loop end directives.

The new loop nest parser constructs the complete loop construct,
removing the need for the canonicalization step. Additionally, it is the
basis for parsing loop-sequence-associated constructs in the future.

It also removes the need for the special treatment of end-loop
directives. While this patch temporarily degrades the error messaging
for misplaced end-loop directives, it enables uniform handling of any
misplaced end-directives in the future.
DeltaFile
+185-8flang/lib/Parser/openmp-parsers.cpp
+0-189flang/lib/Semantics/canonicalize-omp.cpp
+78-1flang/lib/Semantics/check-omp-loop.cpp
+22-18flang/test/Semantics/OpenMP/loop-transformation-construct01.f90
+15-21flang/test/Semantics/OpenMP/loop-association.f90
+27-8flang/lib/Parser/parse-tree.cpp
+327-24514 files not shown
+356-27220 files

LLVM/project 216e85bmlir/python requirements.txt, mlir/python/mlir/dialects/linalg/opdsl/lang yaml_helper.py

[MLIR][Python] remove PyYAML as a dep (#169145)

PyYAML is not an actual use-time/runtime dependency of our bindings. It
is necessary only if someone wants to regenerate
`LinalgNamedStructuredOps.yaml`:
https://github.com/llvm/llvm-project/blob/93097b2d47c87bf5eee0a2612d961c7a01831eab/mlir/tools/mlir-linalg-ods-gen/update_core_linalg_named_ops.sh.in#L29

This PR does the minimal refactor to remove the need during actual run/use time.
DeltaFile
+41-25mlir/python/mlir/dialects/linalg/opdsl/lang/yaml_helper.py
+4-2mlir/python/requirements.txt
+45-272 files

LLVM/project 2336b65llvm/lib/Target/AArch64 AArch64InstrInfo.td

[AArch64] Mark FMOVvXfY_ns as rematerializable, cheap
DeltaFile
+2-0llvm/lib/Target/AArch64/AArch64InstrInfo.td
+2-01 files

LLVM/project 3157865flang/lib/Parser openmp-parsers.cpp

Update loop construct parser
DeltaFile
+1-1flang/lib/Parser/openmp-parsers.cpp
+1-11 files

LLVM/project da686beflang/test/Semantics/OpenMP loop-transformation-construct02.f90 clause-validity01.f90

Restore tests
DeltaFile
+6-6flang/test/Semantics/OpenMP/loop-transformation-construct02.f90
+4-1flang/test/Semantics/OpenMP/clause-validity01.f90
+2-3flang/test/Semantics/OpenMP/loop-transformation-construct03.f90
+2-1flang/test/Semantics/OpenMP/loop-association.f90
+14-114 files

LLVM/project b00c620clang/test/CodeGen/X86 avx512vl-builtins.c avx512f-builtins.c

[X86] Move _mm512_mask_blend_pd/ps tests to avx512f-builtins.c (#169170)

These aren't AVX512VL tests
DeltaFile
+0-32clang/test/CodeGen/X86/avx512vl-builtins.c
+31-0clang/test/CodeGen/X86/avx512f-builtins.c
+31-322 files

LLVM/project 456ca91clang/lib/AST ExprConstant.cpp, clang/lib/AST/ByteCode InterpBuiltin.cpp

[Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - Allow AVX512 VPSHUFBITQMB intrinsics to be used in constexpr (#168100)

Resolves #161337
DeltaFile
+69-0clang/lib/AST/ByteCode/InterpBuiltin.cpp
+22-24clang/lib/Headers/avx512vlbitalgintrin.h
+42-0clang/lib/AST/ExprConstant.cpp
+11-15clang/lib/Headers/avx512bitalgintrin.h
+14-0clang/test/CodeGen/X86/avx512vlbitalg-builtins.c
+10-0clang/test/CodeGen/X86/avx512bitalg-builtins.c
+168-391 files not shown
+171-427 files

LLVM/project fde381bllvm/test/CodeGen/AMDGPU shufflevector.v4i64.v4i64.ll shufflevector.v4p0.v4p0.ll, llvm/test/tools/llvm-ir2vec/output reference_x86_entities.txt

Merge branch 'users/kparzysz/n02-loop-nest-parser' into users/kparzysz/n03-invalid-directive
DeltaFile
+5,975-8,879llvm/test/CodeGen/AMDGPU/shufflevector.v4i64.v4i64.ll
+5,975-8,879llvm/test/CodeGen/AMDGPU/shufflevector.v4p0.v4p0.ll
+3,880-6,644llvm/test/CodeGen/AMDGPU/shufflevector.v4i64.v3i64.ll
+3,880-6,644llvm/test/CodeGen/AMDGPU/shufflevector.v4p0.v3p0.ll
+0-7,157llvm/test/tools/llvm-ir2vec/output/reference_x86_entities.txt
+2,266-3,675llvm/test/CodeGen/AMDGPU/shufflevector.v3i64.v4i64.ll
+21,976-41,878765 files not shown
+90,050-99,703771 files

LLVM/project 1264620compiler-rt/test/ubsan_minimal/TestCases test-darwin-interface.c

[UBSan] Fix test-darwin-interface.c on X86 Darwin with Internal Shell (#169105)

This test was failing with the internal shell due to the use of
subshells. This was not caught in my initial round of testing due to me
only using a M4 Mac for running my tests.
DeltaFile
+10-2compiler-rt/test/ubsan_minimal/TestCases/test-darwin-interface.c
+10-21 files

LLVM/project 13f7345flang/test/Parser/OpenMP fail-looprange.f90, flang/test/Semantics/OpenMP loop-association.f90 clause-validity01.f90

Temporary test changes
DeltaFile
+5-4flang/test/Semantics/OpenMP/loop-association.f90
+3-3flang/test/Parser/OpenMP/fail-looprange.f90
+1-4flang/test/Semantics/OpenMP/clause-validity01.f90
+1-0flang/test/Semantics/OpenMP/loop-transformation-construct02.f90
+1-0flang/test/Semantics/OpenMP/loop-transformation-construct03.f90
+11-115 files

LLVM/project a032a55flang/lib/Parser openmp-parsers.cpp, flang/lib/Semantics check-omp-loop.cpp resolve-directives.cpp

Rebase + parser updates to reflect changes in main
DeltaFile
+76-26flang/lib/Parser/openmp-parsers.cpp
+3-1flang/lib/Semantics/check-omp-loop.cpp
+1-0flang/lib/Semantics/resolve-directives.cpp
+80-273 files

LLVM/project c4921b7lldb/include/lldb/Core Disassembler.h, lldb/source/Core Disassembler.cpp

[lldb] [disassembler] chore: update VariableAnnotator::Annotate to except only Instruction as param and drop module and target (#168276)

DeltaFile
+22-22lldb/source/Core/Disassembler.cpp
+5-5lldb/include/lldb/Core/Disassembler.h
+27-272 files

LLVM/project e8af134llvm/lib/Transforms/InstCombine InstCombineCompares.cpp, llvm/test/Transforms/InstCombine icmp-trunc.ll

[InstCombine] Generalize trunc-shift-icmp fold from (1 << Y) to (Pow2 << Y) (#169163)

Extends the `icmp(trunc(shl))` fold to handle any power of 2 constant as
the shift base, not just 1. This generalizes the following patterns by
adjusting the comparison offsets by `log2(Pow2)`.

```llvm
(trunc (1 << Y) to iN) == 0    --> Y u>= N
(trunc (1 << Y) to iN) != 0    --> Y u<  N
(trunc (1 << Y) to iN) == 2**C --> Y ==  C
(trunc (1 << Y) to iN) != 2**C --> Y !=  C

; to

(trunc (Pow2 << Y) to iN) == 0    --> Y u>= N - log2(Pow2)
(trunc (Pow2 << Y) to iN) != 0    --> Y u<  N - log2(Pow2)
(trunc (Pow2 << Y) to iN) == 2**C --> Y ==  C - log2(Pow2)
(trunc (Pow2 << Y) to iN) != 2**C --> Y !=  C - log2(Pow2)
```

Proof: https://alive2.llvm.org/ce/z/2zwTkp
DeltaFile
+39-33llvm/test/Transforms/InstCombine/icmp-trunc.ll
+12-8llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+51-412 files

LLVM/project cc4dd01clang/lib/AST/ByteCode Compiler.cpp Compiler.h

[clang][bytecode][NFC] Remove VariableScope::emitDestruction (#169148)

destroyLocals() does the same thing.
DeltaFile
+14-7clang/lib/AST/ByteCode/Compiler.cpp
+1-11clang/lib/AST/ByteCode/Compiler.h
+15-182 files

LLVM/project 2e424declang/lib/AST ExprConstant.cpp, clang/lib/Headers avx512vlintrin.h avx512fintrin.h

 [Clang][X86] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow VPERMILPD/S variable mask intrinsics to be used in constexpr (#168861)

Allowing VPERMILPD/S intrinsics to be used in constexpr

Closes #167878
DeltaFile
+68-0clang/test/CodeGen/X86/avx512vl-builtins.c
+48-0clang/test/CodeGen/X86/avx512f-builtins.c
+16-24clang/lib/Headers/avx512vlintrin.h
+34-0clang/lib/AST/ExprConstant.cpp
+12-18clang/lib/Headers/avx512fintrin.h
+28-0clang/test/CodeGen/X86/avx-builtins.c
+206-423 files not shown
+250-649 files

LLVM/project 8ba2713libcxx/include any, libcxx/test/libcxx/utilities/any nodiscard.verify.cpp

[libc++][any] Applied `[[nodiscard]]` (#168826)

`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.
-
https://libcxx.llvm.org/CodingGuidelines.html#apply-nodiscard-where-relevant
DeltaFile
+45-0libcxx/test/libcxx/utilities/any/nodiscard.verify.cpp
+9-9libcxx/include/any
+8-8libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.verify.cpp
+6-6libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.verify.cpp
+4-4libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.verify.cpp
+4-4libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.verify.cpp
+76-311 files not shown
+78-337 files

LLVM/project 9daf434clang/lib/Driver/ToolChains Flang.cpp, flang/lib/Frontend CompilerInvocation.cpp FrontendActions.cpp

[Flang] Add -ffast-real-mod back for further control of MOD optimizations (#167118)

It turns out that having `-ffast-math` as the only option to control
optimizations for MOD for REAL kinds (PR #160660) is too coarse-grained
for some applications. Thus, this PR adds back `-ffast-real-mod` to have
more control over the optimization. The `-ffast-math` flag will still
enable the optimization, and `-fno-fast-real-mod` allows one to disable
it.
DeltaFile
+94-47flang/test/Lower/Intrinsics/fast-real-mod.f90
+9-2flang/lib/Frontend/CompilerInvocation.cpp
+4-6flang/lib/Optimizer/Builder/IntrinsicCall.cpp
+8-2clang/lib/Driver/ToolChains/Flang.cpp
+6-0flang/test/Driver/fast-real-mod.f90
+2-2flang/lib/Frontend/FrontendActions.cpp
+123-592 files not shown
+127-608 files

LLVM/project 7305b6eclang/include/clang/Basic BuiltinsX86.td, clang/lib/AST ExprConstant.cpp

[clang][X86] Allow VALIGND/Q element-shift intrinsics in constexpr evaluation (#168206)

Fixes #167681
DeltaFile
+47-0clang/test/CodeGen/X86/avx512vl-builtins.c
+34-0clang/test/CodeGen/X86/avx512f-builtins.c
+22-0clang/lib/AST/ExprConstant.cpp
+18-0clang/lib/AST/ByteCode/InterpBuiltin.cpp
+5-5clang/include/clang/Basic/BuiltinsX86.td
+126-55 files

LLVM/project 4128b21clang/lib/CIR/CodeGen CIRGenAtomic.cpp, clang/test/CIR/CodeGen atomic.c

[CIR] Add support for non-compile-time memory order (#168892)

This patch upstreams CIR support for atomic operations with memory
orders that are not known at compile time.
DeltaFile
+266-0clang/test/CIR/CodeGen/atomic.c
+92-3clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
+358-32 files

LLVM/project b8f8ef5clang/lib/Driver SanitizerArgs.cpp, clang/test/Driver fsanitize-coverage.c

[Clang][Driver] Allow -fsanitize-coverage with -fsanitize=alloc-token (#169128)

These are not incompatible; allow them to be combined.
DeltaFile
+1-1clang/lib/Driver/SanitizerArgs.cpp
+1-0clang/test/Driver/fsanitize-coverage.c
+2-12 files

LLVM/project 20ebc7ellvm/docs SourceLevelDebugging.rst, llvm/include/llvm/IR DebugProgramInstruction.h

Add new llvm.dbg.declare_value intrinsic. (#168132)

For swift async code, we need to use a debug intrinsic that behaves like
an llvm.dbg.declare but can take any location type rather than just a
pointer or integer.

To solve this, a new debug instrinsic called llvm.dbg.declare_value has
been created, which behaves exactly like an llvm.dbg.declare but can
take non pointer and integer location types.

More information here:
https://discourse.llvm.org/t/rfc-introduce-new-llvm-dbg-coroframe-entry-intrinsic/88269

This is the first patch as part of a stack of patches, with the one
succeeding it being: https://github.com/llvm/llvm-project/pull/168134
DeltaFile
+37-0llvm/test/Assembler/dbg_declare_value.ll
+22-0llvm/docs/SourceLevelDebugging.rst
+20-0llvm/lib/IR/DebugProgramInstruction.cpp
+16-3llvm/include/llvm/IR/DebugProgramInstruction.h
+18-0llvm/lib/IR/DIBuilder.cpp
+17-0llvm/lib/IR/DebugInfo.cpp
+130-310 files not shown
+170-516 files

LLVM/project bfae01fmlir/include/mlir/Dialect/XeGPU/IR XeGPUOps.td, mlir/lib/Dialect/XeGPU/Transforms XeGPUPropagateLayout.cpp

propogation hornor pre-defined layout at anchor op
DeltaFile
+267-177mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp
+40-39mlir/test/Dialect/XeGPU/propagate-layout.mlir
+8-8mlir/test/Dialect/XeGPU/propagate-layout-inst-data.mlir
+4-4mlir/lib/Dialect/XeGPU/Utils/XeGPUUtils.cpp
+3-3mlir/include/mlir/Dialect/XeGPU/IR/XeGPUOps.td
+2-2mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir
+324-2331 files not shown
+326-2357 files

LLVM/project ad7a5d4llvm/include/llvm/CodeGen CallBrPrepare.h, llvm/lib/CodeGen CallBrPrepare.cpp

[CallBrPrepare] Prefer Function &F over Function &Fn

Function &F is the more standard abbreviation (~4000 uses in llvm versus
~300 uses).
DeltaFile
+10-10llvm/lib/CodeGen/CallBrPrepare.cpp
+1-1llvm/include/llvm/CodeGen/CallBrPrepare.h
+11-112 files

LLVM/project 226765blibcxx/utils/libcxx/test/features availability.py

[NFC] [test] [libcxx] Fix invalid escape sequences (#168636)

```
>>> "_target-has-llvm-21 || target={{.+}}-apple-macosx{{26.[0-9](.\d+)?}}" == r"_target-has-llvm-21 || target={{.+}}-apple-macosx{{26.[0-9](.\\
d+)?}}"
<python-input-6>:1: SyntaxWarning: invalid escape sequence '\d'
True
>>> "_target-has-llvm-20 || target={{.+}}-apple-macosx{{15.[4-9](.\d+)?}}" == r"_target-has-llvm-20 || target={{.+}}-apple-macosx{{15.[4-9](.\\
d+)?}}"
<python-input-7>:1: SyntaxWarning: invalid escape sequence '\d'
True
>>> "_target-has-llvm-19 || target={{.+}}-apple-macosx{{15.[0-3](.\d+)?}}" == r"_target-has-llvm-19 || target={{.+}}-apple-macosx{{15.[0-3](.\\
d+)?}}"
<python-input-8>:1: SyntaxWarning: invalid escape sequence '\d'
True
>>> "_target-has-llvm-18 || target={{.+}}-apple-macosx{{14.[4-9](.\d+)?}}" == r"_target-has-llvm-18 || target={{.+}}-apple-macosx{{14.[4-9](.\\
d+)?}}"
<python-input-9>:1: SyntaxWarning: invalid escape sequence '\d'
True
```
DeltaFile
+4-4libcxx/utils/libcxx/test/features/availability.py
+4-41 files