mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-06 04:09:04 +00:00
Add getScaledIntervalSize, which gives a measure of the size of an interval that is independent of the scaling of
the function due to empty index slots. This is suitable for use in backend heuristics that need to reason about the density of an interval. llvm-svn: 52652
This commit is contained in:
parent
11d367fd0c
commit
df17544cd3
@ -169,6 +169,15 @@ namespace llvm {
|
||||
return MBB2IdxMap[MBBNo].second;
|
||||
}
|
||||
|
||||
/// getIntervalSize - get the size of an interval in "units,"
|
||||
/// where every function is composed of one thousand units. This
|
||||
/// measure scales properly with empty index slots in the function.
|
||||
unsigned getScaledIntervalSize(LiveInterval& I) {
|
||||
// Factor of 250 comes from 1000 units per function divided
|
||||
// by four slots per instruction.
|
||||
return (250 * I.getSize()) / i2miMap_.size();
|
||||
}
|
||||
|
||||
/// getMBBFromIndex - given an index in any instruction of an
|
||||
/// MBB return a pointer the MBB
|
||||
MachineBasicBlock* getMBBFromIndex(unsigned index) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user