This is an archive of the discontinued LLVM Phabricator instance.

Give builtins and alloc/dealloc operators the default calling convention.
ClosedPublic

Authored by erichkeane on Mar 1 2019, 1:14 PM.

Details

Summary

On SPIR targets, the default calling convention is SpirFunction.
However, operator new/delete and builtins were being created with CC_C.
The result is indirect references to new/delete (or builtins that are permitted
to be called indirectly have a mismatched type, as well as questionable codegen
in some cases.

This patch sets both to the default calling convention, so that it properly matches the calling convention of the target.

Diff Detail

Repository
rL LLVM

Event Timeline

erichkeane created this revision.Mar 1 2019, 1:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2019, 1:14 PM
Herald added a subscriber: kristina. · View Herald Transcript
rnk accepted this revision.Mar 1 2019, 1:38 PM

lgtm

This revision is now accepted and ready to land.Mar 1 2019, 1:38 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2019, 6:54 AM