[llvm-dev] Generating SSA using llvm
Sudakshina Dutta via llvm-dev
llvm-dev at lists.llvm.org
Mon Apr 12 23:05:08 PDT 2021
Dear all,
Greetings.
I have been trying to generate SSA form using llvm. Note that I have
subjected the following program (prog1.c) to llvm.
int fact(int b);
int main()
{
int a, b;
a = 6;
if(a > 5)
{
b = 7;
}
else
{
b = 5;
}
fact(b);
return 0;
}
Also I have executed the following commands.
clang -S -emit-llvm prog1.c -o prog1.ll
clang -c -emit-llvm prog1.c -o prog1.bc
opt -mem2reg prog1.bc -o prog1.opt.bc
llvm-dis prog1.opt.bc
The last step generates prog1.opt.ll. I did not find any difference between
prog1.ll and prog1.opt.ll other than the names of the files.
Kindly help me in generating SSA using llvm.
Thanks,
Sudakshina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210413/628abad7/attachment.html>
More information about the llvm-dev
mailing list