ARM: decide whether to use movw/movt based on "minsize" attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196102 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover
2013-12-02 14:46:26 +00:00
parent c7cf4869a7
commit ad249171e4
9 changed files with 49 additions and 14 deletions

View File

@@ -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; }