Displaying 3 results from an estimated 3 matches for "foro0".
Did you mean:
foro
2020 May 23
2
Loop Unroll
...is my example (for.c):
#include <stdio.h>
int add(int a, int b) {
return a + b;
}
int main() {
int a, b, c, d;
a = 5;
b = 15;
c = add(a, b);
d = 0;
for(int i=0;i<16;i++)
d = add(c, d);
}
I run:
$ clang -O0 -Xclang -disable-O0-optnone -emit-llvm for.c -S -o forO0.ll
$ opt -O0 -S --loop-unroll --unroll-count=4 -view-cfg forO0.ll -o
for-opt00-unroll4.ll
And this is the LLVM IR code that I get:
; ModuleID = 'forO0.ll'
source_filename = "for.c"
target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128&q...
2020 May 26
3
Loop Unroll
...{
> return a + b;
> }
>
> int main() {
> int a, b, c, d;
> a = 5;
> b = 15;
> c = add(a, b);
> d = 0;
> for(int i=0;i<16;i++)
> d = add(c, d);
> }
>
> I run:
> $ clang -O0 -Xclang -disable-O0-optnone -emit-llvm for.c -S -o forO0.ll
> $ opt -O0 -S --loop-unroll --unroll-count=4 -view-cfg forO0.ll -o
> for-opt00-unroll4.ll
>
> And this is the LLVM IR code that I get:
>
> ; ModuleID = 'forO0.ll'
> source_filename = "for.c"
> target datalayout =
> "e-m:e-p270:32:32-p271:32:32-p...
2020 May 22
4
Loop Unroll
Hi,
I'm interesting in find a pass for loop unrolling in LLVM compiler. I tried
opt --loop-unroll --unroll-count=4, but it don't work well.
What pass I can used and how?
I would also like to know if there is any way to mark the loops that I want
them to be unroll
Thanks you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: