1 //===- Tools.td - Common definitions for LLVMCC -----------*- 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 llvmcc 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
35 def parameter_list_option;
37 def prefix_list_option;
39 // Possible option properties
48 // Marker for an empty DAG.
51 // The 'case' construct.
58 def input_languages_contain;
64 // Increase/decrease the edge weight.
68 // Map from suffixes to language names
70 class LangToSuffixes<string str, list<string> lst> {
72 list<string> suffixes = lst;
75 class LanguageMap<list<LangToSuffixes> lst> {
76 list<LangToSuffixes> map = lst;
81 class EdgeBase<Tool t1, Tool t2, dag d> {
87 class Edge<Tool t1, Tool t2> : EdgeBase<t1, t2, (empty)>;
89 // Edge and SimpleEdge are synonyms.
90 class SimpleEdge<Tool t1, Tool t2> : EdgeBase<t1, t2, (empty)>;
92 // Optionally enabled edge.
93 class OptionalEdge<Tool t1, Tool t2, dag props> : EdgeBase<t1, t2, props>;
95 class CompilationGraph<list<EdgeBase> lst> {
96 list<EdgeBase> edges = lst;