[llvm-commits] [llvm] r164051 - /llvm/trunk/lib/Target/Mips/Mips16FrameLowering.cpp

Hatanaka, Akira ahatanaka at mips.com
Mon Sep 17 14:12:16 PDT 2012


Yes, you are right.

Reed is saying that he didn't remove the if statement because the code which was added is a temporary fix that will be removed once he makes the changes to correctly use save/restore instructions in function prologue/epilogue.

Is that okay with you?
________________________________________
From: Bill Wendling [wendling at apple.com]
Sent: Monday, September 17, 2012 1:28 PM
To: Hatanaka, Akira
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [llvm] r164051 - /llvm/trunk/lib/Target/Mips/Mips16FrameLowering.cpp

On Sep 17, 2012, at 1:02 PM, Akira Hatanaka <ahatanaka at mips.com> wrote:

> Author: ahatanak
> Date: Mon Sep 17 15:02:42 2012
> New Revision: 164051
>
> URL: http://llvm.org/viewvc/llvm-project?rev=164051&view=rev
> Log:
> Make sure there is enough room for RA. getStackSize needs to be cleaned up but
> we will do that when we implement the full save/restore.
>
> Patch by Reed Kotler.
>
> Modified:
>    llvm/trunk/lib/Target/Mips/Mips16FrameLowering.cpp
>
> Modified: llvm/trunk/lib/Target/Mips/Mips16FrameLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/Mips16FrameLowering.cpp?rev=164051&r1=164050&r2=164051&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/Mips/Mips16FrameLowering.cpp (original)
> +++ llvm/trunk/lib/Target/Mips/Mips16FrameLowering.cpp Mon Sep 17 15:02:42 2012
> @@ -35,6 +35,8 @@
>   DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
>   uint64_t StackSize = MFI->getStackSize();
>
> +  StackSize += 16; // need to allocate space for RA. Clean this up later
> +                   // when we fix the save/restore instruction. TBD..
>   // No need to allocate space on the stack.
>   if (StackSize == 0 && !MFI->adjustsStack()) return;
>
> @@ -52,6 +54,8 @@
>   DebugLoc dl = MBBI->getDebugLoc();
>   uint64_t StackSize = MFI->getStackSize();
>
> +  StackSize += 16; // need to allocate space for RA. Clean this up later
> +                   // when we fix the save/restore instruction. TBD..
>   if (!StackSize)
>     return;
>
Erm...Don't these changes make the following 'if-then' statements' conditionals always false?

-bw





More information about the llvm-commits mailing list