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

Side by Side Diff: src/compiler/instruction-selector-impl.h

Issue 2475433005: [turbofan] Refactor the compare-zero folding in instruction selector. (Closed)
Patch Set: Make mips64 happy Created 4 years, 1 month 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 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/compiler/instruction-selector.h" 9 #include "src/compiler/instruction-selector.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 381
382 void Commute() { 382 void Commute() {
383 DCHECK(!IsNone()); 383 DCHECK(!IsNone());
384 condition_ = CommuteFlagsCondition(condition_); 384 condition_ = CommuteFlagsCondition(condition_);
385 } 385 }
386 386
387 void Overwrite(FlagsCondition condition) { condition_ = condition; } 387 void Overwrite(FlagsCondition condition) { condition_ = condition; }
388 388
389 void OverwriteAndNegateIfEqual(FlagsCondition condition) { 389 void OverwriteAndNegateIfEqual(FlagsCondition condition) {
390 DCHECK(condition_ == kEqual || condition_ == kNotEqual);
390 bool negate = condition_ == kEqual; 391 bool negate = condition_ == kEqual;
391 condition_ = condition; 392 condition_ = condition;
392 if (negate) Negate(); 393 if (negate) Negate();
393 } 394 }
394 395
395 void OverwriteUnsignedIfSigned() { 396 void OverwriteUnsignedIfSigned() {
396 switch (condition_) { 397 switch (condition_) {
397 case kSignedLessThan: 398 case kSignedLessThan:
398 condition_ = kUnsignedLessThan; 399 condition_ = kUnsignedLessThan;
399 break; 400 break;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // or mode_ == kFlags_set. 444 // or mode_ == kFlags_set.
444 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. 445 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch.
445 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch. 446 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch.
446 }; 447 };
447 448
448 } // namespace compiler 449 } // namespace compiler
449 } // namespace internal 450 } // namespace internal
450 } // namespace v8 451 } // namespace v8
451 452
452 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 453 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/mips/instruction-selector-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698