Why is targetm.fixed_condition_code_regs a function?

Ian Lance Taylor ian@wasabisystems.com
Thu Feb 19 05:01:00 GMT 2004


"Zack Weinberg" <zack@codesourcery.com> writes:

> While looking to see what had fixed the redundant compare instruction
> generation for i386 I noticed this new target hook.  I don't see why
> it should be a function.  A two-element array of unsigned int should
> suffice - if both are INVALID_REGNUM, then the target doesn't use this
> kind of comparison, else one or both are hard register numbers.  I
> don't think it is possible for this to change at runtime...

Sure, it could be an array.  The information is only retrieved once
per function being compiled, so I doubt it will make much difference
performance-wise.  I can change it if people think it would be
clearer.

Ian



More information about the Gcc mailing list