~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to lib/Target/MSP430/MSP430Subtarget.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- MSP430Subtarget.h - Define Subtarget for the MSP430 ----*- C++ -*--===//
 
2
//
 
3
//                     The LLVM Compiler Infrastructure
 
4
//
 
5
// This file is distributed under the University of Illinois Open Source
 
6
// License. See LICENSE.TXT for details.
 
7
//
 
8
//===----------------------------------------------------------------------===//
 
9
//
 
10
// This file declares the MSP430 specific subclass of TargetSubtargetInfo.
 
11
//
 
12
//===----------------------------------------------------------------------===//
 
13
 
 
14
#ifndef LLVM_LIB_TARGET_MSP430_MSP430SUBTARGET_H
 
15
#define LLVM_LIB_TARGET_MSP430_MSP430SUBTARGET_H
 
16
 
 
17
#include "MSP430FrameLowering.h"
 
18
#include "MSP430ISelLowering.h"
 
19
#include "MSP430InstrInfo.h"
 
20
#include "MSP430RegisterInfo.h"
 
21
#include "llvm/IR/DataLayout.h"
 
22
#include "llvm/Target/TargetSelectionDAGInfo.h"
 
23
#include "llvm/Target/TargetSubtargetInfo.h"
 
24
#include <string>
 
25
 
 
26
#define GET_SUBTARGETINFO_HEADER
 
27
#include "MSP430GenSubtargetInfo.inc"
 
28
 
 
29
namespace llvm {
 
30
class StringRef;
 
31
 
 
32
class MSP430Subtarget : public MSP430GenSubtargetInfo {
 
33
  virtual void anchor();
 
34
  bool ExtendedInsts;
 
35
  MSP430FrameLowering FrameLowering;
 
36
  MSP430InstrInfo InstrInfo;
 
37
  MSP430TargetLowering TLInfo;
 
38
  TargetSelectionDAGInfo TSInfo;
 
39
 
 
40
public:
 
41
  /// This constructor initializes the data members to match that
 
42
  /// of the specified triple.
 
43
  ///
 
44
  MSP430Subtarget(const Triple &TT, const std::string &CPU,
 
45
                  const std::string &FS, const TargetMachine &TM);
 
46
 
 
47
  MSP430Subtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
 
48
 
 
49
  /// ParseSubtargetFeatures - Parses features string setting specified
 
50
  /// subtarget options.  Definition of function is auto generated by tblgen.
 
51
  void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
 
52
 
 
53
  const TargetFrameLowering *getFrameLowering() const override {
 
54
    return &FrameLowering;
 
55
  }
 
56
  const MSP430InstrInfo *getInstrInfo() const override { return &InstrInfo; }
 
57
  const TargetRegisterInfo *getRegisterInfo() const override {
 
58
    return &InstrInfo.getRegisterInfo();
 
59
  }
 
60
  const MSP430TargetLowering *getTargetLowering() const override {
 
61
    return &TLInfo;
 
62
  }
 
63
  const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {
 
64
    return &TSInfo;
 
65
  }
 
66
};
 
67
} // End llvm namespace
 
68
 
 
69
#endif  // LLVM_TARGET_MSP430_SUBTARGET_H