diff mbox

wide-int, hook

Message ID 4ADD8A99-51D7-4697-ABF9-FB1E7D79778B@comcast.net
State New
Headers show

Commit Message

Mike Stump Nov. 23, 2013, 7:21 p.m. UTC
Richi has asked the we break the wide-int patch so that the individual port and front end maintainers can review their parts without have to go through the entire patch.    This patch covers the hook code.

Ok?
* hooks.h: Include wide-int.h rather than double-int.h.
	(hook_bool_dint_dint_uint_bool_true): Delete.
	(hook_bool_wint_wint_uint_bool_true): Declare.
	* hooks.c
	(hook_bool_dint_dint_uint_bool_true): Removed.
	(hook_bool_wint_wint_uint_bool_true): New.
	* targhooks.h (can_use_doloop_if_innermost): Take widest_ints rather
	than double_ints.
	* targhooks.c
	(default_cxx_get_cookie_size): Uses INT_CST_LT rather than
	INT_CST_LT_UNSIGNED.
	(can_use_doloop_if_innermost): Take widest_ints rather than
	double_ints.

Comments

Richard Biener Nov. 25, 2013, 11 a.m. UTC | #1
On Sat, Nov 23, 2013 at 8:21 PM, Mike Stump <mikestump@comcast.net> wrote:
> Richi has asked the we break the wide-int patch so that the individual port and front end maintainers can review their parts without have to go through the entire patch.    This patch covers the hook code.
>
> Ok?

Ok.

Thanks,
Richard.
diff mbox

Patch

diff --git a/gcc/hooks.c b/gcc/hooks.c
index 9f53007..50c1250 100644
--- a/gcc/hooks.c
+++ b/gcc/hooks.c
@@ -332,7 +332,8 @@  hook_bool_rtx_int_int_int_intp_bool_false (rtx a ATTRIBUTE_UNUSED,
 }
 
 bool
-hook_bool_dint_dint_uint_bool_true (double_int, double_int, unsigned int, bool)
+hook_bool_wint_wint_uint_bool_true (const widest_int &, const widest_int &,
+				    unsigned int, bool)
 {
   return true;
 }
diff --git a/gcc/hooks.h b/gcc/hooks.h
index 38454fb..38a5fd4 100644
--- a/gcc/hooks.h
+++ b/gcc/hooks.h
@@ -23,7 +23,7 @@ 
 #define GCC_HOOKS_H
 
 #include "machmode.h"
-#include "double-int.h"
+#include "wide-int.h"
 
 extern bool hook_bool_void_false (void);
 extern bool hook_bool_void_true (void);
@@ -61,7 +61,8 @@  extern bool hook_bool_rtx_int_int_int_intp_bool_false (rtx, int, int, int,
 extern bool hook_bool_tree_tree_false (tree, tree);
 extern bool hook_bool_tree_tree_true (tree, tree);
 extern bool hook_bool_tree_bool_false (tree, bool);
-extern bool hook_bool_dint_dint_uint_bool_true (double_int, double_int,
+extern bool hook_bool_wint_wint_uint_bool_true (const widest_int &,
+						const widest_int &,
 						unsigned int, bool);
 
 extern void hook_void_void (void);
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 6c08385..c383520 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -291,7 +291,7 @@  default_cxx_get_cookie_size (tree type)
 
   sizetype_size = size_in_bytes (sizetype);
   type_align = size_int (TYPE_ALIGN_UNIT (type));
-  if (INT_CST_LT_UNSIGNED (type_align, sizetype_size))
+  if (INT_CST_LT (type_align, sizetype_size))
     cookie_size = sizetype_size;
   else
     cookie_size = type_align;
@@ -1744,7 +1744,7 @@  default_builtin_chkp_function (unsigned int fcode ATTRIBUTE_UNUSED)
    not support nested low-overhead loops.  */
 
 bool
-can_use_doloop_if_innermost (double_int, double_int,
+can_use_doloop_if_innermost (const widest_int &, const widest_int &,
 			     unsigned int loop_depth, bool)
 {
   return loop_depth == 1;
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index 1ba0c1d..aed5778 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -213,5 +213,6 @@  extern tree default_fn_abi_va_list_bounds_size (tree);
 extern tree default_chkp_bound_type (void);
 extern enum machine_mode default_chkp_bound_mode (void);
 extern tree default_builtin_chkp_function (unsigned int);
-extern bool can_use_doloop_if_innermost (double_int, double_int,
+extern bool can_use_doloop_if_innermost (const widest_int &,
+					 const widest_int &,
 					 unsigned int, bool);