[PATCH] D114174: [WIP][RFC][CodeGen] Add support for complex multiplication

Nicholas Guy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 18 10:29:32 PST 2021


NickGuy created this revision.
NickGuy added reviewers: dmgreen, SjoerdMeijer, samtebbs.
NickGuy added a project: LLVM.
Herald added subscribers: hiraditya, mgorny.
NickGuy requested review of this revision.

Add ComplexArithmeticPass.cpp, implementing a potential approach for supporting
complex numbers in a target-independent manner, deferring to the TargetTransformInfo
for the given target to create a target-specific intrinsic.

This approach performs a naive check to find a complex case (<8 x float> which exceeds the width of a
standard vector register), before dropping down to a more granular check for simpler cases. This
granular method evaluates the instructions within a BasicBlock, identifying potential candidates and
tries to pair them up for each side of the complex multiply.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114174

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/CodeGen/ComplexArithmeticPass.h
  llvm/include/llvm/CodeGen/Passes.h
  llvm/include/llvm/InitializePasses.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/CodeGen/CMakeLists.txt
  llvm/lib/CodeGen/ComplexArithmeticPass.cpp
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.h
  llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
  llvm/lib/Target/ARM/ARMTargetMachine.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
  llvm/lib/Target/ARM/ARMTargetTransformInfo.h
  llvm/test/CodeGen/AArch64/O3-pipeline.ll
  llvm/test/CodeGen/ARM/complex-arithmetic-arm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114174.388259.patch
Type: text/x-patch
Size: 62240 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211118/1afe6996/attachment-0001.bin>


More information about the llvm-commits mailing list