[llvm-dev] X86PadShortFunction.cpp inserts noops twice

Serguei Katkov via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 1 20:31:30 PDT 2017


Interesting...

Tim, thank you for explanation.

Thank you,
Serguei.

> -----Original Message-----
> From: Tim Northover [mailto:t.p.northover at gmail.com]
> Sent: Tuesday, August 1, 2017 11:37 PM
> To: Serguei Katkov <serguei.katkov at azul.com>
> Cc: llvm-dev <llvm-dev at lists.llvm.org>
> Subject: Re: [llvm-dev] X86PadShortFunction.cpp inserts noops twice
> 
> On 1 August 2017 at 01:04, Serguei Katkov via llvm-dev <llvm-
> dev at lists.llvm.org> wrote:
> > What is the reason to add two noops? What am I missing?
> 
> It does seem to be intentional (looking at the test) so my guess is that it's
> because the Atom is dual-issue (i.e. executes 2 instructions per cycle).
> 
> The early part of the calculation and wording of the problem (in
> r171879) seems to be in cycles and then this code (with the misnamed
> "NOOPsToAdd") gets called to use up some number of them. Emitting 2
> NOPs probably consumes both pipelines for 1 cycle.
> 
> Cheers.
> 
> Tim.


More information about the llvm-dev mailing list