Mark __builtin_constant_p as constant [patch]
Diego Novillo
dnovillo@redhat.com
Tue Apr 29 22:40:00 GMT 2003
Since __builtin_constant_p is not marked constant, the tree ssa
optimizers were getting confused when calls to
__builtin_constant_p were being folded away. I don't think the
patch affects anything in mainline but it's needed for tree-ssa.
Bootstrapped and tested on x86. It also works on ppc and x86-64
on the ssa branch. OK for mainline?
Diego.
* builtins.def (BUILTIN_CONSTANT_P): Mark as constant.
Index: builtins.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.def,v
retrieving revision 1.49
diff -d -u -p -r1.49 builtins.def
--- builtins.def 28 Apr 2003 12:10:30 -0000 1.49
+++ builtins.def 29 Apr 2003 19:05:09 -0000
@@ -689,7 +689,7 @@ DEF_GCC_BUILTIN(BUILT_IN_ARGS_INFO,
DEF_GCC_BUILTIN(BUILT_IN_CONSTANT_P,
"__builtin_constant_p",
BT_FN_INT_VAR,
- ATTR_NULL)
+ ATTR_CONST_NOTHROW_LIST)
DEF_GCC_BUILTIN(BUILT_IN_FRAME_ADDRESS,
"__builtin_frame_address",
BT_FN_PTR_UNSIGNED,
More information about the Gcc-patches
mailing list