[LLVMdev] argpromotion not working
Arvind Sudarsanam
A.Sudarsanam at cputech.com
Fri Jun 18 13:21:53 PDT 2010
Hi all,
I have the following C code.
static int addp(int *c, int a,int b)
{
int x = *c + a + b;
return(x);
}
I want to replace *c with a scalar. So I tried the -argpromotion pass.
However, it fails to do anything to the resulting llvm file.
List of commands:
clang add.c -c -o add.bc
clang add.c -S -o add.ll
opt -argpromotion -stats add.bc -o add_a.bc
llvm-dis < add_a.bc > add_a.ll
Also, when I try to print the stats I get a message
"Maximum CGSCCPassMgr iterations on one SCC"
Can anyone please let me know what I am missing here?
Thanks for all the help.
Regards
Arvind
More information about the llvm-dev
mailing list