diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2009-10-05 17:46:35 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2009-10-05 10:46:35 -0700 |
commit | 2bd1d2c8d2d026168111295dc53d604856b74deb (patch) | |
tree | 76d28ac5e1fa941648deb5fd3f3b91d9ea13d6ee /gcc/final.c | |
parent | 4cdc876153cc0ddcda76174f868e1722f389be04 (diff) | |
download | gcc-2bd1d2c8d2d026168111295dc53d604856b74deb.zip gcc-2bd1d2c8d2d026168111295dc53d604856b74deb.tar.gz gcc-2bd1d2c8d2d026168111295dc53d604856b74deb.tar.bz2 |
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
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/final.c b/gcc/final.c index 78a698b..f121da1 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -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 |