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

Side by Side Diff: src/hydrogen.cc

Issue 11941013: Don't insert HDummyUses for control instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « 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 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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 // Insert an HDummyUse for each operand, unless the operand 1296 // Insert an HDummyUse for each operand, unless the operand
1297 // is an HDummyUse itself. If it's even from the same block, 1297 // is an HDummyUse itself. If it's even from the same block,
1298 // remember it as a potential replacement for the instruction. 1298 // remember it as a potential replacement for the instruction.
1299 if (operand->IsDummyUse()) { 1299 if (operand->IsDummyUse()) {
1300 if (operand->block() == instr->block() && 1300 if (operand->block() == instr->block() &&
1301 last_dummy == NULL) { 1301 last_dummy == NULL) {
1302 last_dummy = HInstruction::cast(operand); 1302 last_dummy = HInstruction::cast(operand);
1303 } 1303 }
1304 continue; 1304 continue;
1305 } 1305 }
1306 if (operand->IsControlInstruction()) {
1307 // Inserting a dummy use for a value that's not defined anywhere
1308 // will fail. Some instructions define fake inputs on such
1309 // values as control flow dependencies.
1310 continue;
1311 }
1306 HDummyUse* dummy = new(zone()) HDummyUse(operand); 1312 HDummyUse* dummy = new(zone()) HDummyUse(operand);
1307 dummy->InsertBefore(instr); 1313 dummy->InsertBefore(instr);
1308 last_dummy = dummy; 1314 last_dummy = dummy;
1309 } 1315 }
1310 if (last_dummy == NULL) last_dummy = GetConstant1(); 1316 if (last_dummy == NULL) last_dummy = GetConstant1();
1311 instr->DeleteAndReplaceWith(last_dummy); 1317 instr->DeleteAndReplaceWith(last_dummy);
1312 continue; 1318 continue;
1313 } 1319 }
1314 if (instr->IsSoftDeoptimize()) { 1320 if (instr->IsSoftDeoptimize()) {
1315 ASSERT(block->IsDeoptimizing()); 1321 ASSERT(block->IsDeoptimizing());
(...skipping 8964 matching lines...) Expand 10 before | Expand all | Expand 10 after
10280 } 10286 }
10281 } 10287 }
10282 10288
10283 #ifdef DEBUG 10289 #ifdef DEBUG
10284 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10290 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10285 if (allocator_ != NULL) allocator_->Verify(); 10291 if (allocator_ != NULL) allocator_->Verify();
10286 #endif 10292 #endif
10287 } 10293 }
10288 10294
10289 } } // namespace v8::internal 10295 } } // namespace v8::internal
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