This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Helper for replaceAllUses in gcc gimple
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Cristina Georgiana Opriceana <cristina dot opriceana at gmail dot com>,gcc at gcc dot gnu dot org
- Date: Thu, 11 Feb 2016 19:07:31 +0100
- Subject: Re: Helper for replaceAllUses in gcc gimple
- Authentication-results: sourceware.org; auth=none
- References: <CAFA9rWMeaaF_upk5KUrtH--uVSJcY+-Zzw5QtpSHc9-+dqaaeQ at mail dot gmail dot com>
On February 11, 2016 6:39:02 PM GMT+01:00, Cristina Georgiana Opriceana <cristina.opriceana@gmail.com> wrote:
>Hello,
>
>Is there any implementation for replacing all uses of a variable with
>another variable in gimple?
>
>If I want to replace the uses of a variable with another one, do I
>have to do this by hand, investigate the type of the instruction and
>perform a replacement where necessary or is there any sort of helper
>available?
>
>In llvm, this can be done with Value::replaceAllUsesWith(Value *V).
You can replace all uses of an SSA name with replace_uses_by.
Richard.
>Thanks,
>Cristina