[llvm][NFC] refactor setBlockFrequency for clarity.
authorMircea Trofin <mtrofin@google.com>
Tue, 28 Jul 2020 20:04:11 +0000 (13:04 -0700)
committerMircea Trofin <mtrofin@google.com>
Tue, 28 Jul 2020 20:04:11 +0000 (13:04 -0700)
commit1e027b77f056fb50e50d9f743e21eb41151c32da
tree7a09a641473736cae2f725e34078f1d751230fe7
parentb8943e7cea7cafebe26dd96e1a0d98e1f68a1386
[llvm][NFC] refactor setBlockFrequency for clarity.

The refactoring encapsulates frequency calculation in MachineBlockFrequencyInfo,
and renames the API to clarify its motivation. It should clarify
frequencies may not be reset 'freely' by users of the analysis, as the
API serves as a partial update to avoid a full analysis recomputation.

Differential Revision: https://reviews.llvm.org/D84427
llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
llvm/lib/CodeGen/MachineSink.cpp