This is an archive of the discontinued LLVM Phabricator instance.

[SCCP] Split up callsite handling, only propagate result on change (NFC)
ClosedPublic

Authored by fhahn on Mar 9 2020, 6:14 AM.

Details

Summary

Functions include their arguments in the use-list. Changed function
values mean that the result of the function changed. We only need
to update the call sites with the new function result and do not
have to propagate the call arguments.

To do so, this patch splits up the visitCallSite into handleCallResult
and handleCallArguments and updates markUsersAsChanged to only update
call results for functions.

Diff Detail

Event Timeline

fhahn created this revision.Mar 9 2020, 6:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2020, 6:14 AM
Herald added a subscriber: hiraditya. · View Herald Transcript

This makes sense, I think. No testcase because you can't test it on its own?

fhahn updated this revision to Diff 249931.Mar 12 2020, 7:44 AM

This makes sense, I think. No testcase because you can't test it on its own?

Yes, this change should be NFC, as we should only skip redundant updates without constant ranges.

fhahn retitled this revision from [SCCP] Split up call site handling, only propagate result on change. to [SCCP] Split up callsite handling, only propagate result on change (NFC).Mar 12 2020, 7:45 AM

This makes sense, I think. No testcase because you can't test it on its own?

Yes, this change should be NFC, as we should only skip redundant updates without constant ranges.

I've updated the title to reflect that. There are also no changes in the binaries when building MultiSource, SPEC2000 & SPEC2006 with and without the patch.

fhahn updated this revision to Diff 250761.Mar 17 2020, 7:09 AM
fhahn retitled this revision from [SCCP] Split up callsite handling, only propagate result on change (NFC) to [SCCP] Split up callsite handling, only propagate result on change (NFC).

Rebased after recent changes landed.

This revision is now accepted and ready to land.Mar 17 2020, 10:13 AM
This revision was automatically updated to reflect the committed changes.