OLD | NEW |
1 // | 1 // |
2 // The Subzero Code Generator | 2 // The Subzero Code Generator |
3 // | 3 // |
4 // This file is distributed under the University of Illinois Open Source | 4 // This file is distributed under the University of Illinois Open Source |
5 // License. See LICENSE.TXT for details. | 5 // License. See LICENSE.TXT for details. |
6 // | 6 // |
7 //===----------------------------------------------------------------------===// | 7 //===----------------------------------------------------------------------===// |
8 /// | 8 /// |
9 /// \file | 9 /// \file |
10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost | 10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 InstList::reverse_iterator RI, E; | 989 InstList::reverse_iterator RI, E; |
990 for (RI = Insts.rbegin(), E = Insts.rend(); RI != E; ++RI) { | 990 for (RI = Insts.rbegin(), E = Insts.rend(); RI != E; ++RI) { |
991 if (llvm::isa<InstMIPS32Ret>(*RI)) | 991 if (llvm::isa<InstMIPS32Ret>(*RI)) |
992 break; | 992 break; |
993 } | 993 } |
994 if (RI == E) | 994 if (RI == E) |
995 return; | 995 return; |
996 | 996 |
997 // Convert the reverse_iterator position into its corresponding (forward) | 997 // Convert the reverse_iterator position into its corresponding (forward) |
998 // iterator position. | 998 // iterator position. |
999 InstList::iterator InsertPoint = RI.base(); | 999 InstList::iterator InsertPoint = reverseToForwardIterator(RI); |
1000 --InsertPoint; | 1000 --InsertPoint; |
1001 Context.init(Node); | 1001 Context.init(Node); |
1002 Context.setInsertPoint(InsertPoint); | 1002 Context.setInsertPoint(InsertPoint); |
1003 | 1003 |
1004 Variable *SP = getPhysicalRegister(RegMIPS32::Reg_SP); | 1004 Variable *SP = getPhysicalRegister(RegMIPS32::Reg_SP); |
1005 if (UsesFramePointer) { | 1005 if (UsesFramePointer) { |
1006 Variable *FP = getPhysicalRegister(RegMIPS32::Reg_FP); | 1006 Variable *FP = getPhysicalRegister(RegMIPS32::Reg_FP); |
1007 // For late-stage liveness analysis (e.g. asm-verbose mode), adding a fake | 1007 // For late-stage liveness analysis (e.g. asm-verbose mode), adding a fake |
1008 // use of SP before the assignment of SP=FP keeps previous SP adjustments | 1008 // use of SP before the assignment of SP=FP keeps previous SP adjustments |
1009 // from being dead-code eliminated. | 1009 // from being dead-code eliminated. |
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 Str << "\t.set\t" | 2605 Str << "\t.set\t" |
2606 << "nomips16\n"; | 2606 << "nomips16\n"; |
2607 } | 2607 } |
2608 | 2608 |
2609 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; | 2609 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; |
2610 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; | 2610 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; |
2611 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; | 2611 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; |
2612 | 2612 |
2613 } // end of namespace MIPS32 | 2613 } // end of namespace MIPS32 |
2614 } // end of namespace Ice | 2614 } // end of namespace Ice |
OLD | NEW |