2010-12-15 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/46053
PR middle-end/46287
PR middle-end/46242
* cgraph.h (cgraph_indirect_call_info): New field thunk_delta.
* gimple.h (gimple_fold_obj_type_ref): Declaration removed.
(gimple_fold_call): Declare.
(gimple_adjust_this_by_delta): Likewise.
* cgraph.c (cgraph_make_edge_direct): New parameter delta. Updated
all users.
(cgraph_clone_edge): Create a copy of indirect_info also for direct
edges.
* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Adjust this
parameters.
* gimple-fold.c (gimple_fold_obj_type_ref_known_binfo): Renamed to
gimple_get_virt_mehtod_for_binfo, new parameter delta. Do not search
through thunks, in fact bail out if we encounter one, check that
BINFO_VIRTUALS is not NULL.
(gimple_adjust_this_by_delta): New function.
(gimple_fold_obj_type_ref): Removed.
(gimple_fold_obj_type_ref_call): New function.
(fold_gimple_call): Renamed to gimple_fold_call, made external.
Updated users. Call gimple_fold_obj_type_ref_call instead of
gimple_fold_obj_type_ref.
* ipa-cp.c (ipcp_process_devirtualization_opportunities): Process
thunk deltas.
(ipcp_discover_new_direct_edges): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): New parameter delta.
Updated callers.
(ipa_write_indirect_edge_info): Stream thunk_delta.
(ipa_read_indirect_edge_info): Likewise.
* tree-ssa-ccp.c (ccp_fold_stmt): Use gimple_fold_call instead of
gimple_fold_obj_type_ref.
* testsuite/g++.dg/ipa/pr46053.C: New test.
* testsuite/g++.dg/ipa/pr46287-1.C: Likewise.
* testsuite/g++.dg/ipa/pr46287-2.C: Likewise.
* testsuite/g++.dg/ipa/pr46287-3.C: Likewise.
* testsuite/g++.dg/torture/covariant-1.C: Likewise.
* testsuite/g++.dg/torture/pr46287.C: Likewise.
From-SVN: r167855
PR rtl-optimization/46649
* sel-sched-ir.c (purge_empty_blocks): Unconditionally skip the first
basic block in the region.
testsuite:
* g++.dg/opt/pr46649.C: New.
From-SVN: r167854
2010-12-14 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/46928
* tree-data-ref.c (analyze_overlapping_iterations): Handle "A[p] == A[p]"
in data dependence analysis with p a parameter of the loop.
* gcc.dg/tree-ssa/ldist-17.c: New.
From-SVN: r167843
In libobjc/:
2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com>
* ivars.c (class_addIvar): Use the 'size' argument instead of
trying to calculate it using objc_sizeof_type().
* objc/runtime.h (class_addIvar): Updated comments.
From-SVN: r167837
2010-12-15 Nicola Pero <nicola.pero@meta-innovation.com>
* sendmsg.c: Reindented some code and tidied up comments. No
actual code changes.
From-SVN: r167835
2010-12-14 Nicola Pero <nicola.pero@meta-innovation.com>
* objc/Object.h: Moved all the methods, with the exception of
-class and -isEqual:, into ...
* objc/deprecated/Object.h: here.
* Object.m: Moved all the methods, with the exception of -class
and -isEqual: into the 'Deprecated' category.
From-SVN: r167825
PR lto/46940
PR lto/44463
* lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Construct nodes
for aliases when they are used.
* gcc.dg/lto/pr46940_0.c: New testcase.
* gcc.dg/lto/pr46940_1.c: New testcase.
From-SVN: r167822
2010-12-14 Nicola Pero <nicola.pero@meta-innovation.com>
* objects.c (object_copy): Do not #undef as we are no longer
including objc/objc-api.h.
* selector.c: Include objc/runtime.h and
objc-private/module-abi-8.h. Do not include objc/objc-api.h and
objc/encoding.h. Updated
(__objc_register_selectors_from_class): Use struct
objc_method_list * instead of MethodList_t.
(__objc_register_selectors_from_list): Use Method instead of
Method_t.
(struct objc_method_description_list): Do not define here.
(__objc_register_instance_methods_to_class): Use struct
objc_method_list * instead of MethodList_t and Method instead of
Method_t.
From-SVN: r167818
2010-12-14 Nicola Pero <nicola.pero@meta-innovation.com>
* selector.c: Reindented some code and tidied up comments. No
actual code changes.
From-SVN: r167815
PR debug/46885
* tree-ssa-loop-manip.c (canonicalize_loop_ivs): Use gsi_last_bb
instead of gsi_last_nondebug_bb if bump_in_latch.
* gcc.dg/autopar/pr46885.c: New test.
From-SVN: r167801
PR tree-optimization/46909
* gimple-fold.c (and_var_with_comparison_1): Save partial
result even in the is_and case, if both partial results
are the same, return it.
(or_var_with_comparison_1): Use is_or predicate instead of
innercode == TRUTH_OR_EXPR test. Save partial result
even in the is_or case, if both partial results are the
same, return it. In the !is_or case when both partial
results are the same, return the partial result instead
of boolean_true_node.
* gcc.c-torture/execute/pr46909-1.c: New test.
* gcc.c-torture/execute/pr46909-2.c: New test.
* gcc.dg/pr46909.c: New test.
From-SVN: r167800