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

Side by Side Diff: src/IceOperand.cpp

Issue 2116213002: Subzero: Allow deeper levels of variable splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 5 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/IceTargetLowering.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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 if (Func->isVerbose(IceV_RegOrigins)) 547 if (Func->isVerbose(IceV_RegOrigins))
548 Str << ":"; 548 Str << ":";
549 Str << Func->getTarget()->getRegName(RegNum, getType()); 549 Str << Func->getTarget()->getRegName(RegNum, getType());
550 } else if (Func->getTarget()->hasComputedFrame()) { 550 } else if (Func->getTarget()->hasComputedFrame()) {
551 if (Func->isVerbose(IceV_RegOrigins)) 551 if (Func->isVerbose(IceV_RegOrigins))
552 Str << ":"; 552 Str << ":";
553 const auto BaseRegisterNumber = 553 const auto BaseRegisterNumber =
554 hasReg() ? getBaseRegNum() : Func->getTarget()->getFrameOrStackReg(); 554 hasReg() ? getBaseRegNum() : Func->getTarget()->getFrameOrStackReg();
555 Str << "[" 555 Str << "["
556 << Func->getTarget()->getRegName(BaseRegisterNumber, IceType_i32); 556 << Func->getTarget()->getRegName(BaseRegisterNumber, IceType_i32);
557 int32_t Offset = getStackOffset(); 557 if (hasStackOffset()) {
558 if (Offset) { 558 int32_t Offset = getStackOffset();
559 if (Offset > 0) 559 if (Offset) {
560 Str << "+"; 560 if (Offset > 0)
561 Str << Offset; 561 Str << "+";
562 Str << Offset;
563 }
562 } 564 }
563 Str << "]"; 565 Str << "]";
564 } 566 }
565 } 567 }
566 568
567 template <> void ConstantInteger32::emit(TargetLowering *Target) const { 569 template <> void ConstantInteger32::emit(TargetLowering *Target) const {
568 Target->emit(this); 570 Target->emit(this);
569 } 571 }
570 572
571 template <> void ConstantInteger64::emit(TargetLowering *Target) const { 573 template <> void ConstantInteger64::emit(TargetLowering *Target) const {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 if (getType() != IceType_i32 && getType() != IceType_i16 && 649 if (getType() != IceType_i32 && getType() != IceType_i16 &&
648 getType() != IceType_i8) 650 getType() != IceType_i8)
649 return false; 651 return false;
650 // The Following checks if the signed representation of Value is between 652 // The Following checks if the signed representation of Value is between
651 // -Threshold/2 and +Threshold/2 653 // -Threshold/2 and +Threshold/2
652 bool largerThanThreshold = Threshold / 2 + Value >= Threshold; 654 bool largerThanThreshold = Threshold / 2 + Value >= Threshold;
653 return largerThanThreshold; 655 return largerThanThreshold;
654 } 656 }
655 657
656 } // end of namespace Ice 658 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698