re PR tree-optimization/40992 (cunroll ignoring asm size)

2009-10-05  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR tree-opt/40992
        * final.c (asm_str_count): Split out from asm_insn_count.
        * rtl.h (asm_str_count): New prototype.
        * tree-inline (estimate_num_insns) <case GIMPLE_ASM>: Call
        asm_str_count.

From-SVN: r152458
This commit is contained in:
Andrew Pinski 2009-10-05 17:46:35 +00:00 committed by Andrew Pinski
parent 4cdc876153
commit 2bd1d2c8d2
4 changed files with 21 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2009-10-05 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/40992
* final.c (asm_str_count): Split out from asm_insn_count.
* rtl.h (asm_str_count): New prototype.
* tree-inline (estimate_num_insns) <case GIMPLE_ASM>: Call
asm_str_count.
2009-10-05 Sriraman Tallam <tmsriram@google.com>
* doc/plugins.texi: Change plugin_pass to register_pass_info.

View file

@ -1399,13 +1399,23 @@ static int
asm_insn_count (rtx body)
{
const char *templ;
int count = 1;
if (GET_CODE (body) == ASM_INPUT)
templ = XSTR (body, 0);
else
templ = decode_asm_operands (body, NULL, NULL, NULL, NULL, NULL);
return asm_str_count (templ);
}
#endif
/* Return the number of machine instructions likely to be generated for the
inline-asm template. */
int
asm_str_count (const char *templ)
{
int count = 1;
if (!*templ)
return 0;
@ -1416,7 +1426,6 @@ asm_insn_count (rtx body)
return count;
}
#endif
/* ??? This is probably the wrong place for these. */
/* Structure recording the mapping from source file and directory

View file

@ -2424,6 +2424,7 @@ extern void simplify_using_condition (rtx, rtx *, struct bitmap_head_def *);
/* In final.c */
extern unsigned int compute_alignments (void);
extern int asm_str_count (const char *templ);
struct rtl_hooks
{

View file

@ -3346,7 +3346,7 @@ estimate_num_insns (gimple stmt, eni_weights *weights)
return 0;
case GIMPLE_ASM:
return 1;
return asm_str_count (gimple_asm_string (stmt));
case GIMPLE_RESX:
/* This is either going to be an external function call with one