On 9/24/07, Gary Funck <[EMAIL PROTECTED]> wrote:

> I would have thought gimplify_expr's internal mechanisms would
> mark veriables as referenced, when it needs to?

No, it doesn't.  It simply converts to GIMPLE.  Once you inserted the
new statement, you will need to call mark_symbols_for_renaming() on
the new statement.  Unfortunately, this is all not well documented.
The canonical way is:

- create the statement with build() or force_gimple_operand() (if you
want to gimplify an expression).
- insert it on an edge or block with bsi_insert_...
- Call update_stmt() to have it scanned for operands.
- Call mark_symbols_for_renaming() to find all the new symbols and
mark them for renaming.

I keep promising myself that I will spend a few weeks writing up API
documentation for all of this.  The contents of tree-ssa.texi are too
out of date.  One dragon at a time...

Reply via email to