summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-27 04:06:41 +0000
committerChris Lattner <sabre@nondot.org>2009-06-27 04:06:41 +0000
commitc91e8c746445f7ba2656f86685507ea61454194d (patch)
treeec024e8124cd5b3c6fd0f1ade68ec97747ce26cc /llvm/lib
parentf0a7f3b0893751ec1589b06b8702da51e33a5fb3 (diff)
downloadbcm5719-llvm-c91e8c746445f7ba2656f86685507ea61454194d.tar.gz
bcm5719-llvm-c91e8c746445f7ba2656f86685507ea61454194d.zip
When doing remat, don't consider uses of non-allocatable physregs. Patch
by Evan. llvm-svn: 74370
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index d6931df896d..21bb5dc0127 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -947,6 +947,10 @@ unsigned LiveIntervals::getReMatImplicitUse(const LiveInterval &li,
unsigned Reg = MO.getReg();
if (Reg == 0 || Reg == li.reg)
continue;
+
+ if (TargetRegisterInfo::isPhysicalRegister(Reg) &&
+ !allocatableRegs_[Reg])
+ continue;
// FIXME: For now, only remat MI with at most one register operand.
assert(!RegOp &&
"Can't rematerialize instruction with multiple register operand!");
OpenPOWER on IntegriCloud