LLVM/project 08c2a86clang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp, clang/test/CIR/CodeGenBuiltins/X86 avx512bw-builtins.c avx512dq-builtins.c

[CIR][X86] Implement lowering for AVX512 ktest builtins (#169985)

part of [#167765](https://github.com/llvm/llvm-project/issues/167765)
This is a follow-up patch to continue the work from
<[#169774](https://github.com/llvm/llvm-project/pull/169774)>.
It builds on the previous lowering infrastructure and extends support to
the AVX512 ktest builtins.
DeltaFile
+209-0clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c
+115-0clang/test/CIR/CodeGenBuiltins/X86/avx512dq-builtins.c
+63-16clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+57-0clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c
+444-164 files

LLVM/project 8099f6cllvm/include/llvm/IR RuntimeLibcalls.td, llvm/lib/CodeGen TargetLoweringBase.cpp

DAG: Use RuntimeLibcalls to legalize vector frem calls

This continues the replacement of TargetLibraryInfo uses in codegen
with RuntimeLibcallsInfo started in 821d2825a4f782da3da3c03b8a002802bff4b95c.
The series there handled all of the multiple result calls. This
extends for the other handled case, which happened to be frem.

For some reason the Libcall for these are prefixed with "REM_", for
the instruction "frem", which maps to the libcall "fmod".
DeltaFile
+36-80llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+49-4llvm/lib/IR/RuntimeLibcalls.cpp
+23-13llvm/test/Transforms/Util/DeclareRuntimeLibcalls/sleef.ll
+22-13llvm/test/Transforms/Util/DeclareRuntimeLibcalls/armpl.ll
+22-0llvm/lib/CodeGen/TargetLoweringBase.cpp
+11-11llvm/include/llvm/IR/RuntimeLibcalls.td
+163-1211 files not shown
+167-1217 files

LLVM/project 2ddaf38llvm/include/llvm/CodeGen SelectionDAG.h, llvm/lib/CodeGen/SelectionDAG LegalizeDAG.cpp TargetLowering.cpp

DAG: Add overload of getExternalSymbol using RTLIB::LibcallImpl
DeltaFile
+7-8llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+4-4llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+5-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+1-2llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+1-0llvm/include/llvm/CodeGen/SelectionDAG.h
+18-145 files

LLVM/project cf50823llvm/lib/CodeGen/SelectionDAG LegalizeIntegerTypes.cpp

DAG: Avoid asserting on libcall action if function is unavailable

Eventually the set of available functions will be a program
dependent property, which could diverge from the static table of
functions for the subtarget. In that case, fall back to the usual
expansion.
DeltaFile
+13-7llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+13-71 files

LLVM/project 3db09b7llvm/include/llvm/CodeGen TargetLowering.h, llvm/lib/CodeGen/SelectionDAG LegalizeIntegerTypes.cpp TargetLowering.cpp

DAG: Add overload of makeLibCall which calls an RTLIB::LibcallImpl

Logically the concrete implementation is what's being called, not
the abstract libcall. Many uses conditionalize emitting the call on
whether the call is available, so the caller and makeLibCall would
both be checking that.
DeltaFile
+23-14llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+6-8llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+10-1llvm/include/llvm/CodeGen/TargetLowering.h
+5-3llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+44-264 files

LLVM/project 764e922llvm/include/llvm/CodeGen TargetInstrInfo.h, llvm/lib/CodeGen/SelectionDAG SelectionDAGISel.cpp

AMDGPU: Avoid crashing on statepoint-like pseudoinstructions

At the moment the MIR tests are somewhat redundant. The waitcnt
one is needed to ensure we actually have a load, given we are
currently just emitting an error on ExternalSymbol. The asm printer
one is more redundant for the moment, since it's stressed by the IR
test. However I am planning to change the error path for the IR test,
so it will soon not be redundant.
DeltaFile
+64-0llvm/test/CodeGen/AMDGPU/statepoint-insert-waitcnts.mir
+40-0llvm/test/CodeGen/AMDGPU/statepoint-asm-printer.mir
+16-0llvm/test/CodeGen/AMDGPU/llvm.deoptimize.ll
+12-1llvm/include/llvm/CodeGen/TargetInstrInfo.h
+12-0llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+11-0llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+155-17 files not shown
+184-313 files

LLVM/project 4e5b114libc/config config.json, libc/config/linux/arm config.json

Revert "Refactor WIDE_READ to allow finer control over high-performance function selection" (#170717)

Reverts llvm/llvm-project#165613

Breaks build bot
DeltaFile
+0-213libc/src/string/string_length.h
+156-8libc/src/string/string_utils.h
+6-10libc/src/string/memory_utils/aarch64/inline_strlen.h
+5-9libc/src/string/memory_utils/x86_64/inline_strlen.h
+3-8libc/config/config.json
+2-5libc/config/linux/arm/config.json
+172-2537 files not shown
+185-27513 files

LLVM/project b4ed064clang/test/CodeGenObjC expose-direct-method-visibility-linkage.m

amend mac tests
DeltaFile
+3-1clang/test/CodeGenObjC/expose-direct-method-visibility-linkage.m
+3-11 files

LLVM/project 1989108libc/config config.json, libc/config/linux/riscv config.json

Revert "Refactor WIDE_READ to allow finer control over high-performance funct…"

This reverts commit 8701c2a9106bcf4b9c1178125b56958f9aab7faf.
DeltaFile
+0-213libc/src/string/string_length.h
+156-8libc/src/string/string_utils.h
+6-10libc/src/string/memory_utils/aarch64/inline_strlen.h
+5-9libc/src/string/memory_utils/x86_64/inline_strlen.h
+3-8libc/config/config.json
+2-5libc/config/linux/riscv/config.json
+172-2537 files not shown
+185-27513 files

LLVM/project 01737c1flang/lib/Lower/OpenMP Utils.cpp

[Flang][OpenMP] Only allow implicit mappers for Allocatables. (#170701)

Generate implicit declare mappers only for Allocatables.

Fixes #169382 introduced by #140562.
DeltaFile
+1-1flang/lib/Lower/OpenMP/Utils.cpp
+1-11 files

LLVM/project 1c3a555clang/test/CodeGenObjC expose-direct-method.m expose-direct-method-visibility-linkage.m

add tests
DeltaFile
+292-0clang/test/CodeGenObjC/expose-direct-method.m
+170-0clang/test/CodeGenObjC/expose-direct-method-visibility-linkage.m
+136-0clang/test/CodeGenObjC/expose-direct-method-linkedlist.m
+119-0clang/test/CodeGenObjC/expose-direct-method-consumed.m
+103-0clang/test/CodeGenObjC/expose-direct-method-varargs.m
+24-0clang/test/CodeGenObjC/direct-method-ret-mismatch.m
+844-01 files not shown
+846-27 files

LLVM/project 8701c2alibc/config config.json, libc/config/linux/riscv config.json

Refactor WIDE_READ to allow finer control over high-performance function selection (#165613)

[This is more of a straw-proposal than a ready-for-merging PR. I got
started thinking about what this might look like, and ended up just
implementing something as a proof-of-concept. Totally open to other
methods an ideas.]

As we implement more high-performance string-related functions, we have
found a need for better control over their selection than the big-hammer
LIBC_CONF_STRING_LENGTH_WIDE_READ. For example, I have a memchr
implementation coming, and unless I implement it in every variant, a
simple binary value doesn't work.

This PR makes gives finer-grained control over high-performance
functions than the generic LIBC_CONF_UNSAFE_WIDE_READ option. For any
function they like, the user can now select one of four implementations
at build time:

1. element, which reads byte-by-byte (or wchar by wchar)

    [13 lines not shown]
DeltaFile
+213-0libc/src/string/string_length.h
+8-156libc/src/string/string_utils.h
+10-6libc/src/string/memory_utils/aarch64/inline_strlen.h
+9-5libc/src/string/memory_utils/x86_64/inline_strlen.h
+8-3libc/config/config.json
+5-2libc/config/linux/riscv/config.json
+253-1727 files not shown
+275-18513 files

LLVM/project de59ec8llvm/lib/Target/AMDGPU SIInstrInfo.cpp, llvm/test/MachineVerifier/AMDGPU hazard-gfx1250-flat-src-hi.mir

[AMDGPU] Add verifier for flat_scr_base_hi read hazard
DeltaFile
+66-0llvm/test/MachineVerifier/AMDGPU/hazard-gfx1250-flat-src-hi.mir
+11-0llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+77-02 files

LLVM/project 203cd83clang-tools-extra/clang-doc/support Utils.cpp, clang-tools-extra/clang-doc/tool ClangDocMain.cpp

[clang-doc] Add Mustache case to assets test (#170198)

Mustache wasn't tested in the assets lit test, which tests if
user-supplied assets are copied correctly. The Mustache HTML backend
initialy failed this test because it expected every asset, which
included Mustache templates, to be supplied. For now, we just expect
either CSS or JS to be supplied and use the default if one of them isn't
given.

We can allow custom templates in the future using the same checks.
DeltaFile
+14-6clang-tools-extra/clang-doc/support/Utils.cpp
+3-2clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+4-0clang-tools-extra/test/clang-doc/assets.cpp
+21-83 files

LLVM/project 0437433clang-tools-extra/test/clang-doc comments-in-macros.cpp

[clang-doc] Add Mustache output to comment in macros test
DeltaFile
+13-2clang-tools-extra/test/clang-doc/comments-in-macros.cpp
+13-21 files

LLVM/project ddd8862clang-tools-extra/clang-doc HTMLGenerator.cpp HTMLMustacheGenerator.cpp, clang-tools-extra/test/clang-doc namespace.cpp enum.cpp

[clang-doc] Default to Mustache HTML generation
DeltaFile
+142-1,118clang-tools-extra/clang-doc/HTMLGenerator.cpp
+21-458clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
+84-241clang-tools-extra/test/clang-doc/namespace.cpp
+118-188clang-tools-extra/test/clang-doc/enum.cpp
+0-267clang-tools-extra/test/clang-doc/basic-project.test
+0-178clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
+365-2,45017 files not shown
+403-2,63623 files

LLVM/project 45f5127clang-tools-extra/test/clang-doc conversion_function.cpp

[clang-doc] Add Mustache output to conversion function test
DeltaFile
+7-0clang-tools-extra/test/clang-doc/conversion_function.cpp
+7-01 files

LLVM/project c9281daclang-tools-extra/clang-doc/support Utils.cpp, clang-tools-extra/clang-doc/tool ClangDocMain.cpp

[clang-doc] Add Mustache case to assets test

Mustache wasn't tested in the assets lit test, which tests if
user-supplied assets are copied correctly. The Mustache HTML backend
initialy failed this test because it expected every asset, which
included Mustache templates, to be supplied. For now, we just expect
either CSS or JS to be supplied and use the default if one of them isn't
given.

We can allow custom templates in the future using the same checks.
DeltaFile
+14-6clang-tools-extra/clang-doc/support/Utils.cpp
+3-2clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+4-0clang-tools-extra/test/clang-doc/assets.cpp
+21-83 files

LLVM/project 1d84c89clang-tools-extra/clang-doc Generators.cpp, clang-tools-extra/test/clang-doc DR-131697.cpp

[clang-doc] Add Mustache case to test for DR 131697 (#170197)

The test for DR 131697 only requires that clang-doc doesn't crash. There
is no documentation created. However, when using Mustache, clang-doc
still expects certain
paths to exist, like the directory where assets are placed. In legacy
HTML, the `docs` directory is still created and assets are placed there
regardless of there being any Infos to document. Mustache didn't do
this, so now we create `docs/json` and `docs/html` even if there is
nothing to document.
DeltaFile
+15-9clang-tools-extra/clang-doc/Generators.cpp
+1-0clang-tools-extra/test/clang-doc/DR-131697.cpp
+16-92 files

LLVM/project 5af56e5clang/lib/CodeGen CGObjCMac.cpp CGObjC.cpp

[ExposeDirectMethod] Nil chech thunk generation

- Generation
- Dispatch
DeltaFile
+236-1clang/lib/CodeGen/CGObjCMac.cpp
+12-5clang/lib/CodeGen/CGObjC.cpp
+7-0clang/lib/CodeGen/CodeGenFunction.h
+3-1clang/lib/CodeGen/CGDecl.cpp
+258-74 files

LLVM/project b6ddc7aclang/lib/CodeGen CGObjCMac.cpp

fix error
DeltaFile
+2-1clang/lib/CodeGen/CGObjCMac.cpp
+2-11 files

LLVM/project fb969c3clang/lib/CodeGen CGObjCMac.cpp CGObjCGNU.cpp

[ExposeObjCDirect] Setup helper functions

1. GenerateDirectMethodsPreconditionCheck: Move some functionalities to a separate functions.
Those functions will be reused if we move precondition checks into a thunk
2. Create `DirectMethodInfo`, which will be used to manage true implementation and its thunk
DeltaFile
+73-22clang/lib/CodeGen/CGObjCMac.cpp
+9-0clang/lib/CodeGen/CGObjCGNU.cpp
+6-0clang/lib/CodeGen/CGObjCRuntime.h
+88-223 files

LLVM/project cf7c255llvm/include/llvm/Transforms/Utils BasicBlockUtils.h, llvm/lib/Transforms/Scalar JumpThreading.cpp

[JumpThread] Fix `JumpThreading` pass to skip merging when both blocks contain convergence loop/entry intrinsics. (#170247)

Fixes: https://github.com/llvm/llvm-project/issues/165642. After this
fix, optimization passes for the example in the bug.

[LLVM
Spec](https://llvm.org/docs/ConvergentOperations.html#llvm-experimental-convergence-loop)
states that only a single loop / entry convergence token can be included
in a basic block.

This PR fixes the issue in `JumpThreading` pass so that when a basic
block and its predecessor both contain such convergence intrinsics, it
skips merging the two blocks.
DeltaFile
+68-0llvm/test/Transforms/JumpThreading/skip-merging-duplicate-convergence-intrinsics.ll
+7-0llvm/lib/Transforms/Scalar/JumpThreading.cpp
+4-0llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
+1-1llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+80-14 files

LLVM/project b0978a5llvm/lib/Target/AMDGPU AMDGPULegalizerInfo.cpp AMDGPULegalizerInfo.h, llvm/test/CodeGen/AMDGPU llvm.exp10.ll

AMDGPU/GlobalISel: Fix broken exp10 lowering for f16
DeltaFile
+334-198llvm/test/CodeGen/AMDGPU/llvm.exp10.ll
+65-2llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+2-0llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
+401-2003 files

LLVM/project ea8fa8fclang-tools-extra/clang-doc HTMLGenerator.cpp HTMLMustacheGenerator.cpp, clang-tools-extra/test/clang-doc namespace.cpp enum.cpp

[clang-doc] Default to Mustache HTML generation
DeltaFile
+142-1,118clang-tools-extra/clang-doc/HTMLGenerator.cpp
+21-458clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
+84-241clang-tools-extra/test/clang-doc/namespace.cpp
+118-188clang-tools-extra/test/clang-doc/enum.cpp
+0-267clang-tools-extra/test/clang-doc/basic-project.test
+0-178clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp
+365-2,45017 files not shown
+405-2,64323 files

LLVM/project 029f7fcclang-tools-extra/test/clang-doc conversion_function.cpp

[clang-doc] Add Mustache output to conversion function test
DeltaFile
+7-0clang-tools-extra/test/clang-doc/conversion_function.cpp
+7-01 files

LLVM/project 45b366aclang-tools-extra/clang-doc Generators.cpp, clang-tools-extra/test/clang-doc DR-131697.cpp

add time trace scope
DeltaFile
+15-9clang-tools-extra/clang-doc/Generators.cpp
+1-0clang-tools-extra/test/clang-doc/DR-131697.cpp
+16-92 files

LLVM/project d56b271clang-tools-extra/clang-doc/support Utils.cpp, clang-tools-extra/clang-doc/tool ClangDocMain.cpp

[clang-doc] Add Mustache case to assets test

Mustache wasn't tested in the assets lit test, which tests if
user-supplied assets are copied correctly. The Mustache HTML backend
initialy failed this test because it expected every asset, which
included Mustache templates, to be supplied. For now, we just expect
either CSS or JS to be supplied and use the default if one of them isn't
given.

We can allow custom templates in the future using the same checks.
DeltaFile
+14-6clang-tools-extra/clang-doc/support/Utils.cpp
+10-0clang-tools-extra/test/clang-doc/assets.cpp
+3-2clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+27-83 files

LLVM/project 40751c3clang-tools-extra/test/clang-doc comments-in-macros.cpp

[clang-doc] Add Mustache output to comment in macros test
DeltaFile
+13-2clang-tools-extra/test/clang-doc/comments-in-macros.cpp
+13-21 files

LLVM/project 1c72c90llvm/lib/Transforms/Utils BuildLibCalls.cpp, llvm/test/Transforms/InferFunctionAttrs annotate.ll

[InferAttrs] Handle roundeven like other libm functions (#170691)

It was previously missing entirely. It behaves like floor, ceil, round,
and trunc, having no side effects.
DeltaFile
+9-0llvm/test/Transforms/InferFunctionAttrs/annotate.ll
+3-0llvm/lib/Transforms/Utils/BuildLibCalls.cpp
+12-02 files