diff mbox series

More checking TLC

Message ID alpine.LSU.2.20.1804301214410.24704@zhemvz.fhfr.qr
State New
Headers show
Series More checking TLC | expand

Commit Message

Richard Biener April 30, 2018, 10:15 a.m. UTC
Bootstrapped on x86_64-unknown-linux-gnu, applied.

Richard.

2018-04-30  Richard Biener  <rguenther@suse.de>

	* tree-chrec.h (evolution_function_is_constant_p): Remove
	redundant check.
	* tree-cfg.c (tree_node_can_be_shared): Re-order checks.
diff mbox series

Patch

Index: gcc/tree-chrec.h
===================================================================
--- gcc/tree-chrec.h	(revision 259755)
+++ gcc/tree-chrec.h	(working copy)
@@ -170,8 +170,6 @@  evolution_function_is_constant_p (const_
   if (chrec == NULL_TREE)
     return false;
 
-  if (CONSTANT_CLASS_P (chrec))
-    return true;
   return is_gimple_min_invariant (chrec);
 }
 
Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c	(revision 259755)
+++ gcc/tree-cfg.c	(working copy)
@@ -5212,16 +5028,13 @@  static bool
 tree_node_can_be_shared (tree t)
 {
   if (IS_TYPE_OR_DECL_P (t)
-      || is_gimple_min_invariant (t)
       || TREE_CODE (t) == SSA_NAME
-      || t == error_mark_node
-      || TREE_CODE (t) == IDENTIFIER_NODE)
-    return true;
-
-  if (TREE_CODE (t) == CASE_LABEL_EXPR)
+      || TREE_CODE (t) == IDENTIFIER_NODE
+      || TREE_CODE (t) == CASE_LABEL_EXPR
+      || is_gimple_min_invariant (t))
     return true;
 
-  if (DECL_P (t))
+  if (t == error_mark_node)
     return true;
 
   return false;