diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-23 19:37:40 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-23 19:37:40 +0000 |
commit | 10ada81fea4490f94ba2eb5923bf5baa367a38bd (patch) | |
tree | 437dca120093cc7b1f6debf6f6b31779526c7192 /gcc/gcse.c | |
parent | 95a236de8aa10bf009e9368dfd28f95a980e5570 (diff) | |
parent | 3bd7a983695352a99f7dd597725eb5b839d4b4cf (diff) | |
download | gcc-ifunc.tar.gz |
Merged with trunk at revision 162480.ifunc
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/ifunc@162483 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c index b0a18689326..6f345ccbce6 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -143,6 +143,7 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include "coretypes.h" #include "tm.h" +#include "diagnostic-core.h" #include "toplev.h" #include "rtl.h" @@ -169,6 +170,7 @@ along with GCC; see the file COPYING3. If not see #include "df.h" #include "dbgcnt.h" #include "target.h" +#include "gcse.h" /* We support GCSE via Partial Redundancy Elimination. PRE optimizations are a superset of those done by classic GCSE. @@ -262,6 +264,11 @@ along with GCC; see the file COPYING3. If not see /* GCSE global vars. */ +struct target_gcse default_target_gcse; +#if SWITCHABLE_TARGET +struct target_gcse *this_target_gcse = &default_target_gcse; +#endif + /* Set to non-zero if CSE should run after all GCSE optimizations are done. */ int flag_rerun_cse_after_global_opts; @@ -538,10 +545,10 @@ static bool is_too_expensive (const char *); /* Misc. utilities. */ -/* Nonzero for each mode that supports (set (reg) (reg)). - This is trivially true for integer and floating point values. - It may or may not be true for condition codes. */ -static char can_copy[(int) NUM_MACHINE_MODES]; +#define can_copy \ + (this_target_gcse->x_can_copy) +#define can_copy_init_p \ + (this_target_gcse->x_can_copy_init_p) /* Compute which modes support reg/reg copy operations. */ @@ -578,8 +585,6 @@ compute_can_copy (void) bool can_copy_p (enum machine_mode mode) { - static bool can_copy_init_p = false; - if (! can_copy_init_p) { compute_can_copy (); |