public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bill Schmidt <wschmidt@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com
Subject: Re: [PATCH 14/18] rs6000: Debug support
Date: Tue, 9 Nov 2021 09:06:11 -0600	[thread overview]
Message-ID: <4c233179-ed89-c3fd-63ba-274e89d12cfc@linux.ibm.com> (raw)
In-Reply-To: <20211105213455.GR614@gate.crashing.org>


On 11/5/21 4:34 PM, Segher Boessenkool wrote:
> On Wed, Sep 01, 2021 at 11:13:50AM -0500, Bill Schmidt wrote:
>> 	* config/rs6000/rs6000-call.c (rs6000_debug_type): New function.
>> 	(def_builtin): Change debug formatting for easier parsing and
>> 	include more information.
>> 	(rs6000_init_builtins): Add dump of autogenerated builtins.
>> 	(altivec_init_builtins): Dump __builtin_altivec_mask_for_load for
>> 	completeness.
>
>> +{
>> +  if (type == void_type_node)
>> +    return "void";
>> +  else if (type == long_integer_type_node)
>> +    return "long";
>> +  else if (type == long_unsigned_type_node)
>> +    return "ulong";
>> +  else if (type == long_long_integer_type_node)
>> +    return "longlong";
>> +  else if (type == long_long_unsigned_type_node)
>> +    return "ulonglong";
>> +  else if (type == bool_V2DI_type_node)
>> +    return "vbll";
>> +  else if (type == bool_V4SI_type_node)
>> +    return "vbi";
>> +  else if (type == bool_V8HI_type_node)
>> +    return "vbs";
>> +  else if (type == bool_V16QI_type_node)
>> +    return "vbc";
>> +  else if (type == bool_int_type_node)
>> +    return "bool";
>> +  else if (type == dfloat64_type_node)
>> +    return "_Decimal64";
>> +  else if (type == double_type_node)
>> +    return "double";
>> +  else if (type == intDI_type_node)
>> +    return "sll";
>> +  else if (type == intHI_type_node)
>> +    return "ss";
>> +  else if (type == ibm128_float_type_node)
>> +    return "__ibm128";
>> +  else if (type == opaque_V4SI_type_node)
>> +    return "opaque";
>> +  else if (POINTER_TYPE_P (type))
>> +    return "void*";
>> +  else if (type == intQI_type_node || type == char_type_node)
>> +    return "sc";
>> +  else if (type == dfloat32_type_node)
>> +    return "_Decimal32";
>> +  else if (type == float_type_node)
>> +    return "float";
>> +  else if (type == intSI_type_node || type == integer_type_node)
>> +    return "si";
>> +  else if (type == dfloat128_type_node)
>> +    return "_Decimal128";
>> +  else if (type == long_double_type_node)
>> +    return "longdouble";
>> +  else if (type == intTI_type_node)
>> +    return "sq";
>> +  else if (type == unsigned_intDI_type_node)
>> +    return "ull";
>> +  else if (type == unsigned_intHI_type_node)
>> +    return "us";
>> +  else if (type == unsigned_intQI_type_node)
>> +    return "uc";
>> +  else if (type == unsigned_intSI_type_node)
>> +    return "ui";
>> +  else if (type == unsigned_intTI_type_node)
>> +    return "uq";
>> +  else if (type == unsigned_V1TI_type_node)
>> +    return "vuq";
>> +  else if (type == unsigned_V2DI_type_node)
>> +    return "vull";
>> +  else if (type == unsigned_V4SI_type_node)
>> +    return "vui";
>> +  else if (type == unsigned_V8HI_type_node)
>> +    return "vus";
>> +  else if (type == unsigned_V16QI_type_node)
>> +    return "vuc";
>> +  else if (type == V16QI_type_node)
>> +    return "vsc";
>> +  else if (type == V1TI_type_node)
>> +    return "vsq";
>> +  else if (type == V2DF_type_node)
>> +    return "vd";
>> +  else if (type == V2DI_type_node)
>> +    return "vsll";
>> +  else if (type == V4SF_type_node)
>> +    return "vf";
>> +  else if (type == V4SI_type_node)
>> +    return "vsi";
>> +  else if (type == V8HI_type_node)
>> +    return "vss";
>> +  else if (type == pixel_V8HI_type_node)
>> +    return "vp";
>> +  else if (type == pcvoid_type_node)
>> +    return "voidc*";
>> +  else if (type == float128_type_node)
>> +    return "_Float128";
>> +  else if (type == vector_pair_type_node)
>> +    return "__vector_pair";
>> +  else if (type == vector_quad_type_node)
>> +    return "__vector_quad";
>> +  else
>> +    return "unknown";
>> +}
> Please use a switch statement for this.  You can call the variable
> "type_node" then as well, which would be a good idea.
>
Unfortunately you can't have a switch on a non-integer type, so I'm afraid
I'll have to leave this as is.  I'll make all the other suggested changes.
Thanks for the review!

Bill


  reply	other threads:[~2021-11-09 15:06 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 16:13 [PATCHv5 00/18] Replace the Power target-specific builtin machinery Bill Schmidt
2021-09-01 16:13 ` [PATCH 01/18] rs6000: Handle overloads during program parsing Bill Schmidt
2021-09-13 17:17   ` will schmidt
2021-09-13 23:53   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 02/18] rs6000: Move __builtin_mffsl to the [always] stanza Bill Schmidt
2021-09-13 17:53   ` will schmidt
2021-09-16 22:52   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 03/18] rs6000: Handle gimple folding of target built-ins Bill Schmidt
2021-09-13 18:42   ` will schmidt
2021-09-14 22:36     ` Bill Schmidt
2021-09-16 22:58   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 04/18] rs6000: Handle some recent MMA builtin changes Bill Schmidt
2021-09-13 19:02   ` will schmidt
2021-09-16 23:38   ` Segher Boessenkool
2021-09-17 15:14     ` Bill Schmidt
2021-09-01 16:13 ` [PATCH 05/18] rs6000: Support for vectorizing built-in functions Bill Schmidt
2021-09-13 19:29   ` will schmidt
2021-09-17 12:17   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 06/18] rs6000: Builtin expansion, part 1 Bill Schmidt
2021-10-31  3:24   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 07/18] rs6000: Builtin expansion, part 2 Bill Schmidt
2021-11-01 12:18   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 08/18] rs6000: Builtin expansion, part 3 Bill Schmidt
2021-11-03  1:15   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 09/18] rs6000: Builtin expansion, part 4 Bill Schmidt
2021-11-03  1:52   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 10/18] rs6000: Builtin expansion, part 5 Bill Schmidt
2021-11-04  0:55   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 11/18] rs6000: Builtin expansion, part 6 Bill Schmidt
2021-11-04  1:24   ` Segher Boessenkool
2021-11-07 15:28     ` Bill Schmidt
2021-11-07 21:05       ` Segher Boessenkool
2021-11-08 13:16         ` Bill Schmidt
2021-09-01 16:13 ` [PATCH 12/18] rs6000: Update rs6000_builtin_decl Bill Schmidt
2021-11-05 20:27   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 13/18] rs6000: Miscellaneous uses of rs6000_builtins_decl_x Bill Schmidt
2021-11-05 20:36   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 14/18] rs6000: Debug support Bill Schmidt
2021-11-05 21:34   ` Segher Boessenkool
2021-11-09 15:06     ` Bill Schmidt [this message]
2021-09-01 16:13 ` [PATCH 15/18] rs6000: Update altivec.h for automated interfaces Bill Schmidt
2021-11-05 22:08   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 16/18] rs6000: Test case adjustments Bill Schmidt
2021-11-05 22:37   ` Segher Boessenkool
2021-11-11 20:06     ` Bill Schmidt
2021-11-11 20:55       ` Bill Schmidt
2021-09-01 16:13 ` [PATCH 17/18] rs6000: Enable the new builtin support Bill Schmidt
2021-11-05 22:10   ` Segher Boessenkool
2021-09-01 16:13 ` [PATCH 18/18] rs6000: Add escape-newline support for builtins files Bill Schmidt
2021-11-05 23:50   ` Segher Boessenkool
2021-11-08 19:40     ` Bill Schmidt
2021-09-13 13:33 ` [PATCHv5 00/18] Replace the Power target-specific builtin machinery Bill Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c233179-ed89-c3fd-63ba-274e89d12cfc@linux.ibm.com \
    --to=wschmidt@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).