[bitc-dev] Bringup decisions
Swaroop Sridhar
swaroop.sridhar at gmail.com
Fri May 19 11:58:23 EDT 2006
Sandro Magi wrote:
> Jonathan S. Shapiro wrote:
>>We did look at various code generators, notably C-- and LLVM.
>>We didn't
>>look at MLRISC, though in hindsight we should have done so.
>>Unfortunately *none* of those target all of the platforms that we need
>>to target, and C-- and LLVM aren't all that helpful.
>
> Although LLVM has C backend which seems essentially to be the work
> you're now duplicating.
I don't think going to LLVM would have reduced a lot of effort in the
current compiler.
i) As far as I know -- and I might be wrong -- LLVM only has a c or c++
like frontend that is full supported. In that case, much of what we are
doing is necessary anyway. Of course, producing LLVM code would have the
advantage that we could then use the LLVM interpreter for debugging, etc.
ii) The other option was to use the LLVM interfaces to emit LLVM
bytecode directly. Even in this case, all phases including SSA transform
phase are necessary. We would have a LLVM emission phase instead of the
final C emission phase. This would also require some sort of register
allocation.
iii) The other advantage in going to LLVM would be that we can use
LLVM's accurate GC, but we would have to emit GC-roots and type
information. (We are now relying on the Boehm collector for the
bootstrap compiler).
Swaroop.
More information about the bitc-dev
mailing list