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

Side by Side Diff: src/compiler/instruction.h

Issue 2276323002: Treat all kArchNop instuctions as NOPs in jump threading. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_H_
6 #define V8_COMPILER_INSTRUCTION_H_ 6 #define V8_COMPILER_INSTRUCTION_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 DCHECK(!reference_map_); 849 DCHECK(!reference_map_);
850 reference_map_ = map; 850 reference_map_ = map;
851 } 851 }
852 852
853 void OverwriteWithNop() { 853 void OverwriteWithNop() {
854 opcode_ = ArchOpcodeField::encode(kArchNop); 854 opcode_ = ArchOpcodeField::encode(kArchNop);
855 bit_field_ = 0; 855 bit_field_ = 0;
856 reference_map_ = nullptr; 856 reference_map_ = nullptr;
857 } 857 }
858 858
859 bool IsNop() const { 859 bool IsNop() const { return arch_opcode() == kArchNop; }
860 return arch_opcode() == kArchNop && InputCount() == 0 &&
861 OutputCount() == 0 && TempCount() == 0;
862 }
863 860
864 bool IsDeoptimizeCall() const { 861 bool IsDeoptimizeCall() const {
865 return arch_opcode() == ArchOpcode::kArchDeoptimize || 862 return arch_opcode() == ArchOpcode::kArchDeoptimize ||
866 FlagsModeField::decode(opcode()) == kFlags_deoptimize; 863 FlagsModeField::decode(opcode()) == kFlags_deoptimize;
867 } 864 }
868 865
869 bool IsJump() const { return arch_opcode() == ArchOpcode::kArchJmp; } 866 bool IsJump() const { return arch_opcode() == ArchOpcode::kArchJmp; }
870 bool IsRet() const { return arch_opcode() == ArchOpcode::kArchRet; } 867 bool IsRet() const { return arch_opcode() == ArchOpcode::kArchRet; }
871 bool IsTailCall() const { 868 bool IsTailCall() const {
872 return arch_opcode() == ArchOpcode::kArchTailCallCodeObject || 869 return arch_opcode() == ArchOpcode::kArchTailCallCodeObject ||
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 1485
1489 1486
1490 std::ostream& operator<<(std::ostream& os, 1487 std::ostream& operator<<(std::ostream& os,
1491 const PrintableInstructionSequence& code); 1488 const PrintableInstructionSequence& code);
1492 1489
1493 } // namespace compiler 1490 } // namespace compiler
1494 } // namespace internal 1491 } // namespace internal
1495 } // namespace v8 1492 } // namespace v8
1496 1493
1497 #endif // V8_COMPILER_INSTRUCTION_H_ 1494 #endif // V8_COMPILER_INSTRUCTION_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698