brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 111706a Raw
40 lines · plain
1Date: Wed, 31 Jan 2001 12:04:33 -06002From: Vikram S. Adve <vadve@cs.uiuc.edu>3To: Chris Lattner <lattner@cs.uiuc.edu>4Subject: another thought5 6I have a budding idea about making LLVM a little more ambitious: a7customizable runtime system that can be used to implement language-specific8virtual machines for many different languages.  E.g., a C vm, a C++ vm, a9Java vm, a Lisp vm, ..10 11The idea would be that LLVM would provide a standard set of runtime features12(some low-level like standard assembly instructions with code generation and13static and runtime optimization; some higher-level like type-safety and14perhaps a garbage collection library).  Each language vm would select the15runtime features needed for that language, extending or customizing them as16needed.  Most of the machine-dependent code-generation and optimization17features as well as low-level machine-independent optimizations (like PRE)18could be provided by LLVM and should be sufficient for any language,19simplifying the language compiler.  (This would also help interoperability20between languages.)  Also, some or most of the higher-level21machine-independent features like type-safety and access safety should be22reusable by different languages, with minor extensions.  The language23compiler could then focus on language-specific analyses and optimizations.24 25The risk is that this sounds like a universal IR -- something that the26compiler community has tried and failed to develop for decades, and is27universally skeptical about.  No matter what we say, we won't be able to28convince anyone that we have a universal IR that will work.  We need to29think about whether LLVM is different or if has something novel that might30convince people.  E.g., the idea of providing a package of separable31features that different languages select from.  Also, using SSA with or32without type-safety as the intermediate representation.33 34One interesting starting point would be to discuss how a JVM would be35implemented on top of LLVM a bit more.  That might give us clues on how to36structure LLVM to support one or more language VMs.37 38--Vikram39 40