diff options
author | Joern Rennecke <joern.rennecke@embecosm.com> | 2012-11-28 13:18:25 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2012-11-28 13:18:25 +0000 |
commit | ffcc7caf89f32a76f39fd293c0e97df2b5cf5288 (patch) | |
tree | 6999b62bcdb1ea84420bb011e59f00b9d818e552 | |
parent | 1001fb60ccdb5e929b2cbff7d9954996d2196890 (diff) | |
download | gcc-ffcc7caf89f32a76f39fd293c0e97df2b5cf5288.zip gcc-ffcc7caf89f32a76f39fd293c0e97df2b5cf5288.tar.gz gcc-ffcc7caf89f32a76f39fd293c0e97df2b5cf5288.tar.bz2 |
epiphany.h (HARD_REGNO_RENAME_OK): Define.
* config/epiphany/epiphany.h (HARD_REGNO_RENAME_OK): Define.
* config/epiphany/epiphany-protos.h (epiphany_regno_rename_ok): Declare.
* config/epiphany/epiphany.c (epiphany_regno_rename_ok): New function.
From-SVN: r193889
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/epiphany/epiphany-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/epiphany/epiphany.c | 13 | ||||
-rw-r--r-- | gcc/config/epiphany/epiphany.h | 2 |
4 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 128062d..538eb02 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-11-28 Joern Rennecke <joern.rennecke@embecosm.com> + + * config/epiphany/epiphany.h (HARD_REGNO_RENAME_OK): Define. + * config/epiphany/epiphany-protos.h (epiphany_regno_rename_ok): Declare. + * config/epiphany/epiphany.c (epiphany_regno_rename_ok): New function. + 2012-11-28 Richard Biener <rguenther@suse.de> PR tree-optimization/54547 diff --git a/gcc/config/epiphany/epiphany-protos.h b/gcc/config/epiphany/epiphany-protos.h index 2e787da..4400580 100644 --- a/gcc/config/epiphany/epiphany-protos.h +++ b/gcc/config/epiphany/epiphany-protos.h @@ -54,3 +54,4 @@ extern bool epiphany_is_interrupt_p (tree); extern unsigned epiphany_special_round_type_align (tree, unsigned, unsigned); extern unsigned epiphany_adjust_field_align (tree, unsigned); extern void epiphany_start_function (FILE *f, const char *name, tree decl); +extern bool epiphany_regno_rename_ok (unsigned src, unsigned dst); diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index 4279a14..88079d2 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -1879,6 +1879,19 @@ epiphany_initial_elimination_offset (int from, int to) gcc_unreachable (); } +bool +epiphany_regno_rename_ok (unsigned, unsigned dst) +{ + enum epiphany_function_type fn_type; + + fn_type = epiphany_compute_function_type (current_function_decl); + if (!EPIPHANY_INTERRUPT_P (fn_type)) + return true; + if (df_regs_ever_live_p (dst)) + return true; + return false; +} + static int epiphany_issue_rate (void) { diff --git a/gcc/config/epiphany/epiphany.h b/gcc/config/epiphany/epiphany.h index b1b5e8b..07d0909 100644 --- a/gcc/config/epiphany/epiphany.h +++ b/gcc/config/epiphany/epiphany.h @@ -291,6 +291,8 @@ along with GCC; see the file COPYING3. If not see 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77 \ } +#define HARD_REGNO_RENAME_OK(SRC, DST) epiphany_regno_rename_ok (SRC, DST) + /* Return number of consecutive hard regs needed starting at reg REGNO to hold something of mode MODE. This is ordinarily the length in words of a value of mode MODE |