[PATCH] D132926: [ARM64EC 12/?] Add param/ret attr for struct to help generate correct thunk for arm64ec

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 03:34:36 PDT 2022


bcl5980 created this revision.
bcl5980 added a reviewer: efriedma.
Herald added subscribers: zzheng, jdoerfert, hiraditya, kristof.beyls.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When we compile a function on Arm64EC, the function need arm64 function signature, and a corresponding x64 signature. 
The frontend always generates the function with the arm64 signature, and thunk generation translates that to the x64 signature.
For now only from arm64 signature function type we can't translate all kinds of function to x64 signature. 
So this change add a attribute to contain structure's original size to help thunk generation pass to generate correct x64 signature.


https://reviews.llvm.org/D132926

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/test/CodeGenCXX/arm64ec-mangle-align.cpp
  clang/test/CodeGenCXX/arm64ec-mangle-basic.cpp
  clang/test/CodeGenCXX/arm64ec-mangle-struct.cpp
  llvm/include/llvm/Bitcode/LLVMBitCodes.h
  llvm/include/llvm/IR/Attributes.h
  llvm/include/llvm/IR/Attributes.td
  llvm/include/llvm/IR/InstrTypes.h
  llvm/lib/AsmParser/LLParser.cpp
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/lib/IR/AttributeImpl.h
  llvm/lib/IR/Attributes.cpp
  llvm/lib/Transforms/Utils/CodeExtractor.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132926.456593.patch
Type: text/x-patch
Size: 21623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220830/cd603474/attachment-0001.bin>


More information about the llvm-commits mailing list