This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: how to chase a tree check failure in verify_ssa?
On 9/24/07, Gary Funck <gary@intrepid.com> 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...