This is an archive of the discontinued LLVM Phabricator instance.

[Inliner] Add the callsites called function return attributes to set addable attributes
ClosedPublic

Authored by goldstein.w.n on Aug 1 2023, 6:45 PM.

Details

Summary

We can do this by just querying attribute in the callsite itself. This
is both cleaner code and produces better results.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Aug 1 2023, 6:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2023, 6:45 PM
goldstein.w.n requested review of this revision.Aug 1 2023, 6:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2023, 6:45 PM
nikic added inline comments.Aug 15 2023, 3:12 AM
llvm/lib/Transforms/Utils/InlineFunction.cpp
1346

This is going to intern a new AttributeSet just to turn it back into an AttrBuilder.

For this particular usage, I don't get why this is using AttrBuilder at all. You can replace the AB uses below with querying attributes on CB directly.

goldstein.w.n marked an inline comment as done.Aug 15 2023, 3:46 PM

Just use CB attrs

goldstein.w.n edited the summary of this revision. (Show Details)Aug 15 2023, 3:47 PM
nikic accepted this revision.Aug 16 2023, 3:16 AM

LGTM

This revision is now accepted and ready to land.Aug 16 2023, 3:16 AM
This revision was landed with ongoing or failed builds.Aug 16 2023, 8:41 PM
This revision was automatically updated to reflect the committed changes.