Commit 6e73e666 by John Carr Committed by Jeff Law

flags.h, [...]: Remove flag_alias_check; optimization is now always enabled.

        * flags.h, toplev.c, calls.c, alias.c: Remove flag_alias_check;
        optimization is now always enabled.
        * calls.c (expand_call): Recognize C++ operator new as malloc-like
        function.
        * alias.c (memrefs_conflict_p): Eliminate tests now done by
        base_alias_check.
        (*_dependence): Call canon_rtx before base_alias_check.
        (init_alias_once): New function to precompute set of registers which
        can hold Pmode function arguments.
        * rtl.h: Declare init_alias_once.
        * toplev.c (compile_file): Call init_alias_once.

From-SVN: r17226
parent 280e521f
...@@ -889,11 +889,13 @@ expand_call (exp, target, ignore) ...@@ -889,11 +889,13 @@ expand_call (exp, target, ignore)
else if (tname[0] == 'l' && tname[1] == 'o' else if (tname[0] == 'l' && tname[1] == 'o'
&& ! strcmp (tname, "longjmp")) && ! strcmp (tname, "longjmp"))
is_longjmp = 1; is_longjmp = 1;
/* Only recognize malloc when alias analysis is enabled. */ /* XXX should have "malloc" attribute on functions instead
else if (flag_alias_check of recognizing them by name. */
&& ((tname[0] == 'm' && ! strcmp(tname + 1, "alloc")) else if (! strcmp (tname, "malloc")
|| (tname[0] == 'c' && ! strcmp(tname + 1, "alloc")) || ! strcmp (tname, "calloc")
|| (tname[0] == 'r' && ! strcmp(tname + 1, "ealloc")))) || ! strcmp (tname, "realloc")
|| ! strcmp (tname, "__builtin_new")
|| ! strcmp (tname, "__builtin_vec_new"))
is_malloc = 1; is_malloc = 1;
} }
......
...@@ -420,10 +420,6 @@ extern int flag_gnu_linker; ...@@ -420,10 +420,6 @@ extern int flag_gnu_linker;
/* Tag all structures with __attribute__(packed) */ /* Tag all structures with __attribute__(packed) */
extern int flag_pack_struct; extern int flag_pack_struct;
/* 1 if alias checking is enabled: symbols do not alias each other
and parameters do not alias the current stack frame. */
extern int flag_alias_check;
/* This flag is only tested if alias checking is enabled. /* This flag is only tested if alias checking is enabled.
0 if pointer arguments may alias each other. True in C. 0 if pointer arguments may alias each other. True in C.
1 if pointer arguments may not alias each other but may alias 1 if pointer arguments may not alias each other but may alias
......
...@@ -1371,6 +1371,7 @@ extern int true_dependence PROTO ((rtx, enum machine_mode, rtx, ...@@ -1371,6 +1371,7 @@ extern int true_dependence PROTO ((rtx, enum machine_mode, rtx,
extern int read_dependence PROTO ((rtx, rtx)); extern int read_dependence PROTO ((rtx, rtx));
extern int anti_dependence PROTO ((rtx, rtx)); extern int anti_dependence PROTO ((rtx, rtx));
extern int output_dependence PROTO ((rtx, rtx)); extern int output_dependence PROTO ((rtx, rtx));
extern void init_alias_once PROTO ((void));
extern void init_alias_analysis PROTO ((void)); extern void init_alias_analysis PROTO ((void));
extern void end_alias_analysis PROTO ((void)); extern void end_alias_analysis PROTO ((void));
......
...@@ -672,9 +672,6 @@ int flag_prefix_function_name = 0; ...@@ -672,9 +672,6 @@ int flag_prefix_function_name = 0;
int flag_regmove = 0; int flag_regmove = 0;
/* 1 if alias checking is on (by default, when -O). */
int flag_alias_check = 0;
/* 0 if pointer arguments may alias each other. True in C. /* 0 if pointer arguments may alias each other. True in C.
1 if pointer arguments may not alias each other but may alias 1 if pointer arguments may not alias each other but may alias
global variables. global variables.
...@@ -752,7 +749,6 @@ struct { char *string; int *variable; int on_value;} f_options[] = ...@@ -752,7 +749,6 @@ struct { char *string; int *variable; int on_value;} f_options[] =
{"pack-struct", &flag_pack_struct, 1}, {"pack-struct", &flag_pack_struct, 1},
{"stack-check", &flag_stack_check, 1}, {"stack-check", &flag_stack_check, 1},
{"bytecode", &output_bytecode, 1}, {"bytecode", &output_bytecode, 1},
{"alias-check", &flag_alias_check, 1},
{"argument-alias", &flag_argument_noalias, 0}, {"argument-alias", &flag_argument_noalias, 0},
{"argument-noalias", &flag_argument_noalias, 1}, {"argument-noalias", &flag_argument_noalias, 1},
{"argument-noalias-global", &flag_argument_noalias, 2}, {"argument-noalias-global", &flag_argument_noalias, 2},
...@@ -2277,6 +2273,7 @@ compile_file (name) ...@@ -2277,6 +2273,7 @@ compile_file (name)
init_expr_once (); init_expr_once ();
init_loop (); init_loop ();
init_reload (); init_reload ();
init_alias_once ();
if (flag_caller_saves) if (flag_caller_saves)
init_caller_save (); init_caller_save ();
...@@ -3897,7 +3894,6 @@ main (argc, argv, envp) ...@@ -3897,7 +3894,6 @@ main (argc, argv, envp)
#ifdef CAN_DEBUG_WITHOUT_FP #ifdef CAN_DEBUG_WITHOUT_FP
flag_omit_frame_pointer = 1; flag_omit_frame_pointer = 1;
#endif #endif
flag_alias_check = 1;
} }
if (optimize >= 2) if (optimize >= 2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment