Andrew Lenharth | a7a83b9 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 1 | //===- AlphaSubtarget.cpp - Alpha Subtarget Information ---------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | f3ebc3f | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Andrew Lenharth | a7a83b9 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Evan Cheng | 0d639a2 | 2011-07-01 21:01:15 +0000 | [diff] [blame] | 10 | // This file implements the Alpha specific subclass of TargetSubtargetInfo. |
Andrew Lenharth | a7a83b9 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "AlphaSubtarget.h" |
| 15 | #include "Alpha.h" |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 16 | |
| 17 | #define GET_SUBTARGETINFO_CTOR |
| 18 | #define GET_SUBTARGETINFO_MC_DESC |
| 19 | #define GET_SUBTARGETINFO_TARGET_DESC |
Evan Cheng | c9c090d | 2011-07-01 22:36:09 +0000 | [diff] [blame] | 20 | #include "AlphaGenSubtargetInfo.inc" |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 21 | |
Andrew Lenharth | a7a83b9 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 22 | using namespace llvm; |
| 23 | |
Evan Cheng | fe6e405 | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 24 | AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU, |
| 25 | const std::string &FS) |
Evan Cheng | 1a72add6 | 2011-07-07 07:07:08 +0000 | [diff] [blame^] | 26 | : AlphaGenSubtargetInfo(TT, CPU, FS), HasCT(false) { |
Evan Cheng | fe6e405 | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 27 | std::string CPUName = CPU; |
| 28 | if (CPUName.empty()) |
| 29 | CPUName = "generic"; |
Jim Laskey | a2b5235 | 2005-10-26 17:30:34 +0000 | [diff] [blame] | 30 | |
| 31 | // Parse features string. |
Evan Cheng | 1a72add6 | 2011-07-07 07:07:08 +0000 | [diff] [blame^] | 32 | ParseSubtargetFeatures(CPUName, FS); |
Evan Cheng | 54b68e3 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 33 | |
| 34 | // Initialize scheduling itinerary for the specified CPU. |
| 35 | InstrItins = getInstrItineraryForCPU(CPUName); |
Andrew Lenharth | a7a83b9 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 36 | } |