On 03/15/2010 01:00 AM, Amker.Cheng wrote:
1:  In pattern "*mul_acc_si", there's constraint like "*?*?".
what does this supposed to do?

'*' is in the Constraint Modifier Characters section of the docs. It means ignore the next character for register class preferencing. '?' is in the Multiple Alternative Constraints section. It means that this alternative is less desirable than the others. So '*?' will be ignored by the register class preferencing code. It will be used in reload when computing which alternative is better though. Reload computes a cost for each alternative, and then chooses the cheapest one, or which ever one occurs first (left to right) when there are ties. '*?' has the effect of slightly increasing the reload cost of an alternative, and is used when you want to discourage reload from picking this particular alternative.

If you don't know anything about register class preferencing or reload as yet, then this is probably not going to make much sense to you, but it isn't anything important you need to worry about at this point. It is a very minor performance optimization.

2:  there is a split pattern for "*mul_acc_si" as following:
this will generate integer multiply instruction with register write,
but what if the processor has only integer multiply instructions,
which only store results in HILO?

A define_split can only match something generated by a define_insn, and the mul_acc_si define_insn is testing "GENERATE_MADD_MSUB && !TARGET_MIPS16" so there is no serious problem. We are just running a define_split that can never match anything. This could be cleaned up a little by adding an appropriate condition to the define_split, or by combining the define_insn and define_split patterns into a define_insn_and_split pattern.

Jim

Reply via email to