OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |