[llvm-commits] Intel Atom optimization - use LEA to adjust stack pointer

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Dec 23 20:05:52 PST 2011


On Dec 23, 2011, at 10:23 AM, Zhang, Andy wrote:

> On Thursday, December 22, 2011 7:29 PM, Eli Friedman <eli.friedman at gmail.com> wrote: 
>> On Wed, Dec 21, 2011 at 2:28 PM, Zhang, Andy <andy.zhang at intel.com>
>> wrote:
>>> Hi all,
>>> 
>>> Please find attached a patch that implements an optimization for the
>> Intel Atom processor. We can avoid an ALU to AGU dependency by using
>> the LEA instruction to update the stack pointer so as to prevent a
>> stall, as recommended by the Intel Optimization Reference Manual
>> (coding rule 5, specifically).

> Attached is the patch including the tests.

Hi Andy,

Please submit the TableGen changes as an independent patch.

>From a quick glance, you also need to make sure you follow LLVM's style for braces etc.

     if (isSub)
+    {
       MI->setFlag(MachineInstr::FrameSetup);
-    MI->getOperand(3).setIsDead(); // The EFLAGS implicit def is dead.
+    }

Why add braces here?

/jakob





More information about the llvm-commits mailing list