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

Side by Side Diff: src/IceTargetLoweringMIPS32.cpp

Issue 1803403002: Subzero. Flags refactoring. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 9 months 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/IceTargetLoweringX86BaseImpl.h » ('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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // TODO(stichnot): share passes with X86? 131 // TODO(stichnot): share passes with X86?
132 // https://code.google.com/p/nativeclient/issues/detail?id=4094 132 // https://code.google.com/p/nativeclient/issues/detail?id=4094
133 genTargetHelperCalls(); 133 genTargetHelperCalls();
134 134
135 // Merge Alloca instructions, and lay out the stack. 135 // Merge Alloca instructions, and lay out the stack.
136 static constexpr bool SortAndCombineAllocas = false; 136 static constexpr bool SortAndCombineAllocas = false;
137 Func->processAllocas(SortAndCombineAllocas); 137 Func->processAllocas(SortAndCombineAllocas);
138 Func->dump("After Alloca processing"); 138 Func->dump("After Alloca processing");
139 139
140 if (!Ctx->getFlags().getPhiEdgeSplit()) { 140 if (!Ctx->getFlags().getEnablePhiEdgeSplit()) {
141 // Lower Phi instructions. 141 // Lower Phi instructions.
142 Func->placePhiLoads(); 142 Func->placePhiLoads();
143 if (Func->hasError()) 143 if (Func->hasError())
144 return; 144 return;
145 Func->placePhiStores(); 145 Func->placePhiStores();
146 if (Func->hasError()) 146 if (Func->hasError())
147 return; 147 return;
148 Func->deletePhis(); 148 Func->deletePhis();
149 if (Func->hasError()) 149 if (Func->hasError())
150 return; 150 return;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 assert(Func->validateLiveness()); 193 assert(Func->validateLiveness());
194 // The post-codegen dump is done here, after liveness analysis and associated 194 // The post-codegen dump is done here, after liveness analysis and associated
195 // cleanup, to make the dump cleaner and more useful. 195 // cleanup, to make the dump cleaner and more useful.
196 Func->dump("After initial MIPS32 codegen"); 196 Func->dump("After initial MIPS32 codegen");
197 Func->getVMetadata()->init(VMK_All); 197 Func->getVMetadata()->init(VMK_All);
198 regAlloc(RAK_Global); 198 regAlloc(RAK_Global);
199 if (Func->hasError()) 199 if (Func->hasError())
200 return; 200 return;
201 Func->dump("After linear scan regalloc"); 201 Func->dump("After linear scan regalloc");
202 202
203 if (Ctx->getFlags().getPhiEdgeSplit()) { 203 if (Ctx->getFlags().getEnablePhiEdgeSplit()) {
204 Func->advancedPhiLowering(); 204 Func->advancedPhiLowering();
205 Func->dump("After advanced Phi lowering"); 205 Func->dump("After advanced Phi lowering");
206 } 206 }
207 207
208 // Stack frame mapping. 208 // Stack frame mapping.
209 Func->genFrame(); 209 Func->genFrame();
210 if (Func->hasError()) 210 if (Func->hasError())
211 return; 211 return;
212 Func->dump("After stack frame mapping"); 212 Func->dump("After stack frame mapping");
213 213
214 Func->contractEmptyNodes(); 214 Func->contractEmptyNodes();
215 Func->reorderNodes(); 215 Func->reorderNodes();
216 216
217 // Branch optimization. This needs to be done just before code emission. In 217 // Branch optimization. This needs to be done just before code emission. In
218 // particular, no transformations that insert or reorder CfgNodes should be 218 // particular, no transformations that insert or reorder CfgNodes should be
219 // done after branch optimization. We go ahead and do it before nop insertion 219 // done after branch optimization. We go ahead and do it before nop insertion
220 // to reduce the amount of work needed for searching for opportunities. 220 // to reduce the amount of work needed for searching for opportunities.
221 Func->doBranchOpt(); 221 Func->doBranchOpt();
222 Func->dump("After branch optimization"); 222 Func->dump("After branch optimization");
223 223
224 // Nop insertion 224 // Nop insertion
225 if (Ctx->getFlags().shouldDoNopInsertion()) { 225 if (Ctx->getFlags().getShouldDoNopInsertion()) {
226 Func->doNopInsertion(); 226 Func->doNopInsertion();
227 } 227 }
228 } 228 }
229 229
230 void TargetMIPS32::translateOm1() { 230 void TargetMIPS32::translateOm1() {
231 TimerMarker T(TimerStack::TT_Om1, Func); 231 TimerMarker T(TimerStack::TT_Om1, Func);
232 232
233 // TODO: share passes with X86? 233 // TODO: share passes with X86?
234 genTargetHelperCalls(); 234 genTargetHelperCalls();
235 235
(...skipping 24 matching lines...) Expand all
260 if (Func->hasError()) 260 if (Func->hasError())
261 return; 261 return;
262 Func->dump("After regalloc of infinite-weight variables"); 262 Func->dump("After regalloc of infinite-weight variables");
263 263
264 Func->genFrame(); 264 Func->genFrame();
265 if (Func->hasError()) 265 if (Func->hasError())
266 return; 266 return;
267 Func->dump("After stack frame mapping"); 267 Func->dump("After stack frame mapping");
268 268
269 // Nop insertion 269 // Nop insertion
270 if (Ctx->getFlags().shouldDoNopInsertion()) { 270 if (Ctx->getFlags().getShouldDoNopInsertion()) {
271 Func->doNopInsertion(); 271 Func->doNopInsertion();
272 } 272 }
273 } 273 }
274 274
275 bool TargetMIPS32::doBranchOpt(Inst *Instr, const CfgNode *NextNode) { 275 bool TargetMIPS32::doBranchOpt(Inst *Instr, const CfgNode *NextNode) {
276 (void)Instr; 276 (void)Instr;
277 (void)NextNode; 277 (void)NextNode;
278 UnimplementedError(Func->getContext()->getFlags()); 278 UnimplementedError(Func->getContext()->getFlags());
279 return false; 279 return false;
280 } 280 }
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 Str << "\t.set\t" 1317 Str << "\t.set\t"
1318 << "nomips16\n"; 1318 << "nomips16\n";
1319 } 1319 }
1320 1320
1321 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; 1321 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM];
1322 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; 1322 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM];
1323 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; 1323 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM];
1324 1324
1325 } // end of namespace MIPS32 1325 } // end of namespace MIPS32
1326 } // end of namespace Ice 1326 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698