------- Comment #51 from rguenth at gcc dot gnu dot org  2007-05-12 10:47 
-------
This looks indeed very promising.  I'll give it a spin on tramp3d.  The only
thing I noticed is that

+    case CHANGE_DYNAMIC_TYPE_EXPR:
+      /* We can access the location with the given type.  We don't
+        track pointers in RTL, so we handle this by assuming that any
+        reference to one type can alias any reference to the other
+        type across the whole function.  No code is generated.  */
+      {
+       tree type = CHANGE_DYNAMIC_TYPE_NEW_TYPE (exp);
+       tree ptr = CHANGE_DYNAMIC_TYPE_LOCATION (exp);  
+       tree ptr_type = TREE_TYPE (ptr);
+
+       gcc_assert (TREE_CODE (type) == POINTER_TYPE);
+       gcc_assert (TREE_CODE (ptr_type) == POINTER_TYPE);
+       merge_alias_sets_in_function (cfun,
+                                     get_alias_set (TREE_TYPE (type)),
+                                     get_alias_set (TREE_TYPE (ptr_type)));
+       return const0_rtx;
+      }

doesn't seem to handle the case the original pointed to type is not the old
dynamic type (which you rightfully were concerned about in comment #47).  So
it looks like (in absence of points-to information) we need to make the
new dynamic type alias everything?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

Reply via email to