Displaying 3 results from an estimated 3 matches for "bc_from_clang".
2015 Aug 22
3
loop unrolling introduces conditional branch
Hi, Mehdi,
For example, I have this very simple source code:
void foo( int n, int array_x[])
{
for (int i=0; i < n; i++)
array_x[i] = i;
}
After I use "clang -emit-llvm -o bc_from_clang.bc -c try.cc", I get
bc_from_clang.bc. With my code (using LLVM IRbuilder API), I get
bc_from_api.bc. Attachment please find thse two files. I also past the IR
here.
******************************** Clang Generate IR Start
***********************************************************
; ModuleID...
2015 Aug 22
2
loop unrolling introduces conditional branch
...t 7:27 AM, Xiangyang Guo <xguo6 at ncsu.edu> wrote:
>
> Hi, Mehdi,
>
> For example, I have this very simple source code:
> void foo( int n, int array_x[])
> {
> for (int i=0; i < n; i++)
> array_x[i] = i;
> }
>
> After I use "clang -emit-llvm -o bc_from_clang.bc -c try.cc", I get
> bc_from_clang.bc. With my code (using LLVM IRbuilder API), I get
> bc_from_api.bc. Attachment please find thse two files. I also past the IR
> here.
> ******************************** Clang Generate IR Start
> **********************************************...
2015 Aug 22
2
loop unrolling introduces conditional branch
Hi,
I just tried llvm-3.8 (LLVM SVN Repository). With this version, -fno-rtti
can help me to compile my code and -irce can help me to do a better job for
loop unrolling. However, I still have one question. If I use Clang to
compile a piece of c++ code to .bc and then use 'opt -loop-rotate
-loop-unroll -irce', I can get what I want. I mean, there is no conditional
branch at the end of each