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.
35 def switch_list_option;
37 def parameter_list_option;
39 def prefix_list_option;
41 // Possible option properties.
54 def forward_not_split;
56 // The 'case' construct.
72 def input_languages_contain;
76 def single_input_file;
77 def multiple_input_files;
88 def forward_transformed_value;
97 // Increase/decrease the edge weight.
102 def empty_dag_marker;
104 // Used to specify plugin priority.
105 class PluginPriority<int p> {
109 // Option list - a single place to specify options.
110 class OptionList<list<dag> l> {
111 list<dag> options = l;
114 // Option preprocessor - actions taken during plugin loading.
115 class OptionPreprocessor<dag d> {
116 dag preprocessor = d;
119 // Map from suffixes to language names
121 class LangToSuffixes<string str, list<string> lst> {
123 list<string> suffixes = lst;
126 class LanguageMap<list<LangToSuffixes> lst> {
127 list<LangToSuffixes> map = lst;
132 class EdgeBase<string t1, string t2, dag d> {
138 class Edge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
140 // Edge and SimpleEdge are synonyms.
141 class SimpleEdge<string t1, string t2> : EdgeBase<t1, t2, (empty_dag_marker)>;
143 // Optionally enabled edge.
144 class OptionalEdge<string t1, string t2, dag props> : EdgeBase<t1, t2, props>;
146 class CompilationGraph<list<EdgeBase> lst> {
147 list<EdgeBase> edges = lst;