builtins.c (fold_builtin_1): Update a call to targetm.fold_builtin.
* builtins.c (fold_builtin_1): Update a call to targetm.fold_builtin. * hooks.c (hook_tree_tree_bool_null): Rename to hook_tree_tree_tree_bool_null. Take one more argument of type tree. * hooks.h: Update the prototype of hook_tree_tree_bool_null. * target-def.h (TARGET_FOLD_BUILTIN): Define it as hook_tree_tree_tree_bool_null. * target.h (gcc_target): Update the prototype of fold_builtin. * config/alpha/alpha.c (alpha_fold_builtin): Take decomposed arguments of CALL_EXPR. * doc/tm.texi (TARGET_FOLD_BUILTIN): Update. Mention the new prototype. From-SVN: r96762
This commit is contained in:
parent
1655dc9de3
commit
a05a80fc7c
@ -1,3 +1,19 @@
|
||||
2005-03-20 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* builtins.c (fold_builtin_1): Update a call to
|
||||
targetm.fold_builtin.
|
||||
* hooks.c (hook_tree_tree_bool_null): Rename to
|
||||
hook_tree_tree_tree_bool_null. Take one more argument of type
|
||||
tree.
|
||||
* hooks.h: Update the prototype of hook_tree_tree_bool_null.
|
||||
* target-def.h (TARGET_FOLD_BUILTIN): Define it as
|
||||
hook_tree_tree_tree_bool_null.
|
||||
* target.h (gcc_target): Update the prototype of fold_builtin.
|
||||
* config/alpha/alpha.c (alpha_fold_builtin): Take decomposed
|
||||
arguments of CALL_EXPR.
|
||||
* doc/tm.texi (TARGET_FOLD_BUILTIN): Update. Mention the
|
||||
new prototype.
|
||||
|
||||
2005-03-20 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* cgraph.h (cgraph_node): Add prev_clone pointer.
|
||||
|
@ -7947,7 +7947,7 @@ fold_builtin_1 (tree exp, bool ignore)
|
||||
enum built_in_function fcode;
|
||||
|
||||
if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD)
|
||||
return targetm.fold_builtin (exp, ignore);
|
||||
return targetm.fold_builtin (fndecl, arglist, ignore);
|
||||
|
||||
fcode = DECL_FUNCTION_CODE (fndecl);
|
||||
switch (fcode)
|
||||
|
@ -6499,14 +6499,13 @@ alpha_fold_builtin_ctpop (unsigned HOST_WIDE_INT opint[], long op_const)
|
||||
/* Fold one of our builtin functions. */
|
||||
|
||||
static tree
|
||||
alpha_fold_builtin (tree exp, bool ignore ATTRIBUTE_UNUSED)
|
||||
alpha_fold_builtin (tree fndecl, tree arglist, bool ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
tree fndecl = get_callee_fndecl (exp);
|
||||
tree op[MAX_ARGS], t;
|
||||
unsigned HOST_WIDE_INT opint[MAX_ARGS];
|
||||
long op_const = 0, arity = 0;
|
||||
|
||||
for (t = TREE_OPERAND (exp, 1); t ; t = TREE_CHAIN (t), ++arity)
|
||||
for (t = arglist; t ; t = TREE_CHAIN (t), ++arity)
|
||||
{
|
||||
tree arg = TREE_VALUE (t);
|
||||
if (arg == error_mark_node)
|
||||
|
@ -9446,13 +9446,14 @@ ignored. This function should return the result of the call to the
|
||||
built-in function.
|
||||
@end deftypefn
|
||||
|
||||
@deftypefn {Target Hook} tree TARGET_FOLD_BUILTIN (tree @var{exp}, bool @var{ignore})
|
||||
@deftypefn {Target Hook} tree TARGET_FOLD_BUILTIN (tree @var{fndecl}, tree @var{arglist}, bool @var{ignore})
|
||||
|
||||
Expand a call to a machine specific built-in function that was set up by
|
||||
@samp{TARGET_INIT_BUILTINS}. @var{exp} is the expression for the
|
||||
function call; the result is another tree containing a simplified
|
||||
expression for the call's result. If @var{ignore} is true the
|
||||
value will be ignored.
|
||||
Fold a call to a machine specific built-in function that was set up by
|
||||
@samp{TARGET_INIT_BUILTINS}. @var{fndecl} is the declaration of the
|
||||
built-in function. @var{arglist} is the list of arguments passed to
|
||||
the built-in function. The result is another tree containing a
|
||||
simplified expression for the call's result. If @var{ignore} is true
|
||||
the value will be ignored.
|
||||
@end deftypefn
|
||||
|
||||
@defmac MD_CAN_REDIRECT_BRANCH (@var{branch1}, @var{branch2})
|
||||
|
@ -243,7 +243,8 @@ hook_constcharptr_tree_null (tree t ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
tree
|
||||
hook_tree_tree_bool_null (tree t ATTRIBUTE_UNUSED, bool ignore ATTRIBUTE_UNUSED)
|
||||
hook_tree_tree_tree_bool_null (tree t0 ATTRIBUTE_UNUSED, tree t1 ATTRIBUTE_UNUSED,
|
||||
bool ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -64,5 +64,5 @@ extern rtx hook_rtx_rtx_null (rtx);
|
||||
extern rtx hook_rtx_tree_int_null (tree, int);
|
||||
extern tree hook_tree_tree_identity (tree a);
|
||||
extern const char *hook_constcharptr_tree_null (tree);
|
||||
extern tree hook_tree_tree_bool_null (tree, bool);
|
||||
extern tree hook_tree_tree_tree_bool_null (tree, tree, bool);
|
||||
#endif
|
||||
|
@ -296,7 +296,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
/* In builtins.c. */
|
||||
#define TARGET_INIT_BUILTINS hook_void_void
|
||||
#define TARGET_EXPAND_BUILTIN default_expand_builtin
|
||||
#define TARGET_FOLD_BUILTIN hook_tree_tree_bool_null
|
||||
#define TARGET_FOLD_BUILTIN hook_tree_tree_tree_bool_null
|
||||
|
||||
/* In varasm.c. */
|
||||
#ifndef TARGET_SECTION_TYPE_FLAGS
|
||||
|
@ -344,7 +344,7 @@ struct gcc_target
|
||||
enum machine_mode mode, int ignore);
|
||||
|
||||
/* Fold a target-specific builtin. */
|
||||
tree (* fold_builtin) (tree exp, bool ignore);
|
||||
tree (* fold_builtin) (tree fndecl, tree arglist, bool ignore);
|
||||
|
||||
/* For a vendor-specific fundamental TYPE, return a pointer to
|
||||
a statically-allocated string containing the C++ mangling for
|
||||
|
Loading…
Reference in New Issue
Block a user