On Sun, Jul 6, 2008 at 6:46 PM, Fern Moon <[EMAIL PROTECTED]> wrote: > Dear sir, > > I add a pass for the loop optimization. I try to add a function call > but failed due to ssa error. > > In order to verify the error, I just add a simple function call such > as time() without any parameter in the first basic block. > I will get the error: > > hello1.c: In function main > hello1.c:5: error: expected an SSA_NAME object > hello1.c:5: error: in statement > # HEAP.17 = VDEF <HEAP.17> > # SMT.19 = VDEF <SMT.19> { HEAP.17 SMT.19 } > time (); > hello1.c:5: confused by earlier errors, bailing out
You need to mark the virtual symbols for renaming. Try calling mark_symbols_for_renaming on the call stmt after calling update_stmt on it. Also make sure to run TODO_update_ssa on your pass. Richard.