This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PTX] remove unnecessary predicates


I've committed this patch to remove some unused or unnecessary operand predicates. The address-space predicates are not used anywhere. The const_0_operand is one small typo away from const0_operand. And as it turns out unnecessary for its only use in a define_expand for ctrap. const0_operand is the right predicate there anyway.

nathan
2015-11-29  Nathan Sidwell  <nathan@acm.org>

	* config/nvptx/nvptx.md (const_0_operand, global_mem_operand,
	const_mem_operand, param_mem_operand, shared_mem_operand): Delete.
	(ctrap<mode>): Use const0_operand.

Index: gcc/config/nvptx/nvptx.md
===================================================================
--- gcc/config/nvptx/nvptx.md	(revision 231046)
+++ gcc/config/nvptx/nvptx.md	(working copy)
@@ -153,26 +153,6 @@
   return nonimmediate_operand (op, mode);
 })
 
-(define_predicate "const_0_operand"
-  (and (match_code "const_int,const_double,const_vector")
-       (match_test "op == CONST0_RTX (GET_MODE (op))")))
-
-(define_predicate "global_mem_operand"
-  (and (match_code "mem")
-       (match_test "MEM_ADDR_SPACE (op) == ADDR_SPACE_GLOBAL")))
-
-(define_predicate "const_mem_operand"
-  (and (match_code "mem")
-       (match_test "MEM_ADDR_SPACE (op) == ADDR_SPACE_CONST")))
-
-(define_predicate "param_mem_operand"
-  (and (match_code "mem")
-       (match_test "MEM_ADDR_SPACE (op) == ADDR_SPACE_PARAM")))
-
-(define_predicate "shared_mem_operand"
-  (and (match_code "mem")
-       (match_test "MEM_ADDR_SPACE (op) == ADDR_SPACE_SHARED")))
-
 (define_predicate "const0_operand"
   (and (match_code "const_int")
        (match_test "op == const0_rtx")))
@@ -1330,7 +1310,7 @@
   [(trap_if (match_operator 0 "nvptx_comparison_operator"
 			    [(match_operand:SDIM 1 "nvptx_register_operand")
 			     (match_operand:SDIM 2 "nvptx_nonmemory_operand")])
-	    (match_operand 3 "const_0_operand"))]
+	    (match_operand 3 "const0_operand"))]
   ""
 {
   rtx t = nvptx_expand_compare (operands[0]);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]