LLVM/project 22e099fllvm CMakeLists.txt, llvm/docs/CommandGuide llvm-test-mustache-spec.rst index.rst

[llvm] Add a tool to check mustache compliance against the public spec

This is a cli tool to that tests the conformance of LLVM's mustache
implementation against the public Mustache spec, hosted at
https://github.com/mustache/spec. This is a revised version of the
patches in #111487.

Co-authored-by: Peter Chou <peter.chou at mail.utoronto.ca>
DeltaFile
+268-0llvm/utils/llvm-test-mustache-spec/llvm-test-mustache-spec.cpp
+23-0llvm/docs/CommandGuide/llvm-test-mustache-spec.rst
+5-0llvm/utils/llvm-test-mustache-spec/CMakeLists.txt
+1-0llvm/CMakeLists.txt
+1-0llvm/docs/CommandGuide/index.rst
+298-05 files

LLVM/project eec5619llvm CMakeLists.txt, llvm/docs/CommandGuide llvm-test-mustache-spec.rst index.rst

[llvm] Add a tool to check mustache compliance against the public spec

This is a cli tool to that tests the conformance of LLVM's mustache
implementation against the public Mustache spec, hosted at
https://github.com/mustache/spec. This is a revised version of the
patches in #111487.

Co-authored-by: Peter Chou <peter.chou at mail.utoronto.ca>
DeltaFile
+268-0llvm/utils/llvm-test-mustache-spec/llvm-test-mustache-spec.cpp
+12-0llvm/docs/CommandGuide/llvm-test-mustache-spec.rst
+5-0llvm/utils/llvm-test-mustache-spec/CMakeLists.txt
+1-0llvm/CMakeLists.txt
+1-0llvm/docs/CommandGuide/index.rst
+287-05 files

LLVM/project eed98e1clang/lib/CIR/CodeGen CIRGenOpenACCClause.cpp, clang/test/CIR/CodeGenOpenACC combined.cpp parallel.c

[OpenACC][CIR] 'attach' clause lowering for combined/compute

Attach is identical to 'present', except it generates an acc.attach and
acc.detach.  This patch implements these, just like the preivous handful
of clauses.
DeltaFile
+46-11clang/test/CIR/CodeGenOpenACC/combined.cpp
+26-8clang/test/CIR/CodeGenOpenACC/parallel.c
+26-8clang/test/CIR/CodeGenOpenACC/kernels.c
+25-8clang/test/CIR/CodeGenOpenACC/serial.c
+16-0clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp
+139-355 files

LLVM/project 8a51fb2clang/include/clang/Driver Options.td, clang/unittests/Tooling ToolingTest.cpp

Revert "[Clang] Add resource_dir_EQ flag to CC1Option group (#140870)" (#142509)

This reverts commit c7b8d6e1dcb0a277f95496cbc6bb27143afb80a6.
Fix check-clang CodeGenTest.TestNonAlterTest regression, see
https://github.com/llvm/llvm-project/pull/140870#issuecomment-2931610238
DeltaFile
+0-19clang/unittests/Tooling/ToolingTest.cpp
+1-1clang/include/clang/Driver/Options.td
+1-202 files

LLVM/project 6a21dfallvm/tools/llvm-cgdata llvm-cgdata.cpp

[llvm-cgdata] Fix Dangling StringRefs (#143210)

DeltaFile
+2-2llvm/tools/llvm-cgdata/llvm-cgdata.cpp
+2-21 files

LLVM/project 4eb7231clang/lib/CIR/CodeGen CIRGenOpenACCClause.cpp, clang/test/CIR/CodeGenOpenACC combined.cpp kernels.c

[OpenACC][CIR] Implement 'present' lowering for compute/combined

'present' has a data-in operation acc.present, and uses 'delete' for its
data out.  Otherwise it is identical to no_create.
DeltaFile
+35-0clang/test/CIR/CodeGenOpenACC/combined.cpp
+18-0clang/test/CIR/CodeGenOpenACC/kernels.c
+18-0clang/test/CIR/CodeGenOpenACC/parallel.c
+17-0clang/test/CIR/CodeGenOpenACC/serial.c
+16-0clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp
+104-05 files

LLVM/project b09b1d6clang/lib/CIR/CodeGen CIRGenOpenACCClause.cpp, clang/test/CIR/CodeGenOpenACC combined.cpp parallel.c

[OpenACC][CIR] Implement lowering for 'no_create' clause for comp/comb

no_create has its own 'data-in', plus uses the 'delete' for the data-out
operation.  Additionally, like all data clauses it uses the 'async'
functionality previous implemented.  This patch implements no_create for
combined/compute constructs completely, and ensures that the feature is
tested.
DeltaFile
+37-2clang/test/CIR/CodeGenOpenACC/combined.cpp
+29-3clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp
+21-2clang/test/CIR/CodeGenOpenACC/parallel.c
+20-2clang/test/CIR/CodeGenOpenACC/kernels.c
+19-2clang/test/CIR/CodeGenOpenACC/serial.c
+126-115 files

LLVM/project b7ef3e7utils/bazel/llvm-project-overlay/llvm BUILD.bazel

[bazel] Fix llvm-min-tblgen bazel build (#143213)

Broken by 7b2aa02a. Tested with:

    bazelisk build \
        @llvm-project//llvm:llvm-min-tblgen \
        @llvm-project//llvm:FrontendOpenACC \
        @llvm-project//llvm:FrontendOpenMP \
        @llvm-project//llvm:TableGen
DeltaFile
+10-0utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+10-01 files

LLVM/project 65077c7lld/test/ELF riscv-branch.s riscv-undefined-weak.s, llvm/lib/Target/RISCV/MCTargetDesc RISCVAsmBackend.cpp

[RISCV] Remove -riscv-asm-relax-branches flag (#142855)

This flag has been superseded by `.option exact`, as the test updates
show.

Given the flag was always hidden, it makes sense to me to remove it, and
move tests that required it to use `.option exact`.
DeltaFile
+51-0llvm/test/MC/RISCV/option-exact-long-jump-disable.s
+0-47llvm/test/MC/RISCV/long-jump-disable-relax.s
+4-2lld/test/ELF/riscv-branch.s
+4-2llvm/test/ExecutionEngine/JITLink/RISCV/ELF_branch.s
+0-5llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
+3-1lld/test/ELF/riscv-undefined-weak.s
+62-576 files

LLVM/project 70e78bellvm/lib/Target/AMDGPU SIISelLowering.cpp AMDGPULegalizerInfo.cpp, llvm/test/CodeGen/AMDGPU fptrunc.v2f16.no.fast.math.ll

AMDGPU: Custom lower fptrunc vectors for f32 -> f16 (#141883)

The latest asics support v_cvt_pk_f16_f32 instruction. However current
implementation of vector fptrunc lowering fully scalarizes the vectors,
and the scalar conversions may not always be combined to generate the
packed one.
We made v2f32 -> v2f16 legal in
https://github.com/llvm/llvm-project/pull/139956. This work is an
extension to handle wider vectors. Instead of fully scalarization, we
split the vector to packs (v2f32 -> v2f16) to ensure the packed
conversion can always been generated.
DeltaFile
+261-7llvm/test/CodeGen/AMDGPU/fptrunc.v2f16.no.fast.math.ll
+28-4llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+5-3llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+1-0llvm/lib/Target/AMDGPU/SIISelLowering.h
+295-144 files

LLVM/project 7b2aa02llvm/include/llvm/Frontend/Directive Spelling.h, llvm/include/llvm/TableGen DirectiveEmitter.h

[utils][TableGen] Handle versions on clause/directive spellings (#143021)

In "get<lang>DirectiveName(Kind, Version)", return the spelling that
corresponds to Version, and in "get<lang>DirectiveKindAndVersions(Name)"
return the pair {Kind, VersionRange}, where VersionRange contains the
minimum and the maximum versions that allow "Name" as a spelling. This
applies to clauses as well. In general it applies to classes that have
spellings (defined via TableGen class "Spelling").

Given a Kind and a Version, getting the corresponding spelling requires
a runtime search (which can fail in a general case). To avoid generating
the search function inline, a small additional component of
llvm/Frontent was added: LLVMFrontendDirective. The corresponding header
file also defines C++ classes "Spelling" and "VersionRange", which are
used in TableGen/DirectiveEmitter as well.

For background information see

https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507
DeltaFile
+79-53llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+40-0llvm/include/llvm/Frontend/Directive/Spelling.h
+38-0llvm/lib/Frontend/Directive/Spelling.cpp
+20-14llvm/test/TableGen/directive1.td
+8-17llvm/include/llvm/TableGen/DirectiveEmitter.h
+12-12llvm/test/TableGen/directive2.td
+197-965 files not shown
+208-9911 files

LLVM/project 428afa6clang/lib/CodeGen CGExpr.cpp CGExprScalar.cpp, clang/test/CodeGen ubsan-function-debuginfo.c unsigned-promotion-debuginfo.c

[ubsan] Add more -fsanitize-annotate-debug-info checks (#141997)

This extends https://github.com/llvm/llvm-project/pull/138577 to more UBSan checks, by changing SanitizerDebugLocation (formerly SanitizerScope) to add annotations if enabled for the specified ordinals.

Annotations will use the ordinal name if there is exactly one ordinal specified in the SanitizerDebugLocation; otherwise, it will use the handler name.

Updates the tests from https://github.com/llvm/llvm-project/pull/141814.

---------

Co-authored-by: Vitaly Buka <vitalybuka at google.com>
DeltaFile
+138-145clang/lib/CodeGen/CGExpr.cpp
+72-28clang/lib/CodeGen/CGExprScalar.cpp
+82-0clang/lib/CodeGen/CGDebugInfo.cpp
+19-16clang/test/CodeGen/ubsan-function-debuginfo.c
+16-13clang/test/CodeGen/unsigned-promotion-debuginfo.c
+19-9clang/lib/CodeGen/CGBuiltin.cpp
+346-2118 files not shown
+407-25214 files

LLVM/project a42bb8bclang/include/clang/Driver CommonArgs.h, clang/lib/Driver/ToolChains CommonArgs.h Clang.cpp

[Driver] Move CommonArgs to a location visible by the Frontend Drivers (#142800)

This patch moves the CommonArgs utilities into a location visible by the
Frontend Drivers, so that the Frontend Drivers may share option parsing
code with the Compiler Driver. This is useful when the Frontend Drivers
would like to verify that their incoming options are well-formed and
also not reinvent the option parsing wheel.

We already see code in the Clang/Flang Drivers that is parsing and
verifying its incoming options. E.g. OPT_ffp_contract. This option is
parsed in the Compiler Driver, Clang Driver, and Flang Driver, all with
slightly different parsing code. It would be nice if the Frontend
Drivers were not required to duplicate this Compiler Driver code. That
way there is no/low maintenance burden on keeping all these parsing
functions in sync.

Along those lines, the Frontend Drivers will now have a useful mechanism
to verify their incoming options are well-formed. Currently, the
Frontend Drivers trust that the Compiler Driver is not passing back junk

    [11 lines not shown]
DeltaFile
+286-0clang/include/clang/Driver/CommonArgs.h
+0-280clang/lib/Driver/ToolChains/CommonArgs.h
+5-23clang/lib/Driver/ToolChains/Clang.cpp
+23-1clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-13flang/lib/Frontend/CompilerInvocation.cpp
+6-0llvm/include/llvm/Support/Compiler.h
+323-31752 files not shown
+375-36958 files

LLVM/project 347186bclang/test/CodeGen thinlto-distributed-cfi-devirt.ll thinlto-distributed-cfi.ll, clang/test/CodeGen/distributed-thin-lto cfi-devirt.ll cfi.ll

Avoid Assertion Failure Using -fcs-profile-generate with distributed thin-lto (#129736)

When using `-fcs-generate-profile` with distributed thin-lto in the same
fashion we do for local thin-lto, we hit the following assertion:


https://github.com/llvm/llvm-project/blob/6041c745f32e8fd60ed24e29e7d919d8d1c87ca6/llvm/lib/Support/PGOOptions.cpp#L36

Using local thin-lto with LLD for MachO, we set the missing path
automatically to a default value: https://reviews.llvm.org/D151589. In
this fix we add the same behavior.

---------

Co-authored-by: Nuri Amari <nuriamari at fb.com>
DeltaFile
+119-0clang/test/CodeGen/distributed-thin-lto/cfi-devirt.ll
+0-119clang/test/CodeGen/thinlto-distributed-cfi-devirt.ll
+0-74clang/test/CodeGen/thinlto-distributed-cfi.ll
+74-0clang/test/CodeGen/distributed-thin-lto/cfi.ll
+70-0clang/test/CodeGen/distributed-thin-lto/supports-hot-cold-new.ll
+0-70clang/test/CodeGen/thinlto-distributed-supports-hot-cold-new.ll
+263-26310 files not shown
+370-36216 files

LLVM/project b542436clang-tools-extra/clang-doc JSONGenerator.cpp Serialize.cpp, clang-tools-extra/test/clang-doc/json namespace.cpp function-specifiers.cpp

[clang-doc] add namespaces to JSON generator
DeltaFile
+108-0clang-tools-extra/test/clang-doc/json/namespace.cpp
+73-0clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
+34-0clang-tools-extra/clang-doc/JSONGenerator.cpp
+26-0clang-tools-extra/test/clang-doc/json/function-specifiers.cpp
+1-0clang-tools-extra/clang-doc/Serialize.cpp
+242-05 files

LLVM/project 8becb23clang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/test/clang-doc/json class.cpp

fix formatting and CHECK typo
DeltaFile
+1-1clang-tools-extra/clang-doc/JSONGenerator.cpp
+1-1clang-tools-extra/test/clang-doc/json/class.cpp
+2-22 files

LLVM/project cf3c931clang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/unittests/clang-doc JSONGeneratorTest.cpp CMakeLists.txt

return errors, add unit tests
DeltaFile
+166-0clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
+36-6clang-tools-extra/clang-doc/JSONGenerator.cpp
+1-0clang-tools-extra/unittests/clang-doc/CMakeLists.txt
+203-63 files

LLVM/project b90d226clang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/test/clang-doc/json class.cpp

move common children serialization to a new function
DeltaFile
+60-24clang-tools-extra/clang-doc/JSONGenerator.cpp
+10-0clang-tools-extra/test/clang-doc/json/class.cpp
+70-242 files

LLVM/project 36ec0b5clang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/test/clang-doc/json method-template.cpp

address review comments
DeltaFile
+10-0clang-tools-extra/clang-doc/JSONGenerator.cpp
+1-1clang-tools-extra/test/clang-doc/json/method-template.cpp
+11-12 files

LLVM/project 0f109e9clang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/test/clang-doc/json method-template.cpp class-template.cpp

add templates, use JSON values
DeltaFile
+108-60clang-tools-extra/clang-doc/JSONGenerator.cpp
+40-0clang-tools-extra/test/clang-doc/json/method-template.cpp
+22-13clang-tools-extra/unittests/clang-doc/JSONGeneratorTest.cpp
+29-0clang-tools-extra/test/clang-doc/json/class-template.cpp
+12-11clang-tools-extra/test/clang-doc/json/class.cpp
+211-845 files

LLVM/project 806c2c1clang-tools-extra/clang-doc JSONGenerator.cpp Generators.cpp, clang-tools-extra/clang-doc/tool ClangDocMain.cpp

[clang-doc] add a JSON generator
DeltaFile
+316-0clang-tools-extra/clang-doc/JSONGenerator.cpp
+183-0clang-tools-extra/test/clang-doc/json/class.cpp
+6-2clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+2-0clang-tools-extra/clang-doc/Generators.cpp
+1-0clang-tools-extra/clang-doc/CMakeLists.txt
+1-0clang-tools-extra/clang-doc/Generators.h
+509-26 files

LLVM/project 3695d6clibc/src/stdio/gpu puts.cpp CMakeLists.txt

[libc][GPU] clean up includes (#143203)

The GPU stdio functions were depending on indirect inclusion for some of
their dependencies. This patch should fix all of that.
DeltaFile
+5-6libc/src/stdio/gpu/puts.cpp
+7-2libc/src/stdio/gpu/CMakeLists.txt
+4-5libc/src/stdio/gpu/fgets.cpp
+3-4libc/src/stdio/gpu/fputs.cpp
+2-5libc/src/stdio/gpu/file.h
+3-3libc/src/stdio/gpu/fopen.cpp
+24-2526 files not shown
+69-6832 files

LLVM/project 549ce80llvm/test/CodeGen/AMDGPU srl64_reduce.ll

[AMDGPU][NFC] Add test for 64-bit lshr with shifts >=32 (#138281)

Record current results for 64-bit lshr with shifts >=32.

---------

Signed-off-by: John Lu <John.Lu at amd.com>
DeltaFile
+598-0llvm/test/CodeGen/AMDGPU/srl64_reduce.ll
+598-01 files

LLVM/project 3bbb496llvm/test/CodeGen/AMDGPU ashr64_reduce.ll

[AMDGPU][NFC] Add tests for 64-bit ashr with shifts >= 32 (#142463)

Record current results for 64-bit ashr with shifts >=32.

Signed-off-by: John Lu <John.Lu at amd.com>
DeltaFile
+592-0llvm/test/CodeGen/AMDGPU/ashr64_reduce.ll
+592-01 files

LLVM/project 5c82dccllvm/test/CodeGen/AArch64 neon-dotreduce.ll sve-streaming-mode-fixed-length-int-extends.ll, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll minimumnum.bf16.ll

Merge branch 'main' into users/evelez7/clang-doc-json-generator
DeltaFile
+15,701-15,694llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+7,795-12,957llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+7,691-12,868llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+5,119-5,218llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+2,634-2,410llvm/test/CodeGen/AArch64/neon-dotreduce.ll
+1,359-2,629llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-int-extends.ll
+40,299-51,7762,951 files not shown
+140,480-109,4982,957 files

LLVM/project 2626305clang-tools-extra/clang-doc JSONGenerator.cpp, clang-tools-extra/test/clang-doc/json method-template.cpp

address review comments
DeltaFile
+10-0clang-tools-extra/clang-doc/JSONGenerator.cpp
+1-1clang-tools-extra/test/clang-doc/json/method-template.cpp
+11-12 files

LLVM/project 356dc62libc/test/integration/startup/gpu rpc_stream_test.cpp

[libc] Missing include in RPC test
DeltaFile
+1-0libc/test/integration/startup/gpu/rpc_stream_test.cpp
+1-01 files

LLVM/project 897b030clang/lib/Lex DependencyDirectivesScanner.cpp, clang/unittests/Lex DependencyDirectivesScannerTest.cpp

[clang][dep-scan] Resolve lexer crash from a permutation of invalid tokens (#142452)

Sometimes, when a user writes invalid code, the minimization used for
scanning can create a stream of tokens that is invalid at lex time. This
patch protects against the case where there are valid (non-c++20) import
directives discovered in the middle of an invalid `import` declaration.

Mostly authored by: @akyrtzi 
resolves: rdar://152335844
DeltaFile
+16-1clang/unittests/Lex/DependencyDirectivesScannerTest.cpp
+9-0clang/lib/Lex/DependencyDirectivesScanner.cpp
+25-12 files

LLVM/project d62a38bllvm/include/llvm/Analysis IR2Vec.h, llvm/lib/Analysis IR2Vec.cpp

Vocab changes1
DeltaFile
+102-35llvm/unittests/Analysis/IR2VecTest.cpp
+53-28llvm/lib/Analysis/IR2Vec.cpp
+10-0llvm/include/llvm/Analysis/IR2Vec.h
+165-633 files

LLVM/project 8fa440allvm/test/Transforms/LoopVectorize load-deref-pred-poison-ub-ops-feeding-pointer.ll

[LV] Add tests for speculatively loading ptrs with UB/poison ops.

Test cases for https://github.com/llvm/llvm-project/issues/142957.
DeltaFile
+386-0llvm/test/Transforms/LoopVectorize/load-deref-pred-poison-ub-ops-feeding-pointer.ll
+386-01 files