Displaying 5 results from an estimated 5 matches for "optimize_llvm_ir".
2008 Jul 09
2
[LLVMdev] Cloning Functions
...ssing next function.
You do if the functions you compile are mega-humongous.
> If your compiler works like
>
> for each function
> generate_ir
> optimize
Yep.
> then it seems you're doing
>
> for each function
> generate_ir
> convert_to_llvm_ir
> optimize_llvm_ir
Yep.
> If you're doing this then you may try
>
> for each function
> generate_ir
> convert_to_llvm_ir
> optimize_llvm_ir_module
We in fact did used to do it this way. Then we ran out of memory.
And there are other issues to. We'd added things in our copy of LLV...
2008 Jul 11
0
[LLVMdev] Cloning Functions
On Wednesday 09 July 2008 13:49, David Greene wrote:
> > then it seems you're doing
> >
> > for each function
> > generate_ir
> > convert_to_llvm_ir
> > optimize_llvm_ir
>
> Yep.
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 (...
2008 Jul 09
0
[LLVMdev] Cloning Functions
...d and fully optimized before the next
> function
> appears.
You do not need to optimize LLVM IR before processing next function.
If your compiler works like
for each function
generate_ir
optimize
then it seems you're doing
for each function
generate_ir
convert_to_llvm_ir
optimize_llvm_ir
If you're doing this then you may try
for each function
generate_ir
convert_to_llvm_ir
optimize_llvm_ir_module
Now, you have access to un-optimized functions before you do
optimize_llvm_ir_module. Would that work ?
> This also means the global symbol table changes as we
>...
2008 Jul 09
2
[LLVMdev] Cloning Functions
On Wednesday 09 July 2008 12:16, Eli Friedman wrote:
> On Wed, Jul 9, 2008 at 9:56 AM, David Greene <dag at cray.com> wrote:
> > I seem to recall havbing asked this before but I can't find it by
> > searching.
> >
> > What's the right way to clone a Function? I need to save off the text at
> > a certain point and spit it out later, after other
2008 Jul 11
2
[LLVMdev] Cloning Functions
On Jul 11, 2008, at 9:59 AM, David Greene wrote:
> On Wednesday 09 July 2008 13:49, David Greene wrote:
>
>>> then it seems you're doing
>>>
>>> for each function
>>> generate_ir
>>> convert_to_llvm_ir
>>> optimize_llvm_ir
>>
>> Yep.
>
> 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...