Profiling on S390

Richard Henderson rth@redhat.com
Tue Apr 22 23:13:00 GMT 2003


On Tue, Apr 22, 2003 at 10:43:37PM +0200, Ulrich Weigand wrote:
> >It looks very unsafe for me - GCC assumes at many places that CC is not
> >live accross boundaries.
> 
> This is annoying.  Is there any fundamental reason for this restriction?

No, and it's not actually true.

What is true is that you can't generally move the thing around
if most of your instructions clobber the flags.  So e.g. for x86
this would be a Really Bad Idea, but for Sparc it can work out.

It's also true that some of the simplifiers (cse, combine) won't
DTRT unless the compare and use are in the same block.

> Can't the profiler use special code to save/restore CC?

It could, but if you don't have add/load/store insns that don't
clobber CC, then you'll get in trouble with reload too.  Of
course, that brings up the issue of getting the right pattern
emitted from the profiler.  Could be done with a special named
add pattern, but that seems like a lot of overhead for very
little return.

This is all about a movstrsi or cmpstrsi pattern?  Perhaps it
would be better to keep this as one unit until after reload?


r~



More information about the Gcc mailing list