[Bug tree-optimization/31081] [4.3 Regression] Inliner messes up SSA for abnormals

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Dec 3 18:11:00 GMT 2007



------- Comment #10 from jakub at gcc dot gnu dot org  2007-12-03 18:11 -------
The problem as I see it is that result is uninitialized in the inline routine
and in addition to that is SSA_NAME_OCCURS_IN_ABNORMAL_PHI.  After inlining the
empty_stmt SSA_NAME_DEF_STMT is considered to be live from the beginning of the
caller and thus we should add a few PHI nodes around in the caller, if the
inline
function is ever called in any kind of loop.
I guess we could detect this e.g. in tree-inline.c (remap_ssa_name), just test
for SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name) inside of the if (IS_EMPTY_STMT
(SSA_NAME_DEF_STMT (name))) block and if it is (ab) with empty stmt def, add it
to some bitmap for later handling.
But I wonder what would be the best way to add the PHI nodes.  We really
shouldn't do mark_sym_for_renaming on underlying decl, perhaps create a dummy
decl, let intossa create PHIs etc. for it, then change the SSA_NAME_VARs for
it? Or anything easier?  Any ideas?


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31081



More information about the Gcc-bugs mailing list