This is an archive of the discontinued LLVM Phabricator instance.

[MemProf] Set hot/cold new values with option
ClosedPublic

Authored by tejohnson on May 12 2023, 2:59 PM.

Details

Summary

Adds support to set the hot/cold new hint values with an option. Change
the defaults slightly to make it easier to distinguish between compiler
synthesized vs manually inserted calls to the interface.

Diff Detail

Event Timeline

tejohnson created this revision.May 12 2023, 2:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2023, 2:59 PM
Herald added subscribers: hoy, hiraditya. · View Herald Transcript
tejohnson requested review of this revision.May 12 2023, 2:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2023, 2:59 PM
davidxl added inline comments.May 12 2023, 3:13 PM
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
62

Is 0 allowed ?

tejohnson added inline comments.May 12 2023, 3:17 PM
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
62

Yes. The 0 value to getAsInteger is the radix value, and 0 means autosense (so it will accept e.g. hex, octal, etc with the appropriate prefix on the value).

davidxl added inline comments.May 12 2023, 3:39 PM
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
62

My question is if value zero is allowed to be specified as a possible value or it is treated as a reserved value.

tejohnson added inline comments.May 12 2023, 3:43 PM
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
62

It is allowed

davidxl accepted this revision.May 12 2023, 3:44 PM

lgtm

This revision is now accepted and ready to land.May 12 2023, 3:44 PM
This revision was landed with ongoing or failed builds.May 12 2023, 3:47 PM
This revision was automatically updated to reflect the committed changes.