This is an archive of the discontinued LLVM Phabricator instance.

IRBuilder: add CreateIntrinsicByType method
AbandonedPublic

Authored by nhaehnle on Aug 20 2020, 1:43 PM.

Details

Reviewers
arsenm
Flakebi
Summary

Allow creating an intrinsic call whose overload types are automatically
deduced based on the given return type and argument types.

The main point of this is to allow external users to create intrinsic
calls while maintaining compatibility if the set of overloaded arguments
changes.

Change-Id: I0f87caacab7c45bcb58774593eeebcd89751851e

Diff Detail

Event Timeline

nhaehnle created this revision.Aug 20 2020, 1:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2020, 1:43 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
nhaehnle requested review of this revision.Aug 20 2020, 1:43 PM
arsenm added inline comments.Aug 27 2020, 7:00 AM
llvm/include/llvm/IR/Intrinsics.h
90

This should probably elaborate a bit more on how this is different. I'm also not sure ByType is the right name. Maybe getDeclarationWithInferredType?

215

Comment what this is for?

arsenm requested changes to this revision.Jul 28 2023, 11:46 AM

I think an equivalent already went in?

This revision now requires changes to proceed.Jul 28 2023, 11:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 11:46 AM
nhaehnle abandoned this revision.Aug 14 2023, 11:14 AM

Yes, it did: the overload which has the return type as first argument.