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

Side by Side Diff: src/arm/lithium-arm.cc

Issue 6132002: Crankshaft: Move LParallelMove to lithium.h, add LGap to lithium-x64.h. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 void LLabel::PrintDataTo(StringStream* stream) const { 87 void LLabel::PrintDataTo(StringStream* stream) const {
88 LGap::PrintDataTo(stream); 88 LGap::PrintDataTo(stream);
89 LLabel* rep = replacement(); 89 LLabel* rep = replacement();
90 if (rep != NULL) { 90 if (rep != NULL) {
91 stream->Add(" Dead block replaced with B%d", rep->block_id()); 91 stream->Add(" Dead block replaced with B%d", rep->block_id());
92 } 92 }
93 } 93 }
94 94
95 95
96 bool LParallelMove::IsRedundant() const {
97 for (int i = 0; i < move_operands_.length(); ++i) {
98 if (!move_operands_[i].IsRedundant()) return false;
99 }
100 return true;
101 }
102
103
104 void LParallelMove::PrintDataTo(StringStream* stream) const {
105 for (int i = move_operands_.length() - 1; i >= 0; --i) {
106 if (!move_operands_[i].IsEliminated()) {
107 LOperand* from = move_operands_[i].from();
108 LOperand* to = move_operands_[i].to();
109 if (from->Equals(to)) {
110 to->PrintTo(stream);
111 } else {
112 to->PrintTo(stream);
113 stream->Add(" = ");
114 from->PrintTo(stream);
115 }
116 stream->Add("; ");
117 }
118 }
119 }
120
121
122 bool LGap::IsRedundant() const { 96 bool LGap::IsRedundant() const {
123 for (int i = 0; i < 4; i++) { 97 for (int i = 0; i < 4; i++) {
124 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) { 98 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) {
125 return false; 99 return false;
126 } 100 }
127 } 101 }
128 102
129 return true; 103 return true;
130 } 104 }
131 105
(...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 void LPointerMap::PrintTo(StringStream* stream) const { 1929 void LPointerMap::PrintTo(StringStream* stream) const {
1956 stream->Add("{"); 1930 stream->Add("{");
1957 for (int i = 0; i < pointer_operands_.length(); ++i) { 1931 for (int i = 0; i < pointer_operands_.length(); ++i) {
1958 if (i != 0) stream->Add(";"); 1932 if (i != 0) stream->Add(";");
1959 pointer_operands_[i]->PrintTo(stream); 1933 pointer_operands_[i]->PrintTo(stream);
1960 } 1934 }
1961 stream->Add("} @%d", position()); 1935 stream->Add("} @%d", position());
1962 } 1936 }
1963 1937
1964 } } // namespace v8::internal 1938 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698