Mercurial > hg > graal-jvmci-8
comparison graal/GraalCompiler/src/com/sun/c1x/ir/LoadField.java @ 2533:c480605ef068
Removed canonicalizer.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Apr 2011 19:05:35 +0200 |
parents | 16b9a8b5ad39 |
children | e1ba5a93e997 |
comparison
equal
deleted
inserted
replaced
2532:3fca504f28ba | 2533:c480605ef068 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.sun.c1x.ir; | 23 package com.sun.c1x.ir; |
24 | 24 |
25 import com.sun.c1x.*; | |
26 import com.sun.c1x.debug.*; | 25 import com.sun.c1x.debug.*; |
27 import com.sun.c1x.value.*; | 26 import com.sun.c1x.value.*; |
28 import com.sun.cri.ci.*; | 27 import com.sun.cri.ci.*; |
29 import com.sun.cri.ri.*; | 28 import com.sun.cri.ri.*; |
30 | 29 |
77 * Gets a constant value to which this load can be reduced. | 76 * Gets a constant value to which this load can be reduced. |
78 * | 77 * |
79 * @return {@code null} if this load cannot be reduced to a constant | 78 * @return {@code null} if this load cannot be reduced to a constant |
80 */ | 79 */ |
81 public CiConstant constantValue() { | 80 public CiConstant constantValue() { |
82 if (!C1XOptions.CanonicalizeConstantFields) { | |
83 return null; | |
84 } | |
85 if (isStatic()) { | 81 if (isStatic()) { |
86 return field.constantValue(null); | 82 return field.constantValue(null); |
87 } else if (object().isConstant()) { | 83 } else if (object().isConstant()) { |
88 CiConstant cons = field.constantValue(object().asConstant()); | 84 CiConstant cons = field.constantValue(object().asConstant()); |
89 if (cons != null) { | 85 if (cons != null) { |