This is an archive of the discontinued LLVM Phabricator instance.

[VP] getDeclarationForParams
ClosedPublic

Authored by simoll on May 18 2021, 5:47 AM.

Details

Summary

VPIntrinsic::getDeclarationForParams creates a vp intrinsic declaration for parameters you want to call it with.
This is in preparation of a new builder class that makes emitting vp intrinsic code nearly as convenient as using a plain ir builder (aka VectorBuilder, to be used by D99750).

Diff Detail

Event Timeline

simoll created this revision.May 18 2021, 5:47 AM
simoll requested review of this revision.May 18 2021, 5:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2021, 5:47 AM
simoll retitled this revision from [VP] getDeclarationForParam to [VP] getDeclarationForParams.May 18 2021, 5:48 AM
craig.topper added inline comments.May 18 2021, 10:15 AM
llvm/lib/IR/IntrinsicInst.cpp
430

Is this written this way because of the TODO? It seems like this could just be

auto *VPFunc = Intrinsic::getDeclaration(M, VPID, Params[0]->getType());

Which avoids the SmallVector.

Matt added a subscriber: Matt.May 18 2021, 11:29 AM
simoll updated this revision to Diff 346430.May 19 2021, 6:26 AM
simoll marked an inline comment as done.
  • Simplified w/o ShortTypeVec
simoll added inline comments.May 19 2021, 6:44 AM
llvm/lib/IR/IntrinsicInst.cpp
430

It's because of the todo.. other intrinsics will need multiple demangling types (eg vp.fptosi). No reason not to simplify it for now, though.

Are we ok with this one?

This revision is now accepted and ready to land.Jun 7 2021, 10:44 AM
vkmr accepted this revision.Jun 7 2021, 11:59 AM

LGTM.

frasercrmck accepted this revision.Jun 8 2021, 2:01 AM

Might as well throw my hat in here, LGTM.

This revision was landed with ongoing or failed builds.Jun 8 2021, 5:42 AM
This revision was automatically updated to reflect the committed changes.