[patch] Fix behavior of TER on unrolled loops

David Edelsohn dje@watson.ibm.com
Fri Aug 26 00:01:00 GMT 2005


>>>>> Zdenek Dvorak writes:

Zdenek> ivopts are run pretty late at the tree stage of optimizations, after
Zdenek> which point not many significant changes occur to the code; thus, quite
Zdenek> realistic estimates are possible.  And, at the very least, we cannot
Zdenek> avoid taking register pressure/addressing modes into account currently,
Zdenek> without changes to register allocator and/or other passes (to see the
Zdenek> effects, you may just remove the few lines of code responsible for
Zdenek> handling them from ivopts; I did not implement them just for fun, but to
Zdenek> avoid performance regressions in order of 10%).

	Again, I do not believe that anyone disagrees with the goal, just
with the approach.  I am sure that making SR aware of register pressure
improves performance; however, the question is whether including register
pressure in the SR decision is the best way to fix the problem.  It
definitely is not the *only* solution.

	Hopefully the register allocator will be addressed in the
relatively near future.  Some of the proper solutions take time as GCC is
re-engineered.  If we start including a lot of short-term hacks in GCC, it
will create an even more unmaintainable mess.  GCC will be much more
effective by following one guiding design, not a combination of multiple,
conflicting designs.

	Some other developers have suggested compensating for the
aggressive SR in a late pass near RA, like other compilers.  How about
trying to implement the suggestions that match the general strategy of
other GCC developers instead of arguing against them and implementing
designs that conflict with them?

David



More information about the Gcc-patches mailing list