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 llvmc2 tool description files.
12 //===----------------------------------------------------------------------===//
14 class Tool<list<dag> l> {
15 list<dag> properties = l;
18 // Special Tool instance - the root node of the compilation graph.
22 // Possible Tool properties
31 // Possible option types
36 def parameter_list_option;
38 def prefix_list_option;
40 // Possible option properties
53 // The 'case' construct.
60 def input_languages_contain;
68 // Increase/decrease the edge weight.
72 // Option list - used to specify aliases and sometimes help strings.
73 class OptionList<list<dag> l> {
74 list<dag> options = l;
77 // Map from suffixes to language names
79 class LangToSuffixes<string str, list<string> lst> {
81 list<string> suffixes = lst;
84 class LanguageMap<list<LangToSuffixes> lst> {
85 list<LangToSuffixes> map = lst;
90 class EdgeBase<Tool t1, Tool t2, dag d> {
96 class Edge<Tool t1, Tool t2> : EdgeBase<t1, t2, (empty)>;
98 // Edge and SimpleEdge are synonyms.
99 class SimpleEdge<Tool t1, Tool t2> : EdgeBase<t1, t2, (empty)>;
101 // Optionally enabled edge.
102 class OptionalEdge<Tool t1, Tool t2, dag props> : EdgeBase<t1, t2, props>;
104 class CompilationGraph<list<EdgeBase> lst> {
105 list<EdgeBase> edges = lst;