diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-06-19 01:16:17 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-06-19 01:16:17 +0000 |
commit | 1e99d271185f0e060d9109d8de9852265a6ff12f (patch) | |
tree | 10d48852ed330f25e5da4bbb836b8a955e02c417 /include/llvm/CodeGen/LiveIntervalAnalysis.h | |
parent | 25de663f8343317f618460e7f145df1484d91945 (diff) | |
download | external_llvm-1e99d271185f0e060d9109d8de9852265a6ff12f.zip external_llvm-1e99d271185f0e060d9109d8de9852265a6ff12f.tar.gz external_llvm-1e99d271185f0e060d9109d8de9852265a6ff12f.tar.bz2 |
Minor spiller tweak to unfavor reload into load/store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveIntervalAnalysis.h')
-rw-r--r-- | include/llvm/CodeGen/LiveIntervalAnalysis.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index 473cc8e..84c6d67 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -121,8 +121,12 @@ namespace llvm { return getBaseIndex(index) + InstrSlots::STORE; } - static float getSpillWeight(bool isDef, bool isUse, unsigned loopDepth) { - return (isDef + isUse) * powf(10.0F, (float)loopDepth); + static float getSpillWeight(bool isDef, bool isUse, bool isMem, + unsigned loopDepth) { + float Weight = isDef; + if (isUse) + Weight += isMem ? 1.2f : 1.0f; + return Weight * powf(10.0F, (float)loopDepth); } typedef Reg2IntervalMap::iterator iterator; |