Hello,
> 
> 
> ---
>  gcc/ipa-ref.c | 22 ++++++++++++++++++++++
>  gcc/ipa-ref.h |  3 +++
>  2 files changed, 25 insertions(+)
> 
> diff --git a/gcc/ipa-ref.c b/gcc/ipa-ref.c
> index 241828ee973..76459e9cc3d 100644
> --- a/gcc/ipa-ref.c
> +++ b/gcc/ipa-ref.c
> @@ -103,3 +103,25 @@ ipa_ref::referred_ref_list (void)
>  {
>    return &referred->ref_list;
>  }
> +
> +const char *
> +stringify_ipa_ref_use (const ipa_ref_use use)
> +{
> +  switch (use)
> +    {
> +    case IPA_REF_LOAD:
> +      return "IPA_REF_LOAD";
> +      break;
> +    case IPA_REF_STORE:
> +      return "IPA_REF_STORE";
> +      break;
> +    case IPA_REF_ADDR:
> +      return "IPA_REF_ADDR";
> +      break;
> +    case IPA_REF_ALIAS:
> +      return "IPA_REF_ALIAS";
> +      break;
> +    default:
> +      return "<unknown>";
> +    }
There is ipa_ref_use_name that also turns ipa_ref to string. I guess you
can use the same mechanizm in case this is used for debug output?

Honza

Reply via email to