[LLVMdev] Cloning Functions

David Greene dag at cray.com
Fri Jul 11 10:12:21 PDT 2008


On Friday 11 July 2008 12:05, Devang Patel wrote:

> > Ok, I've mostly got a mechanism to do what I want:
> >
> > 1. As each function comes in for op/codegen, clone it and save off
> >   the clone and its associated ValueMap (I call these clones
> > "pristine"
> >   functions.
> >
> > 2. After all processing is done, clone the resulting Module (this
> > has all of
> >   the global data and the optimized functions).  Save the ValueMap
> > from this
> >   operation.
>
> The global data is also optimized at this point. Will it map properly
> with un-optimized pristine functions ?

I had wondered that myself.  In what way is global data optimized?
My assumption is that global data might be added by optimizations
but that nothing would be deleted or drastically changed.

                                                  -Dave



More information about the llvm-dev mailing list