[LLVMdev] An assembly level interface for LLVM

Rahul Joshi rujoshi at uiuc.edu
Sun Dec 14 11:33:00 PST 2003

Hi LLVMdev,

Sorry about the bad title, but I hope you will get my idea. I
think that in many LLVM programs that create/modify the LLVM
IR (like say a language frontend/profiler etc), and in other
cases too, some of the code is just "mechanical", for example
creating function types takes like 4-5 lines of code, but
nothing interesting goes on there. I think we can get rid of
such code by providing an LLVM assembly language parsing
library. For example, a type parser may look something like:

TypeParser p("uint x uinx -> void");
Type* FuncType = p.getType();

The same thing can be extended to an LLVM snippet parser,
which will parse LLVM instruction. We can use $1, $2 etc as
paramaters, so that snippets can be instantiated with 
specific arguments.

Do others think this functionality will be useful?


More information about the llvm-dev mailing list