diff --git a/docs/CompilerDriver.html b/docs/CompilerDriver.html index d7b3de5662e..16e777cc3de 100644 --- a/docs/CompilerDriver.html +++ b/docs/CompilerDriver.html @@ -4,14 +4,6 @@
llvmc was invented to make compilation with LLVM based compilers - easier. To accomplish this, llvmc strives to:
+llvmc was invented to make compilation of user programs with + LLVM-based tools easier. To accomplish this, llvmc strives to:
llvmc -O2 x.c y.c z.c -o xyz
must produce exactly the same results as:
-
+
llvmc -O2 x.c
llvmc -O2 y.c
llvmc -O2 z.c
- llvmc -O2 x.o y.o z.o -o xyz
+ llvmc -O2 x.o y.o z.o -o xyz
To accomplish this, llvmc uses a very simple goal oriented procedure to do its work. The overall goal is to produce a functioning executable. To accomplish this, llvmc always attempts to execute a @@ -230,7 +222,7 @@
This section of the document describes the configuration files used by llvmc. Configuration information is relatively static for a - given release of LLVM and a front end compiler. However, the details may + given release of LLVM and a compiler tool. However, the details may change from release to release of either. Users are encouraged to simply use the various options of the llvmc command and ignore the configuration of the tool. These configuration files are for compiler writers and LLVM @@ -297,32 +289,32 @@ should be invoked. Users may but are not advised to alter the compiler's
Because llvmc just invokes other programs, it must deal with the available command line options for those programs regardless of whether they -were written for LLVM or not. Furthermore, not all compilation front ends will -have the same capabilities. Some front ends will simply generate LLVM assembly +were written for LLVM or not. Furthermore, not all compiler tools will +have the same capabilities. Some compiler tools will simply generate LLVM assembly code, others will be able to generate fully optimized byte code. In general, llvmc doesn't make any assumptions about the capabilities or command line options of a sub-tool. It simply uses the details found in the configuration files and leaves it to the compiler writer to specify the configuration correctly.
-This approach means that new compiler front ends can be up and working very -quickly. As a first cut, a front end can simply compile its source to raw +
This approach means that new compiler tools can be up and working very +quickly. As a first cut, a tool can simply compile its source to raw (unoptimized) bytecode or LLVM assembly and llvmc can be configured to pick up the slack (translate LLVM assembly to bytecode, optimize the -bytecode, generate native assembly, link, etc.). In fact, the front end need -not use any LLVM libraries, and it could be written in any language (instead of -C++). The configuration data will allow the full range of optimization, -assembly, and linking capabilities that LLVM provides to be added to these kinds -of tools. Enabling the rapid development of front-ends is one of the primary -goals of llvmc.
+bytecode, generate native assembly, link, etc.). In fact, the compiler tools +need not use any LLVM libraries, and it could be written in any language +(instead of C++). The configuration data will allow the full range of +optimization, assembly, and linking capabilities that LLVM provides to be added +to these kinds of tools. Enabling the rapid development of front-ends is one +of the primary goals of llvmc. -As a compiler front end matures, it may utilize the LLVM libraries and tools +
As a compiler tool matures, it may utilize the LLVM libraries and tools to more efficiently produce optimized bytecode directly in a single compilation and optimization program. In these cases, multiple tools would not be needed and the configuration data for the compiler would change.
Configuring llvmc to the needs and capabilities of a source language -compiler is relatively straight forward. A compiler writer must provide a +compiler is relatively straight-forward. A compiler writer must provide a definition of what to do for each of the five compilation phases for each of the optimization levels. The specification consists simply of prototypical command lines into which llvmc can substitute command line @@ -335,21 +327,22 @@ optimization.
Each configuration file provides the details for a single source language that is to be compiled. This configuration information tells llvmc how to invoke the language's pre-processor, translator, optimizer, assembler and linker. Note that a given source language needn't provide all these tools as many of them exist in llvm currently.
- -llvmc always looks for files of a specific name. It uses the
first file with the name its looking for by searching directories in the
following order:
The first file found in this search will be used. Other files with the same name will be ignored even if they exist in one of the subsequent search locations.
+In the directories searched, each configuration file is given a specific name to foster faster lookup (so llvmc doesn't have to do directory searches). The name of a given language specific configuration file is simply the same @@ -379,11 +374,13 @@ optimization.
cpp, C, or cxx. For languages that support multiple file suffixes, multiple (probably identical) files (or symbolic links) will need to be provided. +Which configuration files are read depends on the command line options and the suffixes of the file names provided on llvmc's command line. Note - that the --x LANGUAGE option alters the language that llvmc + that the -x LANGUAGE option alters the language that llvmc uses for the subsequent files on the command line. Only the configuration files actually needed to complete llvmc's task are read. Other language specific files will be ignored.
@@ -397,7 +394,8 @@ optimization.