[LLVMbugs] [Bug 512] NEW: Provide post-link-optimization in llvmc and gccld

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Feb 14 14:19:15 PST 2005


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=512

           Summary: Provide post-link-optimization in llvmc and gccld
           Product: tools
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: llvmc
        AssignedTo: rspencer at x10sys.com
        ReportedBy: rspencer at x10sys.com


This enhancement requests that the llvmc and gccld tools support a
-post-link-opt= option that allows the user to specify a "pass" to be run on the
linked bytecode before code generation occurs. For example, we want to be able
to say: 

llvmc x.bc y.bc -o a.out -post-link-opt=FOO

which means that the following steps would occur:

1. x.bc and y.bc are linked together to produce llvm.bc
2. The "FOO" program is invoked to process llvm.bc and return a new bytecode
   file. FOO is passed the full path to llvm.bc in the first argument and the
   name of a temporary file it should create as the second argument.
3. If FOO returns a non-zero result code, processing stops.
4. If FOO returns a zero result code, the temporary file is read in and
   validated.
5. If the file validates correctly, it is used for code generation resulting in
   the creation of the a.out file. 

The idea is to allow separate programs to post-process a linked program. For
example, the pool allocator could be just a program that gets downloaded and
used like:

llvmc x.c y.c -postlinkopt=poolalloc -o xy.out



------- 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