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

Side by Side Diff: src/IceTargetLoweringMIPS32.cpp

Issue 1300993002: Use separate random number generator for each randomization pass (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 4 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
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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 600
601 void TargetMIPS32::lowerLoad(const InstLoad *Inst) { 601 void TargetMIPS32::lowerLoad(const InstLoad *Inst) {
602 (void)Inst; 602 (void)Inst;
603 UnimplementedError(Func->getContext()->getFlags()); 603 UnimplementedError(Func->getContext()->getFlags());
604 } 604 }
605 605
606 void TargetMIPS32::doAddressOptLoad() { 606 void TargetMIPS32::doAddressOptLoad() {
607 UnimplementedError(Func->getContext()->getFlags()); 607 UnimplementedError(Func->getContext()->getFlags());
608 } 608 }
609 609
610 void TargetMIPS32::randomlyInsertNop(float Probability) { 610 void TargetMIPS32::randomlyInsertNop(float Probability,
611 RandomNumberGeneratorWrapper RNG(Ctx->getRNG()); 611 RandomNumberGenerator &RNG) {
612 if (RNG.getTrueWithProbability(Probability)) { 612 RandomNumberGeneratorWrapper RNGW(RNG);
613 if (RNGW.getTrueWithProbability(Probability)) {
613 UnimplementedError(Func->getContext()->getFlags()); 614 UnimplementedError(Func->getContext()->getFlags());
614 } 615 }
615 } 616 }
616 617
617 void TargetMIPS32::lowerPhi(const InstPhi * /*Inst*/) { 618 void TargetMIPS32::lowerPhi(const InstPhi * /*Inst*/) {
618 Func->setError("Phi found in regular instruction list"); 619 Func->setError("Phi found in regular instruction list");
619 } 620 }
620 621
621 void TargetMIPS32::lowerRet(const InstRet *Inst) { 622 void TargetMIPS32::lowerRet(const InstRet *Inst) {
622 Variable *Reg = nullptr; 623 Variable *Reg = nullptr;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 void TargetMIPS32::postLower() { 660 void TargetMIPS32::postLower() {
660 if (Ctx->getFlags().getOptLevel() == Opt_m1) 661 if (Ctx->getFlags().getOptLevel() == Opt_m1)
661 return; 662 return;
662 // Find two-address non-SSA instructions where Dest==Src0, and set 663 // Find two-address non-SSA instructions where Dest==Src0, and set
663 // the DestNonKillable flag to keep liveness analysis consistent. 664 // the DestNonKillable flag to keep liveness analysis consistent.
664 UnimplementedError(Func->getContext()->getFlags()); 665 UnimplementedError(Func->getContext()->getFlags());
665 } 666 }
666 667
667 void TargetMIPS32::makeRandomRegisterPermutation( 668 void TargetMIPS32::makeRandomRegisterPermutation(
668 llvm::SmallVectorImpl<int32_t> &Permutation, 669 llvm::SmallVectorImpl<int32_t> &Permutation,
669 const llvm::SmallBitVector &ExcludeRegisters) const { 670 const llvm::SmallBitVector &ExcludeRegisters, uint64_t Salt) const {
670 (void)Permutation; 671 (void)Permutation;
671 (void)ExcludeRegisters; 672 (void)ExcludeRegisters;
673 (void)Salt;
672 UnimplementedError(Func->getContext()->getFlags()); 674 UnimplementedError(Func->getContext()->getFlags());
673 } 675 }
674 676
675 /* TODO(jvoung): avoid duplicate symbols with multiple targets. 677 /* TODO(jvoung): avoid duplicate symbols with multiple targets.
676 void ConstantUndef::emitWithoutDollar(GlobalContext *) const { 678 void ConstantUndef::emitWithoutDollar(GlobalContext *) const {
677 llvm_unreachable("Not expecting to emitWithoutDollar undef"); 679 llvm_unreachable("Not expecting to emitWithoutDollar undef");
678 } 680 }
679 681
680 void ConstantUndef::emit(GlobalContext *) const { 682 void ConstantUndef::emit(GlobalContext *) const {
681 llvm_unreachable("undef value encountered by emitter."); 683 llvm_unreachable("undef value encountered by emitter.");
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 void TargetDataMIPS32::lowerJumpTables() { 716 void TargetDataMIPS32::lowerJumpTables() {
715 if (Ctx->getFlags().getDisableTranslation()) 717 if (Ctx->getFlags().getDisableTranslation())
716 return; 718 return;
717 UnimplementedError(Ctx->getFlags()); 719 UnimplementedError(Ctx->getFlags());
718 } 720 }
719 721
720 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx) 722 TargetHeaderMIPS32::TargetHeaderMIPS32(GlobalContext *Ctx)
721 : TargetHeaderLowering(Ctx) {} 723 : TargetHeaderLowering(Ctx) {}
722 724
723 } // end of namespace Ice 725 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698