[PATCH] optinfo-emit-json.cc: don't call get_fnname_from_decl (PR middle-end/89725)

David Malcolm dmalcolm@redhat.com
Thu Mar 28 14:44:00 GMT 2019


On Thu, 2019-03-28 at 15:14 +0100, Jakub Jelinek wrote:
> On Thu, Mar 28, 2019 at 11:02:52AM -0400, David Malcolm wrote:
> > optrecord_json_writer::optinfo_to_json can in theory be called from
> > any
> > optimization pass, but currently uses get_fnname_from_decl, which
> > is RTL-specific, which can lead to an ICE (PR middle-end/89725).
> 
> The ICE is a separate problem.  The problem with DECL_RTL early is
> that it is undesirable to create RTL for decls during gimple passes,
> we then need to make sure to clear it when versioning the function
> etc.
> 

Ah, my bad; thanks for the clarification.

Dave



More information about the Gcc-patches mailing list