* Updating phi nodes on deleting gimple statement
@ 2021-12-16 6:33 Shubham Narlawar
2021-12-16 12:58 ` Richard Biener
0 siblings, 1 reply; 3+ messages in thread
From: Shubham Narlawar @ 2021-12-16 6:33 UTC (permalink / raw)
To: GCC Development
Hello,
I have a PHI node that defines a variable that is used in 1 statement. I
then delete the statement. I think I need to update the PHI node to no
longer reference that variable. I looked through some code and I don't see
a way to just remove an element from a PHI node and I see in the file
omp-expand.c what looks like creating a new PHI node and copying over all
of the elements.
My question is: how do I update a PHI node per the above? Is it necessary -
if I don't do anything and leave the PHI node as is it appears to work,
though I don't know the implications of this. If I do need to update it, do
I recreate it and delete the old one?
Thanks and Regards,
Shubham
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Updating phi nodes on deleting gimple statement
2021-12-16 6:33 Updating phi nodes on deleting gimple statement Shubham Narlawar
@ 2021-12-16 12:58 ` Richard Biener
2021-12-17 11:02 ` Shubham Narlawar
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2021-12-16 12:58 UTC (permalink / raw)
To: Shubham Narlawar, Shubham Narlawar via Gcc, GCC Development
On December 16, 2021 7:33:37 AM GMT+01:00, Shubham Narlawar via Gcc <gcc@gcc.gnu.org> wrote:
>Hello,
>
>
>I have a PHI node that defines a variable that is used in 1 statement. I
>then delete the statement. I think I need to update the PHI node to no
>longer reference that variable. I looked through some code and I don't see
>a way to just remove an element from a PHI node and I see in the file
>omp-expand.c what looks like creating a new PHI node and copying over all
>of the elements.
>
>My question is: how do I update a PHI node per the above? Is it necessary -
>if I don't do anything and leave the PHI node as is it appears to work,
>though I don't know the implications of this. If I do need to update it, do
>I recreate it and delete the old one?
You don't need to do anything to the PHI node.
Richard.
>Thanks and Regards,
>Shubham
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Updating phi nodes on deleting gimple statement
2021-12-16 12:58 ` Richard Biener
@ 2021-12-17 11:02 ` Shubham Narlawar
0 siblings, 0 replies; 3+ messages in thread
From: Shubham Narlawar @ 2021-12-17 11:02 UTC (permalink / raw)
To: Richard Biener; +Cc: Shubham Narlawar via Gcc
On Thu, 16 Dec, 2021, 6:28 pm Richard Biener, <richard.guenther@gmail.com>
wrote:
> On December 16, 2021 7:33:37 AM GMT+01:00, Shubham Narlawar via Gcc <
> gcc@gcc.gnu.org> wrote:
> >Hello,
> >
> >
> >I have a PHI node that defines a variable that is used in 1 statement. I
> >then delete the statement. I think I need to update the PHI node to no
> >longer reference that variable. I looked through some code and I don't see
> >a way to just remove an element from a PHI node and I see in the file
> >omp-expand.c what looks like creating a new PHI node and copying over all
> >of the elements.
> >
> >My question is: how do I update a PHI node per the above? Is it necessary
> -
> >if I don't do anything and leave the PHI node as is it appears to work,
> >though I don't know the implications of this. If I do need to update it,
> do
> >I recreate it and delete the old one?
>
> You don't need to do anything to the PHI node.
>
Understood!
Thanks and Regards,
Shubham
> Richard.
>
> >Thanks and Regards,
> >Shubham
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-17 11:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 6:33 Updating phi nodes on deleting gimple statement Shubham Narlawar
2021-12-16 12:58 ` Richard Biener
2021-12-17 11:02 ` Shubham Narlawar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).