summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/BlockFrequency.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-12-14 00:53:32 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-12-14 00:53:32 +0000
commit9f49d7441307b4799eccfaa538b10ca6ae347f2f (patch)
tree2a401d593edab16fed57217578ece3f9ad1da4b2 /llvm/lib/Support/BlockFrequency.cpp
parent9b395ef284341ee7f3525bb55f72c8b8e43a85b2 (diff)
downloadbcm5719-llvm-9f49d7441307b4799eccfaa538b10ca6ae347f2f.tar.gz
bcm5719-llvm-9f49d7441307b4799eccfaa538b10ca6ae347f2f.zip
[block-freq] Refactor LiveInterals::getSpillWeight to use the new MachineBlockFrequencyInfo methods.
This is slightly more interesting than the previous batch of changes. Specifically: 1. We refactor getSpillWeight to take a MachineBlockFrequencyInfo (MBFI) object. This enables us to completely encapsulate the actual manner we use the MachineBlockFrequencyInfo to get our spill weights. This yields cleaner code since one does not need to fetch the actual block frequency before getting the spill weight if all one wants it the spill weight. It also gives us access to entry frequency which we need for our computation. 2. Instead of having getSpillWeight take a MachineBasicBlock (as one might think) to look up the block frequency via the MBFI object, we instead take in a MachineInstr object. The reason for this is that the method is supposed to return the spill weight for an instruction according to the comments around the function. llvm-svn: 197296
Diffstat (limited to 'llvm/lib/Support/BlockFrequency.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud