Fix constant libcalls
Jan Hubicka
jh@suse.cz
Thu Nov 8 11:50:00 GMT 2001
Hi,
as noticed by Zdenek, we are not setting emitting constant libcalls as constant
functions, as we throw the information away early in emit_library_call_value_1.
Crazy...
bootstrapped/regtested i386
Thu Nov 8 20:47:37 CET 2001 Jan Hubicka <jh@suse.cz>
Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* calls.c (emit_library_call_value_1): Set ECF_PURE/ECF_CONST for
LCT_PURE/LCT_CONST functions.
Index: calls.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/calls.c,v
retrieving revision 1.208
diff -c -3 -p -r1.208 calls.c
*** calls.c 2001/11/04 02:51:21 1.208
--- calls.c 2001/11/08 19:47:11
*************** emit_library_call_value_1 (retval, orgfu
*** 3516,3524 ****
switch (fn_type)
{
case LCT_NORMAL:
case LCT_CONST:
case LCT_PURE:
! /* Nothing to do here. */
break;
case LCT_CONST_MAKE_BLOCK:
flags |= ECF_CONST;
--- 3516,3527 ----
switch (fn_type)
{
case LCT_NORMAL:
+ break;
case LCT_CONST:
+ flags |= ECF_CONST;
+ break;
case LCT_PURE:
! flags |= ECF_PURE;
break;
case LCT_CONST_MAKE_BLOCK:
flags |= ECF_CONST;
More information about the Gcc-patches
mailing list