LLVM/project 2580624libcxx/src/support/runtime exception_pointer_msvc.ipp

[libcxx] avoid include Uppercase windows headers (#208903)

We should use unknwn.h and windows.h instead of Unknwn.h and Windows.h
because Linux and other non‑Windows systems treat filenames as
case‑sensitive. Windows does not, so mixed‑case includes work there but
break elsewhere. Both mingw‑w64‑crt and windows‑msvc‑sysroot provide all
Windows headers in fully lowercase, so using the lowercase forms ensures
consistent cross‑platform builds.

Fixes #208901
DeltaFile
+2-2libcxx/src/support/runtime/exception_pointer_msvc.ipp
+2-21 files

LLVM/project 12c4c0bllvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp AMDGPUHWEvents.def, llvm/test/CodeGen/AMDGPU expert_scheduling_gfx12.mir

[AMDGPU] Handle expert scheduling VA_VDST WAR hazards (#201619)

Handle WAR hazards where a VALU reading a VGPR is followed by a VMEM
writing the same VGPR. It is possible, though not very common, that the
VMEM will complete first. To guard against this the compiler must insert
a wait on VA_VDST.
DeltaFile
+58-18llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+56-2llvm/test/CodeGen/AMDGPU/expert_scheduling_gfx12.mir
+13-9llvm/lib/Target/AMDGPU/AMDGPUHWEvents.def
+9-6llvm/lib/Target/AMDGPU/AMDGPUWaitcntUtils.h
+6-3llvm/lib/Target/AMDGPU/AMDGPUWaitcntUtils.cpp
+4-4llvm/lib/Target/AMDGPU/AMDGPUHWEvents.cpp
+146-421 files not shown
+147-437 files

LLVM/project 4894d4eclang/include/clang/Options Options.td, clang/test/Driver darwin-target-variant-sdk-version.c

[clang][driver] Add a -target-variant alias for -darwin-target-variant (#208388)

Swift Build uses the `-target-variant` argument which is an alias for
-darwin-target-variant that's only present in the Xcode version of
clang. Upstream it for general support and parity with swiftc.

Co-authored-by: Alex Lorenz <arphaman at gmail.com>
DeltaFile
+4-0clang/test/Driver/darwin-target-variant-sdk-version.c
+1-0clang/include/clang/Options/Options.td
+5-02 files

LLVM/project 9ee8b18mlir/test/Integration/Dialect/Vector/CPU gather.mlir

[mlir][vector] Fix e2e test post #210090 (#210270)

Failing bots:
  * https://lab.llvm.org/buildbot/#/builders/177/builds/37626
  * https://lab.llvm.org/buildbot/#/builders/116/builds/30570
DeltaFile
+1-1mlir/test/Integration/Dialect/Vector/CPU/gather.mlir
+1-11 files

LLVM/project 981c0f9lldb/test/API/functionalities/thread/finish-from-empty-func TestEmptyFuncThreadStepOut.py main.c

[lldb][test] Handle potential compiler differences in TestEmptyFuncThreadStepOut.py (#210050)

Fixes #195958

It was reported that this test sometimes failed in CI because lldb would
step out to line 6 instead of line 7.

Jim Ingham expained on the issue that both could be valid locations
(https://github.com/llvm/llvm-project/issues/195958#issuecomment-4384269846).

There's no garauntee that "step out" would go to the source line after
the call you step out of. All it does is go to the first location
outside of the call. If the compiler so chose, that could be on the same
line as the call.

I was not able to reproduce this failure mode, but I think it was
happening in CI before, and is possible. So I've made the test accept
line 6 or 7. Anything further than that we've gone too far and the test
will fail.
DeltaFile
+14-5lldb/test/API/functionalities/thread/finish-from-empty-func/TestEmptyFuncThreadStepOut.py
+1-1lldb/test/API/functionalities/thread/finish-from-empty-func/main.c
+15-62 files

LLVM/project 864a598flang/lib/Lower Bridge.cpp

Self review
DeltaFile
+8-13flang/lib/Lower/Bridge.cpp
+8-131 files

LLVM/project 565fc18llvm/lib/Target/AMDGPU AMDGPUWaitcntTracking.cpp AMDGPUWaitcntTracking.h

Avoid virtual dispatch
DeltaFile
+43-66llvm/lib/Target/AMDGPU/AMDGPUWaitcntTracking.cpp
+40-24llvm/lib/Target/AMDGPU/AMDGPUWaitcntTracking.h
+25-19llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+108-1093 files

LLVM/project 8b26958llvm/test/Transforms/VectorCombine/X86 fold-signbit-reduction-cmp.ll

[VectorCombine][X86] Add test coverage for #209714 (#210063)
DeltaFile
+26-0llvm/test/Transforms/VectorCombine/X86/fold-signbit-reduction-cmp.ll
+26-01 files

LLVM/project b69dd33mlir/test/Integration/Dialect/Vector/CPU maskedstore.mlir compress.mlir

[mlir][vector][nfc] Update integration tests (#210090)

Add comments, unify naming, remove redundant printing hooks.
DeltaFile
+54-40mlir/test/Integration/Dialect/Vector/CPU/maskedstore.mlir
+55-36mlir/test/Integration/Dialect/Vector/CPU/compress.mlir
+40-31mlir/test/Integration/Dialect/Vector/CPU/scatter.mlir
+31-11mlir/test/Integration/Dialect/Vector/CPU/expand.mlir
+29-9mlir/test/Integration/Dialect/Vector/CPU/maskedload.mlir
+18-8mlir/test/Integration/Dialect/Vector/CPU/gather.mlir
+227-1356 files

LLVM/project 1777624flang/lib/Lower Bridge.cpp

[flang][PFT-to-MLIR] pull the scf.execute_region wrap inside the DO lowering

Co-authored-by: Claude Opus 4.7 <noreply at anthropic.com>
DeltaFile
+46-13flang/lib/Lower/Bridge.cpp
+46-131 files

LLVM/project dc70769flang/lib/Lower Bridge.cpp, flang/test/Lower if_construct_execute_region_wrap.f90

[flang][PFT-to-MLIR] start entry block for wrappable nested IfConstruct

Co-authored-by: Claude Opus 4.7 <noreply at anthropic.com>
DeltaFile
+33-0flang/test/Lower/if_construct_execute_region_wrap.f90
+13-0flang/lib/Lower/Bridge.cpp
+46-02 files

LLVM/project a2729d5flang/lib/Lower Bridge.cpp

Self review
DeltaFile
+8-8flang/lib/Lower/Bridge.cpp
+8-81 files

LLVM/project 5732104flang/lib/Lower PFTBuilder.cpp, flang/test/Lower do_loop_execute_region_wrap.f90

[flang][PFT] check every branch target in wrappability analyses

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
DeltaFile
+38-0flang/test/Lower/do_loop_execute_region_wrap.f90
+24-7flang/lib/Lower/PFTBuilder.cpp
+62-72 files

LLVM/project e90ba26flang/lib/Lower PFTBuilder.cpp, flang/test/Lower do_loop_unstructured.f90 do_loop_execute_region_wrap.f90

[flang][PFT-to-MLIR] Wrap unstructured Fortran constructs in scf.execute_region

Extend the PFT-to-MLIR (HLFIR/FIR) lowering so unstructured DO and IF
constructs are emitted inside scf.execute_region, hiding their multi-block
CFG behind a single op. OpenACC and OpenMP lowerings that reject
multi-block content (e.g. the "unstructured do loop in combined acc
construct" TODO in OpenACC.cpp) now see a structured op instead.

Flag: -mmlir --wrap-unstructured-constructs-in-execute-region (default on).

An evaluation is wrappable iff all of the following hold:

  * wrap flag on
  * eval is parser::DoConstruct or parser::IfConstruct
  * eval.isUnstructured
  * branchesAreInternal(eval) -- every controlSuccessor in the subtree
    targets a nested eval or the constructExit
  * !hasIncomingBranch(eval) -- no outside eval branches into the body
    (PFT's synthetic IfConstruct around `if(c) goto X` absorbs label

    [29 lines not shown]
DeltaFile
+234-2flang/lib/Lower/PFTBuilder.cpp
+103-102flang/test/Lower/OpenMP/unstructured.f90
+177-24flang/test/Lower/OpenACC/acc-unstructured.f90
+38-87flang/test/Lower/do_loop_unstructured.f90
+111-0flang/test/Lower/do_loop_execute_region_wrap.f90
+47-61flang/test/Lower/mixed_loops.f90
+710-27621 files not shown
+1,058-51727 files

LLVM/project 90e31c4llvm/lib/LTO LTO.cpp, llvm/test/ThinLTO/X86 cache-defined-globals-order.ll

[LTO] Sort DefinedGlobals in LTO cache key (#210025)

Sort the DefindeGlobals by GUID when computing the LTO cache key, to
avoid making the cache key dependent on the insertion order. This fixes
large compile-time regressions in rust incremental builds.

Alternatively one could make collectDefinedGVSummariesPerModule() work
on the sortedRange(), but as that is also used in other places, it
probably makes sense to sort locally.

The issue was introduced in 760bb06cb3cd98832f1e4e7a4eaebd98b66d2bdd.
DeltaFile
+27-0llvm/test/ThinLTO/X86/cache-defined-globals-order.ll
+8-3llvm/lib/LTO/LTO.cpp
+6-0llvm/test/ThinLTO/X86/Inputs/cache-defined-globals-order.ll
+41-33 files

LLVM/project 47e2df7clang/docs UsersManual.md, clang/test/CodeGen/AArch64 sign-return-address.c

[AArch64][COFF] Branch-protection=standard/pac-ret means "b-key" on Windows (#203989)

On AArch64 Windows the `B-key` is the only supported key for userspace,
let's make "standard" and "pac-ret" options generate "b-key".

Fixes: #203852
(cherry picked from commit 68f703f3e58a52c41b39dfc654a675560b6c5614)
DeltaFile
+11-60llvm/test/CodeGen/AArch64/sign-return-address.ll
+30-0clang/docs/UsersManual.md
+15-0clang/test/CodeGen/AArch64/sign-return-address.c
+11-0llvm/test/CodeGen/AArch64/windows-pac-invalid-a-key.ll
+7-1llvm/lib/TargetParser/ARMTargetParserCommon.cpp
+7-0llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.cpp
+81-6111 files not shown
+112-6617 files

LLVM/project e986d15flang/lib/Lower Bridge.cpp

Self review
DeltaFile
+8-8flang/lib/Lower/Bridge.cpp
+8-81 files

LLVM/project e70d2b6llvm/test/CodeGen/AMDGPU memset-param-combinations.ll call-constexpr.ll

[LLC][AMDGPU] start using new pass manager for backend codegen
DeltaFile
+418-215llvm/test/CodeGen/AMDGPU/memset-param-combinations.ll
+0-388llvm/test/CodeGen/AMDGPU/call-constexpr.ll
+243-0llvm/test/CodeGen/AMDGPU/call-constexpr-gisel.ll
+238-0llvm/test/CodeGen/AMDGPU/call-constexpr-sdag.ll
+115-115llvm/test/CodeGen/AMDGPU/memmove-var-size.ll
+67-64llvm/test/CodeGen/AMDGPU/recursive-resource-usage-mcexpr.ll
+1,081-78284 files not shown
+1,458-1,12590 files

LLVM/project cc98c1ellvm/include/llvm/ADT GenericCycleInfo.h GenericUniformityImpl.h, llvm/lib/Analysis CFG.cpp

[CycleInfo] Represent cycles by an opaque handle. NFC (#210117)

Consumers refer to a cycle by a GenericCycle pointer into
GenericCycleInfo's storage. Introduce GenericCycleRef, a value handle
wrapping the cycle's preorder index, and route every GenericCycleInfo
query and mutation through it. GenericCycle becomes an internal
implementation detail, so its storage representation can change without
touching callers.

Aided by Claude Opus 4.8, reviewed by Fable 5

Suggested by
https://github.com/llvm/llvm-project/pull/208614#pullrequestreview-4683378136
DeltaFile
+179-129llvm/include/llvm/ADT/GenericCycleInfo.h
+121-134llvm/include/llvm/ADT/GenericUniformityImpl.h
+75-67llvm/include/llvm/ADT/GenericCycleImpl.h
+19-19llvm/lib/CodeGen/MachineSink.cpp
+11-11llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+8-8llvm/lib/Analysis/CFG.cpp
+413-36815 files not shown
+463-42521 files

LLVM/project 99824cdflang/lib/Lower Bridge.cpp, flang/test/Lower if_construct_execute_region_wrap.f90

[flang][PFT-to-MLIR] start entry block for wrappable nested IfConstruct

Co-authored-by: Claude Opus 4.7 <noreply at anthropic.com>
DeltaFile
+33-0flang/test/Lower/if_construct_execute_region_wrap.f90
+13-0flang/lib/Lower/Bridge.cpp
+46-02 files

LLVM/project ccc3719flang/lib/Lower Bridge.cpp

[flang][PFT-to-MLIR] pull the scf.execute_region wrap inside the DO lowering

Co-authored-by: Claude Opus 4.7 <noreply at anthropic.com>
DeltaFile
+46-13flang/lib/Lower/Bridge.cpp
+46-131 files

LLVM/project 1fb2b84flang/lib/Lower PFTBuilder.cpp, flang/test/Lower do_loop_execute_region_wrap.f90

[flang][PFT] check every branch target in wrappability analyses

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
DeltaFile
+38-0flang/test/Lower/do_loop_execute_region_wrap.f90
+24-7flang/lib/Lower/PFTBuilder.cpp
+62-72 files

LLVM/project 2abfb0bflang/lib/Lower PFTBuilder.cpp, flang/test/Lower do_loop_unstructured.f90 do_loop_execute_region_wrap.f90

[flang][PFT-to-MLIR] Wrap unstructured Fortran constructs in scf.execute_region

Extend the PFT-to-MLIR (HLFIR/FIR) lowering so unstructured DO and IF
constructs are emitted inside scf.execute_region, hiding their multi-block
CFG behind a single op. OpenACC and OpenMP lowerings that reject
multi-block content (e.g. the "unstructured do loop in combined acc
construct" TODO in OpenACC.cpp) now see a structured op instead.

Flag: -mmlir --wrap-unstructured-constructs-in-execute-region (default on).

An evaluation is wrappable iff all of the following hold:

  * wrap flag on
  * eval is parser::DoConstruct or parser::IfConstruct
  * eval.isUnstructured
  * branchesAreInternal(eval) -- every controlSuccessor in the subtree
    targets a nested eval or the constructExit
  * !hasIncomingBranch(eval) -- no outside eval branches into the body
    (PFT's synthetic IfConstruct around `if(c) goto X` absorbs label

    [29 lines not shown]
DeltaFile
+234-2flang/lib/Lower/PFTBuilder.cpp
+103-102flang/test/Lower/OpenMP/unstructured.f90
+177-24flang/test/Lower/OpenACC/acc-unstructured.f90
+38-87flang/test/Lower/do_loop_unstructured.f90
+111-0flang/test/Lower/do_loop_execute_region_wrap.f90
+47-61flang/test/Lower/mixed_loops.f90
+710-27621 files not shown
+1,058-51727 files

LLVM/project d134db0llvm/lib/Analysis HashRecognize.cpp, llvm/lib/Transforms/Scalar LoopIdiomRecognize.cpp

[HashRecognize] Remove byte-multiple trip count requirement (#210086)

The newly added carryless-multiply CRC loop optimization (#203405) does
not require a byte-multiple trip count unlike the Sarwate method which
was previously implemented. Loosen this requirement in HashRecognize and
reapply it in `optimizeCRCLoop`.
DeltaFile
+132-2llvm/test/Transforms/LoopIdiom/cyclic-redundancy-check.ll
+50-29llvm/test/Analysis/HashRecognize/cyclic-redundancy-check.ll
+2-2llvm/lib/Analysis/HashRecognize.cpp
+3-1llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+187-344 files

LLVM/project 58f7aballvm/include/llvm/Analysis DependenceAnalysis.h, llvm/lib/Analysis DependenceAnalysis.cpp

Replace APInt with SCEV to add symbolic support
DeltaFile
+161-180llvm/lib/Analysis/DependenceAnalysis.cpp
+108-0llvm/test/Analysis/DependenceAnalysis/banerjee-symbolic.ll
+11-11llvm/include/llvm/Analysis/DependenceAnalysis.h
+280-1913 files

LLVM/project d68dc18flang/lib/Lower PFTBuilder.cpp, flang/test/Lower pre-fir-tree-assigned-goto.f90

[flang][PFT] record every target of an assigned GO TO (#210065)

Assigned GO TO (`go to v [, (l1, l2, ...)]`) is the third multiway
branch in the language, alongside the computed GO TO and arithmetic IF
that were addressed in PR #210012. Its PFTBuilder handler previously
did:

    [&](const parser::AssignedGotoStmt &) {
      eval.isUnstructured = true;
      markSuccessorAsNewBlock(eval);
    },

i.e. it recorded no branch targets at all -- neither `controlSuccessor`
nor `extraControlSuccessors` was populated.

Handle the assigned GO TO the same way PR #210012 handles the computed
GO TO and arithmetic IF: iterate every possible target and call
`markBranchTarget(eval, label)` for each, so that `controlSuccessor`
receives the first and `extraControlSuccessors` receives the rest.

Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
DeltaFile
+47-0flang/test/Lower/pre-fir-tree-assigned-goto.f90
+23-4flang/lib/Lower/PFTBuilder.cpp
+70-42 files

LLVM/project 89f5334libc/docs CMakeLists.txt, libc/docs/headers time.rst

[libc][docs] Dynamically generate time.h documentation (#210197)

Removed the static time.rst file.

Added time to docgen_list in libc/docs/CMakeLists.txt. Created
libc/utils/docgen/time.yaml to define the functions.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+0-109libc/docs/headers/time.rst
+68-0libc/utils/docgen/time.yaml
+1-0libc/docs/CMakeLists.txt
+69-1093 files

LLVM/project 250f791lldb/source/Plugins/SymbolLocator/DebugSymbols SymbolLocatorDebugSymbols.cpp

[lldb] Fix tsan error in SymbolLocatorDebugSymbols (#209698)

g_dlsym_DBGCopyFullDSYMURLForUUID and g_dlsym_DBGCopyDSYMPropertyLists
are two globals that are lazily initialized when first used. TSan
complains that this lazy init code is not thread-safe as there is no
synchronization mechanism. In practice, the only race that can happen
here is that we initialize the same values concurrently, which should be
'safe' on any platform.

This patch moves the initialization code into a static local that
returns a const object. This makes this code thread-safe by construction
and fixes the TSan error.

It also fixes that we keep calling dlopen if the initialization fails.
That is, the `g_dlsym_DBGCopyFullDSYMURLForUUID == nullptr` will always
be true on systems where the framework doesn't exist, so this code will
try loading it on every function call and fail.
DeltaFile
+45-44lldb/source/Plugins/SymbolLocator/DebugSymbols/SymbolLocatorDebugSymbols.cpp
+45-441 files

LLVM/project 66b4c2allvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp AMDGPUWaitcntTracking.cpp

[RFC][AMDGPU][InsertWaitcnts] Move `WaitcntBrackets` to a separate file

My previous stack of patches de-tangled quite a bit of InsertWaitcnt,
and now `WaitcntBrackets` can be moved into a separate file fairly
easily. I'm proposing this as a RFC. While I think this is a net
positive, I don't want to force this through if others feel it's unnecessary.

Implementation:
This pretty much moves `WaitcntBrackets` as-is, with a few changes:

- Instead of having a pointer to `SIInsertWaitcnts` for the "context"
  there is now a "Info" class that `SIInsertWaitcnts` implements.
  This enforces a small separation between the classes, not enough to
  force a massive redesign, but enough that we can't just access the
  entire state of `InsertWaitcnts` at will.
- Some unused/unnecessary functions were removed or made private.
- I reorganized the code a bit: moved all private functions together,
  moved method implementations to the .cpp if they had more than 2 lines of code.
  The goal is to keep things somewhat organized so it's easy to glance at the

    [23 lines not shown]
DeltaFile
+35-1,347llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+1,124-0llvm/lib/Target/AMDGPU/AMDGPUWaitcntTracking.cpp
+311-0llvm/lib/Target/AMDGPU/AMDGPUWaitcntTracking.h
+5-0llvm/lib/Target/AMDGPU/SIInstrInfo.h
+1-0llvm/lib/Target/AMDGPU/CMakeLists.txt
+1,476-1,3475 files

LLVM/project c490385flang-rt CMakeLists.txt, flang/test/Driver fakeflang.F

[fakeflang] Also detect CMakeTestGNU.c (#210175)

Two fixes when using CMake < 3.28 after #209482:

* In addition to `flang`, also recognize `fakeflang` to determine
whether any workaround for CMake not completely supporting Flang is
needed. `fakeflang` is used as a shim in #209482.

* For CMake < 3.24, CMake does not reognize Flang at all and tries other
methods to detect to the compiler, including the file `CMakeTestGNU.c`.
Make `fakeflang` recognize it as a probe attempt.

This should fix the
[openmp-offload-amdgpu-clang-flang](https://lab.llvm.org/buildbot/#/builders/67)
buildbot. The buildbot is currently upgrade to a newer CMake version,
and the minimum required version of CMake will become 3.31 soon.
DeltaFile
+6-0flang/test/Driver/fakeflang.F
+3-1runtimes/cmake/config-Fortran.cmake
+3-1flang-rt/CMakeLists.txt
+2-1flang/tools/fakeflang/fakeflang.cpp
+14-34 files