Andrew Lenharth | 120ab48 | 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 | 4ee451d | 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 | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Evan Cheng | 5b1b4489 | 2011-07-01 21:01:15 +0000 | [diff] [blame] | 10 | // This file implements the Alpha specific subclass of TargetSubtargetInfo. |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "AlphaSubtarget.h" |
| 15 | #include "Alpha.h" |
Evan Cheng | 9421470 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 16 | |
Evan Cheng | ebdeeab | 2011-07-08 01:53:10 +0000 | [diff] [blame^] | 17 | #define GET_SUBTARGETINFO_ENUM |
Evan Cheng | 9421470 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 18 | #define GET_SUBTARGETINFO_MC_DESC |
| 19 | #define GET_SUBTARGETINFO_TARGET_DESC |
Evan Cheng | ebdeeab | 2011-07-08 01:53:10 +0000 | [diff] [blame^] | 20 | #define GET_SUBTARGETINFO_CTOR |
Evan Cheng | 385e930 | 2011-07-01 22:36:09 +0000 | [diff] [blame] | 21 | #include "AlphaGenSubtargetInfo.inc" |
Evan Cheng | 9421470 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 22 | |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 23 | using namespace llvm; |
| 24 | |
Evan Cheng | 276365d | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 25 | AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU, |
| 26 | const std::string &FS) |
Evan Cheng | 0ddff1b | 2011-07-07 07:07:08 +0000 | [diff] [blame] | 27 | : AlphaGenSubtargetInfo(TT, CPU, FS), HasCT(false) { |
Evan Cheng | 276365d | 2011-06-30 01:53:36 +0000 | [diff] [blame] | 28 | std::string CPUName = CPU; |
| 29 | if (CPUName.empty()) |
| 30 | CPUName = "generic"; |
Jim Laskey | 581a8f7 | 2005-10-26 17:30:34 +0000 | [diff] [blame] | 31 | |
| 32 | // Parse features string. |
Evan Cheng | 0ddff1b | 2011-07-07 07:07:08 +0000 | [diff] [blame] | 33 | ParseSubtargetFeatures(CPUName, FS); |
Evan Cheng | 9421470 | 2011-07-01 20:45:01 +0000 | [diff] [blame] | 34 | |
| 35 | // Initialize scheduling itinerary for the specified CPU. |
| 36 | InstrItins = getInstrItineraryForCPU(CPUName); |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame] | 37 | } |