[LLVMbugs] [Bug 353] NEW: Create Front End Framework And Compiler Driver

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri May 28 22:40:11 PDT 2004


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=353

           Summary: Create Front End Framework And Compiler Driver
           Product: tools
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: llc
        AssignedTo: rspencer at x10sys.com
        ReportedBy: rspencer at x10sys.com


Although LLVM has excellent single purpose tools that each do their specific
jobs well, this is not particularly friendly for users of LLVM and writers of
front end source langauges. What is needed is a pairing of a source language
writers framework with a compiler driver.

1. Front End Framework
This is a small library that implements all the things common to all front end
languages. It defines a SourceLanguage abstraction that source language writers
can subclass to implement, in essence, this method:

Module* compile(istream& source) 

The Module* resulting from compilation is then handled by the framework for
additional processing (application of optimizations, code generation, etc.).
Having this framework means that source language writers don't have to worry
about pass invocation, code generation, files, etc., just the details of turning
an istream into a Module* (the actual compilation part).  The library assists
front end language writers in creating a plug-in that can be dynamically loaded
by the compiler driver to endow the driver with support for compiling that front
end language.  This should make writing source language front ends even easier
than it already is.

2. Compiler Driver
In close conjunction with the Front End Framework there needs to be a new tool
that fills much the same purpose as the gcc program in the Gnu Compiler
Collection. That is, the compiler driver is responsible for:

(a) process initialization
(b) common command line argument interpretation
(c) source language specific command line argument interpretation
(d) selection of "SourceLanguage" implementation plug-ins to run based on
    file suffix or possibly other criteria.
(e) all file handling
(f) generic (LLVM provided) and language-specific pass invocation
(g) invoking the various toolchain utilities as needed/desired by the user.
(h) compiling different kinds of sources from a single command line
(i) selection of correct runtime libraries to link against for multiple front
    end languages (as provided by the source language plug-in).



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list