[LLVMdev] Name of Function's original module during link-time optimization
bram.adams at ugent.be
Mon Sep 25 05:24:50 PDT 2006
Reid Spencer wrote:
> Call getBytecodeModuleProvider (see Reader.h).
The problem is that one needs to provide the filename of the original
module as the argument of getBytecodeModuleProvider, whereas this is
unknown (it's exactly what we're trying to find out).
But, by looking where this method is called in the original bytecode
loading process, I figured out a way to set the attribute I added when
all Functions of a Module are linked into the sole link-time Module (see
patch). The reason I pass an extra argument to so many methods (I let it
default to ""), is that I'd like to have a full path name, not only the
specific file name, of the original modules. As such, using
lib/Linker/LinkModules.cpp:650 did not suffice. However, I noticed that
File.toString() in lib/Linker/LinkItems.cpp:150 does not yield the full
Could this patch (in a revised form) be added to LLVM?
GH-SEL, INTEC, Ghent University (Belgium)
> This will return a
> ModuleProvider. Ask it for the Module and then ask the Module for its
> identifier. This approach avoids loading all the functions.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the llvm-dev