From 1b81fddd654340a06fb199a13e71b27fd23e8064 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 7 Feb 2012 22:50:41 +0000 Subject: Use LEA to adjust stack ptr for Atom. Patch by Andy Zhang. llvm-svn: 150008 --- llvm/lib/Target/X86/X86Subtarget.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/Target/X86/X86Subtarget.h') diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index f930806be6c..9e8b3f98d8a 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -132,6 +132,10 @@ protected: /// this is true for most x86-64 chips, but not the first AMD chips. bool HasCmpxchg16b; + /// UseLeaForSP - True if the LEA instruction should be used for adjusting + /// the stack pointer. This is an optimization for Intel Atom processors. + bool UseLeaForSP; + /// PostRAScheduler - True if using post-register-allocation scheduler. bool PostRAScheduler; @@ -214,6 +218,7 @@ public: bool isUnalignedMemAccessFast() const { return IsUAMemFast; } bool hasVectorUAMem() const { return HasVectorUAMem; } bool hasCmpxchg16b() const { return HasCmpxchg16b; } + bool useLeaForSP() const { return UseLeaForSP; } bool isAtom() const { return X86ProcFamily == IntelAtom; } -- cgit v1.2.3