Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/lir/LIRBlock.java @ 2801:2af109bec0c0
Make block contains a list of nodes instead a list of instructions.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Fri, 27 May 2011 15:11:34 +0200 |
parents | aeccd2af4e9e |
children | c3f64b66fc78 |
comparison
equal
deleted
inserted
replaced
2800:e3a0630a1dab | 2801:2af109bec0c0 |
---|---|
22 */ | 22 */ |
23 package com.sun.c1x.lir; | 23 package com.sun.c1x.lir; |
24 | 24 |
25 import java.util.*; | 25 import java.util.*; |
26 | 26 |
27 import com.oracle.graal.graph.*; | |
27 import com.oracle.max.asm.*; | 28 import com.oracle.max.asm.*; |
28 import com.sun.c1x.alloc.*; | 29 import com.sun.c1x.alloc.*; |
29 import com.sun.c1x.debug.*; | 30 import com.sun.c1x.debug.*; |
30 import com.sun.c1x.ir.*; | |
31 import com.sun.c1x.util.*; | 31 import com.sun.c1x.util.*; |
32 import com.sun.c1x.value.*; | 32 import com.sun.c1x.value.*; |
33 import com.sun.cri.ci.*; | 33 import com.sun.cri.ci.*; |
34 | 34 |
35 /** | 35 /** |
39 | 39 |
40 public final Label label = new Label(); | 40 public final Label label = new Label(); |
41 private LIRList lir; | 41 private LIRList lir; |
42 private final int blockID; | 42 private final int blockID; |
43 private FrameState lastState; | 43 private FrameState lastState; |
44 private List<Instruction> instructions = new ArrayList<Instruction>(4); | 44 private List<Node> instructions = new ArrayList<Node>(4); |
45 private List<LIRBlock> predecessors = new ArrayList<LIRBlock>(4); | 45 private List<LIRBlock> predecessors = new ArrayList<LIRBlock>(4); |
46 private List<LIRBlock> successors = new ArrayList<LIRBlock>(4); | 46 private List<LIRBlock> successors = new ArrayList<LIRBlock>(4); |
47 private List<LIRBlock> exceptionHandlerSuccessors = new ArrayList<LIRBlock>(4); | 47 private List<LIRBlock> exceptionHandlerSuccessors = new ArrayList<LIRBlock>(4); |
48 | 48 |
49 /** | 49 /** |
87 this.blockID = blockID; | 87 this.blockID = blockID; |
88 loopIndex = -1; | 88 loopIndex = -1; |
89 linearScanNumber = blockID; | 89 linearScanNumber = blockID; |
90 } | 90 } |
91 | 91 |
92 public List<Instruction> getInstructions() { | 92 public List<Node> getInstructions() { |
93 return instructions; | 93 return instructions; |
94 } | 94 } |
95 | 95 |
96 public int firstLirInstructionId() { | 96 public int firstLirInstructionId() { |
97 return firstLirInstructionID; | 97 return firstLirInstructionID; |
246 } | 246 } |
247 successors.clear(); | 247 successors.clear(); |
248 predecessors.clear(); | 248 predecessors.clear(); |
249 } | 249 } |
250 | 250 |
251 public void setInstructions(List<Instruction> list) { | 251 public void setInstructions(List<Node> list) { |
252 instructions = list; | 252 instructions = list; |
253 } | 253 } |
254 | 254 |
255 public void substituteSuccessor(LIRBlock target, LIRBlock newSucc) { | 255 public void substituteSuccessor(LIRBlock target, LIRBlock newSucc) { |
256 for (int i = 0; i < successors.size(); ++i) { | 256 for (int i = 0; i < successors.size(); ++i) { |