Page MenuHomePhabricator

[GlobalISel][CallLowering] NFC: Unify flag-setting from CallBase + AttributeList
ClosedPublic

Authored by paquette on Aug 18 2020, 10:50 AM.

Details

Summary

It's annoying to have to maintain multiple, nearly identical chains of if statements which all set the same attributes.

Add a helper function, addFlagsUsingAttrFn which performs the attribute setting.

Then, use wrappers for that function in lowerCall and setArgFlags.

(Note that the flag-setting code in setArgFlags was missing the returned attribute. There's no selection for this yet, so no test. It's an example of the kind of thing this lets us avoid, though.)

Diff Detail

Event Timeline

paquette created this revision.Aug 18 2020, 10:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2020, 10:50 AM
paquette requested review of this revision.Aug 18 2020, 10:50 AM
aemerson accepted this revision.Aug 18 2020, 11:03 AM
This revision is now accepted and ready to land.Aug 18 2020, 11:03 AM