| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringMIPS32.cpp - MIPS32 lowering ----------===// | 1 //===- subzero/src/IceTargetLoweringMIPS32.cpp - MIPS32 lowering ----------===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 /// | 9 /// |
| 10 /// \file | 10 /// \file |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 TypeToRegisterSet[IceType_v4i32] = VectorRegisters; | 85 TypeToRegisterSet[IceType_v4i32] = VectorRegisters; |
| 86 TypeToRegisterSet[IceType_v4f32] = VectorRegisters; | 86 TypeToRegisterSet[IceType_v4f32] = VectorRegisters; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void TargetMIPS32::translateO2() { | 89 void TargetMIPS32::translateO2() { |
| 90 TimerMarker T(TimerStack::TT_O2, Func); | 90 TimerMarker T(TimerStack::TT_O2, Func); |
| 91 | 91 |
| 92 // TODO(stichnot): share passes with X86? | 92 // TODO(stichnot): share passes with X86? |
| 93 // https://code.google.com/p/nativeclient/issues/detail?id=4094 | 93 // https://code.google.com/p/nativeclient/issues/detail?id=4094 |
| 94 | 94 |
| 95 // Merge Alloca instructions, and lay out the stack. |
| 96 static constexpr bool SortAndCombineAllocas = true; |
| 97 Func->processAllocas(SortAndCombineAllocas); |
| 98 Func->dump("After Alloca processing"); |
| 99 |
| 95 if (!Ctx->getFlags().getPhiEdgeSplit()) { | 100 if (!Ctx->getFlags().getPhiEdgeSplit()) { |
| 96 // Lower Phi instructions. | 101 // Lower Phi instructions. |
| 97 Func->placePhiLoads(); | 102 Func->placePhiLoads(); |
| 98 if (Func->hasError()) | 103 if (Func->hasError()) |
| 99 return; | 104 return; |
| 100 Func->placePhiStores(); | 105 Func->placePhiStores(); |
| 101 if (Func->hasError()) | 106 if (Func->hasError()) |
| 102 return; | 107 return; |
| 103 Func->deletePhis(); | 108 Func->deletePhis(); |
| 104 if (Func->hasError()) | 109 if (Func->hasError()) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 if (Ctx->getFlags().shouldDoNopInsertion()) { | 185 if (Ctx->getFlags().shouldDoNopInsertion()) { |
| 181 Func->doNopInsertion(); | 186 Func->doNopInsertion(); |
| 182 } | 187 } |
| 183 } | 188 } |
| 184 | 189 |
| 185 void TargetMIPS32::translateOm1() { | 190 void TargetMIPS32::translateOm1() { |
| 186 TimerMarker T(TimerStack::TT_Om1, Func); | 191 TimerMarker T(TimerStack::TT_Om1, Func); |
| 187 | 192 |
| 188 // TODO: share passes with X86? | 193 // TODO: share passes with X86? |
| 189 | 194 |
| 195 // Do not merge Alloca instructions, and lay out the stack. |
| 196 static constexpr bool SortAndCombineAllocas = false; |
| 197 Func->processAllocas(SortAndCombineAllocas); |
| 198 Func->dump("After Alloca processing"); |
| 199 |
| 190 Func->placePhiLoads(); | 200 Func->placePhiLoads(); |
| 191 if (Func->hasError()) | 201 if (Func->hasError()) |
| 192 return; | 202 return; |
| 193 Func->placePhiStores(); | 203 Func->placePhiStores(); |
| 194 if (Func->hasError()) | 204 if (Func->hasError()) |
| 195 return; | 205 return; |
| 196 Func->deletePhis(); | 206 Func->deletePhis(); |
| 197 if (Func->hasError()) | 207 if (Func->hasError()) |
| 198 return; | 208 return; |
| 199 Func->dump("After Phi lowering"); | 209 Func->dump("After Phi lowering"); |
| (...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 Ostream &Str = Ctx->getStrEmit(); | 1072 Ostream &Str = Ctx->getStrEmit(); |
| 1063 Str << "\t.set\tnomicromips\n"; | 1073 Str << "\t.set\tnomicromips\n"; |
| 1064 Str << "\t.set\tnomips16\n"; | 1074 Str << "\t.set\tnomips16\n"; |
| 1065 } | 1075 } |
| 1066 | 1076 |
| 1067 llvm::SmallBitVector TargetMIPS32::TypeToRegisterSet[IceType_NUM]; | 1077 llvm::SmallBitVector TargetMIPS32::TypeToRegisterSet[IceType_NUM]; |
| 1068 llvm::SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; | 1078 llvm::SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; |
| 1069 llvm::SmallBitVector TargetMIPS32::ScratchRegs; | 1079 llvm::SmallBitVector TargetMIPS32::ScratchRegs; |
| 1070 | 1080 |
| 1071 } // end of namespace Ice | 1081 } // end of namespace Ice |
| OLD | NEW |