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 | 1a72add615cdea9454f681491b8c00c1ae191d64 (patch) | |
| tree | 83856a98cad75009e8c3dd614846550afbca896a /llvm/lib/Target/CellSPU | |
| parent | 4db5c3c83a22268ff0eeaa6ca7fd500668533487 (diff) | |
| download | bcm5719-llvm-1a72add615cdea9454f681491b8c00c1ae191d64.tar.gz bcm5719-llvm-1a72add615cdea9454f681491b8c00c1ae191d64.zip | |
Compute feature bits at time of MCSubtargetInfo initialization.
llvm-svn: 134606
Diffstat (limited to 'llvm/lib/Target/CellSPU')
| -rw-r--r-- | llvm/lib/Target/CellSPU/SPUSubtarget.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Target/CellSPU/SPUSubtarget.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUSubtarget.cpp b/llvm/lib/Target/CellSPU/SPUSubtarget.cpp index 2481e3b9fc9..cb94d281c66 100644 --- a/llvm/lib/Target/CellSPU/SPUSubtarget.cpp +++ b/llvm/lib/Target/CellSPU/SPUSubtarget.cpp @@ -25,7 +25,7 @@ using namespace llvm; SPUSubtarget::SPUSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS) : - SPUGenSubtargetInfo(), + SPUGenSubtargetInfo(TT, CPU, FS), StackAlignment(16), ProcDirective(SPU::DEFAULT_PROC), UseLargeMem(false) @@ -35,7 +35,7 @@ SPUSubtarget::SPUSubtarget(const std::string &TT, const std::string &CPU, std::string default_cpu("v0"); // Parse features string. - ParseSubtargetFeatures(FS, default_cpu); + ParseSubtargetFeatures(default_cpu, FS); // Initialize scheduling itinerary for the specified CPU. InstrItins = getInstrItineraryForCPU(default_cpu); diff --git a/llvm/lib/Target/CellSPU/SPUSubtarget.h b/llvm/lib/Target/CellSPU/SPUSubtarget.h index 19b97d3a0c7..7c4aa143021 100644 --- a/llvm/lib/Target/CellSPU/SPUSubtarget.h +++ b/llvm/lib/Target/CellSPU/SPUSubtarget.h @@ -23,6 +23,7 @@ namespace llvm { class GlobalValue; + class StringRef; namespace SPU { enum { @@ -57,7 +58,7 @@ namespace llvm { /// ParseSubtargetFeatures - Parses features string setting specified /// subtarget options. Definition of function is auto generated by tblgen. - void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU); + void ParseSubtargetFeatures(StringRef CPU, StringRef FS); /// SetJITMode - This is called to inform the subtarget info that we are /// producing code for the JIT. |

