Open prakhar1989 opened 10 years ago
At the very first glance, LLVM: L ow L evel V irtual M achine appears to be an infrastructure for writing compilers. You write a front-end compiler (I'm not sure that's the technically correct term) for a language, it compiles it down to an assembly like code, and then another compiler (back-end compiler?) translates that into machine-specific binary. Kinda reminds me of VM's and .NET, if this is how it really works. Why is it better than JVM or .NET? Is it because it allows one to hook up any language? What are the benefits/drawbacks of using LLVM? Can we use LLVM for Java or .NET languages? How easy is it to learn? All these questions pop up in my mind almost immediately :) This is what I know before reading a single word of the article. Will update as I read more.
@prakhar1989 what is the difference between a 'static' compiler and a 'dynamic' one?
@pratikmallya Not sure what you mean by static and dynamic compiler. Are you referring to static vs dynamic compilation (like JIT)?
@liquidmetal Wanna chime in?
It seems like the goal of LLVM is to provide a unified 'assembly language' for people to 'compile' to. Something that doesn't need to know about the hardware. This assembly (LLVM IR) can then be optimized and targeted to any platform.
Looking at some forums, the main advantage seems like LLVM lets you design languages without thinking about machine code. That leads to different type systems, inheritance strategies, threading optimizations, etc.
tl;dr: machine code generation / optimization: LLVM's problem. Language design: your problem.
@pratikmallya: What is LLVM?