summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-05 03:52:29 +0000
committerChris Lattner <sabre@nondot.org>2002-02-05 03:52:29 +0000
commitd30f989cdaf8e996c3c0f0497b50bff4bb649021 (patch)
tree9fafda92b0026b5d17fdf85ded5df7ab339bf487 /llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
parentf1223ace96046e0cc768c2bffd8218cc4d6d7897 (diff)
downloadbcm5719-llvm-d30f989cdaf8e996c3c0f0497b50bff4bb649021.tar.gz
bcm5719-llvm-d30f989cdaf8e996c3c0f0497b50bff4bb649021.zip
* Code Cleanups
* Removal dependencies on Type.h & remove uses of getTypeID() llvm-svn: 1718
Diffstat (limited to 'llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp b/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
index efa428c9098..7d43763a15b 100644
--- a/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
+++ b/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp
@@ -327,7 +327,7 @@ void LiveRangeInfo::coalesceLRs()
if( ! LROfUse ) { // if LR of use is not found
//don't warn about labels
- if (!((*UseI)->getType())->isLabelType() && DEBUG_RA)
+ if (!isa<BasicBlock>(*UseI) && DEBUG_RA)
cerr << " !! Warning: No LR for use " << RAV(*UseI) << "\n";
continue; // ignore and continue
}
@@ -338,21 +338,19 @@ void LiveRangeInfo::coalesceLRs()
//RegClass *const RCOfUse = LROfUse->getRegClass();
//if( RCOfDef == RCOfUse ) { // if the reg classes are the same
- if( MRI.getRegType(LROfDef) == MRI.getRegType(LROfUse) ) {
+ if (MRI.getRegType(LROfDef) == MRI.getRegType(LROfUse)) {
// If the two RegTypes are the same
-
- if( ! RCOfDef->getInterference(LROfDef, LROfUse) ) {
+ if (!RCOfDef->getInterference(LROfDef, LROfUse) ) {
unsigned CombinedDegree =
LROfDef->getUserIGNode()->getNumOfNeighbors() +
LROfUse->getUserIGNode()->getNumOfNeighbors();
- if( CombinedDegree <= RCOfDef->getNumOfAvailRegs() ) {
-
+ if (CombinedDegree <= RCOfDef->getNumOfAvailRegs()) {
// if both LRs do not have suggested colors
- if( ! (LROfDef->hasSuggestedColor() &&
- LROfUse->hasSuggestedColor() ) ) {
+ if (!(LROfDef->hasSuggestedColor() &&
+ LROfUse->hasSuggestedColor())) {
RCOfDef->mergeIGNodesOfLRs(LROfDef, LROfUse);
unionAndUpdateLRs(LROfDef, LROfUse);
OpenPOWER on IntegriCloud