aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2009-09-03 02:52:02 +0000
committerLang Hames <lhames@gmail.com>2009-09-03 02:52:02 +0000
commit3f2f3f5341374c85955cfaffa71886724999762d (patch)
treeffbcbb80b7b5985fe56b523e4f54e6155af65497 /lib/CodeGen
parent03a5f139fb7d3e9c49fe95aea4c717fab2285d82 (diff)
downloadexternal_llvm-3f2f3f5341374c85955cfaffa71886724999762d.zip
external_llvm-3f2f3f5341374c85955cfaffa71886724999762d.tar.gz
external_llvm-3f2f3f5341374c85955cfaffa71886724999762d.tar.bz2
Fixed a test that ensures the LocalRewriter does not attempt to
avoid reloads by reusing clobbered registers. This was causing issues in 256.bzip2 when compiled with PIC for a while (starting at r78217), though the problem has since been masked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/RegAllocPBQP.cpp2
-rw-r--r--lib/CodeGen/VirtRegRewriter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp
index 853192c..e85a5ac 100644
--- a/lib/CodeGen/RegAllocPBQP.cpp
+++ b/lib/CodeGen/RegAllocPBQP.cpp
@@ -269,7 +269,7 @@ PBQP::Matrix* PBQPRegAlloc::buildInterferenceMatrix(
unsigned reg2 = *a2Itr;
// If the row/column regs are identical or alias insert an infinity.
- if ((reg1 == reg2) || tri->areAliases(reg1, reg2)) {
+ if (tri->regsOverlap(reg1, reg2)) {
(*m)[ri][ci] = std::numeric_limits<PBQP::PBQPNum>::infinity();
isZeroMatrix = false;
}
diff --git a/lib/CodeGen/VirtRegRewriter.cpp b/lib/CodeGen/VirtRegRewriter.cpp
index 6da6a9b..79b366c 100644
--- a/lib/CodeGen/VirtRegRewriter.cpp
+++ b/lib/CodeGen/VirtRegRewriter.cpp
@@ -797,7 +797,7 @@ unsigned ReuseInfo::GetRegForReload(const TargetRegisterClass *RC,
// value aliases the new register. If so, codegen the previous reload
// and use this one.
unsigned PRRU = Op.PhysRegReused;
- if (TRI->areAliases(PRRU, PhysReg)) {
+ if (TRI->regsOverlap(PRRU, PhysReg)) {
// Okay, we found out that an alias of a reused register
// was used. This isn't good because it means we have
// to undo a previous reuse.