[PATCH] D103415: [BuildLibCalls] Properly set ABI attributes on arguments

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 2 14:18:49 PDT 2021


aeubanks added a comment.

In D103415#2794636 <https://reviews.llvm.org/D103415#2794636>, @rnk wrote:

> I'd suggest something like:
>
>   CI->setAttributes(CI->getCalledFunction()->getAttributes().removeAttributes(Ctx, llvm::AttributeList::FunctionIndex)));
>
> That should take the callee's attribute list, throw away all function index attributes (things like SSE level, noreturn, noinline, alwaysinline, optnone), and apply the return and parameter attributes. It should also create fewer immortal, immutable, but temporary attribute lists.

The problem is that right above, we already call

  CI->setAttributes()

and a second one would overwrite that.

I was thinking of adding something new to merge two `AttributeList`s, but idk


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103415/new/

https://reviews.llvm.org/D103415



More information about the llvm-commits mailing list