Page MenuHomePhabricator

[PGO][PGSO] Add an optional query type parameter to shouldOptimizeForSize.
ClosedPublic

Authored by yamauchi on Nov 20 2019, 1:57 PM.

Details

Summary

In case of a need to distinguish different query sites for gradual commit or
debugging of PGSO. NFC.

Diff Detail

Event Timeline

yamauchi created this revision.Nov 20 2019, 1:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2019, 1:57 PM
yamauchi retitled this revision from [PGO][PGSO] Add a query type parameter to shouldOptimizeForSize. to [PGO][PGSO] Add an optional query type parameter to shouldOptimizeForSize..Nov 20 2019, 2:06 PM

Can this be derived statically from the FuncT or BlockT?

Can this be derived statically from the FuncT or BlockT?

I don't think so as some of the CodeGen passes use the IR version instead of the MachineIR version like CodeGenPrepare/ISel.

How is the query type going to be checked?

For example, we could retain the existing behavior (return true only for cold code and the existing call sites of shouldFuncOptimizeForSize) while adding new callers of shouldOptimizeForSize by changing shouldOptimizeForSizeImpl to always false for the "QueryType == PGSOQueryType::Other" case. An alternative would be to combine addition of new callers and behavior changes.

davidxl accepted this revision.Dec 2 2019, 1:05 PM

lgtm

This revision is now accepted and ready to land.Dec 2 2019, 1:05 PM
This revision was automatically updated to reflect the committed changes.