This is an archive of the discontinued LLVM Phabricator instance.

[FuncSpec] Move invariant computation for spec cost out of loop (NFC-ish)
ClosedPublic

Authored by ChuanqiXu on Aug 5 2021, 11:35 PM.

Details

Summary

Noticed that the computation for function specialization cost of a function wouldn't change during the traversal of the arguments for the function. We could hoist the computation out of the traversal. I observed about ~1% improvement on compile time for spec2017. But I guess it may not be precise. This should be NFC and fine.

Test Plan: check-all, spec2017 int rate

Diff Detail

Event Timeline

ChuanqiXu created this revision.Aug 5 2021, 11:35 PM
ChuanqiXu requested review of this revision.Aug 5 2021, 11:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2021, 11:35 PM
SjoerdMeijer accepted this revision.Aug 6 2021, 12:23 AM

Nice one, looks like a good change to me.

This revision is now accepted and ready to land.Aug 6 2021, 12:23 AM