summaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-25 17:42:39 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-25 17:42:39 +0000
commite6f295fbb08ee5dc2d0b2d08d71ff824f952ef91 (patch)
treeb21f72610d0ef15b8f89e3f3117d170b5ca05f55 /gcc/function.h
parent34863464d2ceedf20ddcf52e80dadafd837170ec (diff)
downloadgcc-e6f295fbb08ee5dc2d0b2d08d71ff824f952ef91.tar.gz
* function.h (struct function): New field calls_constant_p.
(current_function_calls_constant_p): New macro for above. * function.c (prepare_function_start): Initialize calls_eh_return and calls_constant_p. * builtins.c (expand_builtin_constant_p): Set calls_constant_p. * toplev.c (rest_of_compilation): Only call purge_builtin_constant_p when the current_function_calls_constant_p. * integrate.c (expand_inline_function): Set calls_constant_p if the function being inlined has calls_constant_p set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61786 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.h')
-rw-r--r--gcc/function.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/function.h b/gcc/function.h
index 63e48f7db29..22bb9da4017 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -413,6 +413,9 @@ struct function GTY(())
/* Nonzero if the function calls __builtin_eh_return. */
unsigned int calls_eh_return : 1;
+ /* Nonzero if the function calls __builtin_constant_p. */
+ unsigned int calls_constant_p : 1;
+
/* Nonzero if function being compiled receives nonlocal gotos
from nested functions. */
unsigned int has_nonlocal_label : 1;
@@ -518,6 +521,7 @@ extern int virtuals_instantiated;
#define current_function_calls_alloca (cfun->calls_alloca)
#define current_function_calls_longjmp (cfun->calls_longjmp)
#define current_function_calls_eh_return (cfun->calls_eh_return)
+#define current_function_calls_constant_p (cfun->calls_constant_p)
#define current_function_has_computed_jump (cfun->has_computed_jump)
#define current_function_contains_functions (cfun->contains_functions)
#define current_function_is_thunk (cfun->is_thunk)