LLVM/project 6d91e20llvm/lib/Transforms/Vectorize/SandboxVectorizer VecUtils.cpp, llvm/test/Transforms/SandboxVectorizer topdown_vec.ll

[SBVec] Track claimed users across bundles
DeltaFile
+38-13llvm/test/Transforms/SandboxVectorizer/topdown_vec.ll
+13-3llvm/lib/Transforms/Vectorize/SandboxVectorizer/VecUtils.cpp
+51-162 files

LLVM/project 888483dllvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.cpp

[SBVec] Refactor BottomUpVec pass for clarity and maintainability

- Corrected comments to clarify the direction of def-use and use-def chains.
- Changed the initialization of the SchedDirection variable to improve clarity.
- Updated documentation in vectorizeRec() to better describe the purpose of UserBndl.
- Removed outdated TODO comment regarding top-down vectorization scheduling.
DeltaFile
+5-4llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h
+1-6llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
+6-102 files

LLVM/project 342e31dllvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.cpp, llvm/test/Transforms/SandboxVectorizer topdown_vec.ll

3 element tests

- nits
DeltaFile
+130-5llvm/test/Transforms/SandboxVectorizer/topdown_vec.ll
+0-4llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
+130-92 files

LLVM/project 83ca453llvm/lib/Transforms/Vectorize/SandboxVectorizer VecUtils.cpp, llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.cpp

[SBVec] Add top-down vectorization to the unified Sandbox Vectorizer

Extend the Sandbox Vectorizer's `bottom-up-vec` pass so a single
implementation can vectorize in either direction, and add the top-down
strategy that walks def-use chains forward from a seed.

Direction selection
--------------------
The pass direction is chosen from the Region's auxiliary pass argument:
"bottom-up" (or empty, the default) and "top-down" map onto a
SchedDirection, and any other value is rejected with a fatal usage error.
The vectorizer always runs in the same direction as the scheduler.

Top-down traversal
------------------
Bottom-up starts from a seed slice (e.g. stores to consecutive addresses)
and recurses into operands. Top-down instead starts from a seed of
consecutive loads and recurses into *users*:


    [32 lines not shown]
DeltaFile
+441-0llvm/test/Transforms/SandboxVectorizer/topdown_vec.ll
+229-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/VecUtilsTest.cpp
+90-27llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
+79-0llvm/lib/Transforms/Vectorize/SandboxVectorizer/VecUtils.cpp
+68-9llvm/test/Transforms/SandboxVectorizer/pack.ll
+68-0llvm/test/Transforms/SandboxVectorizer/external_uses.ll
+975-362 files not shown
+1,017-488 files

LLVM/project 9ab51a6llvm/test/Transforms/SandboxVectorizer topdown_vec.ll

Add 3-way test to check for consecutive matching
DeltaFile
+45-0llvm/test/Transforms/SandboxVectorizer/topdown_vec.ll
+45-01 files

LLVM/project 08efe1cllvm/lib/Transforms/Vectorize/SandboxVectorizer Scheduler.cpp, llvm/unittests/Transforms/Vectorize/SandboxVectorizer SchedulerTest.cpp

[SBVec] Refill ready list during topdown scheduling

Visit nodes which are ready according to the direction of scheduling.
DeltaFile
+28-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
+9-3llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
+37-32 files

LLVM/project fe1fea5libc/src/__support/CPP string.h, libc/test/src/__support/CPP string_test.cpp

Handle self-move-assignment
DeltaFile
+7-0libc/test/src/__support/CPP/string_test.cpp
+3-0libc/src/__support/CPP/string.h
+10-02 files

LLVM/project 132a04dlibc/src/__support/CPP string.h CMakeLists.txt, libc/test/src/__support/CPP string_test.cpp

Remove now unused deps
DeltaFile
+18-17libc/src/__support/CPP/string.h
+14-5libc/test/src/__support/CPP/string_test.cpp
+1-4utils/bazel/llvm-project-overlay/libc/test/src/__support/CPP/BUILD.bazel
+0-2libc/src/__support/CPP/CMakeLists.txt
+0-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+33-305 files

LLVM/project 8b9cce3lldb/include/lldb/Expression ExpressionVariable.h, lldb/source/Expression ExpressionVariable.cpp Materializer.cpp

Make result variables obey their dynamic values in subsequent expressions

This is a resubmit of the original patch: 6344e3aa8106dfdfb30cac36c8ca02bc4c52ce24:

Make result variables obey their dynamic values in subsequent
expressions (#168611)

When I originally submitted this, it caused intermittent flakey failures
on systems I didn't have access to, and I didn't have time to sort them
out, so I reverted the patch. I'm resubmitting this so I can run the
bots on it a few rounds to see if I can reproduce and diagnose those
intermittent failures.

Here's the commit log from the original submission describing the
change:

When you run an expression and the result has a dynamic type that is
different from the expression's static result type, we print the result
variable using the dynamic type, but at present when you use the result

    [25 lines not shown]
DeltaFile
+174-0lldb/test/API/functionalities/expr-result-var/TestCPPExprResult.py
+72-6lldb/source/Expression/ExpressionVariable.cpp
+44-18lldb/include/lldb/Expression/ExpressionVariable.h
+55-0lldb/test/API/functionalities/expr-result-var/two-bases.cpp
+25-24lldb/source/Expression/Materializer.cpp
+9-5lldb/source/Expression/LLVMUserExpression.cpp
+379-534 files not shown
+384-5610 files

LLVM/project f61e12alibc/src/__support/CPP string.h CMakeLists.txt, libc/test/src/__support/CPP string_test.cpp

Remove now unused deps
DeltaFile
+18-17libc/src/__support/CPP/string.h
+14-5libc/test/src/__support/CPP/string_test.cpp
+1-4utils/bazel/llvm-project-overlay/libc/test/src/__support/CPP/BUILD.bazel
+0-2libc/src/__support/CPP/CMakeLists.txt
+0-2utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+33-305 files

LLVM/project b11881ellvm/test/CodeGen/AMDGPU mdt-preserving-crash.ll, llvm/test/CodeGen/PowerPC subreg-postra.ll p10-spill-crun.ll

[BranchFolding] Fold away subsequent identical branches

If we have a BB that has a single conditional branch instruction it that
is identical to the previous block's branch instruction, we can delete
the BB as it is redundant.

This doesn't directly impact performance as such instructions are never
executed, but this can help decrease code size which can help with
overall icache pressure (though likely only slightly). The biggest
impact would probably be fitting more instructions into a single cache
line. This is probably almost a no-op with PLO but definitely doesn't
hurt.

Fixes #202763.

Reviewers: RKSimon, arsenm, krzysz00, topperc, lei137

Pull Request: https://github.com/llvm/llvm-project/pull/203110
DeltaFile
+93-97llvm/test/CodeGen/PowerPC/subreg-postra.ll
+52-57llvm/test/CodeGen/X86/2008-04-17-CoalescerBug.ll
+44-48llvm/test/CodeGen/PowerPC/p10-spill-crun.ll
+23-29llvm/test/CodeGen/X86/2011-09-14-valcoalesce.ll
+13-19llvm/test/CodeGen/X86/2009-11-17-UpdateTerminator.ll
+13-17llvm/test/CodeGen/AMDGPU/mdt-preserving-crash.ll
+238-2676 files not shown
+277-29312 files

LLVM/project b7fbf82llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.cpp, llvm/test/Transforms/SandboxVectorizer topdown_vec.ll

3 element tests
DeltaFile
+128-0llvm/test/Transforms/SandboxVectorizer/topdown_vec.ll
+0-4llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
+128-42 files

LLVM/project f421cb3llvm/lib/Transforms/Vectorize/SandboxVectorizer VecUtils.cpp, llvm/test/Transforms/SandboxVectorizer topdown_vec.ll

[SBVec] Track claimed users across bundles
DeltaFile
+38-13llvm/test/Transforms/SandboxVectorizer/topdown_vec.ll
+13-3llvm/lib/Transforms/Vectorize/SandboxVectorizer/VecUtils.cpp
+51-162 files

LLVM/project 6875b35llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.cpp

[SBVec] Refactor BottomUpVec pass for clarity and maintainability

- Corrected comments to clarify the direction of def-use and use-def chains.
- Changed the initialization of the SchedDirection variable to improve clarity.
- Updated documentation in vectorizeRec() to better describe the purpose of UserBndl.
- Removed outdated TODO comment regarding top-down vectorization scheduling.
DeltaFile
+5-4llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h
+1-6llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
+6-102 files

LLVM/project a24292cllvm/lib/Transforms/Vectorize/SandboxVectorizer VecUtils.cpp, llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes BottomUpVec.cpp

[SBVec] Add top-down vectorization to the unified Sandbox Vectorizer

Extend the Sandbox Vectorizer's `bottom-up-vec` pass so a single
implementation can vectorize in either direction, and add the top-down
strategy that walks def-use chains forward from a seed.

Direction selection
--------------------
The pass direction is chosen from the Region's auxiliary pass argument:
"bottom-up" (or empty, the default) and "top-down" map onto a
SchedDirection, and any other value is rejected with a fatal usage error.
The vectorizer always runs in the same direction as the scheduler.

Top-down traversal
------------------
Bottom-up starts from a seed slice (e.g. stores to consecutive addresses)
and recurses into operands. Top-down instead starts from a seed of
consecutive loads and recurses into *users*:


    [32 lines not shown]
DeltaFile
+441-0llvm/test/Transforms/SandboxVectorizer/topdown_vec.ll
+229-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/VecUtilsTest.cpp
+90-27llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.cpp
+79-0llvm/lib/Transforms/Vectorize/SandboxVectorizer/VecUtils.cpp
+68-9llvm/test/Transforms/SandboxVectorizer/pack.ll
+68-0llvm/test/Transforms/SandboxVectorizer/external_uses.ll
+975-362 files not shown
+1,017-488 files

LLVM/project aef1e4fclang/test/CodeGen target-data.c, llvm/lib/Target/NVPTX NVPTXISelLowering.cpp

[NVPTX] Support short entry param pointers (#206512)
DeltaFile
+458-229llvm/test/CodeGen/NVPTX/lower-args-gridconstant.ll
+32-0llvm/unittests/TargetParser/TripleTest.cpp
+21-9llvm/lib/TargetParser/TargetDataLayout.cpp
+6-5llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+1-1clang/test/CodeGen/target-data.c
+518-2445 files

LLVM/project 6da4586llvm/lib/Transforms/Vectorize/SandboxVectorizer Scheduler.cpp, llvm/unittests/Transforms/Vectorize/SandboxVectorizer SchedulerTest.cpp

[SBVec] Refill ready list during topdown scheduling

Visit nodes which are ready according to the direction of scheduling.
DeltaFile
+28-0llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SchedulerTest.cpp
+9-3llvm/lib/Transforms/Vectorize/SandboxVectorizer/Scheduler.cpp
+37-32 files

LLVM/project 3782c00clang/test/OffloadTools/clang-sycl-linker basic.ll, clang/tools/clang-sycl-linker ClangSYCLLinker.cpp

[clang-sycl-linker] Forward all --ocloc-options occurrences to ocloc (#211075)

getLastArgValue() only returned the final --ocloc-options= occurrence,
silently dropping earlier ones when the option is passed multiple
times (one token per occurrence). Use getAllArgValues() so every
occurrence is forwarded to ocloc.
DeltaFile
+5-2clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+6-0clang/test/OffloadTools/clang-sycl-linker/basic.ll
+11-22 files

LLVM/project 45943a2clang/include/clang/AST Decl.h, clang/lib/AST DeclTemplate.cpp Decl.cpp

fixup

Have the AST mutation listeners receive any new template specializations,
not just the canonical ones.

This is necessary for modules / the ASTWriter to serialize those.
DeltaFile
+73-0clang/test/Modules/function-redecl.cpp
+23-19clang/lib/AST/DeclTemplate.cpp
+2-4clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+2-3clang/lib/AST/Decl.cpp
+1-4clang/include/clang/AST/Decl.h
+1-2clang/lib/AST/ASTImporter.cpp
+102-321 files not shown
+103-337 files

LLVM/project 8787e8dclang/lib/Sema SemaTemplate.cpp, clang/test/SemaTemplate concepts-out-of-line-def.cpp

fixup
DeltaFile
+16-0clang/test/SemaTemplate/concepts-out-of-line-def.cpp
+3-2clang/lib/Sema/SemaTemplate.cpp
+19-22 files

LLVM/project 9b65694clang/include/clang/Sema Sema.h, clang/lib/Sema SemaDecl.cpp SemaTemplate.cpp

fixup
DeltaFile
+9-18clang/lib/Sema/SemaDecl.cpp
+12-11clang/lib/Sema/SemaTemplate.cpp
+5-4clang/include/clang/Sema/Sema.h
+8-0clang/test/SemaCXX/member-class-11.cpp
+1-1clang/lib/Sema/SemaDeclCXX.cpp
+35-345 files

LLVM/project 32743c5clang/include/clang/AST DeclTemplate.h, clang/lib/AST DeclTemplate.cpp

[clang] fix getTemplateInstantiationArgs

This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the template
context of out-of-line definitions.

This greatly simplifies the signature of that function, by removing a bunch
of workarounds, and simpliffying a couple that weren't removed yet.

Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.

Also makes the explicit specialization AST nodes stop abusing the template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.
DeltaFile
+194-429clang/lib/Sema/SemaTemplateInstantiate.cpp
+301-165clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+151-147clang/lib/Sema/SemaTemplate.cpp
+96-95clang/include/clang/AST/DeclTemplate.h
+59-129clang/lib/Sema/SemaConcept.cpp
+60-92clang/lib/AST/DeclTemplate.cpp
+861-1,05762 files not shown
+1,555-1,68468 files

LLVM/project 4fff13bclang/lib/CIR/Dialect/Transforms CallConvLoweringPass.cpp, clang/test/CIR/Transforms/abi-lowering x86_64-empty-record.cir x86_64-aggregate-nyi.cir

[CIR] Classify empty records as Ignore in x86_64 callconv (#211078)

The x86_64 aggregate calling-convention bridge rejects a zero-field
record as NYI, even though the SysV classifier already treats an empty
record as NoClass/NoClass (so it returns Ignore) and the rewriter
already drops arguments and returns classified Ignore.

Dropping the zero-field reject in `isSupportedType` lets a C empty
struct classify as Ignore: the argument slot is removed, the remaining
arguments shift down, and an empty-record return lowers to void.

The C++ empty class stays NYI. CIRGen lays it out as a single padded
byte, which the padded reject still catches. Unions, packed, and
all-float aggregates remain NYI as before.

---------

Co-authored-by: Andy Kaylor <akaylor at nvidia.com>
DeltaFile
+64-0clang/test/CIR/Transforms/abi-lowering/x86_64-empty-record.cir
+6-6clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+0-9clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
+70-153 files

LLVM/project 92de2aeclang/lib/Sema SemaExpr.cpp, clang/test/CodeGenCXX gh196469-default-member-init-lambda-capture-copy.cpp

[Clang] Re-run init-capture initialization when rebuilding default member initializers

When a default member initializer containing a lambda is rebuilt at its
point of use (CWG1815/CWG2631 aggregate initialization),
EnsureImmediateInvocationInDefaultArgs::TransformLambdaExpr transformed
each init-capture initializer with TransformInitializer but never
re-performed the capture's initialization.

TransformInitializer lowers an initializer to its syntactic form -- a
stripped source expression for copy-init, a ParenListExpr for
direct-init, or an InitListExpr for list-init -- and expects the
enclosing context to rebuild the initialization against the target
entity. Without that second step the rebuilt closure was left with a
bare capture initializer: CodeGen crashed for a trivially destructible
closure (aggregate-copy of a non-trivially copyable type) and silently
left the capture uninitialized otherwise.

Re-run buildLambdaInitCaptureInitialization on the transformed
initializer, as the canonical TreeTransform::TransformLambdaExpr does, so

    [7 lines not shown]
DeltaFile
+76-0clang/test/CodeGenCXX/gh196469-default-member-init-lambda-capture-copy.cpp
+24-2clang/lib/Sema/SemaExpr.cpp
+100-22 files

LLVM/project fcbf28fclang/lib/CIR/CodeGen CIRGenClass.cpp, clang/test/CIR/CodeGen trivial-union-assign-nyi.cpp

[CIR] Report NYI for defaulted union copy/move assignment

A defaulted union copy or move assignment operator has an empty synthesized
body because Sema skips union fields, leaving no AST expression for the
implied whole-object copy.  CIRGen emitted that empty body and silently
dropped the assignment.

Report NYI for defaulted union assignment instead.  Struct and array
assignments are unaffected because their synthesized bodies contain the
memberwise copies needed by the existing body-emission path.
DeltaFile
+15-0clang/test/CIR/CodeGen/trivial-union-assign-nyi.cpp
+14-0clang/lib/CIR/CodeGen/CIRGenClass.cpp
+29-02 files

LLVM/project 24586dallvm/test/tools/llvm-reduce initialize-asm-parsers.ll, llvm/tools/llvm-reduce ReducerWorkItem.cpp llvm-reduce.cpp

[llvm-reduce] Unconditionally initialize targets

It is not expensive to do, and doing it unconditionally avoids edge
cases like the one in the added test case.

Reviewers: arsenm, mtrofin

Pull Request: https://github.com/llvm/llvm-project/pull/208966
DeltaFile
+0-13llvm/tools/llvm-reduce/ReducerWorkItem.cpp
+6-0llvm/tools/llvm-reduce/llvm-reduce.cpp
+2-0llvm/test/tools/llvm-reduce/initialize-asm-parsers.ll
+8-133 files

LLVM/project c8c9d21llvm/test/CodeGen/AMDGPU llvm.amdgcn.permlane.ll, llvm/test/CodeGen/AMDGPU/GlobalISel legalize-load-global.mir legalize-load-local.mir

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+9,398-9,218llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-global.mir
+6,993-6,921llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-local.mir
+5,803-5,808llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-private.mir
+3,842-3,722llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-constant.mir
+2,196-5,244llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i8.ll
+3,572-3,745llvm/test/CodeGen/AMDGPU/llvm.amdgcn.permlane.ll
+31,804-34,6582,209 files not shown
+209,145-141,7062,215 files

LLVM/project 9cfbe4allvm/test/tools/llvm-reduce initialize-asm-parsers.ll, llvm/tools/llvm-reduce ReducerWorkItem.cpp

[llvm-reduce] Run AssignGUIDPass when loading BC

Otherwise we run into crashes when loading BC that has a module summary. This is a no-op if we load existing GUIDs, so probably makes sense to run regardless.

Reviewers: mtrofin

Pull Request: https://github.com/llvm/llvm-project/pull/208965
DeltaFile
+13-0llvm/test/tools/llvm-reduce/initialize-asm-parsers.ll
+5-0llvm/tools/llvm-reduce/ReducerWorkItem.cpp
+18-02 files

LLVM/project 4eb0aa7llvm/docs LangRef.rst, llvm/lib/Support UnicodeNameToCodepointGenerated.cpp

rebase

Created using spr 1.3.7
DeltaFile
+36,531-36,463llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+25,784-36,416llvm/test/CodeGen/RISCV/rvv/clmulh-sdnode.ll
+24,053-23,916llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+27,856-11,102llvm/test/CodeGen/RISCV/clmul.ll
+12,227-23,140llvm/test/CodeGen/RISCV/rvv/clmul-sdnode.ll
+0-32,991llvm/docs/LangRef.rst
+126,451-164,02822,370 files not shown
+1,557,865-961,73122,376 files

LLVM/project de498ealibunwind/test aix_vapi_signal_unwind.pass.cpp

Remove unmotivated __builtin_unreachable
DeltaFile
+0-1libunwind/test/aix_vapi_signal_unwind.pass.cpp
+0-11 files