[LLVMbugs] [Bug 792] NEW: Factor AsmWriter out of lib/VMCore
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed May 31 11:21:40 PDT 2006
http://llvm.org/bugs/show_bug.cgi?id=792
Summary: Factor AsmWriter out of lib/VMCore
Product: libraries
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Core LLVM classes
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rspencer at x10sys.com
Not every program that wants to use LLVM wants to generate LLVM assembly.
Unfortunately, the LLVMCore library has this functionality integrated into it.
The AsmWriter code should be factored out so that those that want to use it can
but those that don't can link their programs without it.
Here are the steps that I see need to be done to resolve this:
1. Make Assembly reading and writing analagous to Bytecode reading and writing.
There should be a lib/Assembly directory that contains a "Parser" (or perhaps
Reader) and "Writer" directories.
2. Move lib/VMCore/AsmWriter.cpp to lib/Assembly/Writer/AsmWriter.cpp
3. Factor out all the "print" and "dump" methods of the various LLVM IR classes
to global functions in the llvm namespace. This would change the usage model
of these functions from obj->dump() to llvm::dump(obj) and obj->print() to
llvm::print(obj).
4. Make any adjustments needed to the implementations in VMCore resulting from
the above changes.
This is the first in a series of bugs that aim at reducing the size of the
LLVMCore.o file so that tools built on LLVM can reduce their size and link times
can be improved.
This bug is provided for discussion as a possible enhancement. Reid will sign up
to do the work, but he wants to explore any issues with doing this first and
determine if others would find it useful.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list