Jason Merrill [Fri, 3 Apr 1998 14:13:24 +0000 (14:13 +0000)]
Implement empty base optimization.
* class.c (finish_struct_1): Add vbase fields earlier. Set
CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
* search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
(types_overlap_p): New fn.
* tree.c (avoid_overlap): New fn.
(build_base_fields): Use it to avoid overlapping empty bases.
* cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
Jason Merrill [Fri, 3 Apr 1998 03:41:20 +0000 (22:41 -0500)]
Re-implement allocation of base class subobjects.
* tree.c (unshare_base_binfos): New fn.
(layout_basetypes): Use it. Now handles offsets of both virtual and
non-virtual bases, after layout_type.
(layout_vbasetypes): Remove.
(build_base_fields): Generate FIELD_DECLs for each non-virtual base.
(build_vbase_pointer_fields): Split out from old layout_basetypes.
* class.c (finish_base_struct): Lose offset handling code.
Move nonvdtor warning here. Don't mess with t_binfo anymore.
(finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
* cp-tree.h: Adjust.
Mike Stump [Thu, 2 Apr 1998 23:15:06 +0000 (23:15 +0000)]
gthr.h: Support systems that don't have weak, but have threads.
* gthr.h: Support systems that don't have weak, but have threads.
* configure.in (*wrs-vxworks*): Use VxWorks threads by default.
* gthr-vxworks.h: New file.
* objc/thr-vxworks.h: Dummy file from thr-single.c for now.
Jeffrey A Law [Wed, 1 Apr 1998 23:18:11 +0000 (23:18 +0000)]
c-lex.c (yylex): Initialize traditional_type, ansi_type and type.
* c-lex.c (yylex): Initialize traditional_type, ansi_type and type.
* caller-save.c (insert_save_restore): Initialize pat, code and
numregs.
* emit-rtl.c (push_to_sequence): Initialize top.
(push_topmost_sequence): Likewise.
* genattrtab.c (simplify_by_exploding): Initialize defval.
* profile.c (branch_prob): Initialize dest.
* rtl.h (note_stores): Remove duplicate prototype.
(GEN_INT): Re-instate cast of second arg to HOST_WIDE_INT.
Fix some warnings.
* cplus-dem.c (gnu_special): Don't get confused by .<digits>
strings that are not actually lengths.
A change from libiberty that didn't make it into the gcc copy.
Jeffrey A Law [Wed, 1 Apr 1998 22:44:48 +0000 (22:44 +0000)]
genattrtab.c: Make generated file use system.h, instead of including stdio.h, etc directly.
* genattrtab.c: Make generated file use system.h, instead of
including stdio.h, etc directly.
* genextract.c, genopinit.c, genoutput.c: Likewise.
* genpeep.c, genrecog.c: Likewise
* genoutput.c (process_template): Mark operands in the generated
function as potentially unused if compiling with GNU CC.
Jason Merrill [Wed, 1 Apr 1998 17:05:25 +0000 (17:05 +0000)]
friend.c (is_friend): Fix access control for local classes.
* friend.c (is_friend): Fix access control for local classes.
* class.c (is_empty_class): New fn.
* call.c (build_call): Don't pass empty class objects to a function.
Mark Mitchell [Wed, 1 Apr 1998 13:48:48 +0000 (13:48 +0000)]
cplus-dem.c (optable): Add sizeof.
* cplus-dem.c (optable): Add sizeof.
(demangle_template_value_parm): New function containing code
previously found in demangle_template.
(demangle_integral_value): New function which handles complicated
integral expressions.
(demangle_template): Use them.
Mark Mitchell [Wed, 1 Apr 1998 13:45:40 +0000 (13:45 +0000)]
varasm.c (make_decl_rtl): Update the DECL_ASSEMBLER_NAME for a entity in a local scope.
* varasm.c (make_decl_rtl): Update the DECL_ASSEMBLER_NAME for a
entity in a local scope.
* fold-const.c (fold): Call truthvalue_conversion for values which
are folded to boolean type.
Jason Merrill [Mon, 30 Mar 1998 10:56:25 +0000 (10:56 +0000)]
tree.c (member_p): New fn.
* tree.c (member_p): New fn.
* decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
initializing class members.
* cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
* ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
Jeffrey A Law [Sun, 29 Mar 1998 11:54:09 +0000 (11:54 +0000)]
Makefile.in (c-typeck.o): Delete on expr.h, insn-codes.h and $(RTL_H).
* Makefile.in (c-typeck.o): Delete on expr.h, insn-codes.h and
$(RTL_H).
(stor-layout.o): Likewise.
* c-typeck.c: Include rtl.h and expr.h.
* stor-layout.c: Likewise.
Mark Mitchell [Sat, 28 Mar 1998 17:47:07 +0000 (17:47 +0000)]
pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
* pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
* pt.c (instantiate_class_template): Make sure template
arguments are permanent.
* init.c (resolve_offset_ref): Don't go looking around in
template types.
* semantics.c: Add routines to handle expressions, and some
declaration processing.
* parse.y: Use them.
(current_class_depth): Move declaration to cp-tree.h.
* parse.c: Regenerated.
* cp-tree.h: Use them.
(current_class_depth): Declare.
* pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
Jeffrey A Law [Sat, 28 Mar 1998 13:55:34 +0000 (13:55 +0000)]
genemit.c (gen_expand): Do not emit "_done" or "_fail" labels.
* genemit.c (gen_expand): Do not emit "_done" or "_fail" labels.
(gen_split): Likewise.
(main): Rework generated definitions of DONE and FAIL so that they
no longer use gotos. Avoids warnings about unused labels.
Craig Burley [Sat, 28 Mar 1998 00:28:21 +0000 (19:28 -0500)]
u77-test.f: Don't bother declaring etime.
* libU77/u77-test.f: Don't bother declaring etime.
Use `implicit none' and declare mask and lenstr.
Do ETIME/DTIME consistency check before loop, then
use loop to verify that dtime "ticks" at some point.
Check ETIME array-sum using single-precision add, to
avoid spurious complaint on systems (like x86) that
use more precision for intermediate results.
Fix `Results of ETIME and DTIME...' message to print
pertinent values (r1 and r2 instead of i and j).
Change loop from 10M to 1K repeated up to 1000 times
or until dtime "ticks".
Print the number of 1K loops needed to see this tick.
Answer a commented question.
Split up a long line of output and do other prettying.
Preset lognam in case GETLOG fails to overwrite it.
Patch from Craig.
* basic-block.h (basic_block_computed_jump_target): Declare.
* flags.h: (current_function_has_computed_jump): Declare.
* flow.c: (basic_block_computed_jump_target): Define.
(flow_analysis): Allocate it. Set current_function_has_computed_jump
to 0.
(find_basic_blocks): Set current_function_has_computed_jump and
elements of basic_block_computed_jump_target to 1 as appropriate.
* function.c: (current_function_has_computed_jump): Define.
* global.c (global_conflicts): Don't allocate pseudos into stack regs
at the start of a block that is reachable by a computed jump.
* reg-stack.c (stack_reg_life_analysis): If must restart, do so
immediately.
(subst_stack_regs): Undo change from Sep 4 1997.
(uses_reg_or_mem): Now unused, deleted.
* stupid.c (stupid_life_analysis): Compute
current_function_has_computed_jump.
(stupid_find_reg): Don't allocate stack regs if the function has a
computed goto.
* haifa-sched.c (is_cfg_nonregular): Delete code to determine if
the current function has a computed jump. Use the global value
instead.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r18860