diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2015-09-06 17:18:12 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2015-09-07 08:18:04 +0800 |
commit | e3a5337c113c0e5352877f4d444ce710ecbd6162 (patch) | |
tree | 95b66d427e3c8056acc9ab9eb280fdf61b8d4832 | |
parent | 7f5e4e3b5816f0e25c4eef5f3eccd030b2517063 (diff) |
GBE: avoid vector registers when there is high register pressure.
If the reservedSpillRegs is not zero, it indicates we are in a
very high register pressure. Use register vector will likely
increase that pressure and will cause significant performance
problem which is much worse than use a short-live temporary
vector register with several additional MOVs.
So let's simply avoid use vector registers and just use a
temporary short-live-interval vector.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
-rw-r--r-- | backend/src/backend/gen_reg_allocation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/src/backend/gen_reg_allocation.cpp b/backend/src/backend/gen_reg_allocation.cpp index 39f1934f..36ad914b 100644 --- a/backend/src/backend/gen_reg_allocation.cpp +++ b/backend/src/backend/gen_reg_allocation.cpp @@ -318,7 +318,7 @@ namespace gbe if (it == vectorMap.end() && ctx.sel->isScalarReg(reg) == false && ctx.isSpecialReg(reg) == false && - (intervals[reg].maxID - intervals[reg].minID) < 2048) + ctx.reservedSpillRegs == 0 ) { const VectorLocation location = std::make_pair(vector, regID); this->vectorMap.insert(std::make_pair(reg, location)); |