I am interested in implementing a compiler very much like llvm but with very very modest goals. I just want to have a intermediate format(machine independent) which can be used as input/output by different passes.( much like the bytecode of llvm). The only thing is I want it to be much simpler compared LLVM, say only a very few basic optimizations. Other optimizations could be written and implemented as plug and play but not part of the core compiler. profiling should be helpful but not a necessity. now to what help I need .. I would appreciate comments and pitfalls any implementor faced while doing similar exercise. wonder if the LLVM authors maintained some sort of logs of what they did first and what they implemented last and what problems they faced. pointers to helpful urls is also welcome. Thanks, Abhijit Ray
Getting the corner cases right in LLVM has been a nontrivial task. Given that, I'm wondering if you've considered using LLVM itself? You could certainly take LLVM and pare it down to just the bare essentials, for instance. It would help to know what you're intending to do with this prospective compiler you describe. -Brian On Oct 5, 2004, at 2:42 AM, Abhijit Ray wrote:> I am interested in implementing a compiler very much like llvm but > with very very modest goals. > I just want to have a intermediate format(machine independent) which > can be used as input/output by different passes.( much like the > bytecode of llvm). > > The only thing is I want it to be much simpler compared LLVM, say only > a very few basic optimizations. Other optimizations could be written > and implemented as plug and play but not part of the core compiler. > > profiling should be helpful but not a necessity. > > now to what help I need .. > I would appreciate comments and pitfalls any implementor faced while > doing similar exercise. > > wonder if the LLVM authors maintained some sort of logs of what they > did first and what they implemented last and what problems they faced. > > pointers to helpful urls is also welcome. > > Thanks, > Abhijit Ray > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
> >> I am interested in implementing a compiler very much like llvm but >> with >> very very modest goals. I just want to have a intermediateAbhijit, Although LLVM has a large code base, the LLVM IR is about as simple as a compiler IR can get without becoming trivial. And writing a useful language front-end (say, C) is a lot of work, no matter how simple the IR. If you want a simpler overall system than LLVM, you're still probably better off adopting the IR and LLVM core and the minimal passes you want (as opposed to writing your own). --Vikram http://www.cs.uiuc.edu/~vadve http://llvm.cs.uiuc.edu/
On Tue, 5 Oct 2004, Abhijit Ray wrote:> I am interested in implementing a compiler very much like llvm but with > very very modest goals. I just want to have a intermediate > > now to what help I need .. I would appreciate comments and pitfalls any > implementor faced while doing similar exercise. wonder if the LLVM > authors maintained some sort of logs of what they did first and what > they implemented last and what problems they faced.Nope, we didn't really maintain any formal documentation like that, but our CVS repository does contain the full history of development. In general though, we aren't too interested in spending a lot of time to help people write competitors to LLVM. :) Is there any particular reason that you cannot use LLVM itself for your purposes? -Chris -- http://llvm.org/ http://nondot.org/sabre/