Remove some unnecessary null checks in df.h
Richard Sandiford
rdsandiford@googlemail.com
Sat Jun 14 20:02:00 GMT 2014
DF_REF_REG_USE_P and DF_MWS_REG_USE_P checked for null arguments
but the def equivalents didn't. There doesn't seem to be any
need for this difference.
Tested on x86_64-linux-gnu. OK to install?
Thanks,
Richard
gcc/
* df.h (DF_REF_REG_USE_P, DF_MWS_REG_USE_P): Remove null checks.
Index: gcc/df.h
===================================================================
--- gcc/df.h 2014-06-13 09:50:18.408426173 +0100
+++ gcc/df.h 2014-06-13 10:03:38.465506737 +0100
@@ -678,14 +678,14 @@ #define DF_REF_EXTRACT_MODE(REF) ((REF)-
/* Macros to determine the reference type. */
#define DF_REF_REG_DEF_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_DEF)
-#define DF_REF_REG_USE_P(REF) ((REF) && !DF_REF_REG_DEF_P (REF))
+#define DF_REF_REG_USE_P(REF) (!DF_REF_REG_DEF_P (REF))
#define DF_REF_REG_MEM_STORE_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_MEM_STORE)
#define DF_REF_REG_MEM_LOAD_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_MEM_LOAD)
#define DF_REF_REG_MEM_P(REF) (DF_REF_REG_MEM_STORE_P (REF) \
|| DF_REF_REG_MEM_LOAD_P (REF))
#define DF_MWS_REG_DEF_P(MREF) (DF_MWS_TYPE (MREF) == DF_REF_REG_DEF)
-#define DF_MWS_REG_USE_P(MREF) ((MREF) && !DF_MWS_REG_DEF_P (MREF))
+#define DF_MWS_REG_USE_P(MREF) (!DF_MWS_REG_DEF_P (MREF))
#define DF_MWS_TYPE(MREF) ((MREF)->type)
/* Macros to get the refs out of def_info or use_info refs table. If
More information about the Gcc-patches
mailing list