forked from cgeyer/llvm-cbg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cbg.td
95 lines (82 loc) · 4.19 KB
/
cbg.td
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//===- cbg.td - Describe the cbg Target Machine --------*- tablegen -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
// Target-independent interfaces which we are implementing
//===----------------------------------------------------------------------===//
include "llvm/Target/Target.td"
//===----------------------------------------------------------------------===//
// CBG Subtarget features.
//
def FeatureSelCC
: SubtargetFeature<"selcc", "HasSelCC", "true",
"Enable selCC instructions">;
def FeatureMovCC
: SubtargetFeature<"movcc", "HasMovCC", "true",
"Enable selCC instructions">;
def FeaturePredBlocksCC
: SubtargetFeature<"predblockscc", "HasPredBlocksCC", "true",
"Enable predicated blocks with condition codes">;
def FeaturePredBlocksReg
: SubtargetFeature<"predblocksreg", "HasPredBlocksReg", "true",
"Enable predicated blocks with predicate register">;
def FeaturePredInstrCC
: SubtargetFeature<"predinstrcc", "HasPredInstrCC", "true",
"Enable fully predicated instructions with condition codes">;
def FeaturePredInstrReg
: SubtargetFeature<"predinstrreg", "HasPredInstrReg", "true",
"Enable fully predicated instructions with predicate register">;
def FeatureHWLoop
: SubtargetFeature<"singleloop", "HasHWLoop", "true",
"Enable hardware support for single loop">;
def FeatureHWLoopOpt
: SubtargetFeature<"hwloopopt", "HasHWLoopOpt", "true",
"Enable hardware loop code optimizations">;
// def FeatureHWLoops
// : SubtargetFeature<"nestedloops", "HasHWLoops", "true",
// "Enable hardware support for nested loops - currently not implemented (same as singleloop)">;
// def FeatureVLIWIfElse
// : SubtargetFeature<"vliwbranches", "HasVLIWIfElse", "true",
// "Enable concurrent if and else execution - currently not implemented">;
//===----------------------------------------------------------------------===//
// Register File, Calling Conv, Instruction Descriptions
//===----------------------------------------------------------------------===//
include "cbgRegisterInfo.td"
include "cbgCallingConv.td"
include "cbgInstrInfo.td"
def cbgInstrInfo : InstrInfo;
//===----------------------------------------------------------------------===//
// CBG processors supported.
//===----------------------------------------------------------------------===//
class Proc<string Name, list<SubtargetFeature> Features>
: Processor<Name, NoItineraries, Features>;
def : Proc<"v8", []>;
def : Proc<"v8-blockicc-movcc", [FeatureMovCC, FeaturePredBlocksCC, FeatureHWLoop, FeatureHWLoopOpt]>;
def : Proc<"v8-blockpreg-selcc", [FeatureSelCC, FeaturePredBlocksReg, FeatureHWLoop, FeatureHWLoopOpt]>;
def : Proc<"v8-blockicc-selcc", [FeatureSelCC, FeaturePredBlocksCC, FeatureHWLoop, FeatureHWLoopOpt]>;
// def : Proc<"v8-selcc", [FeatureSelCC]>;
// def : Proc<"v8-movcc", [FeatureMovCC]>;
// def : Proc<"v8-predblockscc", [FeaturePredBlocksCC]>;
// def : Proc<"v8-predblocksreg",[FeaturePredBlocksReg]>;
// def : Proc<"v8-predinstrcc", [FeaturePredInstrCC]>;
// def : Proc<"v8-predinstrreg", [FeaturePredInstrReg]>;
// def : Proc<"v8-singleloop", [FeatureHWLoop]>;
// def : Proc<"v8-nestedloop", [FeatureHWLoops]>;
// def : Proc<"v8-vliwbranches", [FeatureVLIWIfElse]>;
// def : Proc<"v8-block-loops", [FeaturePredBlocksCC, FeatureHWLoops]>;
// def : Proc<"v8-pred-loops", [FeaturePredInstrCC, FeatureHWLoops]>;
//===----------------------------------------------------------------------===//
// Declare the target which we are implementing
//===----------------------------------------------------------------------===//
def cbg : Target {
// Pull in Instruction Info:
let InstructionSet = cbgInstrInfo;
}