comparison graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java @ 4254:1cf920630944

Canonicalize parameter lists and names
author Christian Wimmer <Christian.Wimmer@Oracle.com>
date Tue, 10 Jan 2012 08:50:07 -0800
parents 75c620f90ab9
children 9ce8594bedaf
comparison
equal deleted inserted replaced
4252:67e88b7624d5 4254:1cf920630944
96 96
97 public static CiRegister asDoubleReg(CiValue value) { 97 public static CiRegister asDoubleReg(CiValue value) {
98 assert value.kind == CiKind.Double; 98 assert value.kind == CiKind.Double;
99 return asRegister(value); 99 return asRegister(value);
100 } 100 }
101
102
103 public static boolean sameRegister(CiValue...values) {
104 for (int i = 0; i < values.length; i++) {
105 for (int j = i + 1; j < values.length; j++) {
106 if (isRegister(values[i]) && isRegister(values[j]) && asRegister(values[i]) != asRegister(values[j])) {
107 return false;
108 }
109 }
110 }
111 return true;
112 }
113
114 public static boolean differentRegisters(CiValue...values) {
115 for (int i = 0; i < values.length; i++) {
116 for (int j = i + 1; j < values.length; j++) {
117 if (isRegister(values[i]) && isRegister(values[j]) && asRegister(values[i]) == asRegister(values[j])) {
118 return false;
119 }
120 }
121 }
122 return true;
123 }
101 } 124 }