summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcSubtarget.h
diff options
context:
space:
mode:
authorDaniel Cederman <cederman@gaisler.com>2018-08-27 11:11:47 +0000
committerDaniel Cederman <cederman@gaisler.com>2018-08-27 11:11:47 +0000
commit2739596063a914f4a1918bde30e72d50fea856c2 (patch)
treefaff6d3b99db67ab4fa410eebe495b9aa68276c3 /llvm/lib/Target/Sparc/SparcSubtarget.h
parent9441be6912a8d34245ad928e0d55e4cb3632c4fa (diff)
downloadbcm5719-llvm-2739596063a914f4a1918bde30e72d50fea856c2.tar.gz
bcm5719-llvm-2739596063a914f4a1918bde30e72d50fea856c2.zip
[Sparc] Add support for the cycle counter available in GR740
Summary: The GR740 provides an up cycle counter in the registers ASR22 and ASR23. As these registers can not be read together atomically we only use the value of ASR23 for llvm.readcyclecounter(). The ASR23 register holds the 32 LSBs of the up-counter. Reviewers: jyknight, venkatra Reviewed By: jyknight Subscribers: jfb, fedor.sergeev, jrtc27, llvm-commits Differential Revision: https://reviews.llvm.org/D48638 llvm-svn: 340733
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcSubtarget.h')
-rw-r--r--llvm/lib/Target/Sparc/SparcSubtarget.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/SparcSubtarget.h b/llvm/lib/Target/Sparc/SparcSubtarget.h
index 588a6765bcd..65627f4f70f 100644
--- a/llvm/lib/Target/Sparc/SparcSubtarget.h
+++ b/llvm/lib/Target/Sparc/SparcSubtarget.h
@@ -50,6 +50,7 @@ class SparcSubtarget : public SparcGenSubtargetInfo {
bool InsertNOPLoad;
bool FixAllFDIVSQRT;
bool DetectRoundChange;
+ bool HasLeonCycleCounter;
SparcInstrInfo InstrInfo;
SparcTargetLowering TLInfo;
@@ -95,6 +96,7 @@ public:
bool insertNOPLoad() const { return InsertNOPLoad; }
bool fixAllFDIVSQRT() const { return FixAllFDIVSQRT; }
bool detectRoundChange() const { return DetectRoundChange; }
+ bool hasLeonCycleCounter() const { return HasLeonCycleCounter; }
/// ParseSubtargetFeatures - Parses features string setting specified
/// subtarget options. Definition of function is auto generated by tblgen.
OpenPOWER on IntegriCloud