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

Side by Side Diff: src/IceTargetLoweringX86BaseImpl.h

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/IceTargetLoweringMIPS32.cpp ('k') | src/IceTypeConverter.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/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==//
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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 384 }
385 385
386 genTargetHelperCalls(); 386 genTargetHelperCalls();
387 Func->dump("After target helper call insertion"); 387 Func->dump("After target helper call insertion");
388 388
389 // Merge Alloca instructions, and lay out the stack. 389 // Merge Alloca instructions, and lay out the stack.
390 static constexpr bool SortAndCombineAllocas = true; 390 static constexpr bool SortAndCombineAllocas = true;
391 Func->processAllocas(SortAndCombineAllocas); 391 Func->processAllocas(SortAndCombineAllocas);
392 Func->dump("After Alloca processing"); 392 Func->dump("After Alloca processing");
393 393
394 if (!Ctx->getFlags().getPhiEdgeSplit()) { 394 if (!Ctx->getFlags().getEnablePhiEdgeSplit()) {
395 // Lower Phi instructions. 395 // Lower Phi instructions.
396 Func->placePhiLoads(); 396 Func->placePhiLoads();
397 if (Func->hasError()) 397 if (Func->hasError())
398 return; 398 return;
399 Func->placePhiStores(); 399 Func->placePhiStores();
400 if (Func->hasError()) 400 if (Func->hasError())
401 return; 401 return;
402 Func->deletePhis(); 402 Func->deletePhis();
403 if (Func->hasError()) 403 if (Func->hasError())
404 return; 404 return;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 assert(Func->validateLiveness()); 470 assert(Func->validateLiveness());
471 // The post-codegen dump is done here, after liveness analysis and associated 471 // The post-codegen dump is done here, after liveness analysis and associated
472 // cleanup, to make the dump cleaner and more useful. 472 // cleanup, to make the dump cleaner and more useful.
473 Func->dump("After initial x8632 codegen"); 473 Func->dump("After initial x8632 codegen");
474 Func->getVMetadata()->init(VMK_All); 474 Func->getVMetadata()->init(VMK_All);
475 regAlloc(RAK_Global); 475 regAlloc(RAK_Global);
476 if (Func->hasError()) 476 if (Func->hasError())
477 return; 477 return;
478 Func->dump("After linear scan regalloc"); 478 Func->dump("After linear scan regalloc");
479 479
480 if (Ctx->getFlags().getPhiEdgeSplit()) { 480 if (Ctx->getFlags().getEnablePhiEdgeSplit()) {
481 Func->advancedPhiLowering(); 481 Func->advancedPhiLowering();
482 Func->dump("After advanced Phi lowering"); 482 Func->dump("After advanced Phi lowering");
483 } 483 }
484 484
485 // Stack frame mapping. 485 // Stack frame mapping.
486 Func->genFrame(); 486 Func->genFrame();
487 if (Func->hasError()) 487 if (Func->hasError())
488 return; 488 return;
489 Func->dump("After stack frame mapping"); 489 Func->dump("After stack frame mapping");
490 490
(...skipping 6805 matching lines...) Expand 10 before | Expand all | Expand 10 after
7296 Type Ty = T::Ty; 7296 Type Ty = T::Ty;
7297 SizeT Align = typeAlignInBytes(Ty); 7297 SizeT Align = typeAlignInBytes(Ty);
7298 ConstantList Pool = Ctx->getConstantPool(Ty); 7298 ConstantList Pool = Ctx->getConstantPool(Ty);
7299 7299
7300 Str << "\t.section\t.rodata.cst" << Align << ",\"aM\",@progbits," << Align 7300 Str << "\t.section\t.rodata.cst" << Align << ",\"aM\",@progbits," << Align
7301 << "\n"; 7301 << "\n";
7302 Str << "\t.align\t" << Align << "\n"; 7302 Str << "\t.align\t" << Align << "\n";
7303 7303
7304 // If reorder-pooled-constants option is set to true, we need to shuffle the 7304 // If reorder-pooled-constants option is set to true, we need to shuffle the
7305 // constant pool before emitting it. 7305 // constant pool before emitting it.
7306 if (Ctx->getFlags().shouldReorderPooledConstants() && !Pool.empty()) { 7306 if (Ctx->getFlags().getReorderPooledConstants() && !Pool.empty()) {
7307 // Use the constant's kind value as the salt for creating random number 7307 // Use the constant's kind value as the salt for creating random number
7308 // generator. 7308 // generator.
7309 Operand::OperandKind K = (*Pool.begin())->getKind(); 7309 Operand::OperandKind K = (*Pool.begin())->getKind();
7310 RandomNumberGenerator RNG(Ctx->getFlags().getRandomSeed(), 7310 RandomNumberGenerator RNG(Ctx->getFlags().getRandomSeed(),
7311 RPE_PooledConstantReordering, K); 7311 RPE_PooledConstantReordering, K);
7312 RandomShuffle(Pool.begin(), Pool.end(), 7312 RandomShuffle(Pool.begin(), Pool.end(),
7313 [&RNG](uint64_t N) { return (uint32_t)RNG.next(N); }); 7313 [&RNG](uint64_t N) { return (uint32_t)RNG.next(N); });
7314 } 7314 }
7315 7315
7316 for (Constant *C : Pool) { 7316 for (Constant *C : Pool) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
7413 emitGlobal(*Var, SectionSuffix); 7413 emitGlobal(*Var, SectionSuffix);
7414 } 7414 }
7415 } 7415 }
7416 } break; 7416 } break;
7417 } 7417 }
7418 } 7418 }
7419 } // end of namespace X86NAMESPACE 7419 } // end of namespace X86NAMESPACE
7420 } // end of namespace Ice 7420 } // end of namespace Ice
7421 7421
7422 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H 7422 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringMIPS32.cpp ('k') | src/IceTypeConverter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698