+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.
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;
return count;
}
-#endif
\f
/* ??? This is probably the wrong place for these. */
/* Structure recording the mapping from source file and directory