summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMSubtarget.h
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2013-12-02 14:46:26 +0000
committerTim Northover <tnorthover@apple.com>2013-12-02 14:46:26 +0000
commitdee8604cafc81f573528adf82528a76fffc3facf (patch)
tree7247fd8252ba73191371169594b324c6d6a64636 /llvm/lib/Target/ARM/ARMSubtarget.h
parent094e1653cb3bb92af5ce55e84ad46e8bd2281567 (diff)
downloadbcm5719-llvm-dee8604cafc81f573528adf82528a76fffc3facf.tar.gz
bcm5719-llvm-dee8604cafc81f573528adf82528a76fffc3facf.zip
ARM: decide whether to use movw/movt based on "minsize" attribute.
llvm-svn: 196102
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.h')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h
index ca5ba8541f7..d6e8c81fb76 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.h
+++ b/llvm/lib/Target/ARM/ARMSubtarget.h
@@ -64,6 +64,10 @@ protected:
bool HasFPARMv8;
bool HasNEON;
+ /// MinSize - True if the function being compiled has the "minsize" attribute
+ /// and should be optimised for size at the expense of speed.
+ bool MinSize;
+
/// UseNEONForSinglePrecisionFP - if the NEONFP attribute has been
/// specified. Use the method useNEONForSinglePrecisionFP() to
/// determine if NEON should actually be used.
@@ -270,6 +274,7 @@ public:
bool hasCrypto() const { return HasCrypto; }
bool hasCRC() const { return HasCRC; }
bool hasVirtualization() const { return HasVirtualization; }
+ bool isMinSize() const { return MinSize; }
bool useNEONForSinglePrecisionFP() const {
return hasNEON() && UseNEONForSinglePrecisionFP; }
@@ -327,7 +332,7 @@ public:
bool isR9Reserved() const { return IsR9Reserved; }
- bool useMovt() const { return UseMovt && hasV6T2Ops(); }
+ bool useMovt() const { return UseMovt && !isMinSize(); }
bool supportsTailCall() const { return SupportsTailCall; }
bool allowsUnalignedMem() const { return AllowsUnalignedMem; }
OpenPOWER on IntegriCloud