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 Sat, Oct 31, 2009 at 11:58 AM, Paolo Bonzini<bonzini@gnu.org> wrote:On 10/31/2009 10:57 AM, Richard Sandiford wrote:
So either I need to hack MIPS so that 2 is cheap and 3+ is "expensive", or we need some better way of determining this.
- return mips_address_insns (addr, SImode, false); + int insns = mips_address_insns (addr, SImode, false); + return insns == 1 ? 1 : COSTS_N_INSNS (insns - 1);
?
I don't think sticking an x86-specific magic number in the middle of generic code is acceptable, regardless of how big the comment above it is. ;)
That's why I suggested using "<= COSTS_N_INSNS (1) / 2" instead of "< 3". Also ix86-specific calibration, but not so brutally. :-)
But then you should document that address-cost is supposed to be insn-cost based. Otherwise comparing apples with oranges doesn't make sense, even if it might look less magic to you.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |