]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Remove unused placeholder_p parameter from add_function
authorKito Cheng <kito.cheng@sifive.com>
Tue, 2 Dec 2025 13:40:06 +0000 (06:40 -0700)
committerJeff Law <jlaw@ventanamicro.com>
Tue, 2 Dec 2025 13:40:06 +0000 (06:40 -0700)
The placeholder_p parameter of function_builder::add_function is always
passed as false.  This was inherited from the AArch64 implementation but
is unnecessary for RISC-V.

gcc/ChangeLog:

* config/riscv/riscv-vector-builtins.cc
(function_builder::add_function): Remove placeholder_p parameter.
(function_builder::add_unique_function): Update call.
(function_builder::add_overloaded_function): Likewise.
* config/riscv/riscv-vector-builtins.h
(function_builder::add_function): Update declaration.

gcc/config/riscv/riscv-vector-builtins.cc
gcc/config/riscv/riscv-vector-builtins.h

index a3e596a8097137b74cfbaa69ad7b7c15282b5d93..d37cc43ebe5a3a869f5c76b81bbd89f5390949d2 100644 (file)
@@ -4443,7 +4443,7 @@ function_builder::get_attributes (const function_instance &instance)
 registered_function &
 function_builder::add_function (const function_instance &instance,
                                const char *name, tree fntype, tree attrs,
-                               bool placeholder_p, const char *overload_name,
+                               const char *overload_name,
                                const vec<tree> &argument_types,
                                enum required_ext required,
                                bool overloaded_p = false)
@@ -4464,7 +4464,7 @@ function_builder::add_function (const function_instance &instance,
      nodes and remove the target hook. For now, however, we need to appease the
      validation and return a non-NULL, non-error_mark_node node, so we
      arbitrarily choose integer_zero_node.  */
-  tree decl = placeholder_p || in_lto_p
+  tree decl = in_lto_p
                ? integer_zero_node
                : simulate_builtin_function_decl (input_location, name, fntype,
                                                  code, NULL, attrs);
@@ -4508,7 +4508,7 @@ function_builder::add_unique_function (const function_instance &instance,
                                 argument_types.address ());
   tree attrs = get_attributes (instance);
   registered_function &rfn
-    = add_function (instance, name, fntype, attrs, false, overload_name,
+    = add_function (instance, name, fntype, attrs, overload_name,
                    argument_types.copy (), required);
 
   /* Enter the function into the hash table.  */
@@ -4523,7 +4523,7 @@ function_builder::add_unique_function (const function_instance &instance,
       /* Attribute lists shouldn't be shared.  */
       tree attrs = get_attributes (instance);
       if (m_direct_overloads)
-       add_function (instance, overload_name, fntype, attrs, false, NULL,
+       add_function (instance, overload_name, fntype, attrs, NULL,
                      vNULL, required);
       else
        {
@@ -4562,7 +4562,7 @@ function_builder::add_overloaded_function (const function_instance &instance,
       /* To avoid API conflicting, take void return type and void argument
         for the overloaded function.  */
       tree fntype = build_function_type (void_type_node, void_list_node);
-      add_function (instance, name, fntype, NULL_TREE, false, name,
+      add_function (instance, name, fntype, NULL_TREE, name,
                    vNULL, required, true);
       obstack_free (&m_string_obstack, name);
     }
index 8cb243ba53b04c3a4ca1b78f5a378646d9853cbd..9e1a47499ba6247f953839f362a47d0dfc77c1cd 100644 (file)
@@ -435,7 +435,7 @@ private:
   tree get_attributes (const function_instance &);
 
   registered_function &add_function (const function_instance &, const char *,
-                                    tree, tree, bool, const char *,
+                                    tree, tree, const char *,
                                     const vec<tree> &, enum required_ext,
                                     bool);