aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2014-01-20 21:08:26 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2014-01-20 13:08:26 -0800
commit1cf11770053ce827551849ab721edccb17b4fdde (patch)
tree50ccb405fa1d7c6f984e4ac16406a0427cd1910a /gcc/cgraph.h
parent8586e4bd470382106dc8ba09d7d2d819dbb15488 (diff)
downloadgcc-1cf11770053ce827551849ab721edccb17b4fdde.zip
gcc-1cf11770053ce827551849ab721edccb17b4fdde.tar.gz
gcc-1cf11770053ce827551849ab721edccb17b4fdde.tar.bz2
Add type to DEFCIFCODE to describe the inline failure
Report inline error during early inlining if the inline failure is CIF_FINAL_ERROR. gcc/ PR middle-end/59789 * cgraph.c (cgraph_inline_failed_string): Add type to DEFCIFCODE. (cgraph_inline_failed_type): New function. * cgraph.h (DEFCIFCODE): Add type. (cgraph_inline_failed_type_t): New enum. (cgraph_inline_failed_type): New prototype. * cif-code.def: Add CIF_FINAL_NORMAL to OK, FUNCTION_NOT_CONSIDERED, FUNCTION_NOT_OPTIMIZED, REDEFINED_EXTERN_INLINE, FUNCTION_NOT_INLINE_CANDIDATE, LARGE_FUNCTION_GROWTH_LIMIT, LARGE_STACK_FRAME_GROWTH_LIMIT, MAX_INLINE_INSNS_SINGLE_LIMIT, MAX_INLINE_INSNS_AUTO_LIMIT, INLINE_UNIT_GROWTH_LIMIT, RECURSIVE_INLINING, UNLIKELY_CALL, NOT_DECLARED_INLINED, OPTIMIZING_FOR_SIZE, ORIGINALLY_INDIRECT_CALL, INDIRECT_UNKNOWN_CALL, USES_COMDAT_LOCAL. Add CIF_FINAL_ERROR to UNSPECIFIED, BODY_NOT_AVAILABLE, FUNCTION_NOT_INLINABLE, OVERWRITABLE, MISMATCHED_ARGUMENTS, EH_PERSONALITY, NON_CALL_EXCEPTIONS, TARGET_OPTION_MISMATCH, OPTIMIZATION_MISMATCH. * tree-inline.c (expand_call_inline): Emit errors during early_inlining if cgraph_inline_failed_type returns CIF_FINAL_ERROR. gcc/testsuite/ PR middle-end/59789 * gcc.target/i386/pr59789.c: New testcase. From-SVN: r206858
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 7ce5401..c763516 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -518,13 +518,19 @@ struct varpool_node_set_iterator
unsigned index;
};
-#define DEFCIFCODE(code, string) CIF_ ## code,
+#define DEFCIFCODE(code, type, string) CIF_ ## code,
/* Reasons for inlining failures. */
enum cgraph_inline_failed_t {
#include "cif-code.def"
CIF_N_REASONS
};
+enum cgraph_inline_failed_type_t
+{
+ CIF_FINAL_NORMAL = 0,
+ CIF_FINAL_ERROR
+};
+
/* Structure containing additional information about an indirect call. */
struct GTY(()) cgraph_indirect_call_info
@@ -774,6 +780,7 @@ void cgraph_unnest_node (struct cgraph_node *);
enum availability cgraph_function_body_availability (struct cgraph_node *);
void cgraph_add_new_function (tree, bool);
const char* cgraph_inline_failed_string (cgraph_inline_failed_t);
+cgraph_inline_failed_type_t cgraph_inline_failed_type (cgraph_inline_failed_t);
void cgraph_set_nothrow_flag (struct cgraph_node *, bool);
void cgraph_set_const_flag (struct cgraph_node *, bool, bool);