[mono/mono] 81f7293a: [llvm] Use i64*/i32* as the LLVM type of objrefs instead of i64/i32, the basicaa LLVM pass cannot see through the inttoptr casts we were emitting before loads.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <00000142458de0ea-4a0328ae-890d-4b6d-8dd8-efc3ff233bc2-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/4e8e3cb4669f...81f7293aac73
Commit: 81f7293aac73cfaf9854f4dbfce271327565560e
Author: Zoltan Varga <[email protected]> (vargaz)
Date: 2013-11-11 05:05:29 GMT
URL: https://github.com/mono/mono/commit/81f7293aac73cfaf9854f4dbfce271327565560e
[llvm] Use i64*/i32* as the LLVM type of objrefs instead of i64/i32, the basicaa LLVM pass cannot see through the inttoptr casts we were emitting before loads.
Changed paths:
M mono/mini/mini-llvm.c
Modified: mono/mini/mini-llvm.c
===================================================================
@@ -205,6 +205,12 @@
return sizeof (gpointer) == 8 ? LLVMInt64Type () : LLVMInt32Type ();
}
+static LLVMTypeRef
+ObjRefType (void)
+{
+ return sizeof (gpointer) == 8 ? LLVMPointerType (LLVMInt64Type (), 0) : LLVMPointerType (LLVMInt32Type (), 0);
+}
+
/*
* get_vtype_size:
*
@@ -326,14 +332,14 @@
case MONO_TYPE_SZARRAY:
case MONO_TYPE_STRING:
case MONO_TYPE_PTR:
- return IntPtrType ();
+ return ObjRefType ();
case MONO_TYPE_VAR:
case MONO_TYPE_MVAR:
/* Because of generic sharing */
- return IntPtrType ();
+ return ObjRefType ();
case MONO_TYPE_GENERICINST:
if (!mono_type_generic_inst_is_valuetype (t))
- return IntPtrType ();
+ return ObjRefType ();
/* Fall through */
case MONO_TYPE_VALUETYPE:
case MONO_TYPE_TYPEDBYREF: {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches