Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: src/IceTargetLoweringMIPS32.cpp

Issue 1411583007: Combine allocas (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Finish fast path. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698