From 8a3a6ab4514ca5a346951be94536a204b92fcace Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 19 Jan 2017 17:27:54 +0000 Subject: Make LTO's implementation of LANG_HOOKS_TYPE_FOR_SIZE the default gcc/jit/ChangeLog: * dummy-frontend.c (jit_langhook_type_for_size): Delete. (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine. gcc/ChangeLog: * langhooks-def.h (lhd_type_for_size): New decl. (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size. * langhooks.c (lhd_type_for_size): New function, taken from lto_type_for_size. gcc/lto/ChangeLog: * lto-lang.c (builtin_type_for_size): Convert call to lto_type_for_size to one through the langhook. (lto_type_for_size): Move to langhooks.c and rename to lhd_type_for_size. (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine. From-SVN: r244646 --- gcc/jit/dummy-frontend.c | 52 ------------------------------------------------ 1 file changed, 52 deletions(-) (limited to 'gcc/jit/dummy-frontend.c') diff --git a/gcc/jit/dummy-frontend.c b/gcc/jit/dummy-frontend.c index 4c7932b..87f583f 100644 --- a/gcc/jit/dummy-frontend.c +++ b/gcc/jit/dummy-frontend.c @@ -207,55 +207,6 @@ jit_langhook_type_for_mode (enum machine_mode mode, int unsignedp) return NULL; } -/* Return an integer type with PRECISION bits of precision, - that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */ - -static tree -jit_langhook_type_for_size (unsigned precision, int unsignedp) -{ - int i; - - if (precision == TYPE_PRECISION (integer_type_node)) - return unsignedp ? unsigned_type_node : integer_type_node; - - if (precision == TYPE_PRECISION (signed_char_type_node)) - return unsignedp ? unsigned_char_type_node : signed_char_type_node; - - if (precision == TYPE_PRECISION (short_integer_type_node)) - return unsignedp ? short_unsigned_type_node : short_integer_type_node; - - if (precision == TYPE_PRECISION (long_integer_type_node)) - return unsignedp ? long_unsigned_type_node : long_integer_type_node; - - if (precision == TYPE_PRECISION (long_long_integer_type_node)) - return unsignedp - ? long_long_unsigned_type_node - : long_long_integer_type_node; - - for (i = 0; i < NUM_INT_N_ENTS; i ++) - if (int_n_enabled_p[i] - && precision == int_n_data[i].bitsize) - return (unsignedp ? int_n_trees[i].unsigned_type - : int_n_trees[i].signed_type); - - if (precision <= TYPE_PRECISION (intQI_type_node)) - return unsignedp ? unsigned_intQI_type_node : intQI_type_node; - - if (precision <= TYPE_PRECISION (intHI_type_node)) - return unsignedp ? unsigned_intHI_type_node : intHI_type_node; - - if (precision <= TYPE_PRECISION (intSI_type_node)) - return unsignedp ? unsigned_intSI_type_node : intSI_type_node; - - if (precision <= TYPE_PRECISION (intDI_type_node)) - return unsignedp ? unsigned_intDI_type_node : intDI_type_node; - - if (precision <= TYPE_PRECISION (intTI_type_node)) - return unsignedp ? unsigned_intTI_type_node : intTI_type_node; - - return NULL_TREE; -} - /* Record a builtin function. We just ignore builtin functions. */ static tree @@ -295,9 +246,6 @@ jit_langhook_getdecls (void) #undef LANG_HOOKS_TYPE_FOR_MODE #define LANG_HOOKS_TYPE_FOR_MODE jit_langhook_type_for_mode -#undef LANG_HOOKS_TYPE_FOR_SIZE -#define LANG_HOOKS_TYPE_FOR_SIZE jit_langhook_type_for_size - #undef LANG_HOOKS_BUILTIN_FUNCTION #define LANG_HOOKS_BUILTIN_FUNCTION jit_langhook_builtin_function -- cgit v1.1