comparison graal/GraalCompiler/src/com/sun/c1x/observer/CompilationEvent.java @ 2809:b003ea36fa12

Add block structure to ideal graph visualizer
author Gilles Duboscq <gilles.duboscq@oracle.com>
date Mon, 30 May 2011 14:55:09 +0200
parents bda5972a40a5
children
comparison
equal deleted inserted replaced
2808:189ffb7d1d84 2809:b003ea36fa12
22 */ 22 */
23 package com.sun.c1x.observer; 23 package com.sun.c1x.observer;
24 24
25 import java.util.*; 25 import java.util.*;
26 26
27 import com.oracle.graal.graph.*;
27 import com.sun.c1x.*; 28 import com.sun.c1x.*;
28 import com.sun.c1x.alloc.*; 29 import com.sun.c1x.alloc.*;
29 import com.sun.c1x.graph.*; 30 import com.sun.c1x.graph.*;
30 import com.sun.c1x.ir.*;
31 import com.sun.cri.ci.*; 31 import com.sun.cri.ci.*;
32 import com.sun.cri.ri.*; 32 import com.sun.cri.ri.*;
33 33
34 /** 34 /**
35 * An event that occurred during compilation. Instances of this class provide information about the event and the state 35 * An event that occurred during compilation. Instances of this class provide information about the event and the state
41 */ 41 */
42 public class CompilationEvent { 42 public class CompilationEvent {
43 43
44 private final C1XCompilation compilation; 44 private final C1XCompilation compilation;
45 private final String label; 45 private final String label;
46 private Instruction startBlock; 46 private Graph graph;
47 47
48 private BlockMap blockMap; 48 private BlockMap blockMap;
49 private int codeSize = -1; 49 private int codeSize = -1;
50 50
51 private LinearScan allocator; 51 private LinearScan allocator;
65 assert compilation != null; 65 assert compilation != null;
66 this.label = label; 66 this.label = label;
67 this.compilation = compilation; 67 this.compilation = compilation;
68 } 68 }
69 69
70 public CompilationEvent(C1XCompilation compilation, String label, Instruction startBlock, boolean hirValid, boolean lirValid) { 70 public CompilationEvent(C1XCompilation compilation, String label, Graph graph, boolean hirValid, boolean lirValid) {
71 this(compilation, label); 71 this(compilation, label);
72 this.startBlock = startBlock; 72 this.graph = graph;
73 this.hirValid = hirValid; 73 this.hirValid = hirValid;
74 this.lirValid = lirValid; 74 this.lirValid = lirValid;
75 } 75 }
76 76
77 public CompilationEvent(C1XCompilation compilation, String label, Instruction startBlock, boolean hirValid, boolean lirValid, CiTargetMethod targetMethod) { 77 public CompilationEvent(C1XCompilation compilation, String label, Graph graph, boolean hirValid, boolean lirValid, CiTargetMethod targetMethod) {
78 this(compilation, label, startBlock, hirValid, lirValid); 78 this(compilation, label, graph, hirValid, lirValid);
79 this.targetMethod = targetMethod; 79 this.targetMethod = targetMethod;
80 } 80 }
81 81
82 public CompilationEvent(C1XCompilation compilation, String label, BlockMap blockMap, int codeSize) { 82 public CompilationEvent(C1XCompilation compilation, String label, BlockMap blockMap, int codeSize) {
83 this(compilation, label); 83 this(compilation, label);
106 106
107 public BlockMap getBlockMap() { 107 public BlockMap getBlockMap() {
108 return blockMap; 108 return blockMap;
109 } 109 }
110 110
111 public Instruction getStartBlock() { 111 public Graph getGraph() {
112 return startBlock; 112 return graph;
113 } 113 }
114 114
115 public LinearScan getAllocator() { 115 public LinearScan getAllocator() {
116 return allocator; 116 return allocator;
117 } 117 }