[llvm-commits] [llvm] r89877 - /llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h

Chris Lattner clattner at apple.com
Wed Nov 25 16:18:10 PST 2009


On Nov 25, 2009, at 11:57 AM, Bob Wilson wrote:

> Author: bwilson
> Date: Wed Nov 25 13:57:14 2009
> New Revision: 89877
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=89877&view=rev
> Log:
> Tail duplicate indirect branches for PowerPC, too.
> With the testcase for pr3120, the "threaded interpreter" runtime decreases
> from 1788 to 1413 with this change.

Very nice Bob!  Silly question: should isProfitableToDuplicateIndirectBranch default to true?  That would let targets opt out if it is not beneficial and would save a small bit of code size.

-Chris

> 
> Modified:
>    llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h
> 
> Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h?rev=89877&r1=89876&r2=89877&view=diff
> 
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h Wed Nov 25 13:57:14 2009
> @@ -151,6 +151,8 @@
>   /// instruction may be.  This returns the maximum number of bytes.
>   ///
>   virtual unsigned GetInstSizeInBytes(const MachineInstr *MI) const;
> +
> +  virtual bool isProfitableToDuplicateIndirectBranch() const { return true; }
> };
> 
> }
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list