This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Mon, Apr 6, 2009 at 11:14 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
Can extract_insn_cached help here?
You can look at ix86_attr_length_address_default, there is get_attr_type, used to detect TYPE_LEA.
Here is the rest of Intel Atom optimization. OK for trunk?
+static int +distance_non_agu_define (rtx op1, rtx op2, rtx insn) +{ + unsigned int regno1 = REGNO (op1); + unsigned int regno2 = REG_P (op2) ? REGNO (op2) : (unsigned int) -1;
+ basic_block bb = BLOCK_FOR_INSN (insn); + int distance = 0; + df_ref *def_rec;
+ { + insn_type = get_attr_type (prev); + if (insn_type != TYPE_LEA) + goto done; + }
+done: + /* Restore recog_data which may be modified by get_attr_type. */ + extract_insn_cached (insn); + return distance;
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |