This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: pack various parameters for lowerCall into a struct.

Authored by t.p.northover on Aug 7 2019, 1:43 AM.



I've now needed to add an extra parameter to this call twice recently. Not only is the signature getting extremely unwieldy, but just updating all of the callsites and implementations is a pain. Putting the parameters in a struct sidesteps both issues.

Diff Detail

Event Timeline

t.p.northover created this revision.Aug 7 2019, 1:43 AM
aemerson accepted this revision.Aug 7 2019, 8:33 PM


This revision is now accepted and ready to land.Aug 7 2019, 8:33 PM
aemerson closed this revision.Aug 19 2019, 10:36 AM

Closing as committed.

mantognini added inline comments.

I was wondering about this change. The previous arguments are either values or const&, but the new argument is a non-const reference. Is that intentional (i.e. is it meant that in the future, or even now, implementations of lowerCall should/can modify this argument), or can the argument be turned into a const&? The documentation doesn't say much, so I'm assuming the latter is true. Thanks.