[BOLT] Change call count output for ICF
ICF optimization runs multiple passes and the order in which functions are folded could be dependent on the order they are being processed. This order is indeterministic as functions are intermediately stored in std::unordered_map<>. Note that this order is mostly stable, but is not guaranteed to be and can change e.g. after switching to a different C++ library implementation. Because the processing (and folding) order is indeterministic, the previous way of calculating merged function call count could produce different results. Change the way we calculate the ICF call count to make it independent of the function folding/processing order. Mostly NFC as the output binary should remain the same, the change affects only the console output. Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D144807
Loading
Please sign in to comment