[PATCH] D29925: Implement intrinsic mangling for literal struct types.Fixes PR 31921

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 02:29:43 PST 2017


dberlin added a comment.

Sorry about that.
I wasn't aware intrinsics were allowed to have a calling convention, since they are internal to llvm.
No intrinsic defined  in Intrinsics* has one, from what i can tell, and as you can see, the code we use to upgrade generically does not do anything with calling convention either.
I'm not even sure what it would mean for an intrinsic to have a calling convention (instead of something it *lowers to* to have a calling convention).

Assuming our position is that intrinsics themselves, can have a calling convention, there are two ways to fix this.

We could just replace the called function instead of calling replaceAllUsesWith. Not sure why we don't, but CI->setCalledFunction(NewFn) should work (if we do that, we should stop renaming it .old).

Otherwise, if we really care, we should probably copy both the attributes and the calling convention.


Repository:
  rL LLVM

https://reviews.llvm.org/D29925





More information about the llvm-commits mailing list