Re: Question about creating global varaiable during IPA PASS.

2023-12-20 Thread Hanke Zhang via Gcc
Hi Thomas! Thanks for your reply. That's exactly what I'm missing. When I add varpool_node::finalize_decl() to my code, everything works fine! Thomas Schwinge 于2023年12月16日周六 01:15写道: > > Hi Hanke! > > On 2023-12-13T17:04:57+0800, Hanke Zhang via Gcc wrote: > > Hi, I'm trying to create a global

Re: Question about creating global varaiable during IPA PASS.

2023-12-15 Thread Thomas Schwinge
Hi Hanke! On 2023-12-13T17:04:57+0800, Hanke Zhang via Gcc wrote: > Hi, I'm trying to create a global variable in my own PASS which > located at the LATE_IPA_PASSES. (I'm using GCC 10.3.0.) I can't comment on IPA aspects, or whether something was different on oldish GCC 10 (why using that one,

Question about creating global varaiable during IPA PASS.

2023-12-13 Thread Hanke Zhang via Gcc
Hi, I'm trying to create a global variable in my own PASS which located at the LATE_IPA_PASSES. (I'm using GCC 10.3.0.) And after creating it, I added the attributes like the following. // 1. create the var tree new_name = get_identifier (xx); tree new_type = build_pointer_type (xx); tree