summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86Subtarget.h
diff options
context:
space:
mode:
authorAlexey Volkov <avolkov.intel@gmail.com>2014-05-20 08:55:50 +0000
committerAlexey Volkov <avolkov.intel@gmail.com>2014-05-20 08:55:50 +0000
commit6226de67210755a56d15dca7f1891fe7fddda3ca (patch)
tree49e5679bb8c10b7fed4057f8b74aecbf2b818d01 /llvm/lib/Target/X86/X86Subtarget.h
parentabdf44e7f38d392fed85692b2a31bf1578f3ee3b (diff)
downloadbcm5719-llvm-6226de67210755a56d15dca7f1891fe7fddda3ca.tar.gz
bcm5719-llvm-6226de67210755a56d15dca7f1891fe7fddda3ca.zip
[X86] Tune LEA usage for Silvermont
According to Intel Software Optimization Manual on Silvermont in some cases LEA is better to be replaced with ADD instructions: "The rule of thumb for ADDs and LEAs is that it is justified to use LEA with a valid index and/or displacement for non-destructive destination purposes (especially useful for stack offset cases), or to use a SCALE. Otherwise, ADD(s) are preferable." Differential Revision: http://reviews.llvm.org/D3826 llvm-svn: 209198
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.h')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h
index 5d2dcefb079..8ec680efff8 100644
--- a/llvm/lib/Target/X86/X86Subtarget.h
+++ b/llvm/lib/Target/X86/X86Subtarget.h
@@ -178,6 +178,9 @@ protected:
/// address generation (AG) time.
bool LEAUsesAG;
+ /// SlowLEA - True if the LEA instruction with certain arguments is slow
+ bool SlowLEA;
+
/// Processor has AVX-512 PreFetch Instructions
bool HasPFI;
@@ -315,11 +318,13 @@ public:
bool padShortFunctions() const { return PadShortFunctions; }
bool callRegIndirect() const { return CallRegIndirect; }
bool LEAusesAG() const { return LEAUsesAG; }
+ bool slowLEA() const { return SlowLEA; }
bool hasCDI() const { return HasCDI; }
bool hasPFI() const { return HasPFI; }
bool hasERI() const { return HasERI; }
bool isAtom() const { return X86ProcFamily == IntelAtom; }
+ bool isSLM() const { return X86ProcFamily == IntelSLM; }
const Triple &getTargetTriple() const { return TargetTriple; }
OpenPOWER on IntegriCloud