Use LEA to adjust stack ptr for Atom. Patch by Andy Zhang.
[oota-llvm.git] / lib / Target / X86 / X86Subtarget.h
index f930806be6c7376e25a06cd683892f0906088d1b..9e8b3f98d8aac6e899d43f12c0dd1ba025a9f47f 100644 (file)
@@ -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; }