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

Side by Side Diff: src/x64/lithium-x64.h

Issue 14856015: Bias commutative single-use register inputs and support lea adds (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 7 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/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 class LAddI: public LTemplateInstruction<1, 2, 0> { 1338 class LAddI: public LTemplateInstruction<1, 2, 0> {
1339 public: 1339 public:
1340 LAddI(LOperand* left, LOperand* right) { 1340 LAddI(LOperand* left, LOperand* right) {
1341 inputs_[0] = left; 1341 inputs_[0] = left;
1342 inputs_[1] = right; 1342 inputs_[1] = right;
1343 } 1343 }
1344 1344
1345 LOperand* left() { return inputs_[0]; } 1345 LOperand* left() { return inputs_[0]; }
1346 LOperand* right() { return inputs_[1]; } 1346 LOperand* right() { return inputs_[1]; }
1347 1347
1348 static bool UseLea(HAdd* add) {
1349 return !add->CheckFlag(HValue::kCanOverflow) &&
1350 add->BetterLeftOperand()->UseCount() > 1;
1351 }
1352
1348 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") 1353 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i")
1349 DECLARE_HYDROGEN_ACCESSOR(Add) 1354 DECLARE_HYDROGEN_ACCESSOR(Add)
1350 }; 1355 };
1351 1356
1352 1357
1353 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { 1358 class LMathMinMax: public LTemplateInstruction<1, 2, 0> {
1354 public: 1359 public:
1355 LMathMinMax(LOperand* left, LOperand* right) { 1360 LMathMinMax(LOperand* left, LOperand* right) {
1356 inputs_[0] = left; 1361 inputs_[0] = left;
1357 inputs_[1] = right; 1362 inputs_[1] = right;
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 2746
2742 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2747 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2743 }; 2748 };
2744 2749
2745 #undef DECLARE_HYDROGEN_ACCESSOR 2750 #undef DECLARE_HYDROGEN_ACCESSOR
2746 #undef DECLARE_CONCRETE_INSTRUCTION 2751 #undef DECLARE_CONCRETE_INSTRUCTION
2747 2752
2748 } } // namespace v8::int 2753 } } // namespace v8::int
2749 2754
2750 #endif // V8_X64_LITHIUM_X64_H_ 2755 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698