This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Create `AAMustProgress` for the `mustprogress` attribute
ClosedPublic

Authored by jdoerfert on Jan 14 2021, 7:13 PM.

Details

Summary

Derive the mustprogress attribute based on the willreturn attribute
or the fact that all callers are mustprogress.

Diff Detail

Event Timeline

jdoerfert created this revision.Jan 14 2021, 7:13 PM
jdoerfert requested review of this revision.Jan 14 2021, 7:13 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: bbn. · View Herald Transcript
uenoku added a comment.EditedJan 26 2021, 1:11 AM

Basically it looks good to me.
However, it's not obvious to me that (known) willreturn can derive mustprogress.
(It seems correct to me though)

llvm/lib/Transforms/IPO/AttributorAttributes.cpp
3547–3551

This initialization is already done by AAMustProgress::initialize(A) so I think initialize function can be removed.

However, it's not obvious to me that (known) willreturn can derive mustprogress.

Given that we know we will return or throw, the function will make progress, so it's not going to get stuck. Arguably, it's a bit backwards but it might help down the road.

Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2023, 3:53 PM
jdoerfert edited the summary of this revision. (Show Details)Jun 2 2023, 3:53 PM

I'll fix LLVM.tools/UpdateTestChecks/update_test_checks::check_attrs.test before committing.

jhuber6 accepted this revision.Jun 5 2023, 10:45 AM
jhuber6 added a subscriber: jhuber6.

LG

This revision is now accepted and ready to land.Jun 5 2023, 10:45 AM
This revision was landed with ongoing or failed builds.Jun 5 2023, 4:34 PM
This revision was automatically updated to reflect the committed changes.