LLVM/project f7176eeutils/bazel/llvm-project-overlay/mlir BUILD.bazel

[bazel][mlir][acc] Port 12f4eb2156559c2f8c99fa7dc3b59cb4fef1389d: scf.yield (#184216)

Co-authored-by: Pranav Kant <prka at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-01 files

LLVM/project ed524baclang/test/CodeGen asm_incbin.c, llvm/include/llvm/MC/MCParser MCAsmParser.h

[llvm] Avoid resolving `.incbin` during symbol collection (#172920)

With IO sandboxing enabled, Clang requires all FS accesses happen
through the one "true" VFS instance. That instance is currently not
being propagated into the assembly parser, and doing so would be super
involved. This triggers sandbox violations whenever an `.incbin`
directive is encountered, since the parser needs the VFS to open the
file.

However, it seems that `asm()` directives are only parsed to get the
symbols of an LLVM module, which cannot be affected by `.incbin`
directives. This PR adds an option to the asm parser to avoid resolving
`.incbin` directives when collecting module symbols, avoiding the
sandbox violation.
DeltaFile
+8-0clang/test/CodeGen/asm_incbin.c
+7-0llvm/include/llvm/MC/MCParser/MCAsmParser.h
+4-0llvm/lib/MC/MCParser/AsmParser.cpp
+2-0llvm/lib/Object/ModuleSymbolTable.cpp
+21-04 files

LLVM/project ed08557clang/include/clang/Basic DiagnosticSemaKinds.td DiagnosticGroups.td, clang/include/clang/Sema SemaHLSL.h

[SemaHLSL] Warn when a local resource is re-assigned to non-unique global resource (#182101)

Generate a warning whenever a local resource is (re-)assigned such that
it is not guaranteed to map to a single unique global resource.

An error is not generated during sema because simple DCE or constant
folding might resolve the assignment to be to a unique global resource.
Instead, an error will be reported when trying to resolve the resource
access in the `dxil-resource-access` pass, implemented
[here](https://github.com/llvm/llvm-project/pull/182106).

Resolves https://github.com/llvm/llvm-project/issues/179303.
DeltaFile
+67-1clang/lib/Sema/SemaHLSL.cpp
+62-0clang/test/SemaHLSL/local_resource_bindings.hlsl
+49-0clang/test/SemaHLSL/local_resource_bindings_errs.hlsl
+17-0clang/include/clang/Sema/SemaHLSL.h
+4-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+3-0clang/include/clang/Basic/DiagnosticGroups.td
+202-16 files

LLVM/project 0797a10mlir/lib/Conversion/XeVMToLLVM XeVMToLLVM.cpp, mlir/test/Conversion/XeVMToLLVM rewrite_alloca.mlir

[MLIR][XeVM] Rewrite llvm.alloca if addr_space is 3 (#183417)

Rewrite llvm.alloca with addr_space 3 into llvm.mlir.global and llvm.mlir.addressof
DeltaFile
+76-0mlir/test/Conversion/XeVMToLLVM/rewrite_alloca.mlir
+71-4mlir/lib/Conversion/XeVMToLLVM/XeVMToLLVM.cpp
+147-42 files

LLVM/project 96a02c5clang/include/clang/APINotes APINotesReader.h, clang/lib/APINotes APINotesReader.cpp APINotesManager.cpp

Revert "[APINotes] Refactor APINotesReader to propagate llvm::Error " (#184211)

Reverts llvm/llvm-project#183812

Bot failed constantly. Revert this PR to unblock.
https://lab.llvm.org/buildbot/#/builders/140
DeltaFile
+404-431clang/lib/APINotes/APINotesReader.cpp
+4-11clang/lib/APINotes/APINotesManager.cpp
+3-4clang/include/clang/APINotes/APINotesReader.h
+411-4463 files

LLVM/project 9aff7b6clang/lib/Driver/ToolChains Clang.cpp, clang/test/Driver hip-toolchain-no-rdc.hip

[HIP] Fix wrong triple being passed to offload-bundler (#184195)

Summary:
I made a previous fix that stopped us from hard-coding x64 host in the
HIP fatbinaries we made. However, this then triggered this failure where
we were passing the wrong host triple. Now we will use the aux-triple
for offloading toolchains.
DeltaFile
+6-2clang/lib/Driver/ToolChains/Clang.cpp
+1-0clang/test/Driver/hip-toolchain-no-rdc.hip
+7-22 files

LLVM/project 24873cbllvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/X86 known-never-zero.ll

[SelectionDAG] Pass DemandedElts to isKnownNeverZero for extend nodes (#183624)

Fixes #183042

This patch updates `SelectionDAG::isKnownNeverZero` to forward the
`DemandedElts` mask when analyzing `ISD::ZERO_EXTEND` and
`ISD::SIGN_EXTEND` nodes.
DeltaFile
+98-0llvm/test/CodeGen/X86/known-never-zero.ll
+1-1llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+99-12 files

LLVM/project 12f4eb2mlir/include/mlir/Dialect/OpenACC OpenACCUtilsLoop.h, mlir/lib/Dialect/OpenACC/Utils OpenACCUtilsLoop.cpp

[mlir][acc] Replace terminators with scf.yield in wrapMultiBlockRegionWithSCFExecuteRegion (#183758)

When wrapping a multi-block region in `scf.execute_region`, replace
`func::ReturnOp` (if flang `convertFuncReturn` is set) and
`acc::YieldOp` in all the blocks with `scf.yield` so the region has a
valid SCF terminator.
DeltaFile
+154-0mlir/unittests/Dialect/OpenACC/OpenACCUtilsLoopTest.cpp
+18-13mlir/lib/Dialect/OpenACC/Utils/OpenACCUtilsLoop.cpp
+10-6mlir/include/mlir/Dialect/OpenACC/OpenACCUtilsLoop.h
+182-193 files

LLVM/project 973f760llvm/include/llvm/Transforms/Utils MemoryTaggingSupport.h, llvm/lib/Transforms/Utils MemoryTaggingSupport.cpp

[HWASan] [MTE] support double lifetime.end in same BB

We can just ignore the second one, because it will always be a no-op.

Reviewers: pcc, usama54321, vitalybuka

Reviewed By: vitalybuka

Pull Request: https://github.com/llvm/llvm-project/pull/183809
DeltaFile
+18-51llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope.ll
+11-16llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp
+4-3llvm/test/CodeGen/AArch64/stack-tagging.ll
+0-4llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h
+33-744 files

LLVM/project 0cabe93clang/lib/CodeGen CGHLSLRuntime.cpp, clang/test/CodeGenHLSL inline-functions.hlsl

[HLSL] Reintroduce dx.disable_optimizations to set DisableOptimization Shader Flag (#180069)

This patch removes optnone from HLSL entry functions and instead uses
`dx.disable_optimizations` module flag to know when to enable
`DisableOptimization` Shader Flag. This is part of: #167936

---------

Co-authored-by: Joao Saffran <jderezende at microsoft.com>
DeltaFile
+0-30llvm/test/CodeGen/DirectX/ShaderFlags/lib-entry-attr-error.ll
+8-12llvm/lib/Target/DirectX/DXILShaderFlags.cpp
+10-5llvm/test/CodeGen/DirectX/ShaderFlags/disable-opt-lib.ll
+5-9clang/test/CodeGenHLSL/inline-functions.hlsl
+6-2llvm/test/CodeGen/DirectX/ShaderFlags/disable-opt-cs.ll
+4-2clang/lib/CodeGen/CGHLSLRuntime.cpp
+33-606 files

LLVM/project fb6038dllvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/X86 known-never-zero.ll

[DAG] isKnownNeverZero - add ISD::SRA/SRL DemandedElts handling and tests (#183577)

This patch updates `SelectionDAG::isKnownNeverZero` to support
`ISD::SRA`/`ISD::SRL` by forwarding the `DemandedElts` mask to its
operands.

Fixes #183046
DeltaFile
+6-12llvm/test/CodeGen/X86/known-never-zero.ll
+5-3llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+11-152 files

LLVM/project b3c4d44lldb/include/lldb/Target ThreadList.h ThreadPlanStepOverBreakpoint.h, lldb/source/Target ThreadList.cpp ThreadPlanStepOverBreakpoint.cpp

[lldb] Batch breakpoint step-over for threads stopped at the same BP (#183412)

When multiple threads are stopped at the same breakpoint, LLDB currently
steps each thread over the breakpoint one at a time. Each step requires
disabling the breakpoint, single-stepping one thread, and re-enabling
it, resulting in N disable/enable cycles and N individual vCont packets
for N threads. This is a common scenario for hot breakpoints in
multithreaded programs and scales poorly.

This patch batches the step-over so that all threads at the same
breakpoint site are stepped together in a single vCont packet, with the
breakpoint disabled once at the start and re-enabled once after the last
thread finishes.

At the top of WillResume, any leftover StepOverBreakpoint plans from a
previous cycle are popped with their re-enable side effect suppressed
via SetReenabledBreakpointSite, giving a clean slate.
SetupToStepOverBreakpointIfNeeded then creates fresh plans for all
threads that still need to step over a breakpoint, and these are grouped

    [49 lines not shown]
DeltaFile
+216-0lldb/test/API/functionalities/gdb_remote_client/TestBatchedBreakpointStepOver.py
+170-1lldb/source/Target/ThreadList.cpp
+127-0lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBatchedBreakpointStepOver.py
+21-12lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
+23-0lldb/include/lldb/Target/ThreadList.h
+19-0lldb/include/lldb/Target/ThreadPlanStepOverBreakpoint.h
+576-136 files

LLVM/project 31c4b27llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp

InstCombine: Handle insertvalue in SimplifyDemandedFPClass
DeltaFile
+9-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+9-01 files

LLVM/project e2dd657llvm/include/llvm/Transforms/IPO Attributor.h, llvm/lib/Analysis ValueTracking.cpp

ValueTracking: Handle constant structs in computeKnownFPClass

Also fix attributor not bothering to deal with structs.
DeltaFile
+19-2llvm/test/Transforms/Attributor/nofpclass.ll
+15-0llvm/lib/Analysis/ValueTracking.cpp
+1-9llvm/include/llvm/Transforms/IPO/Attributor.h
+2-4llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-aggregates.ll
+37-154 files

LLVM/project 30bad87llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass.ll

ValueTracking: Handle ConstantDataSequential in computeKnownFPClass
DeltaFile
+16-16llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-aggregates.ll
+18-0llvm/test/Transforms/Attributor/nofpclass.ll
+7-0llvm/lib/Analysis/ValueTracking.cpp
+41-163 files

LLVM/project a171b8dllvm/lib/Target/NVPTX NVPTXMarkKernelPtrsGlobal.cpp NVPTXLowerArgs.cpp, llvm/test/CodeGen/NVPTX lower-args.ll mark-kernel-ptrs-global.ll

[NVPTX] Refactor NVPTXLowerArgs and move helpers to NVPTXUtilities (#183686)

A couple of refactoring changes to simplify `NVPTXLowerArgs` and reduce
unnecessary coupling to `NVPTXTargetLowering`:

- Move `getFunctionParamOptimizedAlign`, `getFunctionArgumentAlignment`,
and `getFunctionByValParamAlign` from `NVPTXTargetLowering` to
`NVPTXUtilities` as free functions. These don't use any TLI state and
were only member functions because they called each other. This also
lets `getArgumentAlignment` become file-static in
`NVPTXISelLowering.cpp`, and removes the `NVPTXTargetLowering`
dependency from `NVPTXLowerArgs` for byval alignment.

- Split the CUDA kernel pointer-marking logic out of `NVPTXLowerArgs`
into a new `NVPTXMarkKernelPtrsGlobal` pass. This code (marking pointers
loaded from byval params as global, handling int-to-ptr patterns) is
conceptually independent of the argument lowering and was guarded by a
`DrvInterface == CUDA` check that is now at pipeline scheduling time.
The new pass is a simple `FunctionPass` with no `TargetMachine`
dependency.
DeltaFile
+124-0llvm/lib/Target/NVPTX/NVPTXMarkKernelPtrsGlobal.cpp
+26-91llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
+1-93llvm/test/CodeGen/NVPTX/lower-args.ll
+82-0llvm/test/CodeGen/NVPTX/mark-kernel-ptrs-global.ll
+5-65llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+54-0llvm/lib/Target/NVPTX/NVPTXUtilities.cpp
+292-2498 files not shown
+326-27614 files

LLVM/project fc59c37llvm/include/llvm/Transforms/IPO Attributor.h, llvm/lib/Analysis ValueTracking.cpp

ValueTracking: Handle constant structs in computeKnownFPClass

Also fix attributor not bothering to deal with structs.
DeltaFile
+19-2llvm/test/Transforms/Attributor/nofpclass.ll
+15-0llvm/lib/Analysis/ValueTracking.cpp
+1-9llvm/include/llvm/Transforms/IPO/Attributor.h
+35-113 files

LLVM/project dd152b5llvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-aggregates.ll

InstCombine: Handle insertvalue in SimplifyDemandedFPClass
DeltaFile
+18-20llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-aggregates.ll
+9-0llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+27-202 files

LLVM/project e289140llvm/lib/Analysis ValueTracking.cpp, llvm/test/Transforms/Attributor nofpclass.ll

ValueTracking: Handle ConstantDataSequential in computeKnownFPClass
DeltaFile
+18-0llvm/test/Transforms/Attributor/nofpclass.ll
+7-0llvm/lib/Analysis/ValueTracking.cpp
+25-02 files

LLVM/project 322179ellvm/lib/Transforms/InstCombine InstCombineSimplifyDemanded.cpp, llvm/test/Transforms/InstCombine simplify-demanded-fpclass-aggregates.ll

InstCombine: Support extractvalue in SimplifyDemandedFPClass

Previously this only handled extractvalue of frexp.
DeltaFile
+67-0llvm/test/Transforms/InstCombine/simplify-demanded-fpclass-aggregates.ll
+6-1llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+73-12 files

LLVM/project 5ff5a1fclang/cmake/modules AddClang.cmake, lld/tools/lld CMakeLists.txt

Revert "[CMake] Use keyword signature in two additional callsites (#1… (#184186)

…83889)"

This reverts commit 2342db00ab4d0305580814fb00f477b4b5cebec6.

Revert "[CMake] Propagate dependencies to OBJECT libraries in
`add_llvm_library` (#183541)"

This reverts commit e3c045415ae52167e197d4a6ed4ad5a04e49423a.
DeltaFile
+1-6llvm/cmake/modules/AddLLVM.cmake
+1-4llvm/cmake/modules/LLVM-Config.cmake
+1-1mlir/cmake/modules/AddMLIR.cmake
+1-1lld/tools/lld/CMakeLists.txt
+1-1clang/cmake/modules/AddClang.cmake
+5-135 files

LLVM/project 16afe67llvm/test/CodeGen/AMDGPU attr-amdgpu-flat-work-group-size-vgpr-limit.ll

[AMDGPU] Make the options consistent across 3 RA pipelines(NFC)

Adding the missing option for the wwm-regalloc in the test
attr-amdgpu-flat-work-group-size-vgpr-limit.ll. The existing
test already specifies -sgpr-regalloc=fast & -vgpr-regalloc=fast
to ensure that the fast register allocator is preferred over
the default greedy allocator. For consistency, the same
preference should also be applied to the wwm-regalloc pipeline.
DeltaFile
+10-10llvm/test/CodeGen/AMDGPU/attr-amdgpu-flat-work-group-size-vgpr-limit.ll
+10-101 files

LLVM/project ae363d5clang/include/clang/AST TypeBase.h, clang/test/AST/HLSL matrix-constructors.hlsl matrix-general-initializer.hlsl

[HLSL][Matrix] Make Matrix InitListExprs and AST row-major order, and respect /Zpr and /Zpc in codegen (#182904)

Fixes #166410 and #181902

This PR makes matrix initializer lists be kept in row-major order in
InitListExpr and the AST for HLSL by not reordering the element indices
in `InitListChecker::CheckMatrixType` in `clang/lib/Sema/SemaInit.cpp`.
This PR also makes the codegen respect /Zpr and /Zpc during codegen for
matrix initializer lists by adding a vector shuffle to
`VisitInitListExpr` in `clang/lib/CodeGen/CGExprScalar.cpp`.

Assisted-by: claude-opus-4.6

---------

Co-authored-by: Farzon Lotfi <farzonl at gmail.com>
DeltaFile
+67-66clang/test/AST/HLSL/matrix-constructors.hlsl
+53-53clang/test/AST/HLSL/matrix-general-initializer.hlsl
+60-0clang/test/CodeGenHLSL/BasicFeatures/MatrixInitializerListOrder.hlsl
+26-24clang/test/CodeGenHLSL/BasicFeatures/MatrixConstructor.hlsl
+40-0clang/test/AST/HLSL/matrix-init-list-row-major.hlsl
+39-0clang/include/clang/AST/TypeBase.h
+285-1434 files not shown
+320-15810 files

LLVM/project 28d294eflang/lib/Semantics expression.cpp, flang/test/Semantics bug2236.f90

[flang] Let -fdisable-real-10 affect only user code (#183870)

Don't let -fdisable-real-10 elicit errors from intrinsic modules.
DeltaFile
+11-2flang/lib/Semantics/expression.cpp
+6-0flang/test/Semantics/bug2236.f90
+17-22 files

LLVM/project d723d14flang-rt/lib/runtime edit-output.cpp edit-output.h, flang-rt/unittests/Runtime NumericalFormatTest.cpp

[flang][runtime] Emit "Infinity" rather than "Inf" when required (#183359)

The ISO Fortran standard requires that numeric output editing produce
the full word "Infinity", rather than my current "Inf", when the output
field is wide enough to hold it. Comply.
DeltaFile
+40-30flang-rt/lib/runtime/edit-output.cpp
+12-12flang-rt/unittests/Runtime/NumericalFormatTest.cpp
+4-2flang-rt/lib/runtime/edit-output.h
+56-443 files

LLVM/project dd3d727llvm/test/tools/llvm-ir2vec/bindings ir2vec-bindings.py, llvm/tools/llvm-ir2vec/Bindings PyIR2Vec.cpp

Revert "[llvm-ir2vec] Adding Inst Embeddings Map API to ir2vec python bindings" (#184179)

Reverts llvm/llvm-project#180140

Unblock bot: https://lab.llvm.org/buildbot/#/builders/140
DeltaFile
+42-32llvm/tools/llvm-ir2vec/lib/Utils.cpp
+1-42llvm/tools/llvm-ir2vec/Bindings/PyIR2Vec.cpp
+0-38llvm/test/tools/llvm-ir2vec/bindings/ir2vec-bindings.py
+0-7llvm/tools/llvm-ir2vec/lib/Utils.h
+43-1194 files

LLVM/project f486fc9clang-tools-extra Maintainers.rst

[clang-tidy] Nominate myself as a maintainer (#183173)

For the past ~8 months, I've been regularly working on clang-tidy, doing
features and cleanups, fixing issues, and reviewing PRs. I'm passionate
about the project, and I'd like to step up to be a maintainer for it!
DeltaFile
+3-0clang-tools-extra/Maintainers.rst
+3-01 files

LLVM/project 307d912clang/lib/StaticAnalyzer/Checkers GenericTaintChecker.cpp, clang/test/Analysis/taint-main-parameters simple.cpp envp2.c

[clang][analyzer] Add taintedness to argv (#178054)

If the execution environment is untrusted, we assume that the argv, argc
and envp parameters of the main function are attacker controlled values
and set them as taint analysis sources.
DeltaFile
+89-1clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
+43-0clang/test/Analysis/taint-main-parameters/simple.cpp
+28-0clang/test/Analysis/taint-main-parameters/envp2.c
+28-0clang/test/Analysis/taint-main-parameters/trusted.c
+26-0clang/test/Analysis/taint-main-parameters/envp.c
+25-0clang/test/Analysis/taint-main-parameters/simple.c
+239-15 files not shown
+315-211 files

LLVM/project ab5205cllvm/lib/MC MCDwarf.cpp, llvm/test/DebugInfo/AArch64 asm-cu-language.s

[llvm][DebugInfo] Emit DW_LNAME_Assembly for DWARFv6 assembly CUs (#183897)

Use the new DWARFv6 language code for assembly CUs. While we have a
`DW_LANG_Assembly` pre-DWARFv6 I kept the `DW_LANG_Mips_Assembler`
pre-DWARFv6 for now (I added a FIXME if we want to address it).
DeltaFile
+20-0llvm/test/DebugInfo/AArch64/asm-cu-language.s
+15-4llvm/lib/MC/MCDwarf.cpp
+35-42 files

LLVM/project 573a541clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers string, clang-tools-extra/test/clang-tidy/checkers/bugprone sizeof-container.cpp dangling-handle.cpp

[clang-tidy][NFC] Use singe mock string header in tests (#183996)

DeltaFile
+3-38clang-tools-extra/test/clang-tidy/checkers/performance/faster-string-find.cpp
+3-34clang-tools-extra/test/clang-tidy/checkers/readability/simplify-subscript-expr.cpp
+2-31clang-tools-extra/test/clang-tidy/checkers/readability/redundant-string-init.cpp
+25-5clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/string
+4-21clang-tools-extra/test/clang-tidy/checkers/bugprone/sizeof-container.cpp
+1-22clang-tools-extra/test/clang-tidy/checkers/bugprone/dangling-handle.cpp
+38-15111 files not shown
+61-22717 files