[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 04/33] tcg-aarch64: Hoist common argument loa

From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v4 04/33] tcg-aarch64: Hoist common argument loads in tcg_out_op
Date: Mon, 16 Sep 2013 09:20:32 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 09/16/2013 12:42 AM, Claudio Fontana wrote:
>> +    /* Hoist the loads of the most common arguments.  */
>> > +    TCGArg a0 = args[0];
>> > +    TCGArg a1 = args[1];
>> > +    TCGArg a2 = args[2];
>> > +    int c2 = const_args[2];
>> > +
> Either all or none (add c0, c1), I would expect the compiler not to
> generate code for the paths that don't use C[n].

I chose the most common.  Those used in 90% of all of the cases.

> Btw, if the compiler generates bloated code without this, we should notify
> the projects working on gcc for aarch64.

It's not the compiler's fault.  After parameter decomposition, the arrays
become pointers, and the compiler can't tell that it's always safe to perform
the loads.  So in general it can't hoist the loads higher than the first
explicit reference that proves the pointers must be non-null.

Now that I think about it, we might actually do better, generically, to package
all of these arguments up into a struct.  The compiler can more easily reason
about the collective safety of structure access...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]