This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa]: Alias analysis update
On Sun, 29 Dec 2002, Daniel Berlin wrote:
> It's not the same as full IPA done at link time.
>
OK. I guess we can leave it for now and revisit in the future.
I tried making -ftree-points-to=andersen the default PTA setting,
but we fail bootstrap while trying to build libjava:
---------------------------------------------------------------------------
[ ... ]
/notnfs/dnovillo/BLD-tree-ssa-native.tobiano/gcc/gcj -B/notnfs/dnovillo/BLD-tree-ssa-native.tobiano/i686-pc-linux-gnu/libjava/ -B/notnfs/dnovillo/BLD-tree-ssa-native.tobiano/gcc/ --encoding=UTF-8 -C -g -classpath '' -bootclasspath /notnfs/dnovillo/BLD-tree-ssa-native.tobiano/i686-pc-linux-gnu/libjava:/home/dnovillo/tree-ssa/src/libjava \
-d /notnfs/dnovillo/BLD-tree-ssa-native.tobiano/i686-pc-linux-gnu/libjava /home/dnovillo/tree-ssa/src/libjava/java/io/ObjectInputStream.java
/home/dnovillo/tree-ssa/src/libjava/java/io/ObjectInputStream.java:794: error: No constructor matching `(java.io.ObjectInputStream,java.lang.Object[],byte[],java.io.ObjectStreamClass)' found in class `java.io.ObjectInputStream$GetField'.
return new GetField ()
^
/home/dnovillo/tree-ssa/src/libjava/java/io/ObjectInputStream.java:794: error: Can't find constructor `java.io.ObjectInputStream$2()' in type `java.io.ObjectInputStream$2'.
return new GetField ()
^
2 errors
make[2]: *** [java/io/ObjectInputStream.class] Error 1
make[2]: Leaving directory `/notnfs/dnovillo/BLD-tree-ssa-native.tobiano/i686-pc-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/notnfs/dnovillo/BLD-tree-ssa-native.tobiano'
make: *** [bootstrap] Error 2
Command exited with non-zero status 2
---------------------------------------------------------------------------
The error doesn't occur if we just use BOOT_CFLAGS, so I guess
that we may be miscompiling libgcc or some other support
libraries.
This is the patch I was testing with:
* toplev.c (flag_tree_points_to): Set default value to PTA_ANDERSEN.
(decode_f_option): Set flag_tree_points_to to PTA_NONE if
libbanshee is not configured or if -ftree-points-to=none is set.
(display_help): Update help text.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.654.2.37
diff -d -u -p -r1.654.2.37 toplev.c
--- toplev.c 29 Dec 2002 22:04:58 -0000 1.654.2.37
+++ toplev.c 30 Dec 2002 03:16:12 -0000
@@ -892,7 +892,7 @@ int flag_disable_simple = 0;
int flag_tree_pre = 0;
/* Enable points-to analysis on trees. */
-enum pta_type flag_tree_points_to = PTA_NONE;
+enum pta_type flag_tree_points_to = PTA_ANDERSEN;
/* Enable SSA-CCP on trees. */
int flag_tree_ccp = 0;
@@ -3723,7 +3723,7 @@ display_help ()
printf (_(" -fmessage-length=<number> Limits diagnostics messages lengths to <number> characters per line. 0 suppresses line-wrapping\n"));
printf (_(" -fdiagnostics-show-location=[once | every-line] Indicates how often source location information should be emitted, as prefix, at the beginning of diagnostics when line-wrapping\n"));
printf (_(" -ftls-model=[global-dynamic | local-dynamic | initial-exec | local-exec] Indicates the default thread-local storage code generation model\n"));
- printf (_(" -ftree-points-to=[steen | andersen] Turn on points-to analysis using the specified algorithm.\n"));
+ printf (_(" -ftree-points-to=[steen | andersen | none] Turn on points-to analysis using the specified algorithm (default: andersen).\n"));
for (i = ARRAY_SIZE (f_options); i--;)
{
const char *description = f_options[i].description;
@@ -4010,9 +4010,12 @@ decode_f_option (arg)
#ifdef HAVE_BANSHEE
flag_tree_points_to = PTA_ANDERSEN;
#else
+ flag_tree_points_to = PTA_NONE;
warning ("Andersen's PTA not available - libbanshee not compiled.");
#endif
}
+ else if (strcmp (option_value, "none") == 0)
+ flag_tree_points_to = PTA_NONE;
else
warning ("`%s`: unknown points-to analysis algorithm", arg - 2);
}