[LLVMbugs] [Bug 9516] New: Refactor and unify "turn global constant into bytes"
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Mar 20 11:28:04 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9516
Summary: Refactor and unify "turn global constant into bytes"
Product: new-bugs
Version: 2.8
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: jwatte at gmail.com
CC: llvmbugs at cs.uiuc.edu
I'm writing a new back-end, using an object format that is not an ELF file.
To do this, a large part of the work is to write code that takes a GlobalValue
(really, a Constant) and turns it into bytes into an array.
It turns out that there are lots of samples that do this -- anything from the
ELFWriter and AsmPrinter, to the JIT, to each of the microcontroller-specific
object files (like the PIC object file writer).
But, "turn Constant into array of bytes" is a really generic operation that
could probably be done once, in a library, and re-used everywhere, rather than
re-implemented each time.
Separately, the selection of a "section" of an object file, given a
GlobalVariable, may also be re-usable, but should be separate from the
evaluation of a Constant into bytes -- some object formats don't even have
"sections" as such (like the JIT, perhaps?)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list