The arg is defaulted to false as most of the users of the interface checks for branch probability data.
Synthetic profile propagation is not on by default, so this patch has no effect on default compilations.
Differential D61025
Add an optional arg to include/exclude synthetic profile when query hasProfileData davidxl on Apr 23 2019, 9:09 AM. Authored by
Details The arg is defaulted to false as most of the users of the interface checks for branch probability data. Synthetic profile propagation is not on by default, so this patch has no effect on default compilations.
Diff Detail Event Timeline
Comment Actions Instead of passing a boolean, would it be better to pass ProfileCountType enum? Right now it doesn't make a difference as there are only two valid profile count types, but if that set expands, we could make them like bitmasks and then get a subset match. Comment Actions It is tempting to use enum in this case, however I don't see possible extension to the type (in forseable future), so perhaps keep this way. |
To me
return EC.hasValue() && (IncludeSynthetic || !EC.isSynthetic()) looks cleaner and readable, but I'll leave it to you.