[LLVMdev] IR in SSA form?
Reid Kleckner
reid.kleckner at gmail.com
Tue Mar 29 10:39:53 PDT 2011
There are no phi functions because the program (for me with clang) is
optimized to:
define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readnone {
ret i32 1
}
Basically, the loop is unrolled, the array is unpacked into scalars,
and things are DCE/folded away.
Reid
On Tue, Mar 29, 2011 at 1:26 PM, George Baah <georgebaah at gmail.com> wrote:
> Hi All,
> When I run the following command
> llvm-gcc -03 -emit-llvm test.cpp -c -o test.bc or llvm-gcc -emit-llvm
> test.cpp -c -o test.bc
> on the program test.cpp, the IR representation is not in SSA form.
> I do not see any phi functions.
> program: test.cpp
> int main(int argc, char **argv)
> {
> int a[2],i,j;
> for(i=0;i<2;i++)
> {
> a[i] = i;
> }
> return a[1];
> }
> Any clarifications will be greatly appreciated. Thanks.
> George
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
More information about the llvm-dev
mailing list