GIMPLE and intent of variables
Mateusz Grabowski
grabekm90@wp.pl
Mon Aug 22 13:59:00 GMT 2011
Thank you for all the answers. Now I have another problem.
When I reach a function call during statement iteration, I want to go to
this function's code.
if (is_gimple_call(stmt)) {
tree fndecl = gimple_call_fndecl(stmt); // This returns function_decl ;-)
struct funtion * new_cfun = DECL_STRUCT_FUNCTION(fndecl); /* This returns
struct function * from tree */
/* Push the current cfun onto the stack, and set cfun to new_cfun. */
push_cfun (new_cfun);
annotate_function(cfun);
/* Pop cfun from the stack. */
pop_cfun();
}
I have a problem with variable types (TREE_CODE). When I change cfun (using
push_cfun), temporary variables, used in new function, have TREE_CODE equals
VAR_DECL instead of SSA_NAME.
I think I have reached the called function before it was passed through SSA.
Should I pass the function through SSA manually or somehow change the moment
when the plugin is run, so that all function are already passed through SSA?
--
View this message in context: http://old.nabble.com/GIMPLE-and-intent-of-variables-tp32275433p32310211.html
Sent from the gcc - patches mailing list archive at Nabble.com.
More information about the Gcc-patches
mailing list