equal
deleted
inserted
replaced
1322 |
1322 |
1323 |
1323 |
1324 void GraphBuilder::table_switch() { |
1324 void GraphBuilder::table_switch() { |
1325 Bytecode_tableswitch sw(stream()); |
1325 Bytecode_tableswitch sw(stream()); |
1326 const int l = sw.length(); |
1326 const int l = sw.length(); |
1327 if (CanonicalizeNodes && l == 1) { |
1327 if (CanonicalizeNodes && l == 1 && compilation()->env()->comp_level() != CompLevel_full_profile) { |
1328 // total of 2 successors => use If instead of switch |
1328 // total of 2 successors => use If instead of switch |
1329 // Note: This code should go into the canonicalizer as soon as it can |
1329 // Note: This code should go into the canonicalizer as soon as it can |
1330 // can handle canonicalized forms that contain more than one node. |
1330 // can handle canonicalized forms that contain more than one node. |
1331 Value key = append(new Constant(new IntConstant(sw.low_key()))); |
1331 Value key = append(new Constant(new IntConstant(sw.low_key()))); |
1332 BlockBegin* tsux = block_at(bci() + sw.dest_offset_at(0)); |
1332 BlockBegin* tsux = block_at(bci() + sw.dest_offset_at(0)); |
1366 |
1366 |
1367 |
1367 |
1368 void GraphBuilder::lookup_switch() { |
1368 void GraphBuilder::lookup_switch() { |
1369 Bytecode_lookupswitch sw(stream()); |
1369 Bytecode_lookupswitch sw(stream()); |
1370 const int l = sw.number_of_pairs(); |
1370 const int l = sw.number_of_pairs(); |
1371 if (CanonicalizeNodes && l == 1) { |
1371 if (CanonicalizeNodes && l == 1 && compilation()->env()->comp_level() != CompLevel_full_profile) { |
1372 // total of 2 successors => use If instead of switch |
1372 // total of 2 successors => use If instead of switch |
1373 // Note: This code should go into the canonicalizer as soon as it can |
1373 // Note: This code should go into the canonicalizer as soon as it can |
1374 // can handle canonicalized forms that contain more than one node. |
1374 // can handle canonicalized forms that contain more than one node. |
1375 // simplify to If |
1375 // simplify to If |
1376 LookupswitchPair pair = sw.pair_at(0); |
1376 LookupswitchPair pair = sw.pair_at(0); |