Commit 60a3d46c by Pekka Jääskeläinen Committed by Pekka Jääskeläinen

[BRIGFE] do not allow optimizations based on known C builtins

It can break inputs that have similarly named functions.

From-SVN: r259949
parent 77c42d45
2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com> 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
* brig/brig-lang.c: Do not allow optimizations based on known C
builtins.
2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
* brig/brig-lang.c: Allow controlling strict aliasing from * brig/brig-lang.c: Allow controlling strict aliasing from
cmd line. cmd line.
......
...@@ -136,6 +136,8 @@ brig_langhook_init_options_struct (struct gcc_options *opts) ...@@ -136,6 +136,8 @@ brig_langhook_init_options_struct (struct gcc_options *opts)
opts->x_flag_signed_zeros = 1; opts->x_flag_signed_zeros = 1;
opts->x_optimize = 3; opts->x_optimize = 3;
flag_no_builtin = 1;
} }
/* Handle Brig specific options. Return 0 if we didn't do anything. */ /* Handle Brig specific options. Return 0 if we didn't do anything. */
...@@ -635,9 +637,11 @@ builtin_type_for_size (int size, bool unsignedp) ...@@ -635,9 +637,11 @@ builtin_type_for_size (int size, bool unsignedp)
static void static void
def_builtin_1 (enum built_in_function fncode, const char *name, def_builtin_1 (enum built_in_function fncode, const char *name,
enum built_in_class fnclass, tree fntype, tree libtype, enum built_in_class fnclass ATTRIBUTE_UNUSED,
bool both_p, bool fallback_p, bool nonansi_p, tree fntype, tree libtype ATTRIBUTE_UNUSED,
tree fnattrs, bool implicit_p) bool both_p ATTRIBUTE_UNUSED, bool fallback_p,
bool nonansi_p ATTRIBUTE_UNUSED, tree fnattrs,
bool implicit_p)
{ {
tree decl; tree decl;
const char *libname; const char *libname;
...@@ -650,12 +654,6 @@ def_builtin_1 (enum built_in_function fncode, const char *name, ...@@ -650,12 +654,6 @@ def_builtin_1 (enum built_in_function fncode, const char *name,
(fallback_p ? libname : NULL), (fallback_p ? libname : NULL),
fnattrs); fnattrs);
if (both_p
&& !flag_no_builtin
&& !(nonansi_p && flag_no_nonansi_builtin))
add_builtin_function (libname, libtype, fncode, fnclass,
NULL, fnattrs);
set_builtin_decl (fncode, decl, implicit_p); set_builtin_decl (fncode, decl, implicit_p);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment