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

Side by Side Diff: src/IceOperand.cpp

Issue 1848303003: Simplify references to command line flags. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 8 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/IceOperand.h ('k') | src/IceRegAlloc.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/IceOperand.cpp - High-level operand implementation -----===// 1 //===- subzero/src/IceOperand.cpp - High-level operand implementation -----===//
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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 Str << "Inf"; 636 Str << "Inf";
637 else 637 else
638 Str << W.getWeight(); 638 Str << W.getWeight();
639 return Str; 639 return Str;
640 } 640 }
641 641
642 // =========== Immediate Randomization and Pooling routines ============== 642 // =========== Immediate Randomization and Pooling routines ==============
643 // Specialization of the template member function for ConstantInteger32 643 // Specialization of the template member function for ConstantInteger32
644 // TODO(stichnot): try to move this specialization into a target-specific file. 644 // TODO(stichnot): try to move this specialization into a target-specific file.
645 template <> bool ConstantInteger32::shouldBeRandomizedOrPooled() const { 645 template <> bool ConstantInteger32::shouldBeRandomizedOrPooled() const {
646 uint32_t Threshold = 646 uint32_t Threshold = getFlags().getRandomizeAndPoolImmediatesThreshold();
647 GlobalContext::getFlags().getRandomizeAndPoolImmediatesThreshold(); 647 if (getFlags().getRandomizeAndPoolImmediatesOption() == RPI_None)
648 if (GlobalContext::getFlags().getRandomizeAndPoolImmediatesOption() ==
649 RPI_None)
650 return false; 648 return false;
651 if (getType() != IceType_i32 && getType() != IceType_i16 && 649 if (getType() != IceType_i32 && getType() != IceType_i16 &&
652 getType() != IceType_i8) 650 getType() != IceType_i8)
653 return false; 651 return false;
654 // The Following checks if the signed representation of Value is between 652 // The Following checks if the signed representation of Value is between
655 // -Threshold/2 and +Threshold/2 653 // -Threshold/2 and +Threshold/2
656 bool largerThanThreshold = Threshold / 2 + Value >= Threshold; 654 bool largerThanThreshold = Threshold / 2 + Value >= Threshold;
657 return largerThanThreshold; 655 return largerThanThreshold;
658 } 656 }
659 657
660 } // end of namespace Ice 658 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceOperand.h ('k') | src/IceRegAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698