[PATCH] inline: Rebuild target option node for caller [PR105459]

Kewen.Lin linkw@linux.ibm.com
Mon Jul 11 03:37:18 GMT 2022


on 2022/7/8 19:37, Martin Liška wrote:
> On 6/6/22 08:20, Kewen.Lin wrote:
>> |Hi, PR105459 exposes one issue in inline_call handling that when it decides to copy FP flags from callee to caller and rebuild the optimization node for caller fndecl, it's possible that the target option node is also necessary to be rebuilt. Without updating target option node early, it can make nodes share the same target option node wrongly, later when we want to unshare it somewhere (like in target hook) it can get unexpected results, like ICE on uninitialized secondary member of target globals exposed in this PR.|
> 
> 
> Hello.
> 
> I think your patch seems reasonable. As you mentioned we need to keep
> pair of target and optimization nodes together and the only correct way
> is by using build_target_option_node for the DECL_FUNCTION_SPECIFIC_TARGET.

Hi Martin,

Thanks for your comments!!  Yeah, the idea of this patch is to make target option node
up to date right away, but Richi thought it's too complicated and posted another patch
to leave it to be fixed up later in LTRANS, Honza already approved it.  I guessed that
thread escaped from your mail radar somehow, it started from [1].

[1] https://gcc.gnu.org/pipermail/gcc-patches/2022-July/597595.html

BR,
Kewen


More information about the Gcc-patches mailing list