This is an archive of the discontinued LLVM Phabricator instance.

[NFCI][SimpleLoopUnswitch] Adjust CostKind query
ClosedPublic

Authored by samparker on Aug 12 2020, 4:53 AM.

Details

Summary

When getUserCost was transitioned to use an explicit CostKind, TCK_CodeSize was used even though the original kind was implicitly SizeAndLatency so restore this behaviour. We now only query for CodeSize when optimising for minsize.
I expect this to not change anything as, I think all, targets will currently return the same value for CodeSize and SizeLatency. Indeed I see no changes in the test suite for Arm, AArch64 and X86.

Diff Detail

Event Timeline

samparker created this revision.Aug 12 2020, 4:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2020, 4:53 AM
samparker requested review of this revision.Aug 12 2020, 4:53 AM
asbirlea resigned from this revision.Aug 12 2020, 4:34 PM

This seems fine, but I don't think I'm the right person to review it.

dfukalov accepted this revision.Aug 13 2020, 7:11 AM

Please clang-format it.

This revision is now accepted and ready to land.Aug 13 2020, 7:11 AM
This revision was landed with ongoing or failed builds.Aug 13 2020, 11:55 PM
This revision was automatically updated to reflect the committed changes.