Re: Crash in remove_stmt_from_en_lp_fn() due to remving of gimple statement using gsi_remove

2019-11-16 Thread Prathamesh Kulkarni
On Sat, 16 Nov 2019 at 11:28, Shubham Narlawar  wrote:
>
> Hello,
>
> I'm writing a Simple LTO pass.  I have placed my optimization routine under
> execute() hook.  In my optimization routine, I want to delete an
> instruction for which I have the gimple_stmt_iterator.  If I call
> gsi_remove(gsi, true), it causes a crash in remove_stmt_from_en_lp_fn()
> where it is expecting cfun and cfun is NULL.
I assume you mean simple_ipa_opt_pass ?
Maybe try calling push_cfun with appropriate function, to provide cfun
context before calling gsi_remove
(and pop_cfun after you're done).

Thanks,
Prathamesh
>
> If I call gsi_remove(gsi, false), it goes through fine but at final link
> stage it shows undefined reference to a certain function.  It looks like
> the entire function vanished.  And the instruction I tried to delete was
> not even a part of that function.
>
> Do I need to call update_ssa() after I delete the instruction using
> gsi_remove(gsi, false)?
>
> Is there a simple manner in which I can delete the instruction without
> having to go through writing the full blown LTO pass with
> serializers/deserializers and the like?
>
> Thanks
>
> Shubham


gcc-9-20191116 is now available

2019-11-16 Thread gccadmin
Snapshot gcc-9-20191116 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/9-20191116/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 9 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-9-branch 
revision 278365

You'll find:

 gcc-9-20191116.tar.xzComplete GCC

  SHA256=06ab42482f6bcd9d9fb3aa0343c62687b1935fadd8160c874fd9b61b7ec2f1ba
  SHA1=8d0affb84f180d298e02836091c2f5d502276cd3

Diffs from 9-20191109 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-9
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.