This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Pad short functions for Atom
On 09/16/2010 10:52 AM, H.J. Lu wrote:
> On Thu, Sep 16, 2010 at 8:47 AM, Richard Henderson <rth@redhat.com> wrote:
>> On 09/16/2010 08:34 AM, H.J. Lu wrote:
>>>> Surely this is overkill. Why not assume that any function
>>>> with more than a single basic block is not short? You can
>>>> then significantly simplify these two functions.
...
> There are 3 basic blocks. But one code path has only 3 instructions.
>
> testl %edi, %edi
> movl %edi, %eax
> je .L2
> ...
> .L2:
> ret
>
> I want to check if any code path has less than 4 instructions
> with less than 3 basic blocks. How can I do it?
As I said: you simply ignore that case.
Honestly, is this *really* worth it? As far as I can see,
it's a large complication to the code for what looks like
zero gain. It's not like you're truly counting cycles,
you're just guessing based on insn counts.
r~