tree.c (get_callee_fndecl): Extract the initial value from a readonly decl.
* tree.c (get_callee_fndecl): Extract the initial value from a readonly decl. * cp/optimize.c (initialize_inlined_parameters): Call c_apply_type_quals_to_decl. Set DECL_INITIAL. From-SVN: r33518
This commit is contained in:
parent
e67cd9f80d
commit
c083cf9a09
@ -1,3 +1,8 @@
|
||||
2000-04-28 Jason Merrill <jason@casey.cygnus.com>
|
||||
|
||||
* tree.c (get_callee_fndecl): Extract the initial value from
|
||||
a readonly decl.
|
||||
|
||||
2000-04-28 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* varasm.c (record_constant_1): Record the CODE_LABEL when
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-04-28 Jason Merrill <jason@casey.cygnus.com>
|
||||
|
||||
* optimize.c (initialize_inlined_parameters): Call
|
||||
c_apply_type_quals_to_decl. Set DECL_INITIAL.
|
||||
|
||||
2000-04-27 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
|
||||
|
@ -419,6 +419,8 @@ initialize_inlined_parameters (id, args, fn)
|
||||
|
||||
/* Make an equivalent VAR_DECL. */
|
||||
var = copy_decl_for_inlining (p, fn, VARRAY_TREE (id->fns, 0));
|
||||
c_apply_type_quals_to_decl (TYPE_QUALS (p), var);
|
||||
|
||||
/* Register the VAR_DECL as the equivalent for the PARM_DECL;
|
||||
that way, when the PARM_DECL is encountered, it will be
|
||||
automatically replaced by the VAR_DECL. */
|
||||
@ -430,6 +432,8 @@ initialize_inlined_parameters (id, args, fn)
|
||||
this will not result in an extra copy: the TARGET_EXPR
|
||||
representing the argument will be bound to VAR, and the
|
||||
object will be constructed in VAR. */
|
||||
if (! TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (p)))
|
||||
DECL_INITIAL (var) = TREE_VALUE (a);
|
||||
init_stmt = build_min_nt (EXPR_STMT,
|
||||
build (INIT_EXPR, TREE_TYPE (p),
|
||||
var, value));
|
||||
|
@ -5265,6 +5265,14 @@ get_callee_fndecl (call)
|
||||
called. */
|
||||
addr = TREE_OPERAND (call, 0);
|
||||
|
||||
STRIP_NOPS (addr);
|
||||
|
||||
/* If this is a readonly function pointer, extract its initial value. */
|
||||
if (DECL_P (addr) && TREE_CODE (addr) != FUNCTION_DECL
|
||||
&& TREE_READONLY (addr) && ! TREE_THIS_VOLATILE (addr)
|
||||
&& DECL_INITIAL (addr))
|
||||
addr = DECL_INITIAL (addr);
|
||||
|
||||
/* If the address is just `&f' for some function `f', then we know
|
||||
that `f' is being called. */
|
||||
if (TREE_CODE (addr) == ADDR_EXPR
|
||||
|
Loading…
Reference in New Issue
Block a user