[PATCH] D141899: [IR][X86] Remove X86AMX type in LLVM IR instead of target extension

Zixuan Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 17 00:13:10 PST 2023


zixuan-wu created this revision.
zixuan-wu added reviewers: jcranmer-intel, nikic, barannikov88, craig.topper, LuoYuanke, pengfei.
Herald added subscribers: StephenFan, jdoerfert, hiraditya, qcolombet.
Herald added a reviewer: deadalnix.
Herald added a project: All.
zixuan-wu requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

It removes X86AMX type in LLVM IR and replace it with target extension called target("X86.AMX").

It also does not change anything in backend and only add two bitcast intrinsics to express bitcast between <256 x i32> and target("X86.AMX") because bitcast inst is not allowed for target extension in LLVM IR.

It needs to try to remove bitcast intrinsics in next follow-up patch, which I think there are more important work in clang about how to
support target extension type instead of using V256Ii type flags in builtin parameters.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141899

Files:
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/X86/amx_api.c
  llvm/bindings/ocaml/llvm/llvm.ml
  llvm/bindings/ocaml/llvm/llvm.mli
  llvm/docs/BitCodeFormat.rst
  llvm/docs/LangRef.rst
  llvm/include/llvm-c/Core.h
  llvm/include/llvm/IR/DataLayout.h
  llvm/include/llvm/IR/IntrinsicsX86.td
  llvm/include/llvm/IR/Type.h
  llvm/lib/Analysis/ConstantFolding.cpp
  llvm/lib/AsmParser/LLLexer.cpp
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/lib/CodeGen/ValueTypes.cpp
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/IR/ConstantFold.cpp
  llvm/lib/IR/Core.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/IR/TypedPointerType.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
  llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
  llvm/lib/Target/X86/X86LowerAMXIntrinsics.cpp
  llvm/lib/Target/X86/X86LowerAMXType.cpp
  llvm/lib/Target/X86/X86PreAMXConfig.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
  llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  llvm/test/CodeGen/X86/AMX/amx-across-func.ll
  llvm/test/CodeGen/X86/AMX/amx-combine-undef.ll
  llvm/test/CodeGen/X86/AMX/amx-combine.ll
  llvm/test/CodeGen/X86/AMX/amx-config.ll
  llvm/test/CodeGen/X86/AMX/amx-configO0toO0.ll
  llvm/test/CodeGen/X86/AMX/amx-configO2toO0-lower.ll
  llvm/test/CodeGen/X86/AMX/amx-configO2toO0-precfg.ll
  llvm/test/CodeGen/X86/AMX/amx-configO2toO0.ll
  llvm/test/CodeGen/X86/AMX/amx-error.ll
  llvm/test/CodeGen/X86/AMX/amx-fastconfig.mir
  llvm/test/CodeGen/X86/AMX/amx-fp16.ll
  llvm/test/CodeGen/X86/AMX/amx-gemm.ll
  llvm/test/CodeGen/X86/AMX/amx-greedy-ra-spill-shape.ll
  llvm/test/CodeGen/X86/AMX/amx-greedy-ra.ll
  llvm/test/CodeGen/X86/AMX/amx-intrinsic-chain.ll
  llvm/test/CodeGen/X86/AMX/amx-ldtilecfg-insert.ll
  llvm/test/CodeGen/X86/AMX/amx-low-intrinsics-no-amx-bitcast.ll
  llvm/test/CodeGen/X86/AMX/amx-low-intrinsics.ll
  llvm/test/CodeGen/X86/AMX/amx-lower-tile-copy.ll
  llvm/test/CodeGen/X86/AMX/amx-sched.ll
  llvm/test/CodeGen/X86/AMX/amx-spill-merge.ll
  llvm/test/CodeGen/X86/AMX/amx-spill.ll
  llvm/test/CodeGen/X86/AMX/amx-tile-basic.ll
  llvm/test/CodeGen/X86/AMX/amx-type.ll
  llvm/test/CodeGen/X86/AMX/amx-zero-config.ll
  llvm/test/CodeGen/X86/AMX/lat-combine-amx-bitcast.ll
  llvm/test/CodeGen/X86/AMX/lat-transform-amx-bitcast.ll
  llvm/test/Transforms/InstCombine/X86/x86-amx-load-store.ll
  llvm/test/Transforms/InstCombine/X86/x86-amx.ll
  llvm/test/Verifier/x86_amx1.ll
  llvm/test/Verifier/x86_amx2.ll
  llvm/test/Verifier/x86_amx3.ll
  llvm/test/Verifier/x86_amx4.ll
  llvm/test/Verifier/x86_amx5.ll
  llvm/test/Verifier/x86_amx6.ll
  llvm/test/Verifier/x86_amx7.ll
  llvm/test/Verifier/x86_amx9.ll
  llvm/tools/llvm-c-test/echo.cpp
  llvm/utils/emacs/llvm-mode.el
  llvm/utils/kate/llvm.xml
  llvm/utils/llvm.grm
  llvm/utils/vim/syntax/llvm.vim
  llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141899.489715.patch
Type: text/x-patch
Size: 302003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230117/503adb41/attachment-0001.bin>


More information about the cfe-commits mailing list