Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/StampFactory.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 | f91e40c4bb47 |
children | 7b0ff8da6057 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/StampFactory.java Thu Mar 05 14:26:16 2015 +0100 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/type/StampFactory.java Sun Mar 08 21:58:34 2015 +0100 @@ -37,6 +37,8 @@ private static final Stamp objectAlwaysNullStamp = new ObjectStamp(null, false, false, true); private static final Stamp nodeIntrinsicStamp = new ObjectStamp(null, false, false, false); private static final Stamp positiveInt = forInteger(Kind.Int, 0, Integer.MAX_VALUE, 0, Integer.MAX_VALUE); + private static final Stamp booleanTrue = forInteger(Kind.Boolean, -1, -1, 1, 1); + private static final Stamp booleanFalse = forInteger(Kind.Boolean, 0, 0, 0, 0); private static void setCache(Kind kind, Stamp stamp) { stampCache[kind.ordinal()] = stamp; @@ -80,6 +82,14 @@ } } + public static Stamp tautology() { + return booleanTrue; + } + + public static Stamp contradiction() { + return booleanFalse; + } + /** * Return a stamp for a Java kind, as it would be represented on the bytecode stack. */