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

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

Issue 7524025: Optimization: Do not assign an environment to LBranch when are sure that we will never deopt later. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 4 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 | « 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 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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 HValue* v = instr->value(); 1035 HValue* v = instr->value();
1036 if (v->EmitAtUses()) { 1036 if (v->EmitAtUses()) {
1037 ASSERT(v->IsConstant()); 1037 ASSERT(v->IsConstant());
1038 ASSERT(!v->representation().IsDouble()); 1038 ASSERT(!v->representation().IsDouble());
1039 HBasicBlock* successor = HConstant::cast(v)->ToBoolean() 1039 HBasicBlock* successor = HConstant::cast(v)->ToBoolean()
1040 ? instr->FirstSuccessor() 1040 ? instr->FirstSuccessor()
1041 : instr->SecondSuccessor(); 1041 : instr->SecondSuccessor();
1042 return new LGoto(successor->block_id()); 1042 return new LGoto(successor->block_id());
1043 } 1043 }
1044 ToBooleanStub::Types expected = instr->expected_input_types(); 1044 ToBooleanStub::Types expected = instr->expected_input_types();
1045 // We need a temporary register when we have to access the map *or* we have
1046 // no type info yet, in which case we handle all cases (including the ones
1047 // involving maps).
1045 bool needs_temp = expected.NeedsMap() || expected.IsEmpty(); 1048 bool needs_temp = expected.NeedsMap() || expected.IsEmpty();
1046 LOperand* temp = needs_temp ? TempRegister() : NULL; 1049 LOperand* temp = needs_temp ? TempRegister() : NULL;
1047 return AssignEnvironment(new LBranch(UseRegister(v), temp)); 1050 LInstruction* branch = new LBranch(UseRegister(v), temp);
1051 // When we handle all cases, we never deopt, so we don't need to assign the
1052 // environment then.
1053 return expected.IsAll() ? branch : AssignEnvironment(branch);
1048 } 1054 }
1049 1055
1050 1056
1051 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { 1057 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
1052 ASSERT(instr->value()->representation().IsTagged()); 1058 ASSERT(instr->value()->representation().IsTagged());
1053 LOperand* value = UseRegisterAtStart(instr->value()); 1059 LOperand* value = UseRegisterAtStart(instr->value());
1054 return new LCmpMapAndBranch(value); 1060 return new LCmpMapAndBranch(value);
1055 } 1061 }
1056 1062
1057 1063
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2259 LOperand* key = UseOrConstantAtStart(instr->key()); 2265 LOperand* key = UseOrConstantAtStart(instr->key());
2260 LOperand* object = UseOrConstantAtStart(instr->object()); 2266 LOperand* object = UseOrConstantAtStart(instr->object());
2261 LIn* result = new LIn(context, key, object); 2267 LIn* result = new LIn(context, key, object);
2262 return MarkAsCall(DefineFixed(result, eax), instr); 2268 return MarkAsCall(DefineFixed(result, eax), instr);
2263 } 2269 }
2264 2270
2265 2271
2266 } } // namespace v8::internal 2272 } } // namespace v8::internal
2267 2273
2268 #endif // V8_TARGET_ARCH_IA32 2274 #endif // V8_TARGET_ARCH_IA32
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