[PATCH] D116031: [ArgPromotion][TTI] Pass types to ABI compatibility hook

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 20 05:17:58 PST 2021


nikic created this revision.
nikic added reviewers: opaque-pointers, tstellar.
Herald added subscribers: ormris, uenoku, pengfei, kbarton, hiraditya, nemanjai.
Herald added a reviewer: uenoku.
nikic requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: sstefan1.
Herald added a reviewer: baziotis.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The areFunctionArgsABICompatible() hook currently accepts a list of pointer arguments, though what we're actually interested in is the ABI compatibility after these pointer arguments have been converted into value arguments.

This means that a) the current API is incompatible with opaque pointers (because it requires inspection of pointee types) and b) it can only be used in the specific context of ArgPromotion. I would like to reuse the API when inspecting calls during inlining.

This patch converts it into an areTypesABICompatible() hook, which accepts a list of types. This makes the method more generally usable, and compatible with opaque pointers from an API perspective (the actual usage in ArgPromotion/Attributor is still incompatible, I'll follow up on that in a separate patch).


https://reviews.llvm.org/D116031

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/lib/Analysis/TargetTransformInfo.cpp
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/lib/Target/X86/X86TargetTransformInfo.h
  llvm/lib/Transforms/IPO/ArgumentPromotion.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116031.395413.patch
Type: text/x-patch
Size: 10412 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211220/45899e99/attachment.bin>


More information about the llvm-commits mailing list