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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 23717039: Tweak the Better{Left,Right}Operand() heuristic Base URL: git://github.com/v8/v8.git@master
Patch Set: Tune Better{Left,Right}Operand() heuristic Created 7 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
« src/hydrogen-instructions.h ('K') | « src/hydrogen-instructions.h ('k') | 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 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 4012 matching lines...) Expand 10 before | Expand all | Expand 10 after
4023 if (!use_rep.IsNone() && 4023 if (!use_rep.IsNone() &&
4024 !use_rep.IsSmi() && 4024 !use_rep.IsSmi() &&
4025 !use_rep.IsTagged()) { 4025 !use_rep.IsTagged()) {
4026 return true; 4026 return true;
4027 } 4027 }
4028 } 4028 }
4029 return false; 4029 return false;
4030 } 4030 }
4031 4031
4032 4032
4033 bool HValue::UsedBy(HValue* value) {
4034 for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
4035 if (it.value() == value) return true;
4036 }
4037 return false;
4038 }
4039
4040
4033 // Node-specific verification code is only included in debug mode. 4041 // Node-specific verification code is only included in debug mode.
4034 #ifdef DEBUG 4042 #ifdef DEBUG
4035 4043
4036 void HPhi::Verify() { 4044 void HPhi::Verify() {
4037 ASSERT(OperandCount() == block()->predecessors()->length()); 4045 ASSERT(OperandCount() == block()->predecessors()->length());
4038 for (int i = 0; i < OperandCount(); ++i) { 4046 for (int i = 0; i < OperandCount(); ++i) {
4039 HValue* value = OperandAt(i); 4047 HValue* value = OperandAt(i);
4040 HBasicBlock* defining_block = value->block(); 4048 HBasicBlock* defining_block = value->block();
4041 HBasicBlock* predecessor_block = block()->predecessors()->at(i); 4049 HBasicBlock* predecessor_block = block()->predecessors()->at(i);
4042 ASSERT(defining_block == predecessor_block || 4050 ASSERT(defining_block == predecessor_block ||
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
4229 break; 4237 break;
4230 case kExternalMemory: 4238 case kExternalMemory:
4231 stream->Add("[external-memory]"); 4239 stream->Add("[external-memory]");
4232 break; 4240 break;
4233 } 4241 }
4234 4242
4235 stream->Add("@%d", offset()); 4243 stream->Add("@%d", offset());
4236 } 4244 }
4237 4245
4238 } } // namespace v8::internal 4246 } } // namespace v8::internal
OLDNEW
« src/hydrogen-instructions.h ('K') | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698