summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-01-10 02:58:51 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-01-10 02:58:51 +0000
commit2fb5b3157826043df780cb52e7e3b773ce7fdd66 (patch)
tree0b931b906005e9d05ce16bf4d2c9c00fa01e5ac7 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent7bb282ebb11a053f4a2559280c17a2797008f5b8 (diff)
downloadbcm5719-llvm-2fb5b3157826043df780cb52e7e3b773ce7fdd66.tar.gz
bcm5719-llvm-2fb5b3157826043df780cb52e7e3b773ce7fdd66.zip
Simplify a bunch of isVirtualRegister() and isPhysicalRegister() logic.
These functions not longer assert when passed 0, but simply return false instead. No functional change intended. llvm-svn: 123155
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 0b5c582083e..000fc40ac46 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -988,7 +988,7 @@ void LiveIntervals::rewriteImplicitOps(const LiveInterval &li,
if (!MO.isReg())
continue;
unsigned Reg = MO.getReg();
- if (Reg == 0 || TargetRegisterInfo::isPhysicalRegister(Reg))
+ if (!TargetRegisterInfo::isVirtualRegister(Reg))
continue;
if (!vrm.isReMaterialized(Reg))
continue;
@@ -1022,7 +1022,7 @@ rewriteInstructionForSpills(const LiveInterval &li, const VNInfo *VNI,
if (!mop.isReg())
continue;
unsigned Reg = mop.getReg();
- if (Reg == 0 || TargetRegisterInfo::isPhysicalRegister(Reg))
+ if (!TargetRegisterInfo::isVirtualRegister(Reg))
continue;
if (Reg != li.reg)
continue;
OpenPOWER on IntegriCloud