diff --git a/c-opopt.cc b/c-opopt.cc index 11153cc..d253dac 100644 --- a/c-opopt.cc +++ b/c-opopt.cc @@ -762,6 +762,15 @@ void T_OptData::buildUseDefineChains( * Entering/exiting functions is a bit of a PITA: * - call instructions define function arguments; * - return edges kill locals + * + * OK, so now that we have edge types, things should be easier, as we + * can: + * - handle arguments directly; they're immutable and always + * defined at the function's call site. + * - handle local variables by walking the function's graph, + * ignoring all CALL edges and terminating at the RET edge; + * - handle globals by following all edges and terminating at the + * exit node */ #if 0 // Walk the graph from the entry point until all reachable nodes