aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>2015-07-09 02:49:51 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2015-07-09 02:49:51 +0000
commitf1657f05ef0fbc5183051de277141159f15a9472 (patch)
treee4dc3a562a1e0900ee3ab1384aba87e00500bcef /gcc/cse.c
parent1acfc9ca30d79133bca85399440c0d7fa123fb51 (diff)
downloadgcc-f1657f05ef0fbc5183051de277141159f15a9472.zip
gcc-f1657f05ef0fbc5183051de277141159f15a9472.tar.gz
gcc-f1657f05ef0fbc5183051de277141159f15a9472.tar.bz2
reduce conditional compilation for LOAD_EXTEND_OP
Provide a default in files where that is possible, so that everything else there can be unconditionally compiled. However rtlanal.c and reload.c do tricky things that break providing a global default, so we can't do that yet. gcc/ChangeLog: 2015-07-08 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * combine.c (try_combine): Don't check if LOAD_EXTEND_OP is defined. (simplify_set): Likewise. * cse.c (cse_insn): Likewise. * fold-const.c (fold_single_bit_test): Likewise. (fold_unary_loc): Likewise. * postreload.c (reload_cse_simplify_set): Likewise. (reload_cse_simplify_operands): Likewise. From-SVN: r225591
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index eefc7bc..af06543 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -51,6 +51,10 @@ along with GCC; see the file COPYING3. If not see
#include "dbgcnt.h"
#include "rtl-iter.h"
+#ifndef LOAD_EXTEND_OP
+#define LOAD_EXTEND_OP(M) UNKNOWN
+#endif
+
/* The basic idea of common subexpression elimination is to go
through the code, keeping a record of expressions that would
have the same value at the current scan point, and replacing
@@ -4867,7 +4871,6 @@ cse_insn (rtx_insn *insn)
}
}
-#ifdef LOAD_EXTEND_OP
/* See if a MEM has already been loaded with a widening operation;
if it has, we can use a subreg of that. Many CISC machines
also have such operations, but this is only likely to be
@@ -4913,7 +4916,6 @@ cse_insn (rtx_insn *insn)
break;
}
}
-#endif /* LOAD_EXTEND_OP */
/* Try to express the constant using a register+offset expression
derived from a constant anchor. */