#include "sbitmap.h"
#include "langhooks.h"
#include "target.h"
-#include "debug.h"
#include "cgraph.h"
#include "except.h"
#include "dbgcnt.h"
if (fndecl && TREE_CODE (fndecl) == FUNCTION_DECL)
set_mem_expr (funmem, fndecl);
else if (fntree)
- set_mem_expr (funmem, build_fold_indirect_ref (CALL_EXPR_FN (fntree)));
+ set_mem_expr (funmem, build_simple_mem_ref (CALL_EXPR_FN (fntree)));
#if defined (HAVE_sibcall_pop) && defined (HAVE_sibcall_value_pop)
if ((ecf_flags & ECF_SIBCALL)
SIBLING_CALL_P (call_insn) = ((ecf_flags & ECF_SIBCALL) != 0);
- /* Record debug information for virtual calls. */
- if (flag_enable_icf_debug && fndecl == NULL)
- (*debug_hooks->virtual_call_token) (CALL_EXPR_FN (fntree),
- INSN_UID (call_insn));
-
/* Restore this now, so that we do defer pops for this call's args
if the context of the call as a whole permits. */
inhibit_defer_pop = old_inhibit_defer_pop;
/* If the value is a non-legitimate constant, force it into a
pseudo now. TLS symbols sometimes need a call to resolve. */
if (CONSTANT_P (args[i].value)
- && !LEGITIMATE_CONSTANT_P (args[i].value))
+ && !targetm.legitimate_constant_p (args[i].mode, args[i].value))
args[i].value = force_reg (args[i].mode, args[i].value);
/* If we are to promote the function arg to a wider mode,
call only uses SIZE bytes at the msb end, but it doesn't
seem worth generating rtl to say that. */
reg = gen_rtx_REG (word_mode, REGNO (reg));
- x = expand_shift (LSHIFT_EXPR, word_mode, reg,
- build_int_cst (NULL_TREE, shift),
- reg, 1);
+ x = expand_shift (LSHIFT_EXPR, word_mode, reg, shift, reg, 1);
if (x != reg)
emit_move_insn (reg, x);
}
: LSHIFT_EXPR;
emit_move_insn (x, tem);
- x = expand_shift (dir, word_mode, x,
- build_int_cst (NULL_TREE, shift),
- ri, 1);
+ x = expand_shift (dir, word_mode, x, shift, ri, 1);
if (x != ri)
emit_move_insn (ri, x);
}
highest_outgoing_arg_in_use = MAX (initial_highest_arg_in_use,
needed);
#endif
- if (stack_usage_map_buf)
- free (stack_usage_map_buf);
+ free (stack_usage_map_buf);
stack_usage_map_buf = XNEWVEC (char, highest_outgoing_arg_in_use);
stack_usage_map = stack_usage_map_buf;
= stack_arg_under_construction;
stack_arg_under_construction = 0;
/* Make a new map for the new argument list. */
- if (stack_usage_map_buf)
- free (stack_usage_map_buf);
+ free (stack_usage_map_buf);
stack_usage_map_buf = XCNEWVEC (char, highest_outgoing_arg_in_use);
stack_usage_map = stack_usage_map_buf;
highest_outgoing_arg_in_use = 0;
/* Free up storage we no longer need. */
for (i = 0; i < num_actuals; ++i)
- if (args[i].aligned_regs)
- free (args[i].aligned_regs);
+ free (args[i].aligned_regs);
insns = get_insns ();
end_sequence ();
currently_expanding_call--;
- if (stack_usage_map_buf)
- free (stack_usage_map_buf);
+ free (stack_usage_map_buf);
return target;
}
/* Make sure it is a reasonable operand for a move or push insn. */
if (!REG_P (addr) && !MEM_P (addr)
- && ! (CONSTANT_P (addr) && LEGITIMATE_CONSTANT_P (addr)))
+ && !(CONSTANT_P (addr)
+ && targetm.legitimate_constant_p (Pmode, addr)))
addr = force_operand (addr, NULL_RTX);
argvec[count].value = addr;
/* Make sure it is a reasonable operand for a move or push insn. */
if (!REG_P (val) && !MEM_P (val)
- && ! (CONSTANT_P (val) && LEGITIMATE_CONSTANT_P (val)))
+ && !(CONSTANT_P (val) && targetm.legitimate_constant_p (mode, val)))
val = force_operand (val, NULL_RTX);
if (pass_by_reference (&args_so_far, mode, NULL_TREE, 1))
stack_usage_map = initial_stack_usage_map;
}
- if (stack_usage_map_buf)
- free (stack_usage_map_buf);
+ free (stack_usage_map_buf);
return value;