aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-10-06 16:34:48 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-10-06 16:34:48 +0200
commite7f9dae09c771b101425e5b1f92b74278c48cb8d (patch)
tree1eb9825a1426b1f1981f774965457b45a5f0fba4 /gcc/gimple-fold.c
parentbc622b2a5ee54492a43a75c4170efefc33690471 (diff)
downloadgcc-e7f9dae09c771b101425e5b1f92b74278c48cb8d.zip
gcc-e7f9dae09c771b101425e5b1f92b74278c48cb8d.tar.gz
gcc-e7f9dae09c771b101425e5b1f92b74278c48cb8d.tar.bz2
tree.h (avoid_folding_inline_builtin): New prototype.
* tree.h (avoid_folding_inline_builtin): New prototype. * builtins.c (avoid_folding_inline_builtin): No longer static. * gimple-fold.c (gimple_fold_builtin): Give up if avoid_folding_inline_builtin returns true. From-SVN: r179614
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index fcfbcc8..b4993fd 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -828,6 +828,11 @@ gimple_fold_builtin (gimple stmt)
if (DECL_BUILT_IN_CLASS (callee) == BUILT_IN_MD)
return NULL_TREE;
+ /* Give up for always_inline inline builtins until they are
+ inlined. */
+ if (avoid_folding_inline_builtin (callee))
+ return NULL_TREE;
+
/* If the builtin could not be folded, and it has no argument list,
we're done. */
nargs = gimple_call_num_args (stmt);