This is the mail archive of the
mailing list for the GCC project.
Re: Seeking suggestion
> From: Jim Wilson <email@example.com>
> To: Jamie Prescott <firstname.lastname@example.org>
> Cc: Georg-Johann Lay <email@example.com>; Ian Lance Taylor <firstname.lastname@example.org>; email@example.com
> Sent: Tuesday, May 26, 2009 7:47:45 PM
> Subject: Re: Seeking suggestion
> Jamie Prescott wrote:
> > Is there a reason why something like this would not work?
> > if (!TARGET_XXX2)
> > emit_clobber(gen_rtx_REG(CCmode, CC_REGNUM));
> > emit_insn(gen_addsi3_nc(operands, operands, operands));
> Yes. The optimizer will not know that addsi3_nc uses CC_REGNUM, as it is not
> mentioned, so the optimizer will not know that these two RTL instructions always
> need to remain next to each other. Any optimization pass that moves insns
> around may separate the add from the clobber resulting in broken code. This is
> what parallels are for, to make sure that the clobber and add stay together.
Thanks for the explanation. I somehow thought that every insn spit out by a define_insn
was automatically turned into a parallel.
I guess I was wrong.