This is an archive of the discontinued LLVM Phabricator instance.

[nfc] small maintainability IndirectCallPromotion changes
ClosedPublic

Authored by mtrofin on Jul 13 2023, 9:02 AM.

Details

Summary
  • we can remove the Module field, it's obtainable from F and used in only one place
  • a few fields can be const-ed, thus enforcing compile-time initialization checking (and we don't need to support operator=)

Diff Detail

Event Timeline

mtrofin created this revision.Jul 13 2023, 9:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2023, 9:02 AM
mtrofin requested review of this revision.Jul 13 2023, 9:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2023, 9:02 AM
xur added a comment.Jul 20 2023, 2:06 PM

How about we get rid of the module field? The function passed in all associating with the module so we can get the module from there. And there seems only one use of M (when calling annotateValueSite).
Other changes look good to me.

mtrofin edited the summary of this revision. (Show Details)Jul 20 2023, 2:20 PM
mtrofin updated this revision to Diff 542671.Jul 20 2023, 2:21 PM

removed the Module field, updated patch description.

This revision was not accepted when it landed; it landed in state Needs Review.Jul 20 2023, 2:35 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.