[PATCH] D137556: [POC] Clang implementation for AArch64 SME and some SME2 builtins
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 7 07:58:23 PST 2022
sdesmalen created this revision.
Herald added subscribers: ecnelises, jdoerfert, mgrang, hiraditya, kristof.beyls.
Herald added a reviewer: aaron.ballman.
Herald added a project: All.
sdesmalen requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
THIS IS A PROOF OF CONCEPT, PLEASE DO NOT REVIEW
We're sharing this patch for people who want to try out the full C/C++ ->
asm flow for the SME (and some of the SME2) intrinsics. The patch can be
applied to b50392342be27efdc01d877ba0c357485dc7e918 <https://reviews.llvm.org/rGb50392342be27efdc01d877ba0c357485dc7e918>.
Some parts are being upstreamed independently from this proof of concept.
- C-level attributes in Clang (D127762 <https://reviews.llvm.org/D127762>)
- Support for `svcount_t` (D136861 <https://reviews.llvm.org/D136861> and D136862 <https://reviews.llvm.org/D136862>)
- SME2 assembler
Some changes in this patch may have already diverged from the patches that
are in flight on Phabricator (this is mostly true for the SME2 assembler).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137556
Files:
clang/include/clang/AST/Type.h
clang/include/clang/AST/TypeProperties.td
clang/include/clang/Basic/AArch64SVEACLETypes.def
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/Builtins.def
clang/include/clang/Basic/BuiltinsSME.def
clang/include/clang/Basic/CMakeLists.txt
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Basic/TargetBuiltins.h
clang/include/clang/Basic/arm_sme.td
clang/include/clang/Basic/arm_sve.td
clang/include/clang/Basic/arm_sve_common.td
clang/include/clang/Sema/Sema.h
clang/include/clang/module.modulemap
clang/lib/AST/ASTContext.cpp
clang/lib/AST/ItaniumMangle.cpp
clang/lib/AST/Type.cpp
clang/lib/AST/TypePrinter.cpp
clang/lib/Basic/Targets/AArch64.cpp
clang/lib/Basic/Targets/AArch64.h
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenTypes.cpp
clang/lib/Headers/CMakeLists.txt
clang/lib/Sema/SemaChecking.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaType.cpp
clang/test/AST/ast-dump-aarch64-sve-types.c
clang/test/CodeGen/aarch64-debug-sve-vector-types.c
clang/test/CodeGen/aarch64-debug-sve-vectorx2-types.c
clang/test/CodeGen/aarch64-sme-intrinsics/aarch64-sme-attrs.c
clang/test/CodeGen/aarch64-sme-intrinsics/aarch64-sme-attrs.cpp
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_add.c
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_cnt.c
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_loads.c
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_mem_ops.c
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_mop.c
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_reads.c
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_state_funs.c
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_stores.c
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_writes.c
clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_zero.c
clang/test/CodeGen/aarch64-sme-intrinsics/negative/acle_sme_add.c
clang/test/CodeGen/aarch64-sme-intrinsics/negative/acle_sme_loads.c
clang/test/CodeGen/aarch64-sme-intrinsics/negative/acle_sme_mop.c
clang/test/CodeGen/aarch64-sme-intrinsics/negative/acle_sme_reads.c
clang/test/CodeGen/aarch64-sme-intrinsics/negative/acle_sme_stores.c
clang/test/CodeGen/aarch64-sme-intrinsics/negative/acle_sme_writes.c
clang/test/CodeGen/aarch64-sme-intrinsics/negative/acle_sme_zero.c
clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mla.c
clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mlal.c
clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mls.c
clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mlsl.c
clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_read.c
clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_write.c
clang/test/CodeGen/aarch64-sve-inline-asm-crash.c
clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_psel.c
clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_revd.c
clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_sclamp.c
clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_uclamp.c
clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ld1.c
clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ldnt1.c
clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_pext.c
clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_ptrue.c
clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_st1.c
clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_stnt1.c
clang/test/CodeGen/svboolx2_t.cpp
clang/test/CodeGen/svboolx4_t.cpp
clang/test/CodeGenCXX/aarch64-mangle-sve-vectors.cpp
clang/test/CodeGenCXX/aarch64-sve-typeinfo.cpp
clang/test/Misc/pragma-attribute-supported-attributes-list.test
clang/test/Preprocessor/aarch64-target-features.c
clang/test/Sema/aarch64-incompat-sm-builtin-calls.c
clang/test/Sema/aarch64-sme-attrs-no-sme.c
clang/test/Sema/aarch64-sme-attrs-on-x86.c
clang/test/Sema/aarch64-sme-func-attrs.c
clang/test/Sema/aarch64-sve2p1-intrinsics/acle_sme2_imm.cpp
clang/unittests/AST/SizelessTypesTest.cpp
clang/utils/TableGen/NeonEmitter.cpp
clang/utils/TableGen/SveEmitter.cpp
clang/utils/TableGen/TableGen.cpp
clang/utils/TableGen/TableGenBackends.h
llvm/docs/LangRef.rst
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/include/llvm/CodeGen/ValueTypes.h
llvm/include/llvm/CodeGen/ValueTypes.td
llvm/include/llvm/IR/DataLayout.h
llvm/include/llvm/IR/Intrinsics.h
llvm/include/llvm/IR/Intrinsics.td
llvm/include/llvm/IR/IntrinsicsAArch64.td
llvm/include/llvm/IR/Type.h
llvm/include/llvm/Support/MachineValueType.h
llvm/lib/Analysis/Loads.cpp
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/lib/CodeGen/LowLevelType.cpp
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/ValueTypes.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/DataLayout.cpp
llvm/lib/IR/Function.cpp
llvm/lib/IR/LLVMContextImpl.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/IR/Type.cpp
llvm/lib/Support/LowLevelType.cpp
llvm/lib/Target/AArch64/AArch64.h
llvm/lib/Target/AArch64/AArch64CallingConvention.td
llvm/lib/Target/AArch64/AArch64FastISel.cpp
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/lib/Target/AArch64/AArch64InstrFormats.td
llvm/lib/Target/AArch64/AArch64InstrInfo.h
llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
llvm/lib/Target/AArch64/AArch64RegisterInfo.td
llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
llvm/lib/Target/AArch64/CMakeLists.txt
llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
llvm/lib/Target/AArch64/SMEABIPass.cpp
llvm/lib/Target/AArch64/SMEInstrFormats.td
llvm/lib/Target/AArch64/SMEPeepholeOpt.cpp
llvm/lib/Target/AArch64/SVEInstrFormats.td
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Assembler/aarch64_svcount.ll
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-inline-asm.ll
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-unwind-inline-asm.ll
llvm/test/CodeGen/AArch64/GlobalISel/regbank-inlineasm.mir
llvm/test/CodeGen/AArch64/O3-pipeline.ll
llvm/test/CodeGen/AArch64/sme-aarch64-svcount-O3.ll
llvm/test/CodeGen/AArch64/sme-aarch64-svcount.ll
llvm/test/CodeGen/AArch64/sme-disable-gisel-fisel.ll
llvm/test/CodeGen/AArch64/sme-exceptions-with-streaming-mode-llc.ll
llvm/test/CodeGen/AArch64/sme-exceptions-with-streaming-mode.ll
llvm/test/CodeGen/AArch64/sme-exceptions-with-za-state-llc.ll
llvm/test/CodeGen/AArch64/sme-exceptions-with-za-state.ll
llvm/test/CodeGen/AArch64/sme-intrinsics-add.ll
llvm/test/CodeGen/AArch64/sme-intrinsics-get-live-za-slices.ll
llvm/test/CodeGen/AArch64/sme-intrinsics-loads.ll
llvm/test/CodeGen/AArch64/sme-intrinsics-mopa.ll
llvm/test/CodeGen/AArch64/sme-intrinsics-mops.ll
llvm/test/CodeGen/AArch64/sme-intrinsics-mova-extract.ll
llvm/test/CodeGen/AArch64/sme-intrinsics-mova-insert.ll
llvm/test/CodeGen/AArch64/sme-intrinsics-stores.ll
llvm/test/CodeGen/AArch64/sme-intrinsics-zero.ll
llvm/test/CodeGen/AArch64/sme-invoke-resume-pstatesm.ll
llvm/test/CodeGen/AArch64/sme-lazy-save-call.ll
llvm/test/CodeGen/AArch64/sme-new-za-function.ll
llvm/test/CodeGen/AArch64/sme-peephole-opts.ll
llvm/test/CodeGen/AArch64/sme-read-write-tpidr2.ll
llvm/test/CodeGen/AArch64/sme-shared-za-abi.ll
llvm/test/CodeGen/AArch64/sme-shared-za-interface.ll
llvm/test/CodeGen/AArch64/sme-streaming-body.ll
llvm/test/CodeGen/AArch64/sme-streaming-interface.ll
llvm/test/CodeGen/AArch64/sme-streaming-locally-interface.ll
llvm/test/CodeGen/AArch64/sme-streaming.ll
llvm/test/CodeGen/AArch64/sme-tailcall.ll
llvm/test/CodeGen/AArch64/sme-toggle-pstateza.ll
llvm/test/CodeGen/AArch64/sme2-intrinsics-extract-mova.ll
llvm/test/CodeGen/AArch64/sme2-intrinsics-fmlas.ll
llvm/test/CodeGen/AArch64/sme2-intrinsics-insert-mova.ll
llvm/test/CodeGen/AArch64/sme2-intrinsics-mlals.ll
llvm/test/CodeGen/AArch64/sme2-intrinsics-qrshr.ll
llvm/test/CodeGen/AArch64/streaming-mode-no-reorder.ll
llvm/test/CodeGen/AArch64/sve2p1-intrinsics-loads.ll
llvm/test/CodeGen/AArch64/sve2p1-intrinsics-predicate-as-counter.ll
llvm/test/CodeGen/AArch64/sve2p1-intrinsics-stores.ll
llvm/test/MC/AArch64/SME/smopa-diagnostics.s
llvm/test/MC/AArch64/SME/smops-diagnostics.s
llvm/test/MC/AArch64/SME/umopa-diagnostics.s
llvm/test/MC/AArch64/SME/umops-diagnostics.s
llvm/test/MC/AArch64/SME2/add-diagnostics.s
llvm/test/MC/AArch64/SME2/bfdot-diagnostics.s
llvm/test/MC/AArch64/SME2/bfdot.s
llvm/test/MC/AArch64/SME2/bfvdot-diagnostics.s
llvm/test/MC/AArch64/SME2/bfvdot.s
llvm/test/MC/AArch64/SME2/bmopa-diagnostics.s
llvm/test/MC/AArch64/SME2/bmopa.s
llvm/test/MC/AArch64/SME2/bmops-diagnostics.s
llvm/test/MC/AArch64/SME2/bmops.s
llvm/test/MC/AArch64/SME2/fclamp-diagnostics.s
llvm/test/MC/AArch64/SME2/fclamp.s
llvm/test/MC/AArch64/SME2/fcvtzs-diagnostics.s
llvm/test/MC/AArch64/SME2/fcvtzs.s
llvm/test/MC/AArch64/SME2/fcvtzu-diagnostics.s
llvm/test/MC/AArch64/SME2/fcvtzu.s
llvm/test/MC/AArch64/SME2/fdot-diagnostics.s
llvm/test/MC/AArch64/SME2/fdot.s
llvm/test/MC/AArch64/SME2/fmax-diagnostics.s
llvm/test/MC/AArch64/SME2/fmax.s
llvm/test/MC/AArch64/SME2/fmaxnm-diagnostics.s
llvm/test/MC/AArch64/SME2/fmaxnm.s
llvm/test/MC/AArch64/SME2/fmin-diagnostics.s
llvm/test/MC/AArch64/SME2/fmin.s
llvm/test/MC/AArch64/SME2/fminnm-diagnostics.s
llvm/test/MC/AArch64/SME2/fminnm.s
llvm/test/MC/AArch64/SME2/fmla-diagnostics.s
llvm/test/MC/AArch64/SME2/fmla.s
llvm/test/MC/AArch64/SME2/fmls-diagnostics.s
llvm/test/MC/AArch64/SME2/fmls.s
llvm/test/MC/AArch64/SME2/frinta-diagnostics.s
llvm/test/MC/AArch64/SME2/frinta.s
llvm/test/MC/AArch64/SME2/frintm-diagnostics.s
llvm/test/MC/AArch64/SME2/frintm.s
llvm/test/MC/AArch64/SME2/frintn-diagnostics.s
llvm/test/MC/AArch64/SME2/frintn.s
llvm/test/MC/AArch64/SME2/frintp-diagnostics.s
llvm/test/MC/AArch64/SME2/frintp.s
llvm/test/MC/AArch64/SME2/fvdot-diagnostics.s
llvm/test/MC/AArch64/SME2/fvdot.s
llvm/test/MC/AArch64/SME2/ld1b.s
llvm/test/MC/AArch64/SME2/ld1d.s
llvm/test/MC/AArch64/SME2/ld1h.s
llvm/test/MC/AArch64/SME2/ld1w.s
llvm/test/MC/AArch64/SME2/ldnt1b.s
llvm/test/MC/AArch64/SME2/ldnt1d.s
llvm/test/MC/AArch64/SME2/ldnt1h.s
llvm/test/MC/AArch64/SME2/ldnt1w.s
llvm/test/MC/AArch64/SME2/ldr-diagnostics.s
llvm/test/MC/AArch64/SME2/ldr.s
llvm/test/MC/AArch64/SME2/luti2-diagnostics.s
llvm/test/MC/AArch64/SME2/luti2.s
llvm/test/MC/AArch64/SME2/luti4-diagnostics.s
llvm/test/MC/AArch64/SME2/luti4.s
llvm/test/MC/AArch64/SME2/mova-diagnostics.s
llvm/test/MC/AArch64/SME2/mova.s
llvm/test/MC/AArch64/SME2/movt-diagnostics.s
llvm/test/MC/AArch64/SME2/movt.s
llvm/test/MC/AArch64/SME2/sclamp-diagnostics.s
(168 more files...)
More information about the llvm-commits
mailing list