Documentation: clarify what is meant by 'multiple edges'.
[oota-llvm.git] / tools / llvmc / plugins / Base / Base.td
1 //===- Base.td - LLVMC2 toolchain descriptions -------------*- tablegen -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains compilation graph description used by llvmc2.
11 //
12 //===----------------------------------------------------------------------===//
13
14 include "llvm/CompilerDriver/Common.td"
15 include "llvm/CompilerDriver/Tools.td"
16
17 // Toolchains
18
19 def CompilationGraph : CompilationGraph<[
20     Edge<"root", "llvm_gcc_c">,
21     Edge<"root", "llvm_gcc_assembler">,
22     Edge<"root", "llvm_gcc_cpp">,
23     Edge<"root", "llvm_gcc_m">,
24     Edge<"root", "llvm_gcc_mxx">,
25     Edge<"root", "llvm_as">,
26
27     Edge<"llvm_gcc_c", "llc">,
28     Edge<"llvm_gcc_cpp", "llc">,
29     Edge<"llvm_gcc_m", "llc">,
30     Edge<"llvm_gcc_mxx", "llc">,
31     Edge<"llvm_as", "llc">,
32
33     OptionalEdge<"llvm_gcc_c", "opt", (case (switch_on "opt"), (inc_weight))>,
34     OptionalEdge<"llvm_gcc_cpp", "opt", (case (switch_on "opt"), (inc_weight))>,
35     OptionalEdge<"llvm_gcc_m", "opt", (case (switch_on "opt"), (inc_weight))>,
36     OptionalEdge<"llvm_gcc_mxx", "opt", (case (switch_on "opt"), (inc_weight))>,
37     OptionalEdge<"llvm_as", "opt", (case (switch_on "opt"), (inc_weight))>,
38     Edge<"opt", "llc">,
39
40     Edge<"llc", "llvm_gcc_assembler">,
41     Edge<"llvm_gcc_assembler", "llvm_gcc_linker">,
42     OptionalEdge<"llvm_gcc_assembler", "llvm_gcc_cpp_linker",
43                  (case
44                      (or (input_languages_contain "c++"),
45                          (input_languages_contain "objective-c++")),
46                      (inc_weight),
47                      (or (parameter_equals "linker", "g++"),
48                          (parameter_equals "linker", "c++")), (inc_weight))>,
49
50
51     Edge<"root", "llvm_gcc_linker">,
52     OptionalEdge<"root", "llvm_gcc_cpp_linker",
53                  (case
54                      (or (input_languages_contain "c++"),
55                          (input_languages_contain "objective-c++")),
56                      (inc_weight),
57                      (or (parameter_equals "linker", "g++"),
58                          (parameter_equals "linker", "c++")), (inc_weight))>
59     ]>;