comparison graal/GraalCompiler/src/com/sun/c1x/ir/Instruction.java @ 2783:9bc0c2eb00d6

Made graph builder removal of BlockBegin work.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 25 May 2011 12:04:58 +0200
parents 27512ea6bbcb
children d3fc4fe063bf
comparison
equal deleted inserted replaced
2782:915456e4959e 2783:9bc0c2eb00d6
115 * Gets the list of predecessors of this block. 115 * Gets the list of predecessors of this block.
116 * @return the predecessor list 116 * @return the predecessor list
117 */ 117 */
118 @SuppressWarnings({ "unchecked", "rawtypes" }) 118 @SuppressWarnings({ "unchecked", "rawtypes" })
119 public List<Instruction> blockPredecessors() { 119 public List<Instruction> blockPredecessors() {
120 if (predecessors().size() == 1 && predecessors().get(0) == graph().start()) { 120 /*if (predecessors().size() == 1 && predecessors().get(0) == graph().start()) {
121 return Collections.EMPTY_LIST; 121 return Collections.EMPTY_LIST;
122 } else { 122 } else {)*/
123 return (List) Collections.unmodifiableList(predecessors()); 123 return (List) Collections.unmodifiableList(predecessors());
124 } 124 //}
125 } 125 }
126 126
127 /** 127 /**
128 * Get the number of predecessors. 128 * Get the number of predecessors.
129 * @return the number of predecessors 129 * @return the number of predecessors
130 */ 130 */
131 public int numberOfPreds() { 131 public int numberOfPreds() {
132 // ignore the graph root 132 // ignore the graph root
133 if (predecessors().size() == 1 && predecessors().get(0) == graph().start()) { 133 /*if (predecessors().size() == 1 && predecessors().get(0) == graph().start()) {
134 return 0; 134 return 0;
135 } else { 135 } else {*/
136 return predecessors().size(); 136 return predecessors().size();
137 } 137 //}
138 } 138 }
139 139
140 public Instruction predAt(int j) { 140 public Instruction predAt(int j) {
141 return (Instruction) predecessors().get(j); 141 return (Instruction) predecessors().get(j);
142 } 142 }