Displaying 5 results from an estimated 5 matches for "generate_ir".
2008 Jul 09
0
[LLVMdev] Cloning Functions
...;
> But here's the catch. Our compiler processes one function at a time,
> so the LLVM IR is generated 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...
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 09
2
[LLVMdev] Cloning Functions
...stream tests and it would be nice to capture
the problem and make the test available to everyone.
> You do not need to optimize LLVM IR before processing 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...
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...
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...