[llvm-commits] [llvm] r168396 - /llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp

Jakub Staszak kubastaszak at gmail.com
Tue Nov 20 16:51:46 PST 2012


Right! r168407.

- Kuba

On Nov 21, 2012, at 12:54 AM, Craig Topper <craig.topper at gmail.com> wrote:

> isScratchReg and isFPCopy could be static couldn't they?
> 
> On Tue, Nov 20, 2012 at 3:32 PM, Jakub Staszak <kubastaszak at gmail.com> wrote:
> Author: kuba
> Date: Tue Nov 20 17:32:32 2012
> New Revision: 168396
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=168396&view=rev
> Log:
> Add obvious constantness.
> 
> Modified:
>     llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
> 
> Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=168396&r1=168395&r2=168396&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Tue Nov 20 17:32:32 2012
> @@ -198,7 +198,7 @@
>      }
> 
>      /// getScratchReg - Return an FP register that is not currently in use.
> -    unsigned getScratchReg() {
> +    unsigned getScratchReg() const {
>        for (int i = NumFPRegs - 1; i >= 8; --i)
>          if (!isLive(i))
>            return i;
> @@ -206,7 +206,7 @@
>      }
> 
>      /// isScratchReg - Returns trus if RegNo is a scratch FP register.
> -    bool isScratchReg(unsigned RegNo) {
> +    bool isScratchReg(unsigned RegNo) const {
>        return RegNo > 8 && RegNo < NumFPRegs;
>      }
> 
> @@ -311,7 +311,7 @@
>      void handleSpecialFP(MachineBasicBlock::iterator &I);
> 
>      // Check if a COPY instruction is using FP registers.
> -    bool isFPCopy(MachineInstr *MI) {
> +    bool isFPCopy(MachineInstr *MI) const {
>        unsigned DstReg = MI->getOperand(0).getReg();
>        unsigned SrcReg = MI->getOperand(1).getReg();
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> 
> 
> -- 
> ~Craig

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121121/04839ad6/attachment.html>


More information about the llvm-commits mailing list