diff options
author | Ruchira Sasanka <sasanka@students.uiuc.edu> | 2001-11-10 00:20:24 +0000 |
---|---|---|
committer | Ruchira Sasanka <sasanka@students.uiuc.edu> | 2001-11-10 00:20:24 +0000 |
commit | 31305c0d57251f0f231e4e83b37c69613acfbddb (patch) | |
tree | 461b0e60c59208de038bc0590905a962623152c3 /llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp | |
parent | d499a261161e155afdf9582833e7f7e9d7f8cf04 (diff) | |
download | bcm5719-llvm-31305c0d57251f0f231e4e83b37c69613acfbddb.tar.gz bcm5719-llvm-31305c0d57251f0f231e4e83b37c69613acfbddb.zip |
Coalesing bug fix - now checks for the same regType instead of the same
regClass since FP class has two reg Types.
llvm-svn: 1236
Diffstat (limited to 'llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp b/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp index a4c3aabe101..c07227539a2 100644 --- a/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp +++ b/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp @@ -253,7 +253,7 @@ void LiveRangeInfo::coalesceLRs() for each machine instruction (inst) for each definition (def) in inst for each operand (op) of inst that is a use - if the def and op are of the same register class + if the def and op are of the same register type if the def and op do not interfere //i.e., not simultaneously live if (degree(LR of def) + degree(LR of op)) <= # avail regs if both LRs do not have suggested colors @@ -312,9 +312,12 @@ void LiveRangeInfo::coalesceLRs() if( LROfUse == LROfDef) // nothing to merge if they are same continue; - RegClass *const RCOfUse = LROfUse->getRegClass(); + //RegClass *const RCOfUse = LROfUse->getRegClass(); + //if( RCOfDef == RCOfUse ) { // if the reg classes are the same - if( RCOfDef == RCOfUse ) { // if the reg classes are the same + if( MRI.getRegType(LROfDef) == MRI.getRegType(LROfUse) ) { + + // If the two RegTypes are the same if( ! RCOfDef->getInterference(LROfDef, LROfUse) ) { |