On Thu, Aug 23, 2012 at 7:59 PM, Andrew Pinski <pins...@gmail.com> wrote:
>>> This patch introduces TARGET_REJECT_COMBINED_INSN target hook, so >>> targets are able to reject combinations of two or more insns. The hook >>> is called from recog_for_combine, so it is the target that has the >>> final say on the combined insn. >> >> Hi, >> >> great place for a hook, it was missing, IMO. >> >> Just a note: Wouldn't it be good to have a hook that may transform >> a pattern to a new one and return that to combine? >> >> Your reject_combined_insn would be a special case, e.g. return >> NULL_RTX. >> >> Sometimes recog_for_combine fails (resp. recog fails) because >> recog_for_combine does not try all possible transformations and >> therefore recog then fails because there is no combine pattern. > > Or just better yet improve recog_for_combine. I was planing on doing > that for some cases dealing with zero_extract. We have tried that (see previous discussions on recog_for_combine change. But there is no way to satisfy all targets: some works better when reload fixes invalid hard regs (sh), others (x86) require totally different strategy. Even if recog_for_combine will be improved for all targets, we will still need something target specific. Uros.