diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-07 07:07:08 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-07 07:07:08 +0000 |
commit | 0ddff1b5359433faf2eb1c4ff5320ddcbd42f52f (patch) | |
tree | 1a7077a4920b307fe6172cf8eb4a9483a8e93fbd /include/llvm/MC/MCSubtargetInfo.h | |
parent | cbd40f8357437a15c653cb8cccd7124a1bb55ae2 (diff) | |
download | external_llvm-0ddff1b5359433faf2eb1c4ff5320ddcbd42f52f.tar.gz external_llvm-0ddff1b5359433faf2eb1c4ff5320ddcbd42f52f.tar.bz2 external_llvm-0ddff1b5359433faf2eb1c4ff5320ddcbd42f52f.zip |
Compute feature bits at time of MCSubtargetInfo initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSubtargetInfo.h')
-rw-r--r-- | include/llvm/MC/MCSubtargetInfo.h | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/include/llvm/MC/MCSubtargetInfo.h b/include/llvm/MC/MCSubtargetInfo.h index d855271227..610a4da9d2 100644 --- a/include/llvm/MC/MCSubtargetInfo.h +++ b/include/llvm/MC/MCSubtargetInfo.h @@ -34,30 +34,29 @@ class MCSubtargetInfo { const unsigned *ForwardingPathes; // Forwarding pathes unsigned NumFeatures; // Number of processor features unsigned NumProcs; // Number of processors - + unsigned FeatureBits; // Feature bits for current CPU + public: - void InitMCSubtargetInfo(const SubtargetFeatureKV *PF, + void InitMCSubtargetInfo(StringRef CPU, StringRef FS, + const SubtargetFeatureKV *PF, const SubtargetFeatureKV *PD, const SubtargetInfoKV *PI, const InstrStage *IS, const unsigned *OC, const unsigned *FP, - unsigned NF, unsigned NP) { - ProcFeatures = PF; - ProcDesc = PD; - ProcItins = PI; - Stages = IS; - OperandCycles = OC; - ForwardingPathes = FP; - NumFeatures = NF; - NumProcs = NP; + unsigned NF, unsigned NP); + + /// getFeatureBits - Get the feature bits. + /// + uint64_t getFeatureBits() const { + return FeatureBits; } + /// ReInitMCSubtargetInfo - Change CPU (and optionally supplemented with + /// feature string), recompute and return feature bits. + uint64_t ReInitMCSubtargetInfo(StringRef CPU, StringRef FS); + /// getInstrItineraryForCPU - Get scheduling itinerary of a CPU. /// InstrItineraryData getInstrItineraryForCPU(StringRef CPU) const; - - /// getFeatureBits - Get the feature bits for a CPU (optionally supplemented - /// with feature string). - uint64_t getFeatureBits(StringRef CPU, StringRef FS) const; }; } // End llvm namespace |