summaryrefslogtreecommitdiff
path: root/gcc/df.h
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-15 07:33:04 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-15 07:33:04 +0000
commitf83d4fdc0cc80ddff64eb3400827d16785c0abc8 (patch)
treeade4c61474f0cf78ce51f16f74ba9dd522d0d440 /gcc/df.h
parentf8d8375042bce47a20a4027e165d4316d427baa6 (diff)
downloadgcc-f83d4fdc0cc80ddff64eb3400827d16785c0abc8.tar.gz
gcc/
* df.h (df_single_def, df_single_use): New functions. * ira.c (find_moveable_pseudos): Use them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211681 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df.h')
-rw-r--r--gcc/df.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/df.h b/gcc/df.h
index 9ec8ae1fd5d..73c09723dae 100644
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -1165,6 +1165,25 @@ df_get_artificial_uses (unsigned int bb_index)
return df_scan_get_bb_info (bb_index)->artificial_uses;
}
+/* If INSN defines exactly one register, return the associated reference,
+ otherwise return null. */
+
+static inline df_ref
+df_single_def (const df_insn_info *info)
+{
+ df_ref *defs = DF_INSN_INFO_DEFS (info);
+ return defs[0] && !defs[1] ? defs[0] : NULL;
+}
+
+/* If INSN uses exactly one register, return the associated reference,
+ otherwise return null. */
+
+static inline df_ref
+df_single_use (const df_insn_info *info)
+{
+ df_ref *uses = DF_INSN_INFO_USES (info);
+ return uses[0] && !uses[1] ? uses[0] : NULL;
+}
/* web */