OpenASIP 2.2
Loading...
Searching...
No Matches
TCESubtarget.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file TCESubtarget.h
26 *
27 * Declaration of TCESubtarget class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2007 (vjaaskel-no.spam-cs.tut.fi)
30 */
31
32#ifndef TTA_TCE_SUBTARGET_H
33#define TTA_TCE_SUBTARGET_H
34
35#include <string>
36
37#include "tce_config.h"
38
39#include "llvm/CodeGen/TargetSubtargetInfo.h"
40
41#define GET_SUBTARGETINFO_HEADER
42#include "TCEGenSubTargetInfo.inc"
43#undef GET_SUBTARGETINFO_HEADER
44
45#include "llvm/CodeGen/SelectionDAGTargetInfo.h"
46
47namespace llvm {
48
49 class TCETargetMachinePlugin;
50 class Module;
51
52 /**
53 * Currently there is only one generic universal machine target,
54 * so this class doesn't contain any relevant information.
55 */
56 class TCESubtarget : public TCEGenSubtargetInfo {
57 public:
58 TCESubtarget(TCETargetMachinePlugin* plugin); //const std::string &TT, const std::string &FS);
59 std::string pluginFileName();
60 virtual bool isLittleEndian() const { return false; };
61
62 virtual bool is64bit() const { return false; }
63
64 const InstrItineraryData*
65 getInstrItineraryData() const override {
66 return &InstrItins;
67 }
68
69 virtual const TargetInstrInfo* getInstrInfo() const override;
70 virtual const TargetFrameLowering* getFrameLowering() const override;
71 virtual const TargetLowering* getTargetLowering() const override;
72 virtual const SelectionDAGTargetInfo* getSelectionDAGInfo()
73 const override;
74
75 virtual const TargetRegisterInfo* getRegisterInfo() const override;
76 virtual bool enableMachinePipeliner() const override;
77
78 protected:
79 /// ParseSubtargetFeatures - Parses features string setting specified
80 /// subtarget options. Definition of function is auto generated by
81 /// tblgen.
83 StringRef CPU, StringRef TuneCPU, StringRef FS);
84 private:
85 std::string pluginFile_;
87 InstrItineraryData InstrItins;
88 };
89
91 public:
94
95 virtual bool isLittleEndian() const override { return true; }
96 };
97
99 public:
102
103 virtual bool is64bit() const override { return true; }
104 };
105}
106
107#endif
virtual bool is64bit() const override
TCELE64Subtarget(TCETargetMachinePlugin *plugin)
TCELESubtarget(TCETargetMachinePlugin *plugin)
virtual bool isLittleEndian() const override
virtual bool is64bit() const
InstrItineraryData InstrItins
virtual bool enableMachinePipeliner() const override
std::string pluginFile_
const InstrItineraryData * getInstrItineraryData() const override
virtual const TargetInstrInfo * getInstrInfo() const override
virtual const TargetLowering * getTargetLowering() const override
virtual const TargetRegisterInfo * getRegisterInfo() const override
virtual bool isLittleEndian() const
virtual const TargetFrameLowering * getFrameLowering() const override
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options....
virtual const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
TCETargetMachinePlugin * plugin_
std::string pluginFileName()