diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-25 18:32:38 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-06-25 18:32:38 +0000 |
commit | ec2e0095a3a5988b03a2706b5ffe0e807b238ba8 (patch) | |
tree | 2772b8c1924eccaec6aead11b83031a8d1852942 /gcc/cgraph.c | |
parent | 23d1032f15175e34834efb86c9c87b4241424a96 (diff) | |
download | gcc-ec2e0095a3a5988b03a2706b5ffe0e807b238ba8.tar.gz |
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* function.h (ipa_opt_pass, ipa_opt_pass_d): Move forward declarations.
* cgraph.h: Include ipa-ref.h and plugin-api.h.
(ipa_opt_pass, ipa_opt_pass_d)): Relocate forward declarations here.
(symtab_node::address_can_be_compared_p): Move function.
* cgraph.c (symtab_node::address_can_be_compared_p): Relocate function
definition here.
* asan.c: Remove ipa-ref.h and plugin-api.h from include list.
* auto-profile.c: Likewise.
* bb-reorder.c: Likewise.
* builtins.c: Likewise.
* calls.c: Likewise.
* cfgexpand.c: Likewise.
* cgraphbuild.c: Likewise.
* cgraphclones.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* coverage.c: Likewise.
* data-streamer-in.c: Likewise.
* data-streamer-out.c: Likewise.
* data-streamer.c: Likewise.
* dbxout.c: Likewise.
* dwarf2out.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* final.c: Likewise.
* fold-const.c: Likewise.
* ggc-page.c: Likewise.
* gimple-fold.c: Likewise.
* gimple-iterator.c: Likewise.
* gimple-pretty-print.c: Likewise.
* gimple-streamer-in.c: Likewise.
* gimple-streamer-out.c: Likewise.
* gimple.c: Likewise.
* gimplify.c: Likewise.
* ipa-chkp.c: Likewise.
* ipa-comdats.c: Likewise.
* ipa-cp.c: Likewise.
* ipa-devirt.c: Likewise.
* ipa-icf-gimple.c: Likewise.
* ipa-icf.c: Likewise.
* ipa-inline-analysis.c: Likewise.
* ipa-inline-transform.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-polymorphic-call.c: Likewise.
* ipa-profile.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-ref.c: Likewise.
* ipa-reference.c: Likewise.
* ipa-split.c: Likewise.
* ipa-utils.c: Likewise.
* ipa-visibility.c: Likewise.
* ipa.c: Likewise.
* langhooks.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-compress.c: Likewise.
* lto-opts.c: Likewise.
* lto-section-in.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.c: Likewise.
* omp-low.c: Likewise.
* opts-global.c: Likewise.
* passes.c: Likewise.
* predict.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* ree.c: Likewise.
* sanopt.c: Likewise.
* stor-layout.c: Likewise.
* symtab.c: Likewise.
* toplev.c: Likewise.
* trans-mem.c: Likewise.
* tree-cfg.c: Likewise.
* tree-chkp.c: Likewise.
* tree-eh.c: Likewise.
* tree-emutls.c: Likewise.
* tree-inline.c: Likewise.
* tree-nested.c: Likewise.
* tree-parloops.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-profile.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-strlen.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-streamer-in.c: Likewise.
* tree-streamer-out.c: Likewise.
* tree-streamer.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-tailcall.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vectorizer.c: Likewise.
* tree.c: Likewise.
* tsan.c: Likewise.
* ubsan.c: Likewise.
* value-prof.c: Likewise.
* varasm.c: Likewise.
* varpool.c: Likewise.
* config/arm/arm.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/c6x/c6x.c: Likewise.
* config/cris/cris.c: Likewise.
* config/darwin-c.c: Likewise.
* config/darwin.c: Likewise.
* config/i386/i386.c: Likewise.
* config/i386/winnt.c: Likewise.
* config/microblaze/microblaze.c: Likewise.
* config/mips/mips.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rx/rx.c: Likewise.
* config/s390/s390.c: Likewise.
* config/tilegx/mul-tables.c: Likewise.
ada
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
list.
* gcc-interface/utils.c: Likewise.
c
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
* c-parser.c: Likewise.
c-family
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
* c-gimplify.c: Likewise.
* c-pragma.c: Likewise.
* c-ubsan.c: Likewise.
* cilk.c: Likewise.
cp
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* call.c: Remove ipa-ref.h and plugin-api.h from include list.
* class.c: Likewise.
* cp-ubsan.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* lambda.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* optimize.c: Likewise.
* parser.c: Likewise.
* semantics.c: Likewise.
* tree.c: Likewise.
* vtable-class-hierarchy.c: Likewise.
fortran
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
* trans-decl.c: Likewise.
go
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* go-gcc.cc: Remove ipa-ref.h and plugin-api.h from include list.
java
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* class.c: Remove ipa-ref.h and plugin-api.h from include list.
* decl.c: Likewise.
* jcf-parse.c: Likewise.
* resource.c: Likewise.
jit
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
* jit-playback.c: Likewise.
lto
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
* lto-object.c: Likewise.
* lto-partition.c: Likewise.
* lto-symtab.c: Likewise.
* lto-tree.h: Likewise.
* lto.c: Likewise.
objc
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* objc-act.c: Remove ipa-ref.h and plugin-api.h from include list.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 698f56ea549..8314ecfc483 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -44,10 +44,8 @@ along with GCC; see the file COPYING3. If not see #include "dominance.h" #include "cfg.h" #include "basic-block.h" -#include "plugin-api.h" #include "hard-reg-set.h" #include "function.h" -#include "ipa-ref.h" #include "cgraph.h" #include "intl.h" #include "tree-ssa-alias.h" @@ -159,6 +157,29 @@ function_version_hasher::equal (cgraph_function_version_info *n1, static GTY(()) struct cgraph_function_version_info * version_info_node = NULL; +/* Return true if NODE's address can be compared. */ + +bool +symtab_node::address_can_be_compared_p () +{ + /* Address of virtual tables and functions is never compared. */ + if (DECL_VIRTUAL_P (decl)) + return false; + /* Address of C++ cdtors is never compared. */ + if (is_a <cgraph_node *> (this) + && (DECL_CXX_CONSTRUCTOR_P (decl) + || DECL_CXX_DESTRUCTOR_P (decl))) + return false; + /* Constant pool symbols addresses are never compared. + flag_merge_constants permits us to assume the same on readonly vars. */ + if (is_a <varpool_node *> (this) + && (DECL_IN_CONSTANT_POOL (decl) + || (flag_merge_constants >= 2 + && TREE_READONLY (decl) && !TREE_THIS_VOLATILE (decl)))) + return false; + return true; +} + /* Get the cgraph_function_version_info node corresponding to node. */ cgraph_function_version_info * cgraph_node::function_version (void) |