Questions about Static Profile Estimator

I have been using ProfileEstimatorPass to provide some static ProfileInfo
information in order to do some optimizations, and I have a couple of

1. The estimator seems to be purely intra-procedural. It starts new edge
and block weights at the beginning of every function. Is there any existing
way to get this to produce a full program profile?

2. I found the BranchProbabilityInfo file and saw that it has heuristics
that should produce a good static estimate. Can BranchProbabilityInfo or
BlockFrequencyInfo be used to provide ProfileInfo data?

Thanks for any help or guidance you can give me.

There was some discussion on this recently. Theoretically you can use the CallGraph to propagate the info captured for each function. However, due to indirect calls the final result may have discrepancies. My personal take is that you may still be able to use this in a restricted manner.