summaryrefslogtreecommitdiff
path: root/gcc/recog.h
diff options
context:
space:
mode:
authoraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-24 18:22:27 +0000
committeraustern <austern@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-24 18:22:27 +0000
commit8c6af5c66fd2324e32caeb7bddb0f6d54d974020 (patch)
tree541afad07a054071f9b596da5f93ae365b489e19 /gcc/recog.h
parentf6781b9a0fc84a93aa6ff5a8fd340f48dd9d39c3 (diff)
downloadgcc-8c6af5c66fd2324e32caeb7bddb0f6d54d974020.tar.gz
Minor back end speedup.
* recog.c (recog_memoized_1): Remove. * recog.h (recog_memoized_1): Remove declaration. (recog_memoized): Change from macro to inline function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91185 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.h')
-rw-r--r--gcc/recog.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/recog.h b/gcc/recog.h
index eae37fb4442..3e88fad58cd 100644
--- a/gcc/recog.h
+++ b/gcc/recog.h
@@ -21,8 +21,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Random number that should be large enough for all purposes. */
#define MAX_RECOG_ALTERNATIVES 30
-#define recog_memoized(I) (INSN_CODE (I) >= 0 \
- ? INSN_CODE (I) : recog_memoized_1 (I))
/* Types of operands. */
enum op_type {
@@ -73,7 +71,6 @@ struct operand_alternative
extern void init_recog (void);
extern void init_recog_no_volatile (void);
-extern int recog_memoized_1 (rtx);
extern int check_asm_operands (rtx);
extern int asm_operand_ok (rtx, const char *);
extern int validate_change (rtx, rtx *, rtx, int);
@@ -102,6 +99,7 @@ extern int offsettable_address_p (int, enum machine_mode, rtx);
extern int mode_dependent_address_p (rtx);
extern int recog (rtx, rtx, int *);
+static inline int recog_memoized (rtx insn);
extern void add_clobbers (rtx, int);
extern int added_clobbers_hard_reg_p (int);
extern void insn_extract (rtx);
@@ -122,6 +120,23 @@ extern rtx peephole2_insns (rtx, rtx, int *);
extern int store_data_bypass_p (rtx, rtx);
extern int if_test_bypass_p (rtx, rtx);
+/* Try recognizing the instruction INSN,
+ and return the code number that results.
+ Remember the code so that repeated calls do not
+ need to spend the time for actual rerecognition.
+
+ This function is the normal interface to instruction recognition.
+ The automatically-generated function `recog' is normally called
+ through this one. (The only exception is in combine.c.) */
+
+static inline int
+recog_memoized (rtx insn)
+{
+ if (INSN_CODE (insn) < 0)
+ INSN_CODE (insn) = recog (PATTERN (insn), insn, 0);
+ return INSN_CODE (insn);
+}
+
/* Nonzero means volatile operands are recognized. */
extern int volatile_ok;