Page MenuHomePhabricator

[Attributor] Add interface to emit remarks in Attributor
ClosedPublic

Authored by jhuber6 on May 13 2021, 2:23 PM.

Details

Summary

This patch adds support for the Attributor to emit remarks on behalf of some
other pass. The attributor can now optionally take a callback function that
returns an OptimizationRemarkEmitter object when given a Function pointer. If
this is availible then a remark will be emitted for the corresponding pass
name.

Depends on D102197

Diff Detail

Event Timeline

jhuber6 created this revision.May 13 2021, 2:23 PM
jhuber6 requested review of this revision.May 13 2021, 2:23 PM
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
sstefan1 accepted this revision.May 13 2021, 11:31 PM

Maybe we can have a test for this? Otherwise LGTM.

This revision is now accepted and ready to land.May 13 2021, 11:31 PM
thegameg accepted this revision.May 14 2021, 9:51 AM
thegameg added a subscriber: thegameg.

LGTM with a test.

jhuber6 updated this revision to Diff 345514.May 14 2021, 11:40 AM

Adding test.

jhuber6 updated this revision to Diff 347101.May 21 2021, 12:20 PM

Changing after D102824 changed the Attributor constructor and adding interface for function remarks from D102784.

jhuber6 updated this revision to Diff 350295.Mon, Jun 7, 8:01 AM

Updating to handle the remarks from the replace globalization pass after it was changed to use the Attributor instead.

jhuber6 updated this revision to Diff 350303.Mon, Jun 7, 8:20 AM

Artefacts in the diff for some reason.

jhuber6 updated this revision to Diff 352180.Tue, Jun 15, 10:36 AM

Comments.

Herald added a project: Restricted Project. · View Herald TranscriptTue, Jun 15, 10:36 AM
jhuber6 updated this revision to Diff 352244.Tue, Jun 15, 2:19 PM

Arcanist updated the wrong revision, fixing.

jhuber6 updated this revision to Diff 352530.Wed, Jun 16, 1:10 PM

Changing remark if the allocation was from globalization. The message was a
little confusing since the programmer didn't explicitly allocate memory there.

jhuber6 updated this revision to Diff 352532.Wed, Jun 16, 1:12 PM

Forgot to fix test.

jhuber6 updated this revision to Diff 352860.Thu, Jun 17, 3:13 PM

Adding missed remark for variables that are potentially captured or freed.

This revision was landed with ongoing or failed builds.Tue, Jun 22, 11:13 AM
This revision was automatically updated to reflect the committed changes.