mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-25 15:19:14 +00:00
Remove floating point computations form SpillPlacement.cpp.
Patch by Benjamin Kramer! Use the BlockFrequency class instead of floats in the Hopfield network computations. This rescales the node Bias field from a [-2;2] float range to two block frequencies BiasN and BiasP pulling in opposite directions. This construct has a more predictable behavior when block frequencies saturate. The per-node scaling factors are no longer necessary, assuming the block frequencies around a bundle are consistent. This patch can cause the register allocator to make different spilling decisions. The differences should be small. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -36,6 +36,9 @@ public:
|
||||
/// \brief Returns the frequency of the entry block of the function.
|
||||
static uint64_t getEntryFrequency() { return ENTRY_FREQ; }
|
||||
|
||||
/// \brief Returns the maximum possible prequency, the saturation value.
|
||||
static uint64_t getMaxFrequency() { return -1ULL; }
|
||||
|
||||
/// \brief Returns the frequency as a fixpoint number scaled by the entry
|
||||
/// frequency.
|
||||
uint64_t getFrequency() const { return Frequency; }
|
||||
|
||||
Reference in New Issue
Block a user