comparison graal/GraalCompiler/src/com/sun/c1x/graph/BlockUtil.java @ 2707:7ed72769d51a

exception handling related changes: * changed blockPredecessors to list of Instructions, instead of Blocks * removed explicit predecessor management in BlockBegin, now using predecessors from Graph structure * replaced generated LIR exception entries with exception dispatch chains in IR * added Unwind and ExceptionDispatch instructions * removed ExceptionEntry flag in BlockBegin and all code depending on it * removed exceptionHandler list from Instruction, replaced by exception Edge on Invoke and Throw * replaced list of ExceptionHandlers with single exception edge in debug info misc: * changed GraphvizPrinter layout (smaller ports on large nodes) * removed defunct run config
author Lukas Stadler <lukas.stadler@jku.at>
date Wed, 18 May 2011 18:09:20 +0200
parents 6ab73784566a
children
comparison
equal deleted inserted replaced
2677:0ea5f12e873a 2707:7ed72769d51a
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 */ 22 */
23 package com.sun.c1x.graph; 23 package com.sun.c1x.graph;
24 24
25 import java.util.*;
26
25 import com.sun.c1x.ir.*; 27 import com.sun.c1x.ir.*;
26 28
27 /** 29 /**
28 * The {@code BlockUtil} class contains a number of utilities for manipulating a CFG of basic blocks. 30 * The {@code BlockUtil} class contains a number of utilities for manipulating a CFG of basic blocks.
29 *
30 * @author Ben L. Titzer
31 */ 31 */
32 public class BlockUtil { 32 public class BlockUtil {
33 33
34 /** 34 /**
35 * Disconnects the specified block from all other blocks. 35 * Disconnects the specified block from all other blocks.
36 * @param block the block to remove from the graph 36 * @param block the block to remove from the graph
37 */ 37 */
38 public static void disconnectFromGraph(BlockBegin block) { 38 public static void disconnectFromGraph(BlockBegin block) {
39 for (BlockEnd p : block.blockPredecessors()) { 39 ArrayList<Instruction> preds = new ArrayList<Instruction>(block.blockPredecessors());
40 p.blockSuccessors().remove(block); 40 for (Instruction p : preds) {
41 p.block().end().blockSuccessors().remove(block);
41 } 42 }
42 for (BlockBegin s : block.end().blockSuccessors()) { 43 block.end().clearSuccessors();
43 s.blockPredecessors().remove(block);
44 }
45 } 44 }
46 } 45 }