This is the mail archive of the gcc@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]

Re: May delete_trivially_dead_insns delete trapping insns?


Hi,

On Fri, 22 Nov 2002, Jan Hubicka wrote:

> We should delete the edges when the insns are deleted unless we are

delete_trivially_dead_insns() has no provisions for updating any edges.

> compiling for Java that requires the edges to be kept.

Why for Java, but not for other languages?  If there are no trapping insns
in a basic block there can't be exceptions edges.  That is _if_ we expect
that d_t_d_i() retains the CFG at least basically, we either have to not
delete trapping insns, or delete now dead edges.

> delete_dead_insn_and_edges should do that.

No such function in HEAD ;)  Anyway, purge_all_dead_edges() would work
also.  The question is, _if_ we want to do that for d_t_d_i() at all.

> What exactly is broken?

Well, simple.  Suppose a block only consisting of one trapping insn (like
setting a pseudo to a value from memory).  Now that pseudo is used nowhere
else.  In that case delete_trivially_dead_insns() will delete that insn,
and suddenly the exception edge is superflous.  Those stray edges break
e.g.  fixup_abnormal_edges() .

> I see perhaps what you are seeing is the scenario where trivially dead
> insn is elliminated creating unreachable block that is not zapped then?

No, it's not unreachable.  It's simply not trapping anymore.


Ciao,
Michael.


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