Mercurial > hg > truffle
comparison graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRVerifier.java @ 14786:a6595f1b55b0
Make LIR use AbstractBlock. (errors)
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 12 Mar 2014 12:09:07 +0100 |
parents | f43313f3f759 |
children | a8723f1ff542 |
comparison
equal
deleted
inserted
replaced
14156:7668297a2e67 | 14786:a6595f1b55b0 |
---|---|
44 private final boolean beforeRegisterAllocation; | 44 private final boolean beforeRegisterAllocation; |
45 | 45 |
46 private final BitSet[] blockLiveOut; | 46 private final BitSet[] blockLiveOut; |
47 private final Object[] variableDefinitions; | 47 private final Object[] variableDefinitions; |
48 | 48 |
49 private BitSet liveOutFor(Block block) { | 49 private BitSet liveOutFor(AbstractBlock<?> block) { |
50 return blockLiveOut[block.getId()]; | 50 return blockLiveOut[block.getId()]; |
51 } | 51 } |
52 | 52 |
53 private void setLiveOutFor(Block block, BitSet liveOut) { | 53 private void setLiveOutFor(AbstractBlock<?> block, BitSet liveOut) { |
54 blockLiveOut[block.getId()] = liveOut; | 54 blockLiveOut[block.getId()] = liveOut; |
55 } | 55 } |
56 | 56 |
57 private int maxRegisterNum() { | 57 private int maxRegisterNum() { |
58 return frameMap.target.arch.getRegisters().length; | 58 return frameMap.target.arch.getRegisters().length; |
96 } | 96 } |
97 | 97 |
98 private BitSet curVariablesLive; | 98 private BitSet curVariablesLive; |
99 private Value[] curRegistersLive; | 99 private Value[] curRegistersLive; |
100 | 100 |
101 private Block curBlock; | 101 private AbstractBlock<?> curBlock; |
102 private Object curInstruction; | 102 private Object curInstruction; |
103 private BitSet curRegistersDefined; | 103 private BitSet curRegistersDefined; |
104 | 104 |
105 private void verify() { | 105 private void verify() { |
106 ValueProcedure useProc = new ValueProcedure() { | 106 ValueProcedure useProc = new ValueProcedure() { |
118 } | 118 } |
119 }; | 119 }; |
120 | 120 |
121 int maxRegisterNum = maxRegisterNum(); | 121 int maxRegisterNum = maxRegisterNum(); |
122 curRegistersDefined = new BitSet(); | 122 curRegistersDefined = new BitSet(); |
123 for (Block block : lir.linearScanOrder()) { | 123 for (AbstractBlock<?> block : lir.linearScanOrder()) { |
124 curBlock = block; | 124 curBlock = block; |
125 curVariablesLive = new BitSet(); | 125 curVariablesLive = new BitSet(); |
126 curRegistersLive = new Value[maxRegisterNum]; | 126 curRegistersLive = new Value[maxRegisterNum]; |
127 | 127 |
128 if (block.getDominator() != null) { | 128 if (block.getDominator() != null) { |