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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2092413002: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "src/crankshaft/s390/lithium-codegen-s390.h" // NOLINT 61 #include "src/crankshaft/s390/lithium-codegen-s390.h" // NOLINT
62 #elif V8_TARGET_ARCH_X87 62 #elif V8_TARGET_ARCH_X87
63 #include "src/crankshaft/x87/lithium-codegen-x87.h" // NOLINT 63 #include "src/crankshaft/x87/lithium-codegen-x87.h" // NOLINT
64 #else 64 #else
65 #error Unsupported target architecture. 65 #error Unsupported target architecture.
66 #endif 66 #endif
67 67
68 namespace v8 { 68 namespace v8 {
69 namespace internal { 69 namespace internal {
70 70
71 const auto GetRegConfig = RegisterConfiguration::Crankshaft;
72
71 class HOptimizedGraphBuilderWithPositions : public HOptimizedGraphBuilder { 73 class HOptimizedGraphBuilderWithPositions : public HOptimizedGraphBuilder {
72 public: 74 public:
73 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) 75 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
74 : HOptimizedGraphBuilder(info) {} 76 : HOptimizedGraphBuilder(info) {}
75 77
76 #define DEF_VISIT(type) \ 78 #define DEF_VISIT(type) \
77 void Visit##type(type* node) override { \ 79 void Visit##type(type* node) override { \
78 SourcePosition old_position = SourcePosition::Unknown(); \ 80 SourcePosition old_position = SourcePosition::Unknown(); \
79 if (node->position() != RelocInfo::kNoPosition) { \ 81 if (node->position() != RelocInfo::kNoPosition) { \
80 old_position = source_position(); \ 82 old_position = source_position(); \
(...skipping 13464 matching lines...) Expand 10 before | Expand all | Expand 10 after
13545 void HTracer::TraceLiveRange(LiveRange* range, const char* type, 13547 void HTracer::TraceLiveRange(LiveRange* range, const char* type,
13546 Zone* zone) { 13548 Zone* zone) {
13547 if (range != NULL && !range->IsEmpty()) { 13549 if (range != NULL && !range->IsEmpty()) {
13548 PrintIndent(); 13550 PrintIndent();
13549 trace_.Add("%d %s", range->id(), type); 13551 trace_.Add("%d %s", range->id(), type);
13550 if (range->HasRegisterAssigned()) { 13552 if (range->HasRegisterAssigned()) {
13551 LOperand* op = range->CreateAssignedOperand(zone); 13553 LOperand* op = range->CreateAssignedOperand(zone);
13552 int assigned_reg = op->index(); 13554 int assigned_reg = op->index();
13553 if (op->IsDoubleRegister()) { 13555 if (op->IsDoubleRegister()) {
13554 trace_.Add(" \"%s\"", 13556 trace_.Add(" \"%s\"",
13555 DoubleRegister::from_code(assigned_reg).ToString()); 13557 GetRegConfig()->GetDoubleRegisterName(assigned_reg));
13556 } else { 13558 } else {
13557 DCHECK(op->IsRegister()); 13559 DCHECK(op->IsRegister());
13558 trace_.Add(" \"%s\"", Register::from_code(assigned_reg).ToString()); 13560 trace_.Add(" \"%s\"",
13561 GetRegConfig()->GetGeneralRegisterName(assigned_reg));
13559 } 13562 }
13560 } else if (range->IsSpilled()) { 13563 } else if (range->IsSpilled()) {
13561 LOperand* op = range->TopLevel()->GetSpillOperand(); 13564 LOperand* op = range->TopLevel()->GetSpillOperand();
13562 if (op->IsDoubleStackSlot()) { 13565 if (op->IsDoubleStackSlot()) {
13563 trace_.Add(" \"double_stack:%d\"", op->index()); 13566 trace_.Add(" \"double_stack:%d\"", op->index());
13564 } else { 13567 } else {
13565 DCHECK(op->IsStackSlot()); 13568 DCHECK(op->IsStackSlot());
13566 trace_.Add(" \"stack:%d\"", op->index()); 13569 trace_.Add(" \"stack:%d\"", op->index());
13567 } 13570 }
13568 } 13571 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
13688 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13691 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13689 } 13692 }
13690 13693
13691 #ifdef DEBUG 13694 #ifdef DEBUG
13692 graph_->Verify(false); // No full verify. 13695 graph_->Verify(false); // No full verify.
13693 #endif 13696 #endif
13694 } 13697 }
13695 13698
13696 } // namespace internal 13699 } // namespace internal
13697 } // namespace v8 13700 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-gap-resolver-arm64.h ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698