This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/48866] gcc hangs when -g is set


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

--- Comment #8 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-05-06 14:43:45 UTC ---
I don't see how it would.  Except for some very particular cases (that do not
include the expansion of addresses AFAICT) we just expand each of the
replaceable stmts at the time their SSA names are first referenced.  It's
combine that takes care of creating double-indirect address modes.

Anyway, the current situation is highly sub-optimal: we'd be better off, at
least in terms of debug info generation, if we emitted the code corresponding
to a replaceable def at the point of the def, if it's not effectively
replaced/combined.  Here's how I'm thinking of implementing this:

- in expand_gimple_basic_block, upon encountering a replaceable gimple stmt,
instead of skipping it altogether:

-- if it is mapped to an expansion in a pointer map, emit the expansion, unmark
it as replaceable, and remove the mapping

-- otherwise, emit a placeholder note and insert (stmt,placeholder) in the
pointer map

- in expand_expr_real_1 case SSA_NAME, instead of expanding the replaceable
stmt onto the current insn seq, expand it into a separate seq and:

-- if the stmt is already in the pointer map, emit the seq before the
placeholder, remove the placeholder, and unmark the stmt as replaceable

-- if it isn't, insert the pair (stmt, expansion) in the pointer map

- at the end of expansion, remove all placeholders before adjusting deferred
debug insns

Makes sense?  Any pitfalls I should watch out for?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]