Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/Stamp.java @ 19716:2fd45bb25118
Initial version of new dominator-based conditional elimination phase.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 08 Mar 2015 21:58:34 +0100 |
parents | 1a21e7ced544 |
children | 51f2e71b57aa |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/Stamp.java Thu Mar 05 14:26:16 2015 +0100 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/Stamp.java Sun Mar 08 21:58:34 2015 +0100 @@ -135,4 +135,13 @@ } return newStamp; } + + public boolean neverDistinct(Stamp other) { + Constant constant = this.asConstant(); + if (constant != null) { + Constant otherConstant = other.asConstant(); + return otherConstant != null && constant.equals(otherConstant); + } + return false; + } }