2010-08-05 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (ipcp_discover_new_direct_edges): New function.
(ipcp_insert_stage): Redirect only edges not flagged with
indirect_inlining_edge. Call ipcp_discover_new_direct_edges for all
discovered constants.
* testsuite/gcc.dg/ipa/ipcp-ii-1.c: New test.
* testsuite/g++.dg/ipa/ipcp-ivi-1.C: Likewise.
From-SVN: r162912
2010-08-05 Martin Jambor <mjambor@suse.cz>
* ipa-prop.h (enum ipa_lattice_type): Changed comments.
(struct ipa_param_descriptor): New fields types and
cannot_devirtualize.
(ipa_param_cannot_devirtualize_p): New function.
(ipa_param_types_vec_empty): Likewise.
(ipa_make_edge_direct_to_target): Declare.
* ipa-cp.c: Fixed first stage driver name in initial comment,
described devirtualization there too.
(ipcp_analyze_node): Call ipa_analyze_params_uses.
(ipcp_print_all_lattices): Print devirtualization info.
(ipa_set_param_cannot_devirtualize): New function.
(ipcp_initialize_node_lattices): Set cannot_devirtualize when setting
lattice to BOTTOM.
(ipcp_init_stage): Merged into...
(ipcp_generate_summary): ...its caller.
(ipcp_change_tops_to_bottom): Also process type lists.
(ipcp_add_param_type): New function.
(ipcp_copy_types): Likewise.
(ipcp_propagate_types): Likewise.
(ipcp_propagate_stage): Also propagate types.
(ipcp_need_redirect_p): Variable jump_func moved to its scope block.
Also return true if propagated types require it.
(ipcp_update_callgraph): Dump redirection info.
(ipcp_process_devirtualization_opportunities): New function.
(ipcp_const_param_count): Include known type information.
(ipcp_insert_stage): Call ipcp_process_devirtualization_opportunities
on new node. Fixed formatting.
* ipa-prop.c (make_edge_direct_to_target): Renamed to
ipa_make_edge_direct_to_target and changed all callers. Made
externally visible.
(ipa_node_duplication_hook): Duplicate types vector.
* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Also try to
redirect outgoing calls for which we can't get a decl from the
statement. Check that we can get a decl from the call statement.
* ipa-inline.c (inline_indirect_intraprocedural_analysis): Call
ipa_analyze_params_uses only when ipa-cp is disabled.
* tree-inline.c (get_indirect_callee_fndecl): Removed.
(expand_call_inline): Do not call get_indirect_callee_fndecl.
* params.def (PARAM_DEVIRT_TYPE_LIST_SIZE): New parameter.
* Makefile.in (ipa-cp.o): Add gimple.h to dependencies.
* testsuite/g++.dg/ipa/devirt-1.C: New test.
* testsuite/g++.dg/ipa/devirt-2.C: Likewise.
* testsuite/g++.dg/ipa/devirt-3.C: Likewise.
* testsuite/g++.dg/ipa/devirt-4.C: Likewise.
* testsuite/g++.dg/ipa/devirt-5.C: Likewise.
* testsuite/gcc.dg/ipa/iinline-3.c: Likewise.
From-SVN: r162911
* expmed.c (expand_mult_const) <case alg_shift>: Expand shift into
temporary. Emit move from temporary to accum, so REG_EQUAL note will
be attached to this insn in correct mode.
From-SVN: r162910
2010-08-05 Robert Dewar <dewar@adacore.com>
* gnat1drv.adb: Minor reformatting.
2010-08-05 Ed Schonberg <schonberg@adacore.com>
* sem.adb (Do_Unit_And_Dependents): If some parent unit is an
instantiation, process its body before the spec of the main unit,
because it may contain subprograms invoked in the spec of main.
* einfo.ads: Add documention of delayed freeze.
2010-08-05 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Process_Linker): Take into account new values for
attribute Response_File_Format.
* prj.ads (Response_File_Format): New enumeration values GCC_GNU,
GCC_Object_List and GCC_Option_List.
2010-08-05 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Selected_Component): Do not constant-fold a
selected component that denotes a discriminant if it is the
discriminant of a component of an unconstrained record type.
From-SVN: r162908
2010-08-05 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Insert_Actions): If the action appears within a
conditional expression that is already analyzed, insert action further
out.
2010-08-05 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Minor reformatting.
From-SVN: r162907
2010-08-05 Thomas Quinot <quinot@adacore.com>
* exp_ch4.adb: Minor reformatting
* gnat1drv.adb: Minor reformatting.
Minor code reorganization (use Nkind_In).
2010-08-05 Ed Schonberg <schonberg@adacore.com>
* exp_util.ads, exp_util.adb (Needs_Constant_Address): New predicate to
determine whether the expression in an address clause for an
initialized object must be constant. Code moved from freeze.adb.
(Remove_Side_Effects): When the temporary is initialized with a
reference, indicate that the temporary is a constant as done in all
other cases.
* freeze.adb (Check_Address_Clause): use Needs_Constant_Address.
* exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address):
If object does not need a constant address, remove side effects from
address expression, so it is elaborated at the point of the address
clause and not at the freeze point of the object, so that elaboration
order is respected.
2010-08-05 Vincent Celier <celier@adacore.com>
* prj.adb (Is_Compilable): Return False for header files of non Ada
languages.
2010-08-05 Emmanuel Briot <briot@adacore.com>
* prj-nmsc.adb: The Missing_Source_Files flag also considers a missing
exec directory as a warning rather than an error.
From-SVN: r162906
2010-08-05 Thomas Quinot <quinot@adacore.com>
* sem_ch6.adb, gnat1drv.adb, exp_ch6.adb, sem_eval.adb: Minor
reformatting.
2010-08-05 Steve Baird <baird@adacore.com>
* exp_util.adb (Remove_Side_Effects): An access value which designates
a volatile object of a nonvolatile type is prohibited.
Do not call Make_Reference to construct a reference to such an object.
From-SVN: r162905
2010-08-05 Gary Dismukes <dismukes@adacore.com>
* sem_ch4.adb (Analyze_Allocator): Flag errors on allocators of a
nested access type whose designated type has tasks or is a protected
object when the restrictions No_Task_Hierarchy or
No_Local_Protected_Objects apply. Add ??? comment.
* sem_ch9.adb (Analyze_Protected_Type): Give a warning when a protected
type is not a library-level type and No_Local_Protected_Objects applies.
(Analyze_Task_Type): Give a warning when a task type is not a
library-level type and No_Task_Hierarchy applies.
From-SVN: r162902
By exporting padding[012] and to_allocate from ix86_compute_frame_layout,
we encouraged re-computation of the size of the local frame. All of the
truly relevant offsets are now exported directly, and should be compared
against directly.
From-SVN: r162891
Union the undo of the frame pointer between the pop and move
code paths.
Combine the local frame stack deallocation with the one for
ix86_static_chain_on_stack, if possible.
From-SVN: r162890
We had been relying on some extremely fragile code within
dwarf2out in order to guess what to do with aligned stack
frames, which broke when we decided to perform the stores
to the aligned stack frame via EBP instead of ESP.
Instead, emit the appropriate unwinding instructions from
the backend. This requires adding a new reg-note in order
to describe a register save at an arbitrary address.
From-SVN: r162889
Record register save offsets in ix86_frame.
Move SP/FP offsets into the global state; update them everywhere
we currently handle CFA offsets.
Use that global state to choose base registers and offsets for
the register saves and restores.
There is a bug fix contained herein, whereby r11 could be clobbered
along an indirect sibcall path when the stack frame is very large (>2GB).
The emit_restore_{sse_,}regs_using_mov functions didn't handle this
case, but pro_epilogue_adjust_stack does.
From-SVN: r162888
The definition in cygming.h differed from the definition in i386.h in
that the predicate was true for 32-bit when outside of any function.
Which (a) seems wrong and (b) never matters because the predicate is
only tested in terms of REGPARM and RED_ZONE, both of which are tied
to functions.
From-SVN: r162887
Emit the entire required hook code sequence via ASM_BYTE; emit
unwind info onto a blockage insn.
Remove the vswapmov pattern.
Fix indentation in several places.
From-SVN: r162886
Trying to reduce the amount of code compiled when dwarf2 debug
info and/or dwarf2 unwind info are disabled results in a twisted
mess. Don't bother -- just build it all even if it's not going
to be used.
From-SVN: r162883
2010-08-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/42207
PR fortran/44064
PR fortran/44065
* class.c (gfc_find_derived_vtab): Do not generate vtabs for class
container types. Do not artificially increase refs. Commit symbols one
by one.
* interface.c (compare_parameter): Make sure vtabs are present before
generating module variables.
* resolve.c (resolve_allocate_expr): Ditto.
2010-08-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/42207
PR fortran/44064
PR fortran/44065
* gfortran.dg/class_25.f03: New.
* gfortran.dg/class_26.f03: New.
From-SVN: r162879
* c-ada-spec.c (dump_ada_template): Mark underlying instance type as
visited.
(dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
decide whether a type has already been declared/seen.
Do not go to the original type.
(dump_nested_types): New parameter forward.
Generate forward declaration if needed and mark type as visited.
(print_ada_declaration): Call dump_nested_types if not already done.
Mark types as visited.
From-SVN: r162868
2010-08-04 Richard Guenther <rguenther@suse.de>
PR middle-end/45176
* expr.c (expand_expr_real_1): Also preserve TARGET_MEM_REF
points-to set for original MEM_REF.
From-SVN: r162862
* gcc-interface/decl.c: Do not undefine IN_GCC_FRONTEND and do not
include expr.h.
(gnat_to_gnu_entity) <object>: Force address of -1 at the tree level
for the debug-only entity.
* gcc-interface/Make-lang.in (ada/decl.o): Adjust dependencies.
From-SVN: r162854
* simplify-rtx.c (simplify_binary_operation_1): Try to simplify away
NEG as operand of a MULT by merging it with the other operand.
* combine.c (make_compound_operation): Use trunc_int_for_mode when
generating a MULT with constant. Canonicalize PLUS and MINUS involving
MULT.
* config/arm/constraints.md (M): Examine only 32 bits of a
HOST_WIDE_INT.
* config/arm/predicates.md (power_of_two_operand): Likewise.
From-SVN: r162849
2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* dependency.c (gfc_deb_compare_expr): Remove any integer
conversion functions to larger types from both arguments.
Remove handling these functions futher down.
2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* gfortran.dg/dependency_30.f90: New test.
From-SVN: r162848