Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/ir/ComputeLinearScanOrder.java @ 2652:6d19b4f476db
Removed more OSR handling stuff.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 11 May 2011 14:51:33 +0200 |
parents | 4a36a0bd6d18 |
children | 7c8ad40c1f88 |
comparison
equal
deleted
inserted
replaced
2651:f9ae687657e8 | 2652:6d19b4f476db |
---|---|
508 linearScanOrder = new ArrayList<BlockBegin>(numBlocks); | 508 linearScanOrder = new ArrayList<BlockBegin>(numBlocks); |
509 appendBlock(startBlock); | 509 appendBlock(startBlock); |
510 | 510 |
511 assert startBlock.end() instanceof Base : "start block must end with Base-instruction"; | 511 assert startBlock.end() instanceof Base : "start block must end with Base-instruction"; |
512 BlockBegin stdEntry = ((Base) startBlock.end()).standardEntry(); | 512 BlockBegin stdEntry = ((Base) startBlock.end()).standardEntry(); |
513 BlockBegin osrEntry = ((Base) startBlock.end()).osrEntry(); | 513 |
514 | |
515 BlockBegin suxOfOsrEntry = null; | |
516 if (osrEntry != null) { | |
517 // special handling for osr entry: | |
518 // ignore the edge between the osr entry and its successor for processing | |
519 // the osr entry block is added manually below | |
520 assert osrEntry.numberOfSux() == 1 : "osr entry must have exactly one successor"; | |
521 assert osrEntry.suxAt(0).numberOfPreds() >= 2 : "sucessor of osr entry must have two predecessors (otherwise it is not present in normal control flow)"; | |
522 | |
523 suxOfOsrEntry = osrEntry.suxAt(0); | |
524 decForwardBranches(suxOfOsrEntry); | |
525 | |
526 computeDominator(osrEntry, startBlock); | |
527 iterativeDominators = true; | |
528 } | |
529 computeDominator(stdEntry, startBlock); | 514 computeDominator(stdEntry, startBlock); |
530 | 515 |
531 // start processing with standard entry block | 516 // start processing with standard entry block |
532 assert workList.isEmpty() : "list must be empty before processing"; | 517 assert workList.isEmpty() : "list must be empty before processing"; |
533 | 518 |
537 throw new CiBailout("the stdEntry must be ready for processing (otherwise, the method has no start block)"); | 522 throw new CiBailout("the stdEntry must be ready for processing (otherwise, the method has no start block)"); |
538 } | 523 } |
539 | 524 |
540 do { | 525 do { |
541 BlockBegin cur = workList.remove(workList.size() - 1); | 526 BlockBegin cur = workList.remove(workList.size() - 1); |
542 | |
543 if (cur == suxOfOsrEntry) { | |
544 // the osr entry block is ignored in normal processing : it is never added to the | |
545 // work list. Instead : it is added as late as possible manually here. | |
546 appendBlock(osrEntry); | |
547 computeDominator(cur, osrEntry); | |
548 } | |
549 appendBlock(cur); | 527 appendBlock(cur); |
550 | 528 |
551 int i; | 529 int i; |
552 int numSux = cur.numberOfSux(); | 530 int numSux = cur.numberOfSux(); |
553 // changed loop order to get "intuitive" order of if- and else-blocks | 531 // changed loop order to get "intuitive" order of if- and else-blocks |