Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] Extract operations as functions"
2011 May 12
2
[LLVMdev] Extract operations as function
Hi,
I am planning to extract every operation as function.
eg. z=x+y; ==> z=func(x,y,op);
I wish to write a custom definition of op. Which I would like to define in
func.
It would be really helpful if someone could suggest passes
already available in llvm to look for or point some references how should
one proceed on it.
Is codeExtractor.cpp useful for this. I was also thinking of going like
2011 May 12
0
[LLVMdev] Extract operations as function
Hi Manish,
> Great!! Thanks Duncan.
> By step 1 that you mentioned it seems I can write my function func(x,y,op) in
> mypass.cpp itself. Please elaborate how can add it to the module?
the minimum is to add a prototype for "func" to the module. For that you can
use getOrInsertFunction. If you want to insert the code defining "func" too,
then insert the prototype,
2011 May 12
0
[LLVMdev] Extract operations as function
Hi Manish,
> I am planning to extract every operation as function.
>
> eg. z=x+y; ==> z=func(x,y,op);
>
> I wish to write a custom definition of op. Which I would like to define in func.
>
> It would be really helpful if someone could suggest passes already available in
> llvm to look for or point some references how should one proceed on it.
I think you should write
2011 May 12
2
[LLVMdev] Extract operations as function
Great!! Thanks Duncan.
By step 1 that you mentioned it seems I can write my function func(x,y,op)
in mypass.cpp itself. Please elaborate how can add it to the module?
On Thu, May 12, 2011 at 1:22 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Manish,
>
> > I am planning to extract every operation as function.
> >
> > eg. z=x+y; ==> z=func(x,y,op);
> >
2011 May 03
3
[LLVMdev] Loop-Unroll optimization
Hi,
You might want to try running -loops -loop-simplify before loop unroll.
>From loop simplify.cpp
This pass performs several transformations to transform natural loops
into a00011 // simpler form, which makes subsequent analyses and
transformations simpler and00012 // more effective.
Arushi
On Tue, May 3, 2011 at 2:17 PM, Manish Gupta <mgupta.iitr at gmail.com> wrote:
> You
2011 May 04
1
[LLVMdev] Loop-Unroll optimization
1. You should run the passes in the same opt command, for passes like loops
which is an analysis pass provides results to the following passes.
2. You can pass a -debug flag to opt to see the some debugging info.
3. I tried this
opt -mem2reg -loops -loopsimplify -loop-unroll -unroll-count=3 -debug
loop.o -o tt.bc
and got this message.
Loop Size = 14
Can't unroll; loop not terminated by
2011 May 03
0
[LLVMdev] Loop-Unroll optimization
Even after all the sequence of commands below bit-code is not showing any
effect of loop-unrolling
*manish at manish:~/Test2$ llvm-gcc-4.2 -O2 -emit-llvm Hello.c -c -o Hello.bc*
*manish at manish:~/Test2$ opt-2.8 -loops Hello.bc -o Hello1.bc*
*manish at manish:~/Test2$ opt-2.8 -loopsimplify Hello1.bc -o Hello2.bc*
*manish at manish:~/Test2$ opt-2.8 -indvars Hello2.bc -o Hello3.bc*
*manish at
2011 May 03
2
[LLVMdev] Loop-Unroll optimization
Hi, you need to run some optimization passes first. (like -O2)
2011/5/3 Manish Gupta <mgupta.iitr at gmail.com>
> I just want to try loop-unroll and see corresponding changes in the bitcode
> file. For that any loop will do. Have you been able to test llvm loop-unroll
> successfully?
>
>
> On Mon, May 2, 2011 at 10:04 PM, Yuan Pengfei <coolypf at qq.com> wrote:
>
2011 May 03
0
[LLVMdev] Loop-Unroll optimization
You mean like
*llvm-gcc-4.2 -O2 -emit-llvm Hello.c -c -o Hello.bc*
But still i am not able to observe any effect on bit code by running
*opt-2.8 -loop-unroll Hello.bc -o Hello_unroll.bc*
On Tue, May 3, 2011 at 3:58 AM, Zakk <zakk0610 at gmail.com> wrote:
> Hi, you need to run some optimization passes first. (like -O2)
>
> 2011/5/3 Manish Gupta <mgupta.iitr at gmail.com>
2011 May 02
2
[LLVMdev] Hello Pass Problem
Hi all
I am trying hello pass in llvm. I have compiled and could generate
LLVMHello.so but while giving the pass using opt i am getting below
mentioned error.
Command used: *opt-2.8 -load
../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so -hello < hello.bc*
Error opening '../../cse231_project/llvm/llvm-2.9/Debug/lib/LLVMHello.so':
2011 May 03
2
[LLVMdev] Loop-Unroll optimization
Hi,
> The loop that I am trying it on is:
> for(i=0; i< 1000; i++)
> {
> c[i] = a[i] + b[i];
> }
I can't find any benefit unrolling this loop.
------------------
Yuan Pengfei
Peking Unversity, China
2011 May 03
0
[LLVMdev] Loop-Unroll optimization
I just want to try loop-unroll and see corresponding changes in the bitcode
file. For that any loop will do. Have you been able to test llvm loop-unroll
successfully?
On Mon, May 2, 2011 at 10:04 PM, Yuan Pengfei <coolypf at qq.com> wrote:
> Hi,
>
> > The loop that I am trying it on is:
> > for(i=0; i< 1000; i++)
> > {
> > c[i] = a[i] + b[i];
> > }
2010 Jan 09
2
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
Hello,
The CodeExtractor contains a std::set<BasicBlock*> to keep track of the
blocks to extract. Iterators on this set are not deterministic, and so
the functions that are generated are not (the order of the
inputs/outputs can change).
The attached patch uses a SetVector instead. Ok to apply ?
Thanks,
Julien
--
Julien Lerouge
PGP Key Id: 0xB1964A62
PGP Fingerprint: 392D 4BAD DB8B CE7F
2010 Jan 10
1
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
On Fri, Jan 08, 2010 at 05:04:17PM -0800, Chris Lattner wrote:
> On Jan 8, 2010, at 5:01 PM, Julien Lerouge wrote:
> >Hello,
> >
> >The CodeExtractor contains a std::set<BasicBlock*> to keep track
> >of the
> >blocks to extract. Iterators on this set are not deterministic, and so
> >the functions that are generated are not (the order of the
>
2010 Jan 09
0
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
On Jan 8, 2010, at 5:01 PM, Julien Lerouge wrote:
> Hello,
>
> The CodeExtractor contains a std::set<BasicBlock*> to keep track of
> the
> blocks to extract. Iterators on this set are not deterministic, and so
> the functions that are generated are not (the order of the
> inputs/outputs can change).
>
> The attached patch uses a SetVector instead. Ok to apply ?
2009 Jan 07
1
[LLVMdev] Private headers and testing
2009/1/3 Chris Lattner <clattner at apple.com>
> On Jan 2, 2009, at 1:48 PM, Misha Brukman wrote:
>
> 2009/1/2 Chris Lattner <clattner at apple.com>
>
>> On Jan 2, 2009, at 12:21 PM, Misha Brukman wrote:
>> Do you have a specific example of a unit test that would need these? I
>> really think these should stay private.
>>
>
> Let's take
2013 Oct 28
0
[LLVMdev] CodeExtractor is not aware of debugger debugger intrinsics
Hello,
I'm writing a pass using CodeExtractor to pull out a outmost loop as
standalone function. But the 'Module Verifier' issues warning
"function-local metadata used in wrong function". After looking
through the CodeExtractor code, I found nothing about debugger
intrinsics. Is this expected behavior?
Thanks,
yuanfang
2009 Jan 08
0
[LLVMdev] LLVMdev Digest, Vol 55, Issue 16
1. Re: LLVM optmization (Bill Wendling)
Hi,
The IR is not wrong. I said that the assembler generated by MSVC is quicker. We can see that the for loop, in the TESTE function, is done without jump's in the MSVC and with jumps in LLVM. I think thats the point.
If we don't use threads, the result is the same. My test were done with one billion interactions in the for loop. The MSVC
2013 Nov 18
2
[LLVMdev] CodeExtractor status?
I am working on a pass to extract small regions of code to run somewhere else (different node in a cluster). Basically what I need is the ability to isolate a region of code, get its inputs and outputs, create a new function with the extracted code and code aggregating the in and out parameters as structs that can be cast for a “void*”-based interface.
It looks like the CodeExtractor
2019 Jan 17
2
stale info in the assumption cache
Hi all,
We have recently encountered a problem with AssumptionCache that it does not get updated when a block with llvm.assume calls gets outlined by the CodeExtractor. As a result we end up with stale references to the llvm.assume calls that were moved to the outlined function in the parent function's cache.
The problem can be reproduced on the attached file as follows (many thanks to Andy