diff options
author | Jan Hubicka <jh@suse.cz> | 2000-09-11 23:54:11 +0000 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2000-09-11 23:54:11 +0000 |
commit | d90ffc8d2c830e45f8e7a17fe66355e7d7865fd8 (patch) | |
tree | a4a10ad41eb4009a3a451fc4518e9f29cc1010ab /gcc/recog.c | |
parent | 14203c9cac8bfbabc168aee4df38cb752bbed421 (diff) | |
download | gcc-d90ffc8d2c830e45f8e7a17fe66355e7d7865fd8.zip gcc-d90ffc8d2c830e45f8e7a17fe66355e7d7865fd8.tar.gz gcc-d90ffc8d2c830e45f8e7a17fe66355e7d7865fd8.tar.bz2 |
i386.md (add?i_3, add?i_5): New.
* i386.md (add?i_3, add?i_5): New.
(add?i_4): Rename from add?i_3; Fix compare pattern.
(sub?i_3, xor?i_3, ior?i_3): New.
* genrecog.c (write_tree): Output code to clear insn_extract cache.
* genattrtab.c (write_attr_case): Gen call to extract_insn_cache
instead of extract_insn and extract_constrain_insn_cache instead of
extract_insn and constrain_operands.
* recog.c (extract_insn_cached, extract_constrain_insn_cached):
New functions.
(extract_insn): Clear which_alternative.
(constrain_operands): Set which_alternative to -1 when failed.
* recog.h (extract_constrain_insn_cached, extract_insn_cached):
Declare.
From-SVN: r36342
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 87f8137..f1d5dee 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2045,6 +2045,31 @@ adj_offsettable_operand (op, offset) abort (); } +/* Like extract_insn, but save insn extracted and don't extract again, when + called again for the same insn expecting that recog_data still contain the + valid information. This is used primary by gen_attr infrastructure that + often does extract insn again and again. */ +void +extract_insn_cached (insn) + rtx insn; +{ + if (recog_data.insn == insn && INSN_CODE (insn) >= 0) + return; + extract_insn (insn); + recog_data.insn = insn; +} +/* Do cached extract_insn, constrain_operand and complain about failures. + Used by insn_attrtab. */ +void +extract_constrain_insn_cached (insn) + rtx insn; +{ + extract_insn_cached (insn); + if (which_alternative == -1 + && !constrain_operands (reload_completed)) + fatal_insn_not_found (insn); +} + /* Analyze INSN and fill in recog_data. */ void @@ -2056,9 +2081,11 @@ extract_insn (insn) int noperands; rtx body = PATTERN (insn); + recog_data.insn = NULL; recog_data.n_operands = 0; recog_data.n_alternatives = 0; recog_data.n_dups = 0; + which_alternative = -1; switch (GET_CODE (body)) { @@ -2592,6 +2619,7 @@ constrain_operands (strict) which_alternative++; } + which_alternative = -1; /* If we are about to reject this, but we are not to test strictly, try a very loose test. Only return failure if it fails also. */ if (strict == 0) |