Qing Zhao <qing.z...@oracle.com> writes: >> >> Going back to the default hook, I guess one option is: >> >> rtx zero = CONST0_RTX (reg_raw_mode[regno]); >> rtx_insn *insn = emit_insn (gen_rtx_SET (regno_reg_rtx[regno], zero)); >> if (!valid_insn_p (insn)) >> sorry (…); > > “Sorry” here will tell the user that the implementation on this platform is > not valid?
Right. If we didn't have a default implementation of the target hook, we would presumably need to issue a sorry () if the user tried to use the option on a target that didn't define the hook. The above is a compromise: we instead make a reasonable attempt to handle the option, and issue the sorry only if that attempt fails. Thanks, Richard > > Qing >> >> but with some mechanism to avoid spewing the user with messages >> for the same problem. >> >> Thanks, >> Richard