C++ PATCH: multiple inheritance optimization
Richard Henderson
rth@cygnus.com
Mon Jan 17 18:29:00 GMT 2000
On Mon, Jan 17, 2000 at 02:55:15PM -0800, Mark Mitchell wrote:
> ========== OLD ABI =========
>
> xorl %eax, %eax
> testl %ecx, %ecx
> leal 8(%ecx), %edx
> sete %al
> decl %eax
> andl %edx, %eax
> movl 4(%eax), %ebx
> xorl %eax, %eax
> testl %ecx, %ecx
> sete %al
> decl %eax
> andl %eax, %edx
> pushl %edx
> movl 8(%ebx), %ebx
> .LCFI6:
> call *%ebx
This calculates (u ? u+8 : u) twice, and due to the if-conversion,
it's too complicated for cse to grovel it's way through.
Any chance you could help the code generator out here and save the
first copy and reuse it? Or are the two COND_EXPRs coming from
different parts of the front end?
r~
More information about the Gcc-patches
mailing list