summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMSubtarget.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-05-12 01:26:05 +0000
committerEric Christopher <echristo@gmail.com>2015-05-12 01:26:05 +0000
commit824f42f209c4b04d9f43e4b74dd601ced6409ff7 (patch)
treedb1a47b1f504331007c995d19256c06dd4df9a41 /llvm/lib/Target/ARM/ARMSubtarget.h
parent8b33567189ea25fbdd454d9c4cc75cb2850a821f (diff)
downloadbcm5719-llvm-824f42f209c4b04d9f43e4b74dd601ced6409ff7.tar.gz
bcm5719-llvm-824f42f209c4b04d9f43e4b74dd601ced6409ff7.zip
Migrate existing backends that care about software floating point
to use the information in the module rather than TargetOptions. We've had and clang has used the use-soft-float attribute for some time now so have the backends set a subtarget feature based on a particular function now that subtargets are created based on functions and function attributes. For the one middle end soft float check go ahead and create an overloadable TargetLowering::useSoftFloat function that just checks the TargetSubtargetInfo in all cases. Also remove the command line option that hard codes whether or not soft-float is set by using the attribute for all of the target specific test cases - for the generic just go ahead and add the attribute in the one case that showed up. llvm-svn: 237079
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.h')
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h
index 0b8b7801f3d..ed1c6a0fc64 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.h
+++ b/llvm/lib/Target/ARM/ARMSubtarget.h
@@ -100,6 +100,9 @@ protected:
/// InThumbMode - True if compiling for Thumb, false for ARM.
bool InThumbMode;
+ /// UseSoftFloat - True if we're using software floating point features.
+ bool UseSoftFloat;
+
/// HasThumb2 - True if Thumb2 instructions are supported.
bool HasThumb2;
@@ -393,6 +396,7 @@ public:
bool isAPCS_ABI() const;
bool isAAPCS_ABI() const;
+ bool useSoftFloat() const { return UseSoftFloat; }
bool isThumb() const { return InThumbMode; }
bool isThumb1Only() const { return InThumbMode && !HasThumb2; }
bool isThumb2() const { return InThumbMode && HasThumb2; }
OpenPOWER on IntegriCloud