tree-inline.h (eni_weights): Add field target_builtin_cost to reflect the cost per call to a target specific...
2007-09-24 Pranav Bhandarkar <pranav.bhandarkar@celunite.com> Ramana Radhakrishnan <ramana@hercules.pun.celunite.com> * tree-inline.h (eni_weights): Add field target_builtin_cost to reflect the cost per call to a target specific builtin. * tree-inline.c (estimate_num_insns_1): If it is a CALL_EXPR for * a call to a target specific builtin, then use target_builtin_call_cost. (init_inline_once): Initialize target_builtin_call_cost field. Co-Authored-By: Ramana Radhakrishnan <ramana@hercules.pun.celunite.com> From-SVN: r128714
This commit is contained in:
parent
548183dbd3
commit
625a2efbe7
@ -1,3 +1,12 @@
|
||||
2007-09-24 Pranav Bhandarkar <pranav.bhandarkar@celunite.com>
|
||||
Ramana Radhakrishnan <ramana@hercules.pun.celunite.com>
|
||||
|
||||
* tree-inline.h (eni_weights): Add field target_builtin_cost to
|
||||
reflect the cost per call to a target specific builtin.
|
||||
* tree-inline.c (estimate_num_insns_1): If it is a CALL_EXPR for a
|
||||
call to a target specific builtin, then use target_builtin_call_cost.
|
||||
(init_inline_once): Initialize target_builtin_call_cost field.
|
||||
|
||||
2007-09-24 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
PR middle-end/33472
|
||||
|
@ -2290,7 +2290,11 @@ estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
|
||||
{
|
||||
tree decl = get_callee_fndecl (x);
|
||||
|
||||
cost = d->weights->call_cost;
|
||||
if (decl && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_MD)
|
||||
cost = d->weights->target_builtin_call_cost;
|
||||
else
|
||||
cost = d->weights->call_cost;
|
||||
|
||||
if (decl && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL)
|
||||
switch (DECL_FUNCTION_CODE (decl))
|
||||
{
|
||||
@ -2391,11 +2395,13 @@ void
|
||||
init_inline_once (void)
|
||||
{
|
||||
eni_inlining_weights.call_cost = PARAM_VALUE (PARAM_INLINE_CALL_COST);
|
||||
eni_inlining_weights.target_builtin_call_cost = 1;
|
||||
eni_inlining_weights.div_mod_cost = 10;
|
||||
eni_inlining_weights.switch_cost = 1;
|
||||
eni_inlining_weights.omp_cost = 40;
|
||||
|
||||
eni_size_weights.call_cost = 1;
|
||||
eni_size_weights.target_builtin_call_cost = 1;
|
||||
eni_size_weights.div_mod_cost = 1;
|
||||
eni_size_weights.switch_cost = 10;
|
||||
eni_size_weights.omp_cost = 40;
|
||||
@ -2405,6 +2411,7 @@ init_inline_once (void)
|
||||
underestimating the cost does less harm than overestimating it, so
|
||||
we choose a rather small value here. */
|
||||
eni_time_weights.call_cost = 10;
|
||||
eni_time_weights.target_builtin_call_cost = 10;
|
||||
eni_time_weights.div_mod_cost = 10;
|
||||
eni_time_weights.switch_cost = 4;
|
||||
eni_time_weights.omp_cost = 40;
|
||||
|
@ -103,6 +103,9 @@ typedef struct eni_weights_d
|
||||
/* Cost per call. */
|
||||
unsigned call_cost;
|
||||
|
||||
/* Cost per call to a target specific builtin */
|
||||
unsigned target_builtin_call_cost;
|
||||
|
||||
/* Cost of "expensive" div and mod operations. */
|
||||
unsigned div_mod_cost;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user