1
//===- Common.td - Common definitions for LLVMC2 ----------*- tablegen -*-===//
3
// The LLVM Compiler Infrastructure
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
8
//===----------------------------------------------------------------------===//
10
// This file contains common definitions used in llvmc tool description files.
12
//===----------------------------------------------------------------------===//
14
class Tool<list<dag> l> {
15
list<dag> properties = l;
18
// Possible Tool properties.
31
// Possible option types.
36
def parameter_list_option;
38
def prefix_list_option;
40
// Possible option properties.
53
def forward_not_split;
55
// The 'case' construct.
71
def input_languages_contain;
75
def single_input_file;
76
def multiple_input_files;
87
def forward_transformed_value;
96
// Increase/decrease the edge weight.
101
def empty_dag_marker;
103
// Used to specify plugin priority.
104
class PluginPriority<int p> {
108
// Option list - a single place to specify options.
109
class OptionList<list<dag> l> {
110
list<dag> options = l;
113
// Option preprocessor - actions taken during plugin loading.
114
class OptionPreprocessor<dag d> {
115
dag preprocessor = d;
118
// Map from suffixes to language names
120
class LangToSuffixes<string str, list<string> lst> {
122
list<string> suffixes = lst;
125
class LanguageMap<list<LangToSuffixes> lst> {
126
list<LangToSuffixes> map = lst;
131
class EdgeBase<string t1, string t2, dag d> {
137
class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
139
// Edge and SimpleEdge are synonyms.
140
class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
142
// Optionally enabled edge.
143
class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
145
class CompilationGraph<list<EdgeBase> lst> {
146
list<EdgeBase> edges = lst;