digitalmars.D.bugs - [Issue 19198] New: Transfer the entire development DMD to LLVM:
- d-bugmail puremagic.com (43/43) Aug 27 2018 https://issues.dlang.org/show_bug.cgi?id=19198
https://issues.dlang.org/show_bug.cgi?id=19198 Issue ID: 19198 Summary: Transfer the entire development DMD to LLVM: WebAssembly, dynamic scripting.. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: black80 bk.ru I am noob of LLVM. 1) LLVM allow use any subset of Analytic and Transfer Passes https://releases.llvm.org/6.0.0/docs/Passes.html GCC(DMD backend?) is blackbox, LLVM - white box where u can insert/delete/update any Passes for any hardware. 2) LLVM can generate WebAssembly code - big frontend area, probably server too. translation LLVM-IR to WASM can be used from any opensource team: LLVM, Rust, Go... U don't need waste time for it. 3) LDC already supports dynamic compilation for some functions. Team can add runtime scripts do D in future. see Terra language with Lua integration. yep, Lua is scripting and Terra is script inside Lua. Lua has one runtime(LUA), Terra has another runtime(LLVM) - they should cooperate and this step adds more complications inside RT. D-LLVM-scripts can work in one runtime and GC. at this PDF author of Terra says about lang and optimizations https://cs.stanford.edu/~zdevito/zdevito_thesis.pdf. Look at chapter 5 where 50 lines of Terra code can compared by speed with thousands LOC of BLAS and MKL - libs that solve linear system of equations. Such simplicity would not be available without LLVM. Runtime scripts are needed in many areas - games, graphic editors (shaders), REPL/shell, finance (trading/backtesting).. Even Qt/QML has no good interop 4) I can't imagine how many bonuses can be with using LLVM. search ideas at internet/blogs and known persons from any lang-teams that use LLVM. union of LLVM and D can add features to both areas: D-team can improve LLVM passes/code/lib and people that worked LLVM can add incredible possibilities to D-lang/runtime --
Aug 27 2018