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.
28 // Possible option types.
33 def parameter_list_option;
35 def prefix_list_option;
37 // Possible option properties.
50 // The 'case' construct.
66 def input_languages_contain;
70 def single_input_file;
71 def multiple_input_files;
82 def forward_transformed_value;
89 // Increase/decrease the edge weight.
96 // Used to specify plugin priority.
97 class PluginPriority<int p> {
101 // Option list - a single place to specify options.
102 class OptionList<list<dag> l> {
103 list<dag> options = l;
106 // Option preprocessor - actions taken during plugin loading.
107 class OptionPreprocessor<dag d> {
108 dag preprocessor = d;
111 // Map from suffixes to language names
113 class LangToSuffixes<string str, list<string> lst> {
115 list<string> suffixes = lst;
118 class LanguageMap<list<LangToSuffixes> lst> {
119 list<LangToSuffixes> map = lst;
124 class EdgeBase<string t1, string t2, dag d> {
130 class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
132 // Edge and SimpleEdge are synonyms.
133 class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
135 // Optionally enabled edge.
136 class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
138 class CompilationGraph<list<EdgeBase> lst> {
139 list<EdgeBase> edges = lst;