This is an archive of the discontinued LLVM Phabricator instance.

[GreedyRA ORE] Add Cost of spill locations into remark
ClosedPublic

Authored by skatkov on Apr 6 2021, 10:53 PM.

Details

Summary

Cost of spill location is computed basing on relative branch frequency where corresponding spill/reload/copy is located.

While the number itself is highly depends on incoming IR, the total cost can be used when do some changes in RA.

Diff Detail

Event Timeline

skatkov created this revision.Apr 6 2021, 10:53 PM
skatkov requested review of this revision.Apr 6 2021, 10:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2021, 10:53 PM
Matt added a subscriber: Matt.Apr 8 2021, 2:13 PM
skatkov updated this revision to Diff 338436.Apr 19 2021, 12:14 AM

rebase + test update.

reames accepted this revision.Apr 19 2021, 9:27 AM

LGTM w/required changes.

llvm/lib/CodeGen/RegAllocGreedy.cpp
582

Personally, I don't think this function adds any clarity since it's used once, and the naming isn't super obvious. Please just inline this into the caller w/a comment about computing cost.

3158–3160

replace "spills location cost" with "total spill cost", analogously for the others below.

This revision is now accepted and ready to land.Apr 19 2021, 9:27 AM
This revision was landed with ongoing or failed builds.Apr 19 2021, 8:56 PM
This revision was automatically updated to reflect the committed changes.