diff graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java @ 4314:9ce8594bedaf

Allow CiAddress as Input and Alive operands of LIR instructions.
author Christian Wimmer <Christian.Wimmer@Oracle.com>
date Thu, 19 Jan 2012 14:14:36 -0800
parents 1cf920630944
children df5547057954
line wrap: on
line diff
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java	Thu Jan 19 14:13:50 2012 -0800
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiValueUtil.java	Thu Jan 19 14:14:36 2012 -0800
@@ -63,6 +63,16 @@
         return (CiStackSlot) value;
     }
 
+    public static boolean isAddress(CiValue value) {
+        assert value != null;
+        return value instanceof CiAddress;
+    }
+
+    public static CiAddress asAddress(CiValue value) {
+        assert value != null;
+        return (CiAddress) value;
+    }
+
 
     public static boolean isRegister(CiValue value) {
         assert value != null;