diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-15 07:33:04 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-15 07:33:04 +0000 |
commit | f83d4fdc0cc80ddff64eb3400827d16785c0abc8 (patch) | |
tree | ade4c61474f0cf78ce51f16f74ba9dd522d0d440 /gcc/df.h | |
parent | f8d8375042bce47a20a4027e165d4316d427baa6 (diff) | |
download | gcc-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.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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 */ |