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


> 
> 
> You'll see that we left in the code label at 33 and the jump table at 34. 
> Not good.  Worse yet, the jump table at 34 references non-existent labels.
> This can cause problems in non-cfg aware code that scans the insn chain.
> 
> There's actually two approaches to fixing this problem.  The first is to 
> arrange for the useless label and jump table to be removed at the same
> time we replace the tablejump with a simplejump.  The second would be to
> have a pass which removed code that was not contained within basic blocks
> (the code label and tablejump are _outside_ existing basic blocks).  The
> former seems a lot cleaner to me.
This should be removed by delete_dead_jumptables in flow.c.  At time of implementing
try_redirect_edge_and_branch, the idea of deleting tablejump when existing instruction
still may reference it looked very curious, so thats why it is in the code.

On cfg branch I did expreimentally same change as you and it appears to work now
(it did caused gcc to crash at time we still used old jump pass).
I would suggest to remove the delete_dead_jumptables then :)

One of drawbacks of your sollution is the fact that we will create DELETED_LABEL
note during delete_insn_chain that will not be elliminated and remaing in the
soutput sequence.

Honza


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