This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
a question about GIMPLE_PHI node
- From: beicy wang <beicywm at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 17 Jul 2012 14:11:52 -0400
- Subject: a question about GIMPLE_PHI node
Hi Everyone,
I am new to GIMPLE, and have a question about GIMPLE_PHI node.
If I add "-fdump-tree-ssa-raw" option, the output file contains every
GIMPLE_PHI node. However, when I added a new pass before pass
"pass_ipa_lto_gimple_out", and traversed each statement using the
following piece of codes:
FOR_EACH_BB (bb){
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)){
stmt = gsi_stmt (gsi);
....
No GIMPLE_PHI node is encountered, but the SSA_NAME defined in the
missed GIMPLE_PHI node are still used in other statements.
Take the following debugging info as an example. SSA_NAME
0x7ffff7fc1680 is used in stmt_cur, but "a_1 = PHI <a_5(3), a_7(4)>"
is not encountered when traversing each gimple statement.
(gdb) p debug_tree(gimple_assign_rh2(stmt_cur))
<ssa_name 0x7fff7c1680
(skipping some info)
visited var <var_decl 0x7fff700a790 a>def_stmt a_1=PHI <a_5(3), a_7(4)>
version 1>
Did I do something wrong? Where are those GIMPLE_PHI nodes?
Thanks a lot for your help!
Beicy