gcc/gcc/ipa-cp.c

1548 lines
45 KiB
C
Raw Normal View History

/* Interprocedural constant propagation
Make-lang.in, [...]: Update copyright years. * ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h, collect2.h, config/alpha/alpha.c, config/alpha/alpha.md, config/alpha/predicates.md, config/arm/arm.md, config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml, config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c, config/darwin9.h, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h, config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c, config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c, config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c, config/mips/mips.md, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md, config/rs6000/aix.h, config/rs6000/dfp.md, config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c, config/rs6000/vector.md, config/rtems.h, config/rx/rx.md, config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h, config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md, config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c, config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in, c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c, diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi, doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi, doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c, fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h, gensupport.c, gimple.h, gimple-iterator.c, graphite.c, graphite-clast-to-gimple.c, graphite-clast-to-gimple.h, graphite-dependences.c, graphite-poly.c, graphite-poly.h, graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c, graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c, intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h, ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c, ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c, loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c, objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk, opt-functions.awk, opth-gen.awk, params.def, passes.c, postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h, rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h, store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c, tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h, tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c, tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c, tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c, unwind-dw2-fde-darwin.c, varpool.c: Update copyright years. From-SVN: r157950
2010-04-02 21:54:46 +02:00
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Razya Ladelsky <RAZYA@il.ibm.com>
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
This file is part of GCC.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Interprocedural constant propagation. The aim of interprocedural constant
propagation (IPCP) is to find which function's argument has the same
constant value in each invocation throughout the whole program. For example,
consider the following program:
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
int g (int y)
{
printf ("value is %d",y);
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
int f (int x)
{
g (x);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
int h (int y)
{
g (y);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
void main (void)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
f (3);
h (3);
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
The IPCP algorithm will find that g's formal argument y is always called
with the value 3.
The algorithm used is based on "Interprocedural Constant Propagation", by
Challahan David, Keith D Cooper, Ken Kennedy, Linda Torczon, Comp86, pg
152-161
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
The optimization is divided into three stages:
First stage - intraprocedural analysis
=======================================
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
This phase computes jump_function and modification flags.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
A jump function for a callsite represents the values passed as an actual
arguments of a given callsite. There are three types of values:
Pass through - the caller's formal parameter is passed as an actual argument.
Constant - a constant is passed as an actual argument.
Unknown - neither of the above.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
The jump function info, ipa_jump_func, is stored in ipa_edge_args
structure (defined in ipa_prop.h and pointed to by cgraph_node->aux)
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
modified_flags are defined in ipa_node_params structure
(defined in ipa_prop.h and pointed to by cgraph_edge->aux).
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
-ipcp_generate_summary() is the first stage driver.
Second stage - interprocedural analysis
========================================
This phase does the interprocedural constant propagation.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
It computes lattices for all formal parameters in the program
and their value that may be:
TOP - unknown.
BOTTOM - non constant.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
CONSTANT - constant value.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
Lattice describing a formal parameter p will have a constant value if all
callsites invoking this function have the same constant value passed to p.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
The lattices are stored in ipcp_lattice which is itself in ipa_node_params
structure (defined in ipa_prop.h and pointed to by cgraph_edge->aux).
-ipcp_iterate_stage() is the second stage driver.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
Third phase - transformation of function code
============================================
Propagates the constant-valued formals into the function.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
For each function whose parameters are constants, we create its clone.
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
Then we process the clone in two ways:
1. We insert an assignment statement 'parameter = const' at the beginning
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
of the cloned function.
2. For read-only parameters that do not live in memory, we replace all their
uses with the constant.
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
We also need to modify some callsites to call the cloned functions instead
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
of the original ones. For a callsite passing an argument found to be a
constant by IPCP, there are two different cases to handle:
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
1. A constant is passed as an argument. In this case the callsite in the
should be redirected to call the cloned callee.
2. A parameter (of the caller) passed as an argument (pass through
argument). In such cases both the caller and the callee have clones and
only the callsite in the cloned caller is redirected to call to the
cloned callee.
cgraph.c: Fix typos in comments. gcc/ * cgraph.c: Fix typos in comments. (cgraph_availability_names): Fix string typo. * fold-const.c: Fix typos in comments. (fold_binary): Fix typo in warning. * genautomata.c: Fix typos in comments. (check_presence_pattern_sets): Fix typo in local variable. (output_description): Fix typo in output. * ggc-zone.c (ggc_pch_finish): Fix typo in error message. * hwint.h: Likewise. * matrix-reorg.c (check_allocation_function): Likewise. * omega.c (smooth_weird_equations): Likewise. * auto-inc-dec.c: Fix typos in comments. * bb-reorder.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-cppbuiltin.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfglayout.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * coverage.c: Likewise. * dbxout.c: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * ggc-page.c: Likewise. * gimplify.c: Likewise. * gthr-lynx.h: Likewise. * haifa-sched.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa.c: Likewise. * loop-doloop.c: Likewise. * mips-tfile.c: Likewise. * mkmap-flat.awk: Likewise. * mkmap-symver.awk: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts.c: Likewise. * passes.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * pretty-print.h: Likewise. * profile.c: Likewise. * protoize.c: Likewise. * ra-conflict.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * scan.h: Likewise. * sched-rgn.c: Likewise. * see.c: Likewise. * stmt.c: Likewise. * target.h: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-analyze.c: Likewise. * tree-vect-transform.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vn.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * unwind-dw2-fde.c: Likewise. * unwind.inc: Likewise. * value-prof.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r136425
2008-06-06 07:42:00 +02:00
This update is done in two steps: First all cloned functions are created
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
during a traversal of the call graph, during which all callsites are
redirected to call the cloned function. Then the callsites are traversed
and many calls redirected back to fit the description above.
-ipcp_insert_stage() is the third phase driver.
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
This pass also performs devirtualization - turns virtual calls into direct
ones if it can prove that all invocations of the function call the same
callee. This is achieved by building a list of all base types (actually,
their BINFOs) that individual parameters can have in an iterative matter
just like propagating scalar constants and then examining whether virtual
calls which take a parameter as their object fold to the same target for all
these types. If we cannot enumerate all types or there is a type which does
not have any BINFO associated with it, cannot_devirtualize of the associated
parameter descriptor is set which is an equivalent of BOTTOM lattice value
in standard IPA constant propagation.
*/
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "target.h"
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
#include "gimple.h"
#include "cgraph.h"
#include "ipa-prop.h"
#include "tree-flow.h"
#include "tree-pass.h"
#include "flags.h"
#include "timevar.h"
#include "diagnostic.h"
diagnostic.c: Don't include tm.h, tree.h, tm_p.h, langhooks.h or langhooks-def.h. * diagnostic.c: Don't include tm.h, tree.h, tm_p.h, langhooks.h or langhooks-def.h. (diagnostic_initialize): Initialize x_data not last_function. (diagnostic_report_current_function): Move to tree-diagnostic.c. (default_diagnostic_starter): Call diagnostic_report_current_module not diagnostic_report_current_function. (diagnostic_report_diagnostic): Initialize x_data not abstract_origin. (verbatim): Likewise. * diagnostic.h (struct diagnostic_info): Change abstract_origin to x_data. (struct diagnostic_context): Change last_function to x_data. (diagnostic_auxiliary_data): Replace with diagnostic_context_auxiliary_data and diagnostic_info_auxiliary_data. (diagnostic_last_function_changed, diagnostic_set_last_function, diagnostic_report_current_function): Move to tree-diagnostic.h. (print_declaration, dump_generic_node, print_generic_stmt, print_generic_stmt_indented, print_generic_expr, print_generic_decl, debug_c_tree, dump_omp_clauses, print_call_name, debug_generic_expr, debug_generic_stmt, debug_tree_chain, default_tree_printer): Move to tree-pretty-print.h. (debug_gimple_stmt, debug_gimple_seq, print_gimple_seq, print_gimple_stmt, print_gimple_expr, dump_gimple_stmt): Move to gimple-pretty-print.h. * pretty-print.c: Don't include tree.h (pp_base_format): Don't handle %K here. (pp_base_tree_identifier): Move to tree-pretty-print.c. * pretty-print.h (text_info): Change abstract_origin to x_data. (pp_tree_identifier, pp_unsupported_tree, pp_base_tree_identifier): Move to tree-pretty-print.h. * gimple-pretty-print.h, tree-diagnostic.c, tree-diagnostic.h, tree-pretty-print.h: New files. * tree-pretty-print.c: Include tree-pretty-print.h. (percent_K_format): New. Moved from pretty-print.c. (pp_base_tree_identifier): Move from pretty-print.c. * c-objc-common.c: Include tree-pretty-print.h. (c_tree_printer): Handle %K here. * langhooks.c: Include tree-diagnostic.h. (lhd_print_error_function): Use diagnostic_abstract_origin macro. * toplev.c: Include tree-diagnostic.h and tree-pretty-print.h. (default_tree_printer): Handle %K using percent_K_format. (general_init): Use default_tree_diagnostic_starter. * tree.c: Include tree-diagnostic.h and tree-pretty-print.h. (free_lang_data): Use default_tree_diagnostic_starter. * c-pretty-print.c: Include tree-pretty-print.h. * cfgexpand.c: Include tree-pretty-print.h and gimple-pretty-print.h. * cgraphunit.c: Include tree-pretty-print.h and gimple-pretty-print.h. * dwarf2out.c: Include tree-pretty-print.h. * except.c: Include tree-pretty-print.h. * gimple-pretty-print.c: Include tree-pretty-print.h and gimple-pretty-print.h. * gimplify.c: Include tree-pretty-print.h. * graphite-poly.c: Include tree-pretty-print.h and gimple-pretty-print.h. * ipa-cp.c: Include tree-pretty-print.h. * ipa-inline.c: Include gimple-pretty-print.h. * ipa-prop.c: Include tree-pretty-print.h and gimple-pretty-print.h. * ipa-pure-const.c: Include gimple-pretty-print.h. * ipa-struct-reorg.c: Include tree-pretty-print.h and gimple-pretty-print.h. * ipa-type-escape.c: Include tree-pretty-print.h. * print-rtl.c: Include tree-pretty-print.h. * print-tree.c: Include gimple-pretty-print.h. * sese.c: Include tree-pretty-print.h. * tree-affine.c: Include tree-pretty-print.h. * tree-browser.c: Include tree-pretty-print.h. * tree-call-cdce.c: Include gimple-pretty-print.h. * tree-cfg.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-chrec.c: Include tree-pretty-print.h. * tree-data-ref.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-dfa.c: Include tree-pretty-print.h. * tree-if-conv.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-inline.c: Include tree-pretty-print.h. * tree-into-ssa.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-nrv.c: Include tree-pretty-print.h. * tree-object-size.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-outof-ssa.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-parloops.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-predcom.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-scalar-evolution.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-sra.c: Include tree-pretty-print.h. * tree-ssa-address.c: Include tree-pretty-print.h. * tree-ssa-alias.c: Include tree-pretty-print.h. * tree-ssa-ccp.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-coalesce.c: Include tree-pretty-print.h. * tree-ssa-copy.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-copyrename.c: Include tree-pretty-print.h. * tree-ssa-dce.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-dom.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-dse.c: Include gimple-pretty-print.h. * tree-ssa-forwprop.c: Include tree-pretty-print.h. * tree-ssa-ifcombine.c: Include tree-pretty-print.h. * tree-ssa-live.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-im.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-ivcanon.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-ivopts.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-niter.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-loop-prefetch.c: Include tree-pretty-print.h. * tree-ssa-math-opts.c: Include gimple-pretty-print.h. * tree-ssa-operands.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-phiprop.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-pre.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-propagate.c: Include gimple-pretty-print.h. * tree-ssa-reassoc.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-sccvn.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-sink.c: Include gimple-pretty-print.h. * tree-ssa-ter.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-ssa-uninit.c: Include gimple-pretty-print.h. * tree-ssa.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-stdarg.c: Include gimple-pretty-print.h. * tree-switch-conversion.c: Include gimple-pretty-print.h. * tree-tailcall.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-data-refs.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-loop-manip.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-loop.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-patterns.c: Include gimple-pretty-print.h. * tree-vect-slp.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vect-stmts.c: Include tree-pretty-print.h and gimple-pretty-print.h. * tree-vectorizer.c: Include tree-pretty-print.h. * tree-vrp.c: Include tree-pretty-print.h and gimple-pretty-print.h. * value-prof.c: Include tree-pretty-print.h and gimple-pretty-print.h. * var-tracking.c: Include tree-pretty-print.h. * Makefile.in (OBJS-common): Add tree-diagnostic.o. (tree-diagnostic.o): New dependencies. (c-objc-common.o, c-pretty-print.o, langhooks.o, tree.o, tree-inline.o, print-tree.o, stor-layout.o, tree-ssa-uninit.o, tree-ssa.o, tree-into-ssa.o, tree-ssa-ter.o, tree-ssa-coalesce.o, tree-outof-ssa.o, tree-ssa-forwprop.o, tree-ssa-phiprop.o, tree-ssa-ifcombine.o, tree-nrv.o, tree-ssa-copy.o, tree-ssa-propagate.o, tree-ssa-dom.o, tree-ssa-uncprop.o, tree-ssa-live.o, tree-ssa-copyrename.o, tree-ssa-pre.o, tree-ssa-sccvn.o, tree-vrp.o, tree-cfg.o, tree-tailcall.o, tree-ssa-sink.o, tree-if-conv.o, tree-dfa.o, tree-ssa-operands.o, tree-ssa-address.o, tree-ssa-loop-niter.o, tree-ssa-loop-ivcanon.o, tree-ssa-loop-prefetch.o, tree-predcom.o, tree-ssa-loop-ivopts.o, tree-affine.o, tree-ssa-loop-im.o, tree-ssa-math-opts.o, tree-ssa-alias.o, tree-ssa-reassoc.o, gimplify.o, tree-browser.o, tree-chrec.o, tree-scalar-evolution.o, tree-data-ref.o, sese.o, graphite-poly.o, tree-vect-loop.o, tree-vect-loop-manip.o, tree-vect-patterns.o, tree-vect-slp.o, tree-vect-stmts.o, tree-vect-data-refs.o, tree-vectorizer.o, tree-parloops.o, tree-stdarg.o, tree-object-size.o, gimple-pretty-print.o, tree-pretty-print.o, diagnostic.o, toplev.o, print-rtl.o, except.o, dwarf2out.o, cgraphunit.o, ipa-prop.o, ipa-cp.o, ipa-inline.o, ipa-pure-const.o, ipa-type-escape.o, ipa-struct-reorg.o, tree-ssa-dce.o, tree-call-cdce.o, tree-ssa-ccp.o, tree-sra.o, tree-switch-conversion.o, var-tracking.o, value-prof.o, cfgexpand.o, pretty-print.o): Update dependencies. cp: * error.c: Include tree-diagnostic.h and tree-pretty-print.h. (cp_print_error_function): Use diagnostic_abstract_origin macro. (cp_printer): Handle %K here using percent_K_format. * cxx-pretty-print.c: Include tree-pretty-print.h. * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update dependencies. From-SVN: r159685
2010-05-22 00:34:26 +02:00
#include "tree-pretty-print.h"
#include "tree-dump.h"
#include "tree-inline.h"
#include "fibheap.h"
#include "params.h"
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
/* Number of functions identified as candidates for cloning. When not cloning
we can simplify iterate stage not forcing it to go through the decision
on what is profitable and what not. */
static int n_cloning_candidates;
/* Maximal count found in program. */
static gcov_type max_count;
/* Cgraph nodes that has been completely replaced by cloning during iterate
* stage and will be removed after ipcp is finished. */
static bitmap dead_nodes;
static void ipcp_print_profile_data (FILE *);
static void ipcp_function_scale_print (FILE *);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Get the original node field of ipa_node_params associated with node NODE. */
static inline struct cgraph_node *
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_get_orig_node (struct cgraph_node *node)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
return IPA_NODE_REF (node)->ipcp_orig_node;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return true if NODE describes a cloned/versioned function. */
static inline bool
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_node_is_clone (struct cgraph_node *node)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
return (ipcp_get_orig_node (node) != NULL);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Create ipa_node_params and its data structures for NEW_NODE. Set ORIG_NODE
as the ipcp_orig_node field in ipa_node_params. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_init_cloned_node (struct cgraph_node *orig_node,
struct cgraph_node *new_node)
{
gcc_checking_assert (ipa_node_params_vector
&& (VEC_length (ipa_node_params_t,
ipa_node_params_vector)
> (unsigned) cgraph_max_uid));
gcc_checking_assert (IPA_NODE_REF (new_node)->params);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
IPA_NODE_REF (new_node)->ipcp_orig_node = orig_node;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return scale for NODE. */
static inline gcov_type
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_get_node_scale (struct cgraph_node *node)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
return IPA_NODE_REF (node)->count_scale;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Set COUNT as scale for NODE. */
static inline void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_set_node_scale (struct cgraph_node *node, gcov_type count)
{
IPA_NODE_REF (node)->count_scale = count;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return whether LAT is a constant lattice. */
static inline bool
ipcp_lat_is_const (struct ipcp_lattice *lat)
{
if (lat->type == IPA_CONST_VALUE)
return true;
else
return false;
}
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
/* Return whether LAT is a constant lattice that ipa-cp can actually insert
into the code (i.e. constants excluding member pointers and pointers). */
static inline bool
ipcp_lat_is_insertable (struct ipcp_lattice *lat)
{
return lat->type == IPA_CONST_VALUE;
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return true if LAT1 and LAT2 are equal. */
static inline bool
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_lats_are_equal (struct ipcp_lattice *lat1, struct ipcp_lattice *lat2)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
gcc_assert (ipcp_lat_is_const (lat1) && ipcp_lat_is_const (lat2));
if (lat1->type != lat2->type)
return false;
if (TREE_CODE (lat1->constant) == ADDR_EXPR
&& TREE_CODE (lat2->constant) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (lat1->constant, 0)) == CONST_DECL
&& TREE_CODE (TREE_OPERAND (lat2->constant, 0)) == CONST_DECL)
return operand_equal_p (DECL_INITIAL (TREE_OPERAND (lat1->constant, 0)),
DECL_INITIAL (TREE_OPERAND (lat2->constant, 0)), 0);
else
return operand_equal_p (lat1->constant, lat2->constant, 0);
}
/* Compute Meet arithmetics:
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
Meet (IPA_BOTTOM, x) = IPA_BOTTOM
Meet (IPA_TOP,x) = x
Meet (const_a,const_b) = IPA_BOTTOM, if const_a != const_b.
MEET (const_a,const_b) = const_a, if const_a == const_b.*/
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipa_lattice_meet (struct ipcp_lattice *res, struct ipcp_lattice *lat1,
struct ipcp_lattice *lat2)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (lat1->type == IPA_BOTTOM || lat2->type == IPA_BOTTOM)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = IPA_BOTTOM;
return;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (lat1->type == IPA_TOP)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = lat2->type;
res->constant = lat2->constant;
return;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (lat2->type == IPA_TOP)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = lat1->type;
res->constant = lat1->constant;
return;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (!ipcp_lats_are_equal (lat1, lat2))
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = IPA_BOTTOM;
return;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
res->type = lat1->type;
res->constant = lat1->constant;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return the lattice corresponding to the Ith formal parameter of the function
described by INFO. */
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
static inline struct ipcp_lattice *
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
ipcp_get_lattice (struct ipa_node_params *info, int i)
{
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
return &(info->params[i].ipcp_lattice);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Given the jump function JFUNC, compute the lattice LAT that describes the
value coming down the callsite. INFO describes the caller node so that
pass-through jump functions can be evaluated. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_lattice_from_jfunc (struct ipa_node_params *info, struct ipcp_lattice *lat,
struct ipa_jump_func *jfunc)
{
if (jfunc->type == IPA_JF_CONST)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
lat->type = IPA_CONST_VALUE;
lat->constant = jfunc->value.constant;
}
else if (jfunc->type == IPA_JF_PASS_THROUGH)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipcp_lattice *caller_lat;
tree cst;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
caller_lat = ipcp_get_lattice (info, jfunc->value.pass_through.formal_id);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
lat->type = caller_lat->type;
if (caller_lat->type != IPA_CONST_VALUE)
return;
cst = caller_lat->constant;
if (jfunc->value.pass_through.operation != NOP_EXPR)
{
tree restype;
if (TREE_CODE_CLASS (jfunc->value.pass_through.operation)
== tcc_comparison)
restype = boolean_type_node;
else
restype = TREE_TYPE (cst);
cst = fold_binary (jfunc->value.pass_through.operation,
restype, cst, jfunc->value.pass_through.operand);
}
if (!cst || !is_gimple_ip_invariant (cst))
lat->type = IPA_BOTTOM;
lat->constant = cst;
}
else if (jfunc->type == IPA_JF_ANCESTOR)
{
struct ipcp_lattice *caller_lat;
tree t;
bool ok;
caller_lat = ipcp_get_lattice (info, jfunc->value.ancestor.formal_id);
lat->type = caller_lat->type;
if (caller_lat->type != IPA_CONST_VALUE)
return;
if (TREE_CODE (caller_lat->constant) != ADDR_EXPR)
{
/* This can happen when the constant is a NULL pointer. */
lat->type = IPA_BOTTOM;
return;
}
t = TREE_OPERAND (caller_lat->constant, 0);
ok = build_ref_for_offset (&t, TREE_TYPE (t),
jfunc->value.ancestor.offset,
jfunc->value.ancestor.type, false);
if (!ok)
{
lat->type = IPA_BOTTOM;
lat->constant = NULL_TREE;
}
else
lat->constant = build_fold_addr_expr (t);
}
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
else
lat->type = IPA_BOTTOM;
}
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
/* True when OLD_LAT and NEW_LAT values are not the same. */
static bool
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
ipcp_lattice_changed (struct ipcp_lattice *old_lat,
struct ipcp_lattice *new_lat)
{
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
if (old_lat->type == new_lat->type)
{
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
if (!ipcp_lat_is_const (old_lat))
return false;
builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * builtins.c (expand_builtin_profile_func): Avoid C++ keywords. * calls.c (avoid_likely_spilled_reg): Likewise. * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise. * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise. * config/i386/i386.c (ix86_expand_special_args_builtin, ix86_secondary_reload): Likewise. * except.c (struct eh_region, gen_eh_region_catch, remove_unreachable_regions, duplicate_eh_regions, assign_filter_values, build_post_landing_pads, sjlj_find_directly_reachable_regions, remove_eh_handler, reachable_next_level, foreach_reachable_handler, can_throw_internal_1, can_throw_external_1, collect_one_action_chain): Likewise. * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise. * fold-const.c (twoval_comparison_p, eval_subst): Likewise. * function.c (update_temp_slot_address, instantiate_new_reg, instantiate_virtual_regs_in_rtx, instantiate_virtual_regs_in_insn): Likewise. * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise. * gimplify.c (gimplify_call_expr, gimplify_init_constructor, gimplify_cleanup_point_expr): Likewise. * ipa-cp.c (ipcp_lattice_changed): Likewise. * passes.c (next_pass_1): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * profile.c (branch_prob): Likewise. * tree-dump.c (dump_register): Likewise. * tree-eh.c (replace_goto_queue_cond_clause, lower_catch): Likewise. * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks, copy_statement_list, remap_gimple_op_r, copy_tree_body_r, copy_edges_for_bb, copy_cfg_body, copy_tree_r, copy_arguments_for_versioning, copy_static_chain): Likewise. * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl, add_new_name_mapping, register_new_name_mapping): Likewise. * tree-mudflap.c (mf_xform_derefs): Likewise. * tree-predcom.c (struct chain, dump_chain, replace_ref_with, get_init_expr, combine_chains): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-structalias.c (create_variable_info_for): Likewise. * tree-vrp.c (simplify_cond_using_ranges): Likewise. * tree.c (substitute_in_expr, iterative_hash_expr): Likewise. * value-prof.c (gimple_duplicate_stmt_histograms): Likewise. From-SVN: r138809
2008-08-06 17:57:09 +02:00
if (ipcp_lats_are_equal (old_lat, new_lat))
return false;
}
return true;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Print all ipcp_lattices of all functions to F. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_all_lattices (FILE * f)
{
struct cgraph_node *node;
int i, count;
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
fprintf (f, "\nLattice:\n");
for (node = cgraph_nodes; node; node = node->next)
{
struct ipa_node_params *info;
if (!node->analyzed)
continue;
info = IPA_NODE_REF (node);
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
fprintf (f, " Node: %s:\n", cgraph_node_name (node));
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
{
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
struct ipcp_lattice *lat = ipcp_get_lattice (info, i);
ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. 2008-07-23 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_print_edge_profiles): Test for node->analyzed rather than for DECL_SAVED_TREE. * ipa-prop.c: Include diagnostic.h. (ipa_check_stmt_modifications): Check LHS of GIMPLE_MODIFY_EXPRs thoroughly. (ipa_detect_param_modifications): Function rewritten from scratch. (ipa_compute_jump_functions): Changed accesses to modification flags. (ipa_free_node_params_substructures): Update flags destruction. (ipa_node_duplication_hook): Update flags duplication. (ipa_print_all_params_modified): Updated flag access. * ipa-prop.h (struct ipa_param_flags): New structure. (struct ipa_node_params): New field modification_analysis_done, modified_flags changed into param_flags. (ipa_is_ith_param_modified): Changed to use new flags. * Makefile.in (ipa-prop.o): Add $(DIAGNOSTIC_H) to dependencies. * ipa-prop.c (ipa_print_all_jump_functions): Moved here from ipa-cp.c and split into two functions. (ipa_print_node_jump_functions): New function. (compute_scalar_jump_functions): New function. (type_like_member_ptr_p): New function. (compute_pass_through_member_ptrs): New function. (fill_member_ptr_cst_jump_function): New function. (determine_cst_member_ptr): New function. (compute_cst_member_ptr_arguments): New function. (ipa_compute_jump_functions): Complete rewrite. * ipa-prop.h (enum jump_func_type): Make explicit that we depend on IPA_UNKNOWN being zero. Added value IPA_CONST_MEMBER_PTR. (struct ipa_member_ptr_cst): New structure. (union jump_func_value): New field member_cst. * ipa-cp.c (ipcp_lat_is_insertable): New function. (ipcp_lattice_from_jfunc): Produces bottom lattices for unhandled jump function types. (ipcp_print_all_lattices): Slight fprintf rearrangement. (ipcp_print_all_structures): Call ipa_print_all_jump_functions instead of ipcp_print_all_jump_functions. (ipcp_insert_stage): Use ipcp_lat_is_insertable, create replace maps only for replacable scalars. * doc/invoke.texi (Optimize options): Add description of -findirect-inlining. * common.opt (flag_indirect_inlining): New flag. * opts.c (decode_options): Set flag_indirect_inlining when optimize >= 3. * ipa-inline.c: Include ipa-prop.h. (inline_indirect_intraprocedural_analysis): New function. (inline_generate_summary): Allocate parameter and argument info structures, call inline_indirect_intraprocedural_analysis on each node when doing indirect inlining and deallocate indirect inlining data structures in the end. * ipa-prop.c (ipa_create_param_decls_array): Return if already done. (free_all_ipa_structures_after_iinln): New function. (free_all_ipa_structures_after_ipa_cp): Checks whether iinln will be done. * Makefile.in (ipa-inline.o): Added $(IPA_PROP_H) to dependencies. * cgraphbuild.c (compute_call_stmt_bb_frequency): New function. (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead of computing the frequency separately. * ipa-cp.c (ipcp_print_all_structures): Replace a call to ipa_print_all_param_modified with a call to ipa_print_all_param_flags. * ipa-prop.c (ipa_get_member_ptr_load_param): New function. (ipa_get_stmt_member_ptr_load_param): New function. (ipa_is_ssa_with_stmt_def): New function. (ipa_note_param_call): New function. (ipa_analyze_call_uses): New function. (ipa_analyze_stmt_uses): New function. (ipa_analyze_params_uses): New function. (ipa_free_node_params_substructures): Also free the param_calls linked list. (ipa_node_duplication_hook): Also duplicate the param_calls linked list. (ipa_print_node_param_flags): New function. (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags. (ipa_print_all_param_flags): Calls ipa_print_node_param_flags. * ipa-prop.h (struct ipa_param_flags): New field called. (struct ipa_param_call_note): New structure. (struct ipa_node_params): New fields param_calls and uses_analysis_done. (ipa_is_ith_param_called): New function. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_analyze_params_uses and dump parameter flags. * ipa-inline.c (cgraph_decide_recursive_inlining): Call ipa_propagate_indirect_call_infos if performing indirect inlining, pass a new parameter new_edges to it. (add_new_edges_to_heap): New fucntion. (cgraph_decide_inlining_of_small_functions): New vector new_indirect_edges for newly found indirect edges , call ipa_propagate_indirect_call_infos after inlining. (cgraph_decide_inlining): Call ipa_propagate_indirect_call_infos after inlining if performing indirect inlining. Call free_all_ipa_structures_after_iinln when doing so too. (inline_generate_summary): Do not call free_all_ipa_structures_after_iinln here. * ipa-prop.c (update_jump_functions_after_inlining): New function. (print_edge_addition_message): New function. (update_call_notes_after_inlining): New function. (propagate_info_to_inlined_callees): New function. (ipa_propagate_indirect_call_infos): New function. * ipa-prop.h: Include cgraph.h (struct ipa_param_call_note): Fields reordered, new field processed. * cgraph.h (cgraph_edge): Shrink loop_nest field to 31 bits, add a new flag indirect_call. * cgraphunit.c (verify_cgraph_node): Allow indirect edges not to have rediscovered call statements. * cgraph.c (cgraph_create_edge): Initialize indirect_call to zero. (dump_cgraph_node): Dump also the indirect_call flag. (cgraph_clone_edge): Copy also the indirect_call flag. * tree-inline.c (copy_bb): Do not check for fndecls from call expressions, check for edge availability when moving clones. (get_indirect_callee_fndecl): New function. (expand_call_inline): If callee declaration is not apprent from the statement, try calling get_indirect_callee_fndecl. Do not issue warnings or call sorry when not inlinings an indirect edge. * Makefile.in (IPA_PROP_H): Added $(CGRAPH_H) to dependencies. * ipa-prop.c (ipa_print_node_param_flags): Make the dump format a bit more frandly to matching. * testsuite/g++.dg/ipa/iinline-1.C: New testcase. * testsuite/gcc.dg/ipa/iinline-1.c: New testcase. * testsuite/gcc.dg/ipa/modif-1.c: New testcase. From-SVN: r138092
2008-07-23 21:45:45 +02:00
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
fprintf (f, " param [%d]: ", i);
if (lat->type == IPA_CONST_VALUE)
{
tree cst = lat->constant;
fprintf (f, "type is CONST ");
print_generic_expr (f, cst, 0);
if (TREE_CODE (cst) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (cst, 0)) == CONST_DECL)
{
fprintf (f, " -> ");
print_generic_expr (f, DECL_INITIAL (TREE_OPERAND (cst, 0)),
0);
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
else if (lat->type == IPA_TOP)
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
fprintf (f, "type is TOP");
else
fprintf (f, "type is BOTTOM");
if (ipa_param_cannot_devirtualize_p (info, i))
fprintf (f, " - cannot_devirtualize set\n");
else if (ipa_param_types_vec_empty (info, i))
fprintf (f, " - type list empty\n");
else
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
fprintf (f, "\n");
}
}
}
/* Return true if ipcp algorithms would allow cloning NODE. */
static bool
ipcp_versionable_function_p (struct cgraph_node *node)
{
struct cgraph_edge *edge;
/* There are a number of generic reasons functions cannot be versioned. */
if (!node->local.versionable)
return false;
/* Removing arguments doesn't work if the function takes varargs
or use __builtin_apply_args. */
for (edge = node->callees; edge; edge = edge->next_callee)
{
tree t = edge->callee->decl;
if (DECL_BUILT_IN_CLASS (t) == BUILT_IN_NORMAL
&& (DECL_FUNCTION_CODE (t) == BUILT_IN_APPLY_ARGS
|| DECL_FUNCTION_CODE (t) == BUILT_IN_VA_START))
return false;
}
return true;
}
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
/* Return true if this NODE is viable candidate for cloning. */
static bool
ipcp_cloning_candidate_p (struct cgraph_node *node)
{
int n_calls = 0;
int n_hot_calls = 0;
gcov_type direct_call_sum = 0;
struct cgraph_edge *e;
/* We never clone functions that are not visible from outside.
FIXME: in future we should clone such functions when they are called with
different constants, but current ipcp implementation is not good on this.
*/
lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones has no address taken. * lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones has no address taken. * cgraph.c (cgraph_mark_needed_node): Assert that inline clones are never needed. (cgraph_clone_node): Clear externally_visible flag for clones. * cgraph.h (cgraph_only_called_directly_p, cgraph_can_remove_if_no_direct_calls_p): New predicates. * tree-pass.h (pass_ipa_whole_program_visibility): Declare. * ipa-cp.c (ipcp_cloning_candidate_p): Use new predicate. (ipcp_initialize_node_lattices, ipcp_estimate_growth, ipcp_insert_stage): Likwise. * cgraphunit.c (cgraph_decide_is_function_needed): Do not compute externally_visible flag. (verify_cgraph_node): Verify that inline clones look right. (process_function_and_variable_attributes): Do not set externally_visible flags. (ipa_passes): Avoid executing small_ipa_passes at LTO stage; they've been already run. * lto-cgraph.c (lto_output_node): Assert that inline clones are not boundaries. * ipa-inline.c (cgraph_clone_inlined_nodes): Use new predicates; clear externally_visible when turning into inline clones (cgraph_mark_inline_edge): Use new predicates. (cgraph_estimate_growth): Likewise. (cgraph_decide_inlining): Likewise. * ipa.c (cgraph_postorder): Likewise. (cgraph_remove_unreachable_nodes): Likewise; sanity check that inline clones are not needed. (cgraph_externally_visible_p): New predicate. (function_and_variable_visibility): Add whole_program parameter; always set externally_visible flag; handle COMDAT function privatization. (local_function_and_variable_visibility): New function. (gate_whole_program_function_and_variable_visibility): New function. (whole_program_function_and_variable_visibility): New function. (pass_ipa_whole_program_visibility): New function. * passes.c (init_optimization_passes): Add whole program visibility pass. (do_per_function_toporder, function_called_by_processed_nodes_p): Do not care about needed/reachable flags. * varpool.c: Include flags.h (decide_is_variable_needed): When doing LTO assume whole-program mode. (varpool_finalize_decl): When we are in LTO read-back, all variables are analyzed. (varpool_analyze_pending_decls): Skip analyzis of analyzed vars. * lto/lto.c (read_cgraph_and_symbols): Mark functions neccesary only at ltrans stage; explain why this is needed and should not. From-SVN: r152520
2009-10-07 11:01:16 +02:00
if (cgraph_only_called_directly_p (node) || !node->analyzed)
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
return false;
if (cgraph_function_body_availability (node) <= AVAIL_OVERWRITABLE)
{
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; body is overwrittable.\n",
cgraph_node_name (node));
return false;
}
if (!ipcp_versionable_function_p (node))
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
{
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; body is not versionable.\n",
cgraph_node_name (node));
return false;
}
for (e = node->callers; e; e = e->next_caller)
{
direct_call_sum += e->count;
n_calls ++;
if (cgraph_maybe_hot_edge_p (e))
n_hot_calls ++;
}
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
if (!n_calls)
{
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; no direct calls.\n",
cgraph_node_name (node));
return false;
}
cgraph.c (dump_cgraph_node): Dump size/time/benefit. * cgraph.c (dump_cgraph_node): Dump size/time/benefit. * cgraph.h (struct inline_summary): New filed self_wize, size_inlining_benefit, self_time and time_inlining_benefit. (struct cgraph_global_info): Replace insns by time ans size fields. * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size (ipcp_estimate_growth, ipcp_insert_stage): Likewise. (ipcp_update_callgraph): Do not touch function bodies. * ipa-inline.c: Include except.h (MAX_TIME): New constant. (overall_insns): Remove. (leaf_node_p): New. (overall_size, max_benefit): New static variables. (cgraph_estimate_time_after_inlining): New function. (cgraph_estimate_size_after_inlining): Rewrite using benefits. (cgraph_clone_inlined_nodes): Update size. (cgraph_mark_inline_edge): Update size. (cgraph_estimate_growth): Use size info. (cgraph_check_inline_limits): Check size. (cgraph_default_inline_p): Likewise. (cgraph_edge_badness): Compute badness based on benefit and size cost. (cgraph_decide_recursive_inlining): Check size. (cgraph_decide_inlining_of_small_function): Update size; dump sizes and times. (cgraph_decide_inlining): Likewise. (cgraph_decide_inlining_incrementally): Likewise; honor PARAM_EARLY_INLINING_INSNS. (likely_eliminated_by_inlining_p): New predicate. (estimate_function_body_sizes): New function. (compute_inline_parameters): Use it. * except.c (must_not_throw_labels): New function. * except.h (must_not_throw_labels): Declare. * tree-inline.c (init_inline_once): Kill inlining_weigths * tree-ssa-structalias.c: Avoid uninitialized warning. * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300. (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60. (PARAM_INLINE_CALL_COST): Remove. (PARAM_EARLY_INLINING_INSNS): New. From-SVN: r147852
2009-05-25 23:59:24 +02:00
if (node->local.inline_summary.self_size < n_calls)
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
{
if (dump_file)
fprintf (dump_file, "Considering %s for cloning; code would shrink.\n",
cgraph_node_name (node));
return true;
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.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. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
}
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
if (!flag_ipa_cp_clone)
{
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; -fipa-cp-clone disabled.\n",
cgraph_node_name (node));
return false;
}
if (!optimize_function_for_speed_p (DECL_STRUCT_FUNCTION (node->decl)))
{
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; optimizing it for size.\n",
cgraph_node_name (node));
return false;
}
/* When profile is available and function is hot, propagate into it even if
calls seems cold; constant propagation can improve function's speed
significandly. */
if (max_count)
{
if (direct_call_sum > node->count * 90 / 100)
{
if (dump_file)
fprintf (dump_file, "Considering %s for cloning; usually called directly.\n",
cgraph_node_name (node));
return true;
}
}
if (!n_hot_calls)
{
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; no hot calls.\n",
cgraph_node_name (node));
return false;
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
}
if (dump_file)
fprintf (dump_file, "Considering %s for cloning.\n",
cgraph_node_name (node));
return true;
}
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
/* Mark parameter with index I of function described by INFO as unsuitable for
devirtualization. Return true if it has already been marked so. */
static bool
ipa_set_param_cannot_devirtualize (struct ipa_node_params *info, int i)
{
bool ret = info->params[i].cannot_devirtualize;
info->params[i].cannot_devirtualize = true;
if (info->params[i].types)
VEC_free (tree, heap, info->params[i].types);
return ret;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Initialize ipcp_lattices array. The lattices corresponding to supported
types (integers, real types and Fortran constants defined as const_decls)
are initialized to IPA_TOP, the rest of them to IPA_BOTTOM. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_initialize_node_lattices (struct cgraph_node *node)
{
int i;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipa_node_params *info = IPA_NODE_REF (node);
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
enum ipa_lattice_type type;
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
if (ipa_is_called_with_var_arguments (info))
type = IPA_BOTTOM;
lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones has no address taken. * lto-symtab.c (lto_cgraph_replace_node): Assert that inline clones has no address taken. * cgraph.c (cgraph_mark_needed_node): Assert that inline clones are never needed. (cgraph_clone_node): Clear externally_visible flag for clones. * cgraph.h (cgraph_only_called_directly_p, cgraph_can_remove_if_no_direct_calls_p): New predicates. * tree-pass.h (pass_ipa_whole_program_visibility): Declare. * ipa-cp.c (ipcp_cloning_candidate_p): Use new predicate. (ipcp_initialize_node_lattices, ipcp_estimate_growth, ipcp_insert_stage): Likwise. * cgraphunit.c (cgraph_decide_is_function_needed): Do not compute externally_visible flag. (verify_cgraph_node): Verify that inline clones look right. (process_function_and_variable_attributes): Do not set externally_visible flags. (ipa_passes): Avoid executing small_ipa_passes at LTO stage; they've been already run. * lto-cgraph.c (lto_output_node): Assert that inline clones are not boundaries. * ipa-inline.c (cgraph_clone_inlined_nodes): Use new predicates; clear externally_visible when turning into inline clones (cgraph_mark_inline_edge): Use new predicates. (cgraph_estimate_growth): Likewise. (cgraph_decide_inlining): Likewise. * ipa.c (cgraph_postorder): Likewise. (cgraph_remove_unreachable_nodes): Likewise; sanity check that inline clones are not needed. (cgraph_externally_visible_p): New predicate. (function_and_variable_visibility): Add whole_program parameter; always set externally_visible flag; handle COMDAT function privatization. (local_function_and_variable_visibility): New function. (gate_whole_program_function_and_variable_visibility): New function. (whole_program_function_and_variable_visibility): New function. (pass_ipa_whole_program_visibility): New function. * passes.c (init_optimization_passes): Add whole program visibility pass. (do_per_function_toporder, function_called_by_processed_nodes_p): Do not care about needed/reachable flags. * varpool.c: Include flags.h (decide_is_variable_needed): When doing LTO assume whole-program mode. (varpool_finalize_decl): When we are in LTO read-back, all variables are analyzed. (varpool_analyze_pending_decls): Skip analyzis of analyzed vars. * lto/lto.c (read_cgraph_and_symbols): Mark functions neccesary only at ltrans stage; explain why this is needed and should not. From-SVN: r152520
2009-10-07 11:01:16 +02:00
else if (cgraph_only_called_directly_p (node))
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
type = IPA_TOP;
/* When cloning is allowed, we can assume that externally visible functions
are not called. We will compensate this by cloning later. */
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
else if (ipcp_cloning_candidate_p (node))
type = IPA_TOP, n_cloning_candidates ++;
else
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
type = IPA_BOTTOM;
for (i = 0; i < ipa_get_param_count (info) ; i++)
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
{
ipcp_get_lattice (info, i)->type = type;
if (type == IPA_BOTTOM)
ipa_set_param_cannot_devirtualize (info, i);
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* build INTEGER_CST tree with type TREE_TYPE and value according to LAT.
Return the tree. */
static tree
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
build_const_val (struct ipcp_lattice *lat, tree tree_type)
{
cgraph.c (first_cgraph_function_insertion_hook): New variable. * cgraph.c (first_cgraph_function_insertion_hook): New variable. (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. From-SVN: r139389
2008-08-21 17:26:59 +02:00
tree val;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
gcc_assert (ipcp_lat_is_const (lat));
cgraph.c (first_cgraph_function_insertion_hook): New variable. * cgraph.c (first_cgraph_function_insertion_hook): New variable. (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. From-SVN: r139389
2008-08-21 17:26:59 +02:00
val = lat->constant;
if (!useless_type_conversion_p (tree_type, TREE_TYPE (val)))
{
if (fold_convertible_p (tree_type, val))
return fold_build1 (NOP_EXPR, tree_type, val);
else
return fold_build1 (VIEW_CONVERT_EXPR, tree_type, val);
}
return val;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Compute the proper scale for NODE. It is the ratio between the number of
direct calls (represented on the incoming cgraph_edges) and sum of all
invocations of NODE (represented as count in cgraph_node).
FIXME: This code is wrong. Since the callers can be also clones and
the clones are not scaled yet, the sums gets unrealistically high.
To properly compute the counts, we would need to do propagation across
callgraph (as external call to A might imply call to non-clonned B
if A's clone calls clonned B). */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_compute_node_scale (struct cgraph_node *node)
{
gcov_type sum;
struct cgraph_edge *cs;
sum = 0;
/* Compute sum of all counts of callers. */
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
sum += cs->count;
/* Work around the unrealistically high sum problem. We just don't want
the non-cloned body to have negative or very low frequency. Since
majority of execution time will be spent in clones anyway, this should
give good enough profile. */
if (sum > node->count * 9 / 10)
sum = node->count * 9 / 10;
if (node->count == 0)
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_set_node_scale (node, 0);
else
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_set_node_scale (node, sum * REG_BR_PROB_BASE / node->count);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return true if there are some formal parameters whose value is IPA_TOP (in
the whole compilation unit). Change their values to IPA_BOTTOM, since they
most probably get their values from outside of this compilation unit. */
static bool
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_change_tops_to_bottom (void)
{
int i, count;
struct cgraph_node *node;
bool prop_again;
prop_again = false;
for (node = cgraph_nodes; node; node = node->next)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipa_node_params *info = IPA_NODE_REF (node);
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
{
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
struct ipcp_lattice *lat = ipcp_get_lattice (info, i);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (lat->type == IPA_TOP)
{
prop_again = true;
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
if (dump_file)
{
fprintf (dump_file, "Forcing param ");
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
print_generic_expr (dump_file, ipa_get_param (info, i), 0);
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
fprintf (dump_file, " of node %s to bottom.\n",
cgraph_node_name (node));
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
lat->type = IPA_BOTTOM;
}
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
if (!ipa_param_cannot_devirtualize_p (info, i)
&& ipa_param_types_vec_empty (info, i))
{
prop_again = true;
ipa_set_param_cannot_devirtualize (info, i);
if (dump_file)
{
fprintf (dump_file, "Marking param ");
print_generic_expr (dump_file, ipa_get_param (info, i), 0);
fprintf (dump_file, " of node %s as unusable for "
"devirtualization.\n",
cgraph_node_name (node));
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
}
}
return prop_again;
}
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
/* Insert BINFO to the list of known types of parameter number I of the
function described by CALLEE_INFO. Return true iff the type information
associated with the callee parameter changed in any way. */
static bool
ipcp_add_param_type (struct ipa_node_params *callee_info, int i, tree binfo)
{
int j, count;
if (ipa_param_cannot_devirtualize_p (callee_info, i))
return false;
if (callee_info->params[i].types)
{
count = VEC_length (tree, callee_info->params[i].types);
for (j = 0; j < count; j++)
if (VEC_index (tree, callee_info->params[i].types, j) == binfo)
return false;
}
if (VEC_length (tree, callee_info->params[i].types)
== (unsigned) PARAM_VALUE (PARAM_DEVIRT_TYPE_LIST_SIZE))
return !ipa_set_param_cannot_devirtualize (callee_info, i);
VEC_safe_push (tree, heap, callee_info->params[i].types, binfo);
return true;
}
/* Copy known types information for parameter number CALLEE_IDX of CALLEE_INFO
from a parameter of CALLER_INFO as described by JF. Return true iff the
type information changed in any way. JF must be a pass-through or an
ancestor jump function. */
static bool
ipcp_copy_types (struct ipa_node_params *caller_info,
struct ipa_node_params *callee_info,
int callee_idx, struct ipa_jump_func *jf)
{
int caller_idx, j, count;
bool res;
if (ipa_param_cannot_devirtualize_p (callee_info, callee_idx))
return false;
if (jf->type == IPA_JF_PASS_THROUGH)
{
if (jf->value.pass_through.operation != NOP_EXPR)
{
ipa_set_param_cannot_devirtualize (callee_info, callee_idx);
return true;
}
caller_idx = jf->value.pass_through.formal_id;
}
else
caller_idx = jf->value.ancestor.formal_id;
if (ipa_param_cannot_devirtualize_p (caller_info, caller_idx))
{
ipa_set_param_cannot_devirtualize (callee_info, callee_idx);
return true;
}
if (!caller_info->params[caller_idx].types)
return false;
res = false;
count = VEC_length (tree, caller_info->params[caller_idx].types);
for (j = 0; j < count; j++)
{
tree binfo = VEC_index (tree, caller_info->params[caller_idx].types, j);
if (jf->type == IPA_JF_ANCESTOR)
{
binfo = get_binfo_at_offset (binfo, jf->value.ancestor.offset,
jf->value.ancestor.type);
if (!binfo)
{
ipa_set_param_cannot_devirtualize (callee_info, callee_idx);
return true;
}
}
res |= ipcp_add_param_type (callee_info, callee_idx, binfo);
}
return res;
}
/* Propagate type information for parameter of CALLEE_INFO number I as
described by JF. CALLER_INFO describes the caller. Return true iff the
type information changed in any way. */
static bool
ipcp_propagate_types (struct ipa_node_params *caller_info,
struct ipa_node_params *callee_info,
struct ipa_jump_func *jf, int i)
{
tree cst, binfo;
switch (jf->type)
{
case IPA_JF_UNKNOWN:
case IPA_JF_CONST_MEMBER_PTR:
break;
case IPA_JF_KNOWN_TYPE:
return ipcp_add_param_type (callee_info, i, jf->value.base_binfo);
case IPA_JF_CONST:
cst = jf->value.constant;
if (TREE_CODE (cst) != ADDR_EXPR)
break;
binfo = gimple_get_relevant_ref_binfo (TREE_OPERAND (cst, 0), NULL_TREE);
if (!binfo)
break;
return ipcp_add_param_type (callee_info, i, binfo);
case IPA_JF_PASS_THROUGH:
case IPA_JF_ANCESTOR:
return ipcp_copy_types (caller_info, callee_info, i, jf);
}
/* If we reach this we cannot use this parameter for devirtualization. */
return !ipa_set_param_cannot_devirtualize (callee_info, i);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Interprocedural analysis. The algorithm propagates constants from the
caller's parameters to the callee's arguments. */
static void
ipcp_propagate_stage (void)
{
int i;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipcp_lattice inc_lat = { IPA_BOTTOM, NULL };
struct ipcp_lattice new_lat = { IPA_BOTTOM, NULL };
struct ipcp_lattice *dest_lat;
struct cgraph_edge *cs;
struct ipa_jump_func *jump_func;
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
struct ipa_func_list *wl;
int count;
ipa_check_create_node_params ();
ipa_check_create_edge_args ();
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
/* Initialize worklist to contain all functions. */
wl = ipa_init_func_list ();
while (wl)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct cgraph_node *node = ipa_pop_func_from_list (&wl);
struct ipa_node_params *info = IPA_NODE_REF (node);
for (cs = node->callees; cs; cs = cs->next_callee)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipa_node_params *callee_info = IPA_NODE_REF (cs->callee);
struct ipa_edge_args *args = IPA_EDGE_REF (cs);
ipa-cp.c (ipcp_write_summary, [...]): New functions. * ipa-cp.c (ipcp_write_summary, ipcp_read_summary): New functions. (pass_ipa_cp): Register them. (ipcp_init_stage): Analyze all functions for whopr/lto. (ipcp_propagate_stage): Skip external calls. (ipcp_iterate_stage): Call ipa_update_after_lto_read if needed. * ipa-reference.c (write_node_summary_p): Fix thinko about availability. * cgraphunit.c (ipa_passes): When in lto, ne er produce new summaries; when in ltrans, skip executing of ipa passes since everything should've been done. * ipa-inline.c (cgraph_decide_inlining): Remove FIXMEs. (inline_generate_summary): Likewise. (inline_read_summary): New function. (inline_write_summary): New function. (pass_ipa_inline): Register new hooks. * ipa-prop.c: Inlcude lto-streamer.h (ipa_edge_args_vector): Update declaration. (ipa_count_arguments, ipa_compute_jump_functions, ipa_free_edge_args_substructures): Move ipa_edge_args_vector into ggc. (ipa_write_jump_function, ipa_read_jump_function, ipa_write_node_info, ipa_read_node_info): New static functions. (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Update. (duplicate_array): Use xmalloc. (duplicate_ggc_array): New. (ipa_edge_duplication_hook): Use it. (ipa_update_after_lto_read): New function. * ipa-prop.h (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Declare. (ipa_pass_through_data, ipa_ancestor_jf_data, ipa_member_ptr_cst, jump_func_value, ipa_member_ptr_cst, ipa_edge_args): Add GTY markers. (ipa_edge_args_vector): Move into GGC. (ipa_check_create_edge_args): Update. (ipa_update_after_lto_read): New. * passes.c (ipa_write_summaries_1): When in wpa, do not write summaries. (ipa_read_summaries): When in ltrans, so not read summaries. * lto-streamer.c (lto_get_section_name): Add LTO_section_jump_functions. * lto-streamer.h (LTO_section_jump_functions): New section. (produce_asm): Declare. * lto-cgraph.c (output_cgraph): Output edges in reverse order. * lto-streamer-out.c (produce_asm): Export. * lto-streamer-in.c: Include tree-pass.h (input_function): Free dominance info when done. (lto_read_body): Push ipa_inline in ltrans stage. * gengtype.c (open_base_files): Add ipa-prop.h into includes. * Makefile.in (GTFILES): Add ipa-prop.h * lto.c (lto_fixup_jump_functions): New function. (lto_fixup_decls): Use it. From-SVN: r153449
2009-10-22 12:02:29 +02:00
if (ipa_is_called_with_var_arguments (callee_info)
|| !cs->callee->analyzed
|| ipa_is_called_with_var_arguments (callee_info))
ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal... 2008-04-30 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_init_stage): Calls ipa_set_called_with_variable_arg instead of setting number of formal parameters to zero. (ipcp_init_stage): Do not set the number of actual parameters to zero either. (ipcp_propagate_stage): Explicitly skipping all calls to nodes which are called with variable number of arguments. (ipcp_insert_stage): Explicitely skipping all nodes which are called with variable number of arguments. (ipcp_callsite_param_print): Skipps callsites to nodes with varaible number of parameters. * ipa-prop.h (struct ipa_node_params): Added flag called_with_var_arguments (ipa_set_param_count): Added. Changed sole setter to use it. (ipa_get_param_count): Added. All readers of param_count converted to use it instead. (ipa_set_called_with_variable_arg): Added. (ipa_is_called_with_var_arguments): Added. (ipa_get_ith_param): Added. All readers of param_decls converted to use it instead. (ipa_set_cs_argument_count): Added, sole writer to argument_count changed to use it. (ipa_get_cs_argument_count): Added, all readers of argument_count changed to cal it. (ipa_get_ith_jump_func): Added. Accessors of jump values changed to use it. * ipa-prop.h (struct ipcp_formal): Renamed to ipcp_lattice (struct ipcp_lattice): Renamed cval_type to type (struct ipa_node_params): ipcp_cval renamed to ipcp_lattices * ipa-cp.c (ipcp_cval_get_cvalue): Changed return value to tree (ipcp_cval_set_cvalue): Changed type of parameter value to tree (ipcp_insert_stage): Changed the type of variable cvalue to tree (ipcp_replace_map_create): Changed the type of parameter cvalue to tree (build_const_val): Changed the type of parameter cvalue to tree (ipcp_propagate_const): Changed the type of parameter cvalue to tree (ipcp_method_cval_set_cvalue_type): Renamed parameter cval_type1 to type * ipa-prop.h (struct ipcp_formal): Replaced cvalue with tree called constant * ipa-prop.c (ipa_methodlist_init): Renamed to ipa_init_func_list (ipa_methodlist_not_empty): Removed, the sole user now checks directly (ipa_add_method): Renamed to ipa_push_func_to_list (ipa_remove_method): Renamed to ipa_pop_func_from_list (ipa_callsite_param_count): Removed. (ipa_callsite_param_count_set): Removed. (ipa_callsite_param): Removed. (ipa_callsite_callee): Removed. (ipa_callsite_compute_param): Renamed to ipa_compute_jump_functions (ipa_callsite_compute_count): Renamed to ipa_count_arguments (ipa_method_formal_count): Removed. (ipa_method_formal_count_set): Removed. (ipa_method_get_tree): Removed. (ipa_method_tree_map_create): Removed. (ipa_method_compute_tree_map): Renamed to ipa_create_param_decls_array (ipa_create_param_decls_array): Creates the array itself (ipa_create_param_decls_array): Temporary variable info instead of a few dereferences. (ipa_method_formal_compute_count): Renamed to ipa_count_formal_params (ipa_method_compute_modify): Renamed to ipa_detect_param_modifications (get_type): Removed. (ipa_jf_get_info_type): Removed. (ipa_node_create): Renamed to ipa_create_node_params (ipa_free): Renamed to ipa_free_all_node_params (ipa_nodes_create): Renamed to ipa_create_all_node_params (ipa_edges_create): Renamed to ipa_create_all_edge_args (ipa_edges_free): Renamed to ipa_free_all_edge_args (ipa_nodes_free): Integrated into ipa_free_all_node_params and removed (ipa_free_all_node_params): Deallocation to jump_functions moved to ipa_free_all_edge_args (ipa_method_tree_print): Renamed to ipa_print_all_tree_maps (ipa_method_modify_print): Renamed to ipa_print_all_params_modified (ipa_create_methodlist_node): Removed. (ipa_methodlist_method): Removed. (ipa_methodlist_method_set): Removed. (ipa_methodlist_next_method): Removed. (ipa_methodlist_next_method_set): Removed. (ipa_method_is_modified): Removed. (ipa_method_modify_create): Removed. (ipa_method_modify_init): Temporary variable info instead of a few dereferences. (ipa_detect_param_modifications): Temporary variable info instead of a few dereferences. (ipa_compute_jump_functions): Temporary variable info instead of a few dereferences. (ipa_method_modify_set): Removed. (ipa_method_tree_map): Renamed to ipa_get_param_decl_index (ipa_get_param_decl_index): Now accepts struct ipa_node_params rather than craph_node as the first parameter. (ipa_method_modify_stmt): Renamed to ipa_check_stmt_modifications (ipa_method_modify_init): Removed. (ipa_compute_jump_functions): Added a temp variable instead of repeatadly dereferencing the cgraph_edge.aux pointer (ipa_callsite_param_set_type): Removed. (ipa_compute_jump_functions): i renamed to index and moved to an inner block (ipa_callsite_param_set_info_type_formal): Removed. (ipa_callsite_param_set_info_type): Removed. (ipa_callsite_param_map_create): Removed. (ipa_callsite_tree): Removed. (ipa_callsite_caller): Removed. (ipa_pop_func_from_list): return_method removed to return_func * ipa-prop.h (enum cvalue_type): Renamed to ipa_lattice_type, prefixed all values with IPA_. Changed all users. (enum jump_func_type): Rnamed UNKNOWN_IPATYPE to IPA_UNKNOWN, CONST_IPATYPE to IPA_CONST, CONST_IPATYPE_REF to IPA_CONST_REF and FORMAL_IPATYPE IPA_PASS_THROUGH. (union parameter_info): Renamed to jump_func_value. (union jump_func_value): Renamed value to constant (struct ipa_jump_func): Renamed info_type to value (struct ipa_node): Renamed to ipa_node_params (struct ipa_node_params): Renamed ipa_arg_num to param_count (struct ipa_node_params): Renamed ipa_param_tree to param_decls (struct ipa_node_params): Renamed ipa_mod to modified_flags (struct ipa_edge): Renamed to ipa_edge_args (struct ipa_edge_args): Renamed ipa_param_num to argument_count (struct ipa_edge_args): Renamed ipa_param_map to jump_functions (struct ipa_methodlist): Renamed to ipa_func_list (struct ipa_func_list): method_p renamed to node, next_method renamed to next (ipa_methodlist_p): Removed, switched all users to struct pointer (IS_VALID_TREE_MAP_INDEX): Renamed to IS_VALID_JUMP_FUNC_INDEX From-SVN: r134818
2008-04-30 12:01:59 +02:00
continue;
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
count = ipa_get_cs_argument_count (args);
for (i = 0; i < count; i++)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
jump_func = ipa_get_ith_jump_func (args, i);
ipcp_lattice_from_jfunc (info, &inc_lat, jump_func);
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
dest_lat = ipcp_get_lattice (callee_info, i);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipa_lattice_meet (&new_lat, &inc_lat, dest_lat);
if (ipcp_lattice_changed (&new_lat, dest_lat))
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
dest_lat->type = new_lat.type;
dest_lat->constant = new_lat.constant;
ipa_push_func_to_list (&wl, cs->callee);
}
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
if (ipcp_propagate_types (info, callee_info, jump_func, i))
ipa_push_func_to_list (&wl, cs->callee);
}
}
}
}
/* Call the constant propagation algorithm and re-call it if necessary
(if there are undetermined values left). */
static void
ipcp_iterate_stage (void)
{
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
struct cgraph_node *node;
n_cloning_candidates = 0;
if (dump_file)
fprintf (dump_file, "\nIPA iterate stage:\n\n");
ipa-cp.c (ipcp_write_summary, [...]): New functions. * ipa-cp.c (ipcp_write_summary, ipcp_read_summary): New functions. (pass_ipa_cp): Register them. (ipcp_init_stage): Analyze all functions for whopr/lto. (ipcp_propagate_stage): Skip external calls. (ipcp_iterate_stage): Call ipa_update_after_lto_read if needed. * ipa-reference.c (write_node_summary_p): Fix thinko about availability. * cgraphunit.c (ipa_passes): When in lto, ne er produce new summaries; when in ltrans, skip executing of ipa passes since everything should've been done. * ipa-inline.c (cgraph_decide_inlining): Remove FIXMEs. (inline_generate_summary): Likewise. (inline_read_summary): New function. (inline_write_summary): New function. (pass_ipa_inline): Register new hooks. * ipa-prop.c: Inlcude lto-streamer.h (ipa_edge_args_vector): Update declaration. (ipa_count_arguments, ipa_compute_jump_functions, ipa_free_edge_args_substructures): Move ipa_edge_args_vector into ggc. (ipa_write_jump_function, ipa_read_jump_function, ipa_write_node_info, ipa_read_node_info): New static functions. (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Update. (duplicate_array): Use xmalloc. (duplicate_ggc_array): New. (ipa_edge_duplication_hook): Use it. (ipa_update_after_lto_read): New function. * ipa-prop.h (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Declare. (ipa_pass_through_data, ipa_ancestor_jf_data, ipa_member_ptr_cst, jump_func_value, ipa_member_ptr_cst, ipa_edge_args): Add GTY markers. (ipa_edge_args_vector): Move into GGC. (ipa_check_create_edge_args): Update. (ipa_update_after_lto_read): New. * passes.c (ipa_write_summaries_1): When in wpa, do not write summaries. (ipa_read_summaries): When in ltrans, so not read summaries. * lto-streamer.c (lto_get_section_name): Add LTO_section_jump_functions. * lto-streamer.h (LTO_section_jump_functions): New section. (produce_asm): Declare. * lto-cgraph.c (output_cgraph): Output edges in reverse order. * lto-streamer-out.c (produce_asm): Export. * lto-streamer-in.c: Include tree-pass.h (input_function): Free dominance info when done. (lto_read_body): Push ipa_inline in ltrans stage. * gengtype.c (open_base_files): Add ipa-prop.h into includes. * Makefile.in (GTFILES): Add ipa-prop.h * lto.c (lto_fixup_jump_functions): New function. (lto_fixup_decls): Use it. From-SVN: r153449
2009-10-22 12:02:29 +02:00
if (in_lto_p)
ipa_update_after_lto_read ();
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
for (node = cgraph_nodes; node; node = node->next)
{
ipcp_initialize_node_lattices (node);
ipcp_compute_node_scale (node);
}
if (dump_file && (dump_flags & TDF_DETAILS))
{
ipcp_print_all_lattices (dump_file);
ipcp_function_scale_print (dump_file);
}
ipcp_propagate_stage ();
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (ipcp_change_tops_to_bottom ())
/* Some lattices have changed from IPA_TOP to IPA_BOTTOM.
This change should be propagated. */
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
{
gcc_assert (n_cloning_candidates);
ipcp_propagate_stage ();
}
if (dump_file)
{
fprintf (dump_file, "\nIPA lattices after propagation:\n");
ipcp_print_all_lattices (dump_file);
if (dump_flags & TDF_DETAILS)
ipcp_print_profile_data (dump_file);
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Check conditions to forbid constant insertion to function described by
NODE. */
static inline bool
ipcp_node_modifiable_p (struct cgraph_node *node)
{
/* Once we will be able to do in-place replacement, we can be more
lax here. */
return ipcp_versionable_function_p (node);
}
/* Print count scale data structures. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_function_scale_print (FILE * f)
{
struct cgraph_node *node;
for (node = cgraph_nodes; node; node = node->next)
{
if (!node->analyzed)
continue;
fprintf (f, "printing scale for %s: ", cgraph_node_name (node));
fprintf (f, "value is " HOST_WIDE_INT_PRINT_DEC
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
" \n", (HOST_WIDE_INT) ipcp_get_node_scale (node));
}
}
/* Print counts of all cgraph nodes. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_func_profile_counts (FILE * f)
{
struct cgraph_node *node;
for (node = cgraph_nodes; node; node = node->next)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
fprintf (f, "function %s: ", cgraph_node_name (node));
fprintf (f, "count is " HOST_WIDE_INT_PRINT_DEC
" \n", (HOST_WIDE_INT) node->count);
}
}
/* Print counts of all cgraph edges. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_call_profile_counts (FILE * f)
{
struct cgraph_node *node;
struct cgraph_edge *cs;
for (node = cgraph_nodes; node; node = node->next)
{
for (cs = node->callees; cs; cs = cs->next_callee)
{
fprintf (f, "%s -> %s ", cgraph_node_name (cs->caller),
cgraph_node_name (cs->callee));
fprintf (f, "count is " HOST_WIDE_INT_PRINT_DEC " \n",
(HOST_WIDE_INT) cs->count);
}
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Print profile info for all functions. */
static void
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_profile_data (FILE * f)
{
fprintf (f, "\nNODE COUNTS :\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_func_profile_counts (f);
fprintf (f, "\nCS COUNTS stage:\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_call_profile_counts (f);
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Build and initialize ipa_replace_map struct according to LAT. This struct is
processed by versioning, which operates according to the flags set.
PARM_TREE is the formal parameter found to be constant. LAT represents the
constant. */
static struct ipa_replace_map *
ipcp_create_replace_map (tree parm_tree, struct ipcp_lattice *lat)
{
struct ipa_replace_map *replace_map;
tree const_val;
utils.c (init_gnat_to_gnu): Use typed GC allocation. gcc/ada: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC allocation. (init_dummy_type): Likewise. (gnat_pushlevel): Likewise. * gcc-interface/trans.c (Attribute_to_gnu): Likewise. (Subprogram_Body_to_gnu): Likewise. (Compilation_Unit_to_gnu): Likewise. (start_stmt_group): Likewise. (extract_encoding): Likewise. (decode_name): Likewise. * gcc-interface/misc.c (gnat_printable_name): Likewise. * gcc-interface/decl.c (annotate_value): Likewise. * gcc-interface/ada-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation. (SET_DECL_LANG_SPECIFIC): Likewise. gcc/c-family: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * c-pragma.c (push_alignment): Use typed GC allocation. (handle_pragma_push_options): Likewise. * c-common.c (parse_optimize_options): Likewise. * c-common.h (struct sorted_fields_type): Add variable_size GTY option. gcc/cp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * typeck2.c (abstract_virtuals_error): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (register_specialization): Likewise. (add_pending_template): Likewise. (lookup_template_class): Likewise. (push_tinst_level): Likewise. * parser.c (cp_lexer_new_main): Likewise. (cp_lexer_new_from_tokens): Likewise. (cp_token_cache_new): Likewise. (cp_parser_context_new): Likewise. (cp_parser_new): Likewise. (cp_parser_nested_name_specifier_opt): Likewise. (cp_parser_template_id): Likewise. * name-lookup.c (binding_entry_make): Likewise. (binding_table_construct): Likewise. (binding_table_new): Likewise. (cxx_binding_make): Likewise. (pushdecl_maybe_friend): Likewise. (begin_scope): Likewise. (push_to_top_level): Likewise. * lex.c (init_reswords): Likewise. (retrofit_lang_decl): Likewise. (cxx_dup_lang_specific_decl): Likewise. (copy_lang_type): Likewise. (cxx_make_type): Likewise. * decl.c (make_label_decl): Likewise. (check_goto): Likewise. (start_preparsed_function): Likewise. (save_function_data): Likewise. * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise. * class.c (finish_struct_1): Likewise. * cp-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * parser.c (cp_parser_new): Update comment to not reference ggc_alloc. gcc/fortran: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * trans-types.c (gfc_get_nodesc_array_type): Use typed GC allocation. (gfc_get_array_type_bounds): Likewise. * trans-decl.c (gfc_allocate_lang_decl): Likewise. (gfc_find_module): Likewise. * f95-lang.c (pushlevel): Likewise. * trans.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. gcc/java: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation. * jcf-parse.c (java_parse_file): Likewise. (process_zip_dir): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise. * expr.c (add_type_assertion): Likewise. * decl.c (make_binding_level): Likewise. (java_dup_lang_specific_decl): Likewise. * constants.c (set_constant_entry): Likewise. (cpool_for_class): Likewise. * class.c (add_method_1): Likewise. (java_treetreehash_new): Likewise. * java-tree.h (struct lang_type): Add variable_size GTY option. (struct lang_decl): Likewise. * jch.h (struct cpool_entry): Likewise. * java-tree.h (java_treetreehash_create): Remove parameter ggc. * except.c (prepare_eh_table_type): Update java_treetreehash_create call. * class.c (add_method_1): Update java_treetreehash_create call. (java_treetreehash_create): Remove parameter gc. Use htab_create_ggc. gcc/lto: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * lto.c (lto_read_in_decl_state): Use typed GC allocation. (lto_file_read): Likewise. (new_partition): Likewise. (read_cgraph_and_symbols): Likewise. gcc/objc: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. * objc-act.c (objc_volatilize_decl): Likewise. (objc_build_string_object): Likewise. (hash_init): Likewise. (hash_enter): Likewise. (hash_add_attr): Likewise. (add_class): Likewise. (start_class): Likewise. gcc/objcp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC allocation. gcc: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * doc/tm.texi (Per-Function Data): Do not reference ggc_alloc. * doc/gty.texi (GTY Options): Document typed GC allocation and variable_size GTY option. * ggc-internal.h: New. * ggc.h: Update copyright year. (digit_string): Move to stringpool.c. (ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots) (gt_pch_save_stringpool, gt_pch_fixup_stringpool) (gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object) (init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size) (ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write) (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read) (ggc_force_collect, ggc_get_size, ggc_statistics) (ggc_print_common_statistics): Move to ggc-internal.h. (digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat) (ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW) (GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec) (ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic) (ggc_min_heapsize_heuristic, ggc_alloc_zone) (ggc_alloc_zone_pass_stat): Remove. (ggc_internal_alloc_stat, ggc_internal_alloc) (ggc_internal_cleared_alloc_stat): New. (GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine. (ggc_internal_vec_alloc_stat) (ggc_internal_cleared_vec_alloc_stat) (ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc) (ggc_alloc_atomic_stat, ggc_alloc_atomic) (ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args) (ggc_cleared_alloc_ptr_array_two_args): New. (htab_create_ggc, splay_tree_new_ggc): Redefine. (ggc_splay_alloc): Change the type of the first argument to enum gt_types_enum. (ggc_alloc_string): Make macro. (ggc_alloc_string_stat): New. (ggc_strdup): Redefine. (rtl_zone, tree_zone, tree_id_zone): Declare unconditionally. (ggc_alloc_rtvec_sized): New. (ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat) (ggc_internal_cleared_alloc_zone_stat) (ggc_internal_zone_alloc_stat) (ggc_internal_zone_cleared_alloc_stat) (ggc_internal_zone_vec_alloc_stat) (ggc_alloc_zone_rtx_def_stat) (ggc_alloc_zone_tree_node_stat) (ggc_alloc_zone_cleared_tree_node_stat) (ggc_alloc_cleared_gimple_statement_d_stat): New. * ggc-common.c: Include ggc-internal.h. (ggc_internal_cleared_alloc_stat): Rename from ggc_alloc_cleared_stat. (ggc_realloc_stat): Use ggc_internal_alloc_stat. (ggc_calloc): Remove. (ggc_cleared_alloc_htab_ignore_args): New. (ggc_cleared_alloc_ptr_array_two_args): New. (ggc_splay_alloc): Add obj_type parameter. (init_ggc_heuristics): Formatting fixes. * ggc-none.c: Update copyright year. (ggc_alloc_stat): Rename to ggc_alloc_stat. (ggc_alloc_cleared_stat): Rename to ggc_internal_cleared_alloc_stat. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-page.c: Update copyright year. Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_typed_stat): Call ggc_internal_alloc_stat. (ggc_alloc_stat): Rename to ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. (struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New. * ggc-zone.c: Include ggc-internal.h. Remove references to ggc_alloc in comments. (ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat. (ggc_internal_alloc_zone_pass_stat): New. (ggc_internal_cleared_alloc_zone_stat): New. (ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat. (ggc_alloc_stat): Rename ggc_internal_alloc_stat. (new_ggc_zone, destroy_ggc_zone): Remove. * stringpool.c: Update copyright year. Include ggc-internal.h (digit_vector): Make static. (digit_string): Moved from ggc.h. (stringpool_ggc_alloc): Use ggc_alloc_atomic. (ggc_alloc_string): Rename to ggc_alloc_string_stat. * Makefile.in (GGC_INTERNAL_H): New. (ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add $(GGC_INTERNAL_H) to dependencies. * gentype.c: Update copyright year. (walk_type): Accept variable_size GTY option. (USED_BY_TYPED_GC_P): New macro. (write_enum_defn): Use USED_BY_TYPED_GC_P. Do not output whitespace at the end of strings. (get_type_specifier, variable_size_p): New functions. (alloc_quantity, alloc_zone): New enums. (write_typed_alloc_def): New function. (write_typed_struct_alloc_def): Likewise. (write_typed_typed_typedef_alloc_def): Likewise. (write_typed_alloc_defns): Likewise. (output_typename, write_splay_tree_allocator_def): Likewise. (write_splay_tree_allocators): Likewise. (main): Call write_typed_alloc_defns and write_splay_tree_allocators. * lto-streamer.h (lto_file_decl_data_ptr): New. * passes.c (order): Define using cgraph_node_ptr. * strinpool.c (struct string_pool_data): Declare nested_ptr using ht_identifier_ptr. * gimple.h (union gimple_statement_d): Likewise. * rtl.h (struct rtx_def): Likewise. (struct rtvec_def): Likewise. * tree.h (union tree_node): Likewise. * tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise. * cfgloop.c (record_loop_exits): Use htab_create_ggc. * tree-scalar-evolution.c (scev_initialize): Likewise. * alias.c (record_alias_subset): Update splay_tree_new_ggc call. * dwarf2asm.c (dw2_force_const_mem): Likewise. * omp-low.c (lower_omp_critical): Likewise. * bitmap.h (struct bitmap_head_def): Update comment to not reference ggc_alloc. * config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC. * ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC. * ipa-prop.c (duplicate_ggc_array): Rename to duplicate_ipa_jump_func_array. Use typed GC allocation. (ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array. * gimple.c (gimple_alloc_stat): Use ggc_alloc_cleared_gimple_statement_d_stat. * varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def. * tree.c (make_node_stat): Use ggc_alloc_zone_cleared_tree_node_stat. (make_tree_vec_stat): Likewise. (build_vl_exp_stat): Likewise. (copy_node_stat): Use ggc_alloc_zone_tree_node_stat. (make_tree_binfo_stat): Likewise. (tree_cons_stat): Likewise. * rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat. (shallow_copy_rtx_stat): Likewise. (make_node_stat): Likewise. * lto-symtab.c: Fix comment. * tree-cfg.c (create_bb): Update comment to not reference ggc_alloc_cleared. * tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is value. * varpool.c (varpool_node): Use typed GC allocation. (varpool_extra_name_alias): Likewise. * varasm.c (emutls_decl): Likewise. (get_unnamed_section): Likewise. (get_noswitch_section): Likewise. (get_section): Likewise. (get_block_for_section): Likewise. (build_constant_desc): Likewise. (create_constant_pool): Likewise. (force_const_mem): Likewise. * tree.c (build_vl_exp_stat): Likewise. (build_real): Likewise. (build_string): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_insert): Likewise. (type_hash_add): Likewise. (build_omp_clause): Likewise. * tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise. * tree-ssa.c (init_tree_ssa): Likewise. * tree-ssa-structalias.c (heapvar_insert): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Likewise. * tree-ssa-loop-niter.c (record_estimate): Likewise. * tree-ssa-alias.c (get_ptr_info): Likewise. * tree-scalar-evolution.c (new_scev_info_str): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. * tree-iterator.c (tsi_link_before): Likewise. (tsi_link_after): Likewise. * tree-eh.c (add_stmt_to_eh_lp_fn): Likewise. * tree-dfa.c (create_var_ann): Likewise. * tree-cfg.c (create_bb): Likewise. * toplev.c (alloc_for_identifier_to_locale): Likewise. (general_init): Likewise. * stringpool.c (stringpool_ggc_alloc): Likewise. (gt_pch_save_stringpool): Likewise. * sese.c (if_region_set_false_region): Likewise. * passes.c (do_per_function_toporder): Likewise. * optabs.c (set_optab_libfunc): Likewise. (set_conv_libfunc): Likewise. * lto-symtab.c (lto_symtab_register_decl): Likewise. * lto-streamer-in.c (lto_input_eh_catch_list): Likewise. (input_eh_region): Likewise. (input_eh_lp): Likewise. (make_new_block): Likewise. (unpack_ts_real_cst_value_fields): Likewise. * lto-section-in.c (lto_new_in_decl_state): Likewise. * lto-cgraph.c (input_node_opt_summary): Likewise. * loop-init.c (loop_optimizer_init): Likewise. * lambda.h (lambda_vector_new): Likewise. * lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise. * ira.c (update_equiv_regs): Likewise. * ipa.c (cgraph_node_set_new): Likewise. (cgraph_node_set_add): Likewise. (varpool_node_set_new): Likewise. (varpool_node_set_add): Likewise. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise. (duplicate_ipa_jump_func_array): Likewise. (ipa_read_node_info): Likewise. * ipa-cp.c (ipcp_create_replace_map): Likewise. * integrate.c (get_hard_reg_initial_val): Likewise. * gimple.c (gimple_alloc_stat): Likewise. (gimple_build_omp_for): Likewise. (gimple_seq_alloc): Likewise. (gimple_copy): Likewise. * gimple-iterator.c (gsi_insert_before_without_update): Likewise. (gsi_insert_after_without_update): Likewise. * function.c (add_frame_space): Likewise. (insert_temp_slot_address): Likewise. (assign_stack_temp_for_type): Likewise. (allocate_struct_function): Likewise. (types_used_by_var_decl_insert): Likewise. * except.c (init_eh_for_function): Likewise. (gen_eh_region): Likewise. (gen_eh_region_catch): Likewise. (gen_eh_landing_pad): Likewise. (add_call_site): Likewise. * emit-rtl.c (get_mem_attrs): Likewise. (get_reg_attrs): Likewise. (start_sequence): Likewise. (init_emit): Likewise. * dwarf2out.c (new_cfi): Likewise. (queue_reg_save): Likewise. (dwarf2out_frame_init): Likewise. (new_loc_descr): Likewise. (find_AT_string): Likewise. (new_die): Likewise. (add_var_loc_to_decl): Likewise. (clone_die): Likewise. (clone_as_declaration): Likewise. (break_out_comdat_types): Likewise. (new_loc_list): Likewise. (loc_descriptor): Likewise. (add_loc_descr_to_each): Likewise. (add_const_value_attribute): Likewise. (tree_add_const_value_attribute): Likewise. (add_comp_dir_attribute): Likewise. (add_name_and_src_coords_attributes): Likewise. (lookup_filename): Likewise. (store_vcall_insn): Likewise. (dwarf2out_init): Likewise. * dbxout.c (dbxout_init): Likewise. * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. * config/sparc/sparc.c (sparc_init_machine_status): Likewise. * config/score/score7.c (score7_output_external): Likewise. * config/score/score3.c (score3_output_external): Likewise. * config/s390/s390.c (s390_init_machine_status): Likewise. * config/rs6000/rs6000.c (builtin_function_type): Likewise. (rs6000_init_machine_status): Likewise. (output_toc): Likewise. * config/pa/pa.c (pa_init_machine_status): Likewise. (get_deferred_plabel): Likewise. * config/moxie/moxie.c (moxie_init_machine_status): Likewise. * config/mmix/mmix.c (mmix_init_machine_status): Likewise. * config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise. * config/mep/mep.c (mep_init_machine_status): Likewise. (mep_note_pragma_flag): Likewise. * config/m32c/m32c.c (m32c_init_machine_status): Likewise. * config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise. * config/ia64/ia64.c (ia64_init_machine_status): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_maybe_record_exported_symbol): Likewise. * config/i386/i386.c (get_dllimport_decl): Likewise. (ix86_init_machine_status): Likewise. (assign_386_stack_local): Likewise. * config/frv/frv.c (frv_init_machine_status): Likewise. * config/darwin.c (machopic_indirection_name): Likewise. * config/cris/cris.c (cris_init_machine_status): Likewise. * config/bfin/bfin.c (bfin_init_machine_status): Likewise. * config/avr/avr.c (avr_init_machine_status): Likewise. * config/arm/arm.c (arm_init_machine_status): Likewise. * config/alpha/alpha.c (alpha_init_machine_status): Likewise. (alpha_need_linkage): Likewise. (alpha_use_linkage): Likewise. * cgraph.c (cgraph_allocate_node): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_create_indirect_edge): Likewise. (cgraph_add_asm_node): Likewise. * cfgrtl.c (init_rtl_bb_info): Likewise. * cfgloop.c (alloc_loop): Likewise. (rescan_loop_exit): Likewise. * cfg.c (init_flow): Likewise. (alloc_block): Likewise. (unchecked_make_edge): Likewise. * c-parser.c (c_parse_init): Likewise. (c_parse_file): Likewise. * c-decl.c (bind): Likewise. (record_inline_static): Likewise. (push_scope): Likewise. (make_label): Likewise. (lookup_label_for_goto): Likewise. (finish_struct): Likewise. (finish_enum): Likewise. (c_push_function_context): Likewise. * bitmap.c (bitmap_element_allocate): Likewise. (bitmap_gc_alloc_stat): Likewise. * alias.c (record_alias_subset): Likewise. (init_alias_analysis): Likewise. include: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * splay-tree.h: Update copyright years. (splay_tree_s): Document fields. (splay_tree_new_typed_alloc): New. * hashtab.h: Update copyright years. (htab_create_typed_alloc): New. libcpp: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * include/symtab.h (ht_identifier_ptr): New. libiberty: 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> * splay-tree.c: Update copyright years. (splay_tree_new_typed_alloc): New. (splay_tree_new_with_allocator): Use it. * hashtab.c: Update copyright years. (htab_create_typed_alloc): New. (htab_create_alloc): Use it. * functions.texi: Regenerate. From-SVN: r160425
2010-06-08 09:25:24 +02:00
replace_map = ggc_alloc_ipa_replace_map ();
const_val = build_const_val (lat, TREE_TYPE (parm_tree));
if (dump_file)
{
fprintf (dump_file, " replacing param ");
print_generic_expr (dump_file, parm_tree, 0);
fprintf (dump_file, " with const ");
print_generic_expr (dump_file, const_val, 0);
fprintf (dump_file, "\n");
}
replace_map->old_tree = parm_tree;
replace_map->new_tree = const_val;
replace_map->replace_p = true;
replace_map->ref_p = false;
return replace_map;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Return true if this callsite should be redirected to the original callee
(instead of the cloned one). */
static bool
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_need_redirect_p (struct cgraph_edge *cs)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
struct ipa_node_params *orig_callee_info;
int i, count;
struct cgraph_node *node = cs->callee, *orig;
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
if (!n_cloning_candidates)
return false;
if ((orig = ipcp_get_orig_node (node)) != NULL)
node = orig;
if (ipcp_get_orig_node (cs->caller))
return false;
orig_callee_info = IPA_NODE_REF (node);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
count = ipa_get_param_count (orig_callee_info);
for (i = 0; i < count; i++)
{
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
struct ipcp_lattice *lat = ipcp_get_lattice (orig_callee_info, i);
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
struct ipa_jump_func *jump_func;
jump_func = ipa_get_ith_jump_func (IPA_EDGE_REF (cs), i);
if ((ipcp_lat_is_const (lat)
&& jump_func->type != IPA_JF_CONST)
|| (!ipa_param_cannot_devirtualize_p (orig_callee_info, i)
&& !ipa_param_types_vec_empty (orig_callee_info, i)
&& jump_func->type != IPA_JF_CONST
&& jump_func->type != IPA_JF_KNOWN_TYPE))
return true;
}
return false;
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Fix the callsites and the call graph after function cloning was done. */
static void
ipcp_update_callgraph (void)
{
struct cgraph_node *node;
for (node = cgraph_nodes; node; node = node->next)
if (node->analyzed && ipcp_node_is_clone (node))
{
bitmap args_to_skip = BITMAP_ALLOC (NULL);
struct cgraph_node *orig_node = ipcp_get_orig_node (node);
struct ipa_node_params *info = IPA_NODE_REF (orig_node);
int i, count = ipa_get_param_count (info);
struct cgraph_edge *cs, *next;
for (i = 0; i < count; i++)
{
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
struct ipcp_lattice *lat = ipcp_get_lattice (info, i);
/* We can proactively remove obviously unused arguments. */
if (!ipa_is_param_used (info, i))
{
bitmap_set_bit (args_to_skip, i);
continue;
}
if (lat->type == IPA_CONST_VALUE)
bitmap_set_bit (args_to_skip, i);
}
for (cs = node->callers; cs; cs = next)
{
next = cs->next_caller;
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
if (!ipcp_node_is_clone (cs->caller) && ipcp_need_redirect_p (cs))
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
{
if (dump_file)
fprintf (dump_file, "Redirecting edge %s/%i -> %s/%i "
"back to %s/%i.",
cgraph_node_name (cs->caller), cs->caller->uid,
cgraph_node_name (cs->callee), cs->callee->uid,
cgraph_node_name (orig_node), orig_node->uid);
cgraph_redirect_edge_callee (cs, orig_node);
}
}
}
}
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
/* Update profiling info for versioned functions and the functions they were
versioned from. */
static void
ipcp_update_profiling (void)
{
struct cgraph_node *node, *orig_node;
gcov_type scale, scale_complement;
struct cgraph_edge *cs;
for (node = cgraph_nodes; node; node = node->next)
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
if (ipcp_node_is_clone (node))
{
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
orig_node = ipcp_get_orig_node (node);
scale = ipcp_get_node_scale (orig_node);
node->count = orig_node->count * scale / REG_BR_PROB_BASE;
scale_complement = REG_BR_PROB_BASE - scale;
orig_node->count =
orig_node->count * scale_complement / REG_BR_PROB_BASE;
for (cs = node->callees; cs; cs = cs->next_callee)
cs->count = cs->count * scale / REG_BR_PROB_BASE;
for (cs = orig_node->callees; cs; cs = cs->next_callee)
cs->count = cs->count * scale_complement / REG_BR_PROB_BASE;
}
}
}
/* If NODE was cloned, how much would program grow? */
static long
ipcp_estimate_growth (struct cgraph_node *node)
{
struct cgraph_edge *cs;
int redirectable_node_callers = 0;
int removable_args = 0;
bool need_original
= !cgraph_will_be_removed_from_program_if_no_direct_calls (node);
struct ipa_node_params *info;
int i, count;
int growth;
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
if (cs->caller == node || !ipcp_need_redirect_p (cs))
redirectable_node_callers++;
else
need_original = true;
/* If we will be able to fully replace orignal node, we never increase
program size. */
if (!need_original)
return 0;
info = IPA_NODE_REF (node);
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
{
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
struct ipcp_lattice *lat = ipcp_get_lattice (info, i);
/* We can proactively remove obviously unused arguments. */
if (!ipa_is_param_used (info, i))
removable_args++;
if (lat->type == IPA_CONST_VALUE)
removable_args++;
}
/* We make just very simple estimate of savings for removal of operand from
call site. Precise cost is dificult to get, as our size metric counts
constants and moves as free. Generally we are looking for cases that
small function is called very many times. */
cgraph.c (dump_cgraph_node): Dump size/time/benefit. * cgraph.c (dump_cgraph_node): Dump size/time/benefit. * cgraph.h (struct inline_summary): New filed self_wize, size_inlining_benefit, self_time and time_inlining_benefit. (struct cgraph_global_info): Replace insns by time ans size fields. * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size (ipcp_estimate_growth, ipcp_insert_stage): Likewise. (ipcp_update_callgraph): Do not touch function bodies. * ipa-inline.c: Include except.h (MAX_TIME): New constant. (overall_insns): Remove. (leaf_node_p): New. (overall_size, max_benefit): New static variables. (cgraph_estimate_time_after_inlining): New function. (cgraph_estimate_size_after_inlining): Rewrite using benefits. (cgraph_clone_inlined_nodes): Update size. (cgraph_mark_inline_edge): Update size. (cgraph_estimate_growth): Use size info. (cgraph_check_inline_limits): Check size. (cgraph_default_inline_p): Likewise. (cgraph_edge_badness): Compute badness based on benefit and size cost. (cgraph_decide_recursive_inlining): Check size. (cgraph_decide_inlining_of_small_function): Update size; dump sizes and times. (cgraph_decide_inlining): Likewise. (cgraph_decide_inlining_incrementally): Likewise; honor PARAM_EARLY_INLINING_INSNS. (likely_eliminated_by_inlining_p): New predicate. (estimate_function_body_sizes): New function. (compute_inline_parameters): Use it. * except.c (must_not_throw_labels): New function. * except.h (must_not_throw_labels): Declare. * tree-inline.c (init_inline_once): Kill inlining_weigths * tree-ssa-structalias.c: Avoid uninitialized warning. * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300. (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60. (PARAM_INLINE_CALL_COST): Remove. (PARAM_EARLY_INLINING_INSNS): New. From-SVN: r147852
2009-05-25 23:59:24 +02:00
growth = node->local.inline_summary.self_size
- removable_args * redirectable_node_callers;
if (growth < 0)
return 0;
return growth;
}
/* Estimate cost of cloning NODE. */
static long
ipcp_estimate_cloning_cost (struct cgraph_node *node)
{
int freq_sum = 1;
gcov_type count_sum = 1;
struct cgraph_edge *e;
int cost;
cost = ipcp_estimate_growth (node) * 1000;
if (!cost)
{
if (dump_file)
fprintf (dump_file, "Versioning of %s will save code size\n",
cgraph_node_name (node));
return 0;
}
for (e = node->callers; e; e = e->next_caller)
if (!bitmap_bit_p (dead_nodes, e->caller->uid)
&& !ipcp_need_redirect_p (e))
{
count_sum += e->count;
freq_sum += e->frequency + 1;
}
if (max_count)
cost /= count_sum * 1000 / max_count + 1;
else
cost /= freq_sum * 1000 / REG_BR_PROB_BASE + 1;
if (dump_file)
fprintf (dump_file, "Cost of versioning %s is %i, (size: %i, freq: %i)\n",
cgraph.c (dump_cgraph_node): Dump size/time/benefit. * cgraph.c (dump_cgraph_node): Dump size/time/benefit. * cgraph.h (struct inline_summary): New filed self_wize, size_inlining_benefit, self_time and time_inlining_benefit. (struct cgraph_global_info): Replace insns by time ans size fields. * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size (ipcp_estimate_growth, ipcp_insert_stage): Likewise. (ipcp_update_callgraph): Do not touch function bodies. * ipa-inline.c: Include except.h (MAX_TIME): New constant. (overall_insns): Remove. (leaf_node_p): New. (overall_size, max_benefit): New static variables. (cgraph_estimate_time_after_inlining): New function. (cgraph_estimate_size_after_inlining): Rewrite using benefits. (cgraph_clone_inlined_nodes): Update size. (cgraph_mark_inline_edge): Update size. (cgraph_estimate_growth): Use size info. (cgraph_check_inline_limits): Check size. (cgraph_default_inline_p): Likewise. (cgraph_edge_badness): Compute badness based on benefit and size cost. (cgraph_decide_recursive_inlining): Check size. (cgraph_decide_inlining_of_small_function): Update size; dump sizes and times. (cgraph_decide_inlining): Likewise. (cgraph_decide_inlining_incrementally): Likewise; honor PARAM_EARLY_INLINING_INSNS. (likely_eliminated_by_inlining_p): New predicate. (estimate_function_body_sizes): New function. (compute_inline_parameters): Use it. * except.c (must_not_throw_labels): New function. * except.h (must_not_throw_labels): Declare. * tree-inline.c (init_inline_once): Kill inlining_weigths * tree-ssa-structalias.c: Avoid uninitialized warning. * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300. (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60. (PARAM_INLINE_CALL_COST): Remove. (PARAM_EARLY_INLINING_INSNS): New. From-SVN: r147852
2009-05-25 23:59:24 +02:00
cgraph_node_name (node), cost, node->local.inline_summary.self_size,
freq_sum);
return cost + 1;
}
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
/* Walk indirect calls of NODE and if any polymorphic can be turned into a
direct one now, do so. */
static void
ipcp_process_devirtualization_opportunities (struct cgraph_node *node)
{
struct ipa_node_params *info = IPA_NODE_REF (node);
struct cgraph_edge *ie, *next_ie;
for (ie = node->indirect_calls; ie; ie = next_ie)
{
int param_index, types_count, j;
HOST_WIDE_INT token;
tree target;
next_ie = ie->next_callee;
if (!ie->indirect_info->polymorphic)
continue;
param_index = ie->indirect_info->param_index;
if (param_index == -1
|| ipa_param_cannot_devirtualize_p (info, param_index)
|| ipa_param_types_vec_empty (info, param_index))
continue;
token = ie->indirect_info->otr_token;
target = NULL_TREE;
types_count = VEC_length (tree, info->params[param_index].types);
for (j = 0; j < types_count; j++)
{
tree binfo = VEC_index (tree, info->params[param_index].types, j);
tree t = gimple_fold_obj_type_ref_known_binfo (token, binfo);
if (!t)
{
target = NULL_TREE;
break;
}
else if (!target)
target = t;
else if (target != t)
{
target = NULL_TREE;
break;
}
}
if (target)
ipa_make_edge_direct_to_target (ie, target);
}
}
/* Return number of live constant parameters. */
static int
ipcp_const_param_count (struct cgraph_node *node)
{
int const_param = 0;
struct ipa_node_params *info = IPA_NODE_REF (node);
int count = ipa_get_param_count (info);
int i;
for (i = 0; i < count; i++)
{
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
struct ipcp_lattice *lat = ipcp_get_lattice (info, i);
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
if ((ipcp_lat_is_insertable (lat)
/* Do not count obviously unused arguments. */
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
&& ipa_is_param_used (info, i))
|| (!ipa_param_cannot_devirtualize_p (info, i)
&& !ipa_param_types_vec_empty (info, i)))
const_param++;
}
return const_param;
}
/* Propagate the constant parameters found by ipcp_iterate_stage()
to the function's code. */
static void
ipcp_insert_stage (void)
{
struct cgraph_node *node, *node1 = NULL;
int i;
VEC (cgraph_edge_p, heap) * redirect_callers;
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
VEC (ipa_replace_map_p,gc)* replace_trees;
int node_callers, count;
tree parm_tree;
struct ipa_replace_map *replace_param;
fibheap_t heap;
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
long overall_size = 0, new_size = 0;
long max_new_size;
ipa_check_create_node_params ();
ipa_check_create_edge_args ();
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
if (dump_file)
fprintf (dump_file, "\nIPA insert stage:\n\n");
dead_nodes = BITMAP_ALLOC (NULL);
for (node = cgraph_nodes; node; node = node->next)
if (node->analyzed)
{
if (node->count > max_count)
max_count = node->count;
cgraph.c (dump_cgraph_node): Dump size/time/benefit. * cgraph.c (dump_cgraph_node): Dump size/time/benefit. * cgraph.h (struct inline_summary): New filed self_wize, size_inlining_benefit, self_time and time_inlining_benefit. (struct cgraph_global_info): Replace insns by time ans size fields. * ipa-cp (ipcp_cloning_candidate_p): Base estimate on size (ipcp_estimate_growth, ipcp_insert_stage): Likewise. (ipcp_update_callgraph): Do not touch function bodies. * ipa-inline.c: Include except.h (MAX_TIME): New constant. (overall_insns): Remove. (leaf_node_p): New. (overall_size, max_benefit): New static variables. (cgraph_estimate_time_after_inlining): New function. (cgraph_estimate_size_after_inlining): Rewrite using benefits. (cgraph_clone_inlined_nodes): Update size. (cgraph_mark_inline_edge): Update size. (cgraph_estimate_growth): Use size info. (cgraph_check_inline_limits): Check size. (cgraph_default_inline_p): Likewise. (cgraph_edge_badness): Compute badness based on benefit and size cost. (cgraph_decide_recursive_inlining): Check size. (cgraph_decide_inlining_of_small_function): Update size; dump sizes and times. (cgraph_decide_inlining): Likewise. (cgraph_decide_inlining_incrementally): Likewise; honor PARAM_EARLY_INLINING_INSNS. (likely_eliminated_by_inlining_p): New predicate. (estimate_function_body_sizes): New function. (compute_inline_parameters): Use it. * except.c (must_not_throw_labels): New function. * except.h (must_not_throw_labels): Declare. * tree-inline.c (init_inline_once): Kill inlining_weigths * tree-ssa-structalias.c: Avoid uninitialized warning. * params.def (PARAM_MAX_INLINE_INSNS_SINGLE): Reduce to 300. (PARAM_MAX_INLINE_INSNS_AUTO): Reduce to 60. (PARAM_INLINE_CALL_COST): Remove. (PARAM_EARLY_INLINING_INSNS): New. From-SVN: r147852
2009-05-25 23:59:24 +02:00
overall_size += node->local.inline_summary.self_size;
}
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
max_new_size = overall_size;
if (max_new_size < PARAM_VALUE (PARAM_LARGE_UNIT_INSNS))
max_new_size = PARAM_VALUE (PARAM_LARGE_UNIT_INSNS);
max_new_size = max_new_size * PARAM_VALUE (PARAM_IPCP_UNIT_GROWTH) / 100 + 1;
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
/* First collect all functions we proved to have constant arguments to
heap. */
heap = fibheap_new ();
for (node = cgraph_nodes; node; node = node->next)
{
struct ipa_node_params *info;
/* Propagation of the constant is forbidden in certain conditions. */
if (!node->analyzed || !ipcp_node_modifiable_p (node))
continue;
info = IPA_NODE_REF (node);
if (ipa_is_called_with_var_arguments (info))
continue;
if (ipcp_const_param_count (node))
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
node->aux = fibheap_insert (heap, ipcp_estimate_cloning_cost (node),
node);
}
/* Now clone in priority order until code size growth limits are met or
heap is emptied. */
while (!fibheap_empty (heap))
{
struct ipa_node_params *info;
int growth = 0;
bitmap args_to_skip;
struct cgraph_edge *cs;
node = (struct cgraph_node *)fibheap_extract_min (heap);
node->aux = NULL;
if (dump_file)
fprintf (dump_file, "considering function %s\n",
cgraph_node_name (node));
growth = ipcp_estimate_growth (node);
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
if (new_size + growth > max_new_size)
break;
if (growth
loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. * loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. * tree-ssa-threadupdate.c (mark_threaded_blocks): Use optimize_function_for_size_p. * tracer.c (ignore_bb_p): Use optimize_bb_for_size_p. * postreload-gcse.c (eliminate_partially_redundant_load): Use optimize_bb_for_size_p. * value-prof.c (gimple_divmod_fixed_value_transform, gimple_mod_pow2_value_transform, gimple_mod_subtract_transform, gimple_stringops_transform): Use optimize_bb_for_size_p. * ipa-cp.c (ipcp_insert_stage): Use optimize_function_for_size_p. * final.c (compute_alignments): Use optimize_function_for_size_p. * builtins.c (fold_builtin_cabs): Use optimize_function_for_speed_p. (fold_builtin_strcpy, fold_builtin_fputs): Use optimize_function_for_size_p. * fold-const.c (tree_swap_operands_p): Use optimize_function_for_size_p. * recog.c (relax_delay_slots): Likewise. * tree-ssa-math-opts.c (replace_reciprocal): Use optimize_bb_for_speed_p. (execute_cse_reciprocals): Use optimize_bb_for_size_p. * ipa-inline.c (cgraph_decide_recursive_inlining): Use optimize_function_for_size_p. (cgraph_decide_inlining_of_small_function): Use optimize_function_for_size_p. * global.c (find_reg): Use optimize_function_for_size_p. * opts.c (decode_options): Do not clear flag_tree_ch, flag_inline_functions, flag_unswitch_loops, flag_unroll_loops, flag_unroll_all_loops and flag_prefetch_loop_arrays. Those can work it out from profile. * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely): Use optimize_loop_for_speed_p. * predict.c (optimize_bb_for_size_p, optimize_bb_for_speed_p): Constify argument. (optimize_loop_nest_for_size_p, optimize_loop_nest_for_speed_p): New. * tree-parloops.c (parallelize_loops): Use optimize_loop_for_size_p. * tree-eh.c (decide_copy_try_finally): Use optimize_function_for_size_p. * local-alloc.c (block_alloc): Pass BB pointer. (find_free_reg): Add BB pointer, use optimize_bb_for_size_p. * gcse.c (gcse_main): Use optimize_function_for_size_p. * loop-unroll.c (decide_unrolling_and_peeling): Use optimize_loop_for_size_p. (decide_peel_completely): Likewise. * tree-vect-analyze.c (vect_mark_for_runtime_alias_test): Use optimize_loop_for_size_p. (vect_enhance_data_refs_alignment): Likewise. * tree-ssa-coalesce.c (coalesce_cost): Add optimize_for_size argument. (coalesce_cost_bb, coalesce_cost_edge, create_outofssa_var_map): Update call. * cfgcleanup.c (outgoing_edges_match): Use optimize_bb_for_speed_p. (try_crossjump_bb): Use optimize_bb_for_size_p. * tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Use optimize_loop_for_speed_p. * bb-reorder.c (find_traces_1_round): Likewise. (copy_bb): Use optimize_bb_for_speed_p. (duplicate_computed_gotos): Likewise. * basic-block.h (optimize_loop_nest_for_size_p, optimize_loop_nest_for_speed_p): New. * stmt.c (expand_case): Use optimize_insn_for_size_p. From-SVN: r139760
2008-08-29 12:35:57 +02:00
&& optimize_function_for_size_p (DECL_STRUCT_FUNCTION (node->decl)))
{
if (dump_file)
fprintf (dump_file, "Not versioning, cold code would grow");
continue;
}
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
new_size += growth;
/* Look if original function becomes dead after clonning. */
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
if (cs->caller == node || ipcp_need_redirect_p (cs))
break;
if (!cs && cgraph_will_be_removed_from_program_if_no_direct_calls (node))
bitmap_set_bit (dead_nodes, node->uid);
info = IPA_NODE_REF (node);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
count = ipa_get_param_count (info);
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
replace_trees = VEC_alloc (ipa_replace_map_p, gc, 1);
args_to_skip = BITMAP_GGC_ALLOC ();
for (i = 0; i < count; i++)
{
ipa-prop.h (struct ipa_param_flags): Removed. 2008-09-11 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (struct ipa_param_flags): Removed. (struct ipa_param_descriptor): New structure. (struct ipa_node_params): ipcp_lattices, param_decls and param_flags moved to ipa_param_description. (ipa_get_ith_param): Renamed to ipa_get_param, changed to access descriptors. Renamed all users. (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified, changed to access descriptors. Renamed all users. (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed to access descriptors. Renamed all users. * ipa-cp.c (ipcp_init_cloned_node): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. (ipcp_analyze_node): Likewise. (ipcp_get_ith_lattice): Renamed to ipcp_get_lattice, changed to access descriptors. Renamed all users. (ipcp_initialize_node_lattices): Remove allocation. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call ipa_initialize_node_params instead of ipa_count_formal_params and ipa_create_param_decls_array. * ipa-prop.c (ipa_create_param_decls_array): Renamed to ipa_populate_param_decls, made static, added parameter info, renamed mt to node, removed allocation, changed to use descriptors. (ipa_count_formal_params): Made static, added parameter info, renamed mt to node. (ipa_initialize_node_params): New function. (ipa_check_stmt_modifications): Changed to use descriptors. (ipa_detect_param_modifications): Removed allocation, changed to use descriptors. (ipa_note_param_call): Changed to use descriptors. (ipa_analyze_params_uses): Removed allocation. (ipa_free_node_params_substructures): Changed to use descriptors. (ipa_edge_duplication_hook): Use the unused attribute. (ipa_node_duplication_hook): Use the unused attribute, changed to use descriptors, changed to duplicate descriptors. * ipa-inline.c (cgraph_mark_inline_edge): New parameter new_edges, changed all callers. Call ipa_propagate_indirect_call_infos if doing indirect inlining. Made static. (cgraph_decide_inlining): Freeing ipa-prop structures after inlining functions called only once. (cgraph_decide_recursive_inlining): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining_of_small_functions): Don't call ipa_propagate_indirect_call_infos, pass new_edges to cgraph_mark_inline_edge instead. (cgraph_decide_inlining): Don't call ipa_propagate_indirect_call_infos. * ipa-prop.c: Check that vectors are allocated. * ipa-inline.c (cgraph_mark_inline_edge): Returns boolean, true iff a new cgraph edges have been created. (cgraph_decide_inlining): New variable redo_always_inline. Flattening and always_inlining loop until callgraph stabilizes. * ipa-prop.c (update_call_notes_after_inlining): Returns boolean, true iff new cgraph edges have been created. (propagate_info_to_inlined_callees): Likewise. (ipa_propagate_indirect_call_infos): Likewise. From-SVN: r140293
2008-09-11 19:03:23 +02:00
struct ipcp_lattice *lat = ipcp_get_lattice (info, i);
parm_tree = ipa_get_param (info, i);
/* We can proactively remove obviously unused arguments. */
if (!ipa_is_param_used (info, i))
{
bitmap_set_bit (args_to_skip, i);
continue;
}
if (lat->type == IPA_CONST_VALUE)
{
replace_param =
ipcp_create_replace_map (parm_tree, lat);
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
VEC_safe_push (ipa_replace_map_p, gc, replace_trees, replace_param);
bitmap_set_bit (args_to_skip, i);
}
}
/* Compute how many callers node has. */
node_callers = 0;
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
node_callers++;
redirect_callers = VEC_alloc (cgraph_edge_p, heap, node_callers);
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
VEC_quick_push (cgraph_edge_p, redirect_callers, cs);
/* Redirecting all the callers of the node to the
new versioned node. */
node1 =
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
cgraph_create_virtual_clone (node, redirect_callers, replace_trees,
args_to_skip, "constprop");
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
args_to_skip = NULL;
VEC_free (cgraph_edge_p, heap, redirect_callers);
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
replace_trees = NULL;
if (node1 == NULL)
continue;
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
ipcp_process_devirtualization_opportunities (node1);
if (dump_file)
fprintf (dump_file, "versioned function %s with growth %i, overall %i\n",
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
cgraph_node_name (node), (int)growth, (int)new_size);
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_init_cloned_node (node, node1);
cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. * cgraphbuild.c (compute_call_stmt_bb_frequency): Accept function argument; handle correctly when profile is absent. (build_cgraph_edges): Update. (rebuild_cgraph_edges): Update. * cgraph.c: Do not include varrau.h (cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones): New function (cgraph_update_edges_for_call_stmt_node): New stati cfunction. (cgraph_update_edges_for_call_stmt): Handle clones. (cgraph_remove_node): Handle clone tree. (cgraph_remove_node_and_inline_clones): New function. (dump_cgraph_node): Dump clone tree. (cgraph_clone_node): Handle clone tree. (clone_function_name): Bring here from tree-inline.c (cgraph_create_virtual_clone): New function. * cgraph.h (ipa_replace_map): Move ehre from ipa.h (cgraph_clone_info): New function (strut cgraph_node): Add clone_info and new clone tree pointers. (cgraph_remove_node_and_inline_clones, cgraph_set_call_stmt_including_clones, cgraph_create_edge_including_clones, cgraph_create_virtual_clone): Declare. (cgraph_function_versioning): Use VEC argument. (compute_call_stmt_bb_frequency): Update prototype. (cgraph_materialize_all_clones): New function. * ipa-cp.c (ipcp_update_cloned_node): Remove. (ipcp_create_replace_map): Update to VECtors. (ipcp_update_callgraph): Use virtual clones. (ipcp_update_bb_counts, ipcp_update_edges_counts): Remove. (ipcp_update_profiling): Do not update local profiling. (ipcp_insert_stage): Use VECtors and virtual clones. * cgraphunit.c (verify_cgraph_node): Verify clone tree. (clone_of_p): New function. (cgraph_preserve_function_body_p): Use clone tree. (cgraph_optimize): Materialize clones. (cgraph_function_versioning): Update for VECtors. (save_inline_function_body): Use clone tree. (cgraph_materialize_clone, cgraph_materialize_all_clones): New functions. * ipa-inline.c (cgraph_default_inline_p): Use analyzed flags. * ipa.c: Include gimple.h. (cgraph_remove_unreachable_nodes): Use clone tree. * ipa-prop.c (ipa_note_param_call): Update call of compute_call_stmt_bb_frequency. * ipa-prop.h (ipa_replace_map): Move to cgraph.h. * tree-inline.c: Do not include varray.h; do not include gt-tree-inline.h (copy_bb): Handle updating of clone tree; add new edge when new call appears. (expand_call_inline): Be strict about every call having edge. (clone_fn_id_num, clone_function_name): Move to cgraph.c. (delete_unreachable_blocks_update_callgraph): New function. (tree_function_versioning): Use VECtors; always remove unreachable blocks and fold conditionals. * tree-inline.h: Do not include varray.h (tree_function_versioning): Remove. * Makefile.in (GTFILES): Remove tree-inline.c * passes.c (do_per_function): Do only functions having body. * ipa-struct-reorg.c (do_reorg_1, collect_data_accesses): Handle cone tree. From-SVN: r147294
2009-05-08 21:19:51 +02:00
/* TODO: We can use indirect inlning info to produce new calls. */
cgraph.c (first_cgraph_function_insertion_hook): New variable. * cgraph.c (first_cgraph_function_insertion_hook): New variable. (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. From-SVN: r139389
2008-08-21 17:26:59 +02:00
if (dump_file)
dump_function_to_file (node1->decl, dump_file, dump_flags);
for (cs = node->callees; cs; cs = cs->next_callee)
if (cs->callee->aux)
{
fibheap_delete_node (heap, (fibnode_t) cs->callee->aux);
cs->callee->aux = fibheap_insert (heap,
ipcp_estimate_cloning_cost (cs->callee),
cs->callee);
}
}
while (!fibheap_empty (heap))
{
if (dump_file)
fprintf (dump_file, "skipping function %s\n",
cgraph_node_name (node));
node = (struct cgraph_node *) fibheap_extract_min (heap);
node->aux = NULL;
}
fibheap_delete (heap);
BITMAP_FREE (dead_nodes);
ipcp_update_callgraph ();
ipcp_update_profiling ();
}
/* The IPCP driver. */
static unsigned int
ipcp_driver (void)
{
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
cgraph_remove_unreachable_nodes (true,dump_file);
if (dump_file)
{
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
fprintf (dump_file, "\nIPA structures before propagation:\n");
if (dump_flags & TDF_DETAILS)
ipa_print_all_params (dump_file);
ipa_print_all_jump_functions (dump_file);
}
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
/* 2. Do the interprocedural propagation. */
ipcp_iterate_stage ();
/* 3. Insert the constants found to the functions. */
ipcp_insert_stage ();
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "\nProfiling info after insert stage:\n");
ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. 2008-05-06 Martin Jambor <mjambor@suse.cz> * ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node. (ipcp_method_is_cloned): Renamed to ipcp_node_is_clone (ipcp_method_set_orig_node): Removed. (ipcp_cval_get_cvalue_type): Removed. (ipcp_method_get_scale): Renamed to ipcp_get_node_scale. (ipcp_method_set_scale): Renamed to ipcp_set_node_scale. (ipcp_cval_set_cvalue_type): Removed. (ipcp_cval_get_cvalue): Removed. (ipcp_cval_set_cvalue): Removed. (ipcp_type_is_const): Renamed to ipcp_lat_is_const. (ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal (ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's (ipcp_cval_meet): Renamed to ipa_lattice_meet (ipcp_cval_changed): Changed to use ipcp_lat_is_const (ipcp_method_cval): Renamed to ipcp_get_ith_lattice (ipcp_get_ith_lattice): Changed parameters. (ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc (ipcp_lattice_from_jfunc): Changed parameters. (ipcp_redirect): Local lattice pointer instead of lattice type variable. (ipcp_method_cval_print): Added temporary variable info. (ipcp_redirect): Removed already unused local variable caller. (ipcp_redirect): New temporary variable orig_callee_info (ipcp_redirect): Removed newly unused local variable callee. (ipcp_redirect): Removed (a bit confusing) local variable type. (ipcp_insert_stage): Added local variable info. (ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters renamed too (ipcp_formal_create): Removed. (ipcp_method_cval_set): Removed. (ipcp_propagate_stage): Renamed lattice variables. (ipcp_method_cval_set_cvalue_type): Removed. (ipcp_method_cval_print): Renamed to ipcp_print_all_lattices (ipcp_print_all_lattices): Changed printed strings to refer to lattices rather than cvals. (ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices (ipcp_propagate_const): Changed formal parameters. (build_const_val): Changed formal parameters. (ipcp_insert_stage): Removed useless variable cvalue (build_const_val): Changed formal parameters. (ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale (ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom (ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions (ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts (ipcp_print_func_profile_counts): Changed string from "method" to "function" (ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts (ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles (ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles (ipcp_structures_print): Renamed to ipcp_print_all_structures (ipcp_profile_print): Renamed to ipcp_print_profile_data (ipcp_lat_is_const): Changed parameters and made inline. (ipcp_replace_map_create): Renamed to ipcp_create_replace_map (ipcp_redirect): Renamed to ipcp_need_redirect_p (ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using the predicate condition directly (ipcp_propagate_stage): Added local variable args. Removed local variable callee. (Both are mere code simplifications.) (ipcp_method_dont_insert_const): Renamed to ipcp_node_not_modifiable_p. (ipcp_node_not_modifiable_p): Made inline. (ipcp_cloned_create): Renamed to ipcp_init_cloned_node (ipcp_propagate_const): Renamed to ipcp_propagate_one_const (ipcp_print_all_lattices): Removed variable cvalue (ipcp_method_scale_print): Renamed to ipcp_function_scale_print Updated comments. From-SVN: r134984
2008-05-06 16:15:18 +02:00
ipcp_print_profile_data (dump_file);
}
/* Free all IPCP structures. */
cgraph.h (struct cgraph_node): New field indirect_calls. 2010-04-28 Martin Jambor <mjambor@suse.cz> * cgraph.h (struct cgraph_node): New field indirect_calls. (struct cgraph_indirect_call_info): New type. (struct cgraph_edge): Removed field indirect_call. New fields indirect_info, indirect_inlining_edge and indirect_unknown_callee. (cgraph_create_indirect_edge): Declare. (cgraph_make_edge_direct): Likewise. (enum LTO_cgraph_tags): New item LTO_cgraph_indirect_edge. * ipa-prop.h (struct ipa_param_call_note): Removed. (struct ipa_node_params): Removed field param_calls. (ipa_create_all_structures_for_iinln): Declare. * cgraph.c: Described indirect edges and uids in initial comment. (cgraph_add_edge_to_call_site_hash): New function. (cgraph_edge): Search also among the indirect edges, use cgraph_add_edge_to_call_site_hash to add edges to the call site hash. (cgraph_set_call_stmt): Possibly turn an indirect edge into a direct one, use cgraph_add_edge_to_call_site_hash to add edges to the call site hash. (initialize_inline_failed): Assign a reason to indirect edges. (cgraph_create_edge_1): New function. (cgraph_create_edge): Moved some functionality to cgraph_create_edge_1. (cgraph_create_indirect_edge): New function. (cgraph_edge_remove_callee): Add an assert checking for non-indirectness. (cgraph_edge_remove_caller): Special-case indirect edges. (cgraph_remove_edge): Likewise. (cgraph_set_edge_callee): New function. (cgraph_redirect_edge_callee): Use cgraph_set_edge_callee. (cgraph_make_edge_direct): New function. (cgraph_update_edges_for_call_stmt_node): Do nothing only when also the declaration of the call statement matches. (cgraph_node_remove_callees): Special-case indirect edges. (cgraph_clone_edge): Likewise. (cgraph_clone_node): Clone also the indirect edges. (dump_cgraph_node): Dump indirect_inlining_edge flag instead of indirect_call, dump count of indirect_calls edges. * ipa-prop.c (iinlining_processed_edges): New variable. (ipa_note_param_call): Create indirect edges instead of creating notes. New parameter node. (ipa_analyze_call_uses): New parameter node, pass it on to ipa_note_param_call. (ipa_analyze_stmt_uses): Likewise. (ipa_analyze_params_uses): Pass node to ipa_analyze_stmt_uses. (print_edge_addition_message): Work on edges rather than on notes. (update_call_notes_after_inlining): Likewise, renamed to update_indirect_edges_after_inlining. (ipa_create_all_structures_for_iinln): New function. (ipa_free_node_params_substructures): Do not free notes. (ipa_edge_duplication_hook): Propagate bits within iinlining_processed_edges bitmap. (ipa_node_duplication_hook): Do not duplicate notes. (free_all_ipa_structures_after_ipa_cp): Renamed to ipa_free_all_structures_after_ipa_cp. (free_all_ipa_structures_after_iinln): Renamed to ipa_free_all_structures_after_iinln.g (ipa_write_param_call_note): Removed. (ipa_read_param_call_note): Removed. (ipa_write_indirect_edge_info): New function. (ipa_read_indirect_edge_info): Likewise. (ipa_write_node_info): Do not stream notes, do stream information in indirect edges. (ipa_read_node_info): Likewise. (lto_ipa_fixup_call_notes): Removed. * ipa-cp.c (pass_ipa_cp): Set stmt_fixup to NULL. * ipa-inline.c (pass_ipa_inline): Likewise. * cgraphunit.c (verify_cgraph_node): Check also indirect edges. * cif-code.def (INDIRECT_UNKNOWN_CALL): New reason. * tree-inline.c (copy_bb): Removed an unnecessary double check for is_gimple_call. * tree-inline.c (get_indirect_callee_fndecl): Do not consider indirect edges. * lto-cgraph.c (output_outgoing_cgraph_edges): New function. (output_cgraph): Stream also indirect edges. (lto_output_edge): Added capability to stream indirect edges. (input_edge): Likewise. (input_cgraph_1): Likewise. * testsuite/gcc.dg/lto/20091209-1_0.c: New testcase. From-SVN: r158827
2010-04-28 16:05:54 +02:00
ipa_free_all_structures_after_ipa_cp ();
if (dump_file)
fprintf (dump_file, "\nIPA constant propagation end\n");
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
return 0;
}
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
/* Initialization and computation of IPCP data structures. This is the initial
intraprocedural analysis of functions, which gathers information to be
propagated later on. */
cgraph.c (first_cgraph_function_insertion_hook): New variable. * cgraph.c (first_cgraph_function_insertion_hook): New variable. (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. From-SVN: r139389
2008-08-21 17:26:59 +02:00
static void
ipcp_generate_summary (void)
{
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
struct cgraph_node *node;
cgraph.c (first_cgraph_function_insertion_hook): New variable. * cgraph.c (first_cgraph_function_insertion_hook): New variable. (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. From-SVN: r139389
2008-08-21 17:26:59 +02:00
if (dump_file)
fprintf (dump_file, "\nIPA constant propagation start:\n");
ipa_check_create_node_params ();
ipa_check_create_edge_args ();
ipa_register_cgraph_hooks ();
ipa-prop.h (enum ipa_lattice_type): Changed comments. 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
2010-08-05 15:23:07 +02:00
for (node = cgraph_nodes; node; node = node->next)
if (node->analyzed)
{
/* Unreachable nodes should have been eliminated before ipcp. */
gcc_assert (node->needed || node->reachable);
node->local.versionable = tree_versionable_function_p (node->decl);
ipa_analyze_node (node);
}
cgraph.c (first_cgraph_function_insertion_hook): New variable. * cgraph.c (first_cgraph_function_insertion_hook): New variable. (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. From-SVN: r139389
2008-08-21 17:26:59 +02:00
}
ipa-cp.c (ipcp_write_summary, [...]): New functions. * ipa-cp.c (ipcp_write_summary, ipcp_read_summary): New functions. (pass_ipa_cp): Register them. (ipcp_init_stage): Analyze all functions for whopr/lto. (ipcp_propagate_stage): Skip external calls. (ipcp_iterate_stage): Call ipa_update_after_lto_read if needed. * ipa-reference.c (write_node_summary_p): Fix thinko about availability. * cgraphunit.c (ipa_passes): When in lto, ne er produce new summaries; when in ltrans, skip executing of ipa passes since everything should've been done. * ipa-inline.c (cgraph_decide_inlining): Remove FIXMEs. (inline_generate_summary): Likewise. (inline_read_summary): New function. (inline_write_summary): New function. (pass_ipa_inline): Register new hooks. * ipa-prop.c: Inlcude lto-streamer.h (ipa_edge_args_vector): Update declaration. (ipa_count_arguments, ipa_compute_jump_functions, ipa_free_edge_args_substructures): Move ipa_edge_args_vector into ggc. (ipa_write_jump_function, ipa_read_jump_function, ipa_write_node_info, ipa_read_node_info): New static functions. (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Update. (duplicate_array): Use xmalloc. (duplicate_ggc_array): New. (ipa_edge_duplication_hook): Use it. (ipa_update_after_lto_read): New function. * ipa-prop.h (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Declare. (ipa_pass_through_data, ipa_ancestor_jf_data, ipa_member_ptr_cst, jump_func_value, ipa_member_ptr_cst, ipa_edge_args): Add GTY markers. (ipa_edge_args_vector): Move into GGC. (ipa_check_create_edge_args): Update. (ipa_update_after_lto_read): New. * passes.c (ipa_write_summaries_1): When in wpa, do not write summaries. (ipa_read_summaries): When in ltrans, so not read summaries. * lto-streamer.c (lto_get_section_name): Add LTO_section_jump_functions. * lto-streamer.h (LTO_section_jump_functions): New section. (produce_asm): Declare. * lto-cgraph.c (output_cgraph): Output edges in reverse order. * lto-streamer-out.c (produce_asm): Export. * lto-streamer-in.c: Include tree-pass.h (input_function): Free dominance info when done. (lto_read_body): Push ipa_inline in ltrans stage. * gengtype.c (open_base_files): Add ipa-prop.h into includes. * Makefile.in (GTFILES): Add ipa-prop.h * lto.c (lto_fixup_jump_functions): New function. (lto_fixup_decls): Use it. From-SVN: r153449
2009-10-22 12:02:29 +02:00
/* Write ipcp summary for nodes in SET. */
static void
* lto-symtab.c (lto_symtab_entry_def) Add vnode. (lto_varpool_replace_node): New. (lto_symtab_resolve_symbols): Resolve varpool nodes. (lto_symtab_merge_decls_1): Prefer decls with varpool node. (lto_symtab_merge_cgraph_nodes_1): Merge varpools. * cgraph.h (varpool_node_ptr): New type. (varpool_node_ptr): New vector. (varpool_node_set_def): New structure. (varpool_node_set): New type. (varpool_node_set): New vector. (varpool_node_set_element_def): New structure. (varpool_node_set_element, const_varpool_node_set_element): New types. (varpool_node_set_iterator): New type. (varpool_node): Add prev pointers, add used_from_other_partition, in_other_partition. (varpool_node_set_new, varpool_node_set_find, varpool_node_set_add, varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set, varpool_get_node, varpool_remove_node): Declare. (vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p, varpool_node_set_size): New inlines. * cgraph.c (dump_cgraph_node): Dump asm names of aliases. * tree-pass.h (varpool_node_set_def): Forward declare. (ipa_opt_pass_d): Summary writting takes vnode sets too. (ipa_write_optimization_summaries): Update prototype. * ipa-cp.c (ipcp_write_summary): Update. * ipa-reference.c (ipa_reference_write_summary): Update. * lto-cgraph.c (lto_output_varpool_node): New static function. (output_varpool): New function. (input_varpool_node): New static function. (input_varpool_1): New function. (input_cgraph): Input varpool. * ipa-pure-const.c (pure_const_write_summary): Update. * lto-streamer-out.c (lto_output): Update, output varpool too. (write_global_stream): Kill WPA hack. (produce_asm_for_decls): Update. (output_alias_pair_p): Handle variables. (output_unreferenced_globals): Output only needed partition of varpool. * ipa-inline.c (inline_write_summary): Update. * lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph. * lto-section-in.c (lto_section_name): Add varpool and jump funcs. * ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element, varpool_node_set_new, varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set, debug_varpool_node_set): New functions. * passes.c (rest_of_decl_compilation): when in LTO do not finalize. (execute_one_pass): Process new decls too. (ipa_write_summaries_2): Pass around vsets. (ipa_write_summaries_1): Likewise. (ipa_write_summaries): Build vset; be more selective about cgraph nodes to add. (ipa_write_optimization_summaries_1): Pass around vsets. (ipa_write_optimization_summaries): Likewise. * varpool.c (varpool_get_node): New. (varpool_node): Update doubly linked lists. (varpool_remove_node): New. (dump_varpool_node): More dumping. (varpool_enqueue_needed_node): Update doubly linked lists. (decide_is_variable_needed): Kill ltrans hack. (varpool_finalize_decl): Kill lto hack. (varpool_assemble_decl): Skip decls in other partitions. (varpool_assemble_pending_decls): Update doubly linkes lists. (varpool_empty_needed_queue): Likewise. (varpool_extra_name_alias): Likewise. * lto-streamer.c (lto_get_section_name): Add vars section. * lto-streamer.h (lto_section_type): Update. (output_varpool, input_varpool): Declare. * lto.c (lto_varpool_node_sets): New. (lto_1_to_1_map): Partition varpool too. (globalize_context_t, globalize_cross_file_statics, lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node, lto_scan_statics_in_remaining_global_vars): Remove. (lto_promote_cross_file_statics): Rewrite. (get_filename_for_set): Take vset argument. (lto_wpa_write_files): Pass around vsets. From-SVN: r158854
2010-04-29 09:10:38 +02:00
ipcp_write_summary (cgraph_node_set set,
varpool_node_set vset ATTRIBUTE_UNUSED)
ipa-cp.c (ipcp_write_summary, [...]): New functions. * ipa-cp.c (ipcp_write_summary, ipcp_read_summary): New functions. (pass_ipa_cp): Register them. (ipcp_init_stage): Analyze all functions for whopr/lto. (ipcp_propagate_stage): Skip external calls. (ipcp_iterate_stage): Call ipa_update_after_lto_read if needed. * ipa-reference.c (write_node_summary_p): Fix thinko about availability. * cgraphunit.c (ipa_passes): When in lto, ne er produce new summaries; when in ltrans, skip executing of ipa passes since everything should've been done. * ipa-inline.c (cgraph_decide_inlining): Remove FIXMEs. (inline_generate_summary): Likewise. (inline_read_summary): New function. (inline_write_summary): New function. (pass_ipa_inline): Register new hooks. * ipa-prop.c: Inlcude lto-streamer.h (ipa_edge_args_vector): Update declaration. (ipa_count_arguments, ipa_compute_jump_functions, ipa_free_edge_args_substructures): Move ipa_edge_args_vector into ggc. (ipa_write_jump_function, ipa_read_jump_function, ipa_write_node_info, ipa_read_node_info): New static functions. (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Update. (duplicate_array): Use xmalloc. (duplicate_ggc_array): New. (ipa_edge_duplication_hook): Use it. (ipa_update_after_lto_read): New function. * ipa-prop.h (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Declare. (ipa_pass_through_data, ipa_ancestor_jf_data, ipa_member_ptr_cst, jump_func_value, ipa_member_ptr_cst, ipa_edge_args): Add GTY markers. (ipa_edge_args_vector): Move into GGC. (ipa_check_create_edge_args): Update. (ipa_update_after_lto_read): New. * passes.c (ipa_write_summaries_1): When in wpa, do not write summaries. (ipa_read_summaries): When in ltrans, so not read summaries. * lto-streamer.c (lto_get_section_name): Add LTO_section_jump_functions. * lto-streamer.h (LTO_section_jump_functions): New section. (produce_asm): Declare. * lto-cgraph.c (output_cgraph): Output edges in reverse order. * lto-streamer-out.c (produce_asm): Export. * lto-streamer-in.c: Include tree-pass.h (input_function): Free dominance info when done. (lto_read_body): Push ipa_inline in ltrans stage. * gengtype.c (open_base_files): Add ipa-prop.h into includes. * Makefile.in (GTFILES): Add ipa-prop.h * lto.c (lto_fixup_jump_functions): New function. (lto_fixup_decls): Use it. From-SVN: r153449
2009-10-22 12:02:29 +02:00
{
ipa_prop_write_jump_functions (set);
}
/* Read ipcp summary. */
static void
ipcp_read_summary (void)
{
ipa_prop_read_jump_functions ();
}
/* Gate for IPCP optimization. */
static bool
cgraph_gate_cp (void)
{
/* FIXME: We should remove the optimize check after we ensure we never run
IPA passes when not optimizng. */
return flag_ipa_cp && optimize;
}
alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. gcc/ChangeLog: * alias.c (struct alias_set_entry_d): Rename from struct alias_set_entry. Change all uses. * except.c (struct call_site_record_d): Rename from struct call_site_record. Change all uses. * except.h (struct eh_region_d): Rename from struct eh_region. Change all uses. * gcse.c (struct hash_table_d): Rename from struct hash_table. Change all uses. * graphite.c (struct ivtype_map_elt_d): Rename fromstruct ivtype_map_elt. Change all uses. (struct rename_map_elt_d): Rename fromstruct rename_map_elt. Change all uses. (struct ifsese_d): Rename fromstruct ifsese. Change all uses. * graphite.h (struct name_tree_d): Rename from struct name_tree. Change all uses. (struct sese_d): Rename from struct sese. Change all uses. * omega.h (struct eqn_d): Rename from struct eqn. Change all uses. (struct omega_pb_d): Rename from struct omega_pb. Change all uses. * optabs.h (struct optab_d): Rename from struct optab. Change all uses. (struct convert_optab_d): Rename from struct convert_optab. Change all uses. * tree-pass.h (struct ipa_opt_pass_d): Rename fromstruct ipa_opt_pass. Change all uses. * tree-predcom.c (struct dref_d): Rename from struct dref. Change all uses. * c-decl.c (pushtag): If -Wc++-compat, warn if the tag is already defined as a typedef. (grokdeclarator): If -Wc++-compat, warn if a typedef is already defined as a tag. gcc/cp/ChangeLog: * cp-tree.h (enum cp_lvalue_kind_flags): Rename from cp_lvalue_kind. Change all uses. (enum base_access_flags): Rename from enum base_access. Change all uses. * parser.c (enum cp_parser_flags): Remove enum tag. gcc/testsuite/ChangeLog: * gcc.dg/Wcxx-compat-10.c: New testcase. libcpp/ChangeLog: * include/cpplib.h (enum cpp_builtin_type): Rename from enum builtin_type. Change all uses. From-SVN: r147605
2009-05-16 08:54:11 +02:00
struct ipa_opt_pass_d pass_ipa_cp =
re PR other/35094 (RTL dump file letters hosed and partly undocumented) * gcc.dg/20050811-2.c: Update dumping flags. * gcc.dg/sms-2.c: Update dumping flags. * gcc.dg/var-expand1.c: Update dumping flags. * gcc.dg/var-expand3.c: Update dumping flags. * gcc.dg/pr30957-1.c: Update dumping flags. * gcc.dg/20050811-1.c: Update dumping flags. * gcc.dg/cpp/cmdlne-dI-M.C: Do not xfail. * gcc.dg/cpp/cmdlne-dM-M.C: Do not xfail. PR other/35094 * toplev.c (decode_d_option): Handle all CPP flags. * tree-vrp.c: Update tree_pass descriptors. * regrename.c: Update tree_pass descriptors. * fwprop.c: Update tree_pass descriptors. * doc/invoke.texi: Remove documentation of dropped -d? flags. * tree-into-ssa.c: Update tree_pass descriptors. * tree-dump.c: Update tree_pass descriptors. * tree-complex.c: Update tree_pass descriptors. * tree-dump.h: Update tree_pass descriptors. * see.c: Update tree_pass descriptors. * cgraphbuild.c: Update tree_pass descriptors. * tracer.c: Update tree_pass descriptors. * tree-loop-distribution.c: Update tree_pass descriptors. * cgraph.c: Update tree_pass descriptors. * postreload-gcse.c: Update tree_pass descriptors. * postreload.c: Update tree_pass descriptors. * tree-ssa-loop-ch.c: Update tree_pass descriptors. * tree-tailcall.c: Update tree_pass descriptors. * tree-pass.h (tree_opt_pass): Rename to ... (opt_pass) ... this one; add "type" field and remove letter field. (gimple_opt_pass, rtl_opt_pass, simple_ipa_opt_pass): New. (execute_pass_list, execute_ipa_pass_list, all_passes, all_ipa_passes, all_lowering_passes): Update declaration. * ipa-cp.c: Update tree_pass descriptors. * final.c: Update tree_pass descriptors. * omp-low.c: Update tree_pass descriptors. * tree-ssa-dse.c: Update tree_pass descriptors. * ipa-reference.c: Update tree_pass descriptors. * tree-ssa-uncprop.c: Update tree_pass descriptors. * auto-inc-dec.c: Update tree_pass descriptors. * reorg.c: Update tree_pass descriptors. * cgraphunit.c: Update tree_pass descriptors. * tree-ssa-copyrename.c: Update tree_pass descriptors. * tree-ssa-ccp.c: Update tree_pass descriptors. * df-core.c: Update tree_pass descriptors. * mode-switching.c: Update tree_pass descriptors. * tree-nomudflap.c: Update tree_pass descriptors. * modulo-sched.c: Update tree_pass descriptors. * ipa-pure-const.c: Update tree_pass descriptors. * cse.c: Update tree_pass descriptors. * web.c: Update tree_pass descriptors. * tree-stdarg.c: Update tree_pass descriptors. * tree-ssa-math-opts.c: Update tree_pass descriptors. * tree-ssa-dom.c: Update tree_pass descriptors. * tree-nrv.c: Update tree_pass descriptors. * tree-ssa-alias.c: Update tree_pass descriptors. * loop-init.c: Update tree_pass descriptors. * gimple-low.c: Update tree_pass descriptors. * ipa-inline.c: Update tree_pass descriptors. * tree-ssa-sink.c: Update tree_pass descriptors. * global.c: Update tree_pass descriptors. * ifcvt.c: Update tree_pass descriptors. * jump.c: Update tree_pass descriptors. * predict.c: Update tree_pass descriptors. * tree-ssa-loop.c: Update tree_pass descriptors. * recog.c: Update tree_pass descriptors. * dse.c: Update tree_pass descriptors. * tree-ssa-ifcombine.c: Update tree_pass descriptors. * tree-eh.c: Update tree_pass descriptors. * regmove.c: Update tree_pass descriptors. * local-alloc.c * function.c: Update tree_pass descriptors. * tree-vectorizer.c: Update tree_pass descriptors. * gcse.c: Update tree_pass descriptors. * ipa-type-escape.c: Update tree_pass descriptors. * tree-if-conv.c: Update tree_pass descriptors. * init-regs.c: Update tree_pass descriptors. * ipa.c: Update tree_pass descriptors. * tree-ssa-phiopt.c: Update tree_pass descriptors. * rtl-factoring.c: Update tree_pass descriptors. * lower-subreg.c: Update tree_pass descriptors. * bt-load.c: Update tree_pass descriptors. * tree-dfa.c: Update tree_pass descriptors. * except.c: Update tree_pass descriptors. * emit-rtl.c: Update tree_pass descriptors. * cfgexpand.c: Update tree_pass descriptors. * tree-cfgcleanup.c: Update tree_pass descriptors. * cfgcleanup.c: Update tree_pass descriptors. * tree-ssa-pre.c: Update tree_pass descriptors. * tree-sra.c: Update tree_pass descriptors. * tree-mudflap.c: Update tree_pass descriptors. * tree-ssa-copy.c: Update tree_pass descriptors. * cfglayout.c: Update tree_pass descriptors. * tree-ssa-forwprop.c: Update tree_pass descriptors. * tree-ssa-dce.c: Update tree_pass descriptors. * tree-ssa.c: Update tree_pass descriptors. * regclass.c: Update tree_pass descriptors. * integrate.c: Update tree_pass descriptors. * tree-optimize.c: Update tree_pass descriptors. * tree-ssa-phiprop.c: Update tree_pass descriptors. * tree-object-size.c: Update tree_pass descriptors. * combine.c: Update tree_pass descriptors. * tree-outof-ssa.c: Update tree_pass descriptors. * bb-reorder.c: Update tree_pass descriptors. * stack-ptr-mod.c: Update tree_pass descriptors. * var-tracking.c: Update tree_pass descriptors. * tree-profile.c: Update tree_pass descriptors. * tree-vect-generic.c: Update tree_pass descriptors. * reg-stack.c: Update tree_pass descriptors. * sched-rgn.c: Update tree_pass descriptors. * tree-ssa-structalias.c: Update tree_pass descriptors. * tree-cfg.c: Update tree_pass descriptors. * passes.c (current_pass): Update declaration. (finish_optimization_passes): Update. (all_passes, all_ipa_passes, all_lowering_passes): Update declaration. (register_one_dump_file, register_dump_files_1, next_pass_1): Update arguments. (init_optimization_passes): Update handling of new types. (execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update. * ipa-struct-reorg.c: Update tree_pass descriptors. * tree-ssa-reassoc.c: Update tree_pass descriptors. * combine-stack-adj.c: Update tree_pass descriptors. * cfgrtl.c: Update tree_pass descriptors. * dce.c: Update tree_pass descriptors. * tree-ssanames.c: Update tree_pass descriptors. From-SVN: r133342
2008-03-19 12:22:40 +01:00
{
{
cgraph.c (first_cgraph_function_insertion_hook): New variable. * cgraph.c (first_cgraph_function_insertion_hook): New variable. (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. From-SVN: r139389
2008-08-21 17:26:59 +02:00
IPA_PASS,
"cp", /* name */
cgraph_gate_cp, /* gate */
ipcp_driver, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_IPA_CONSTANT_PROP, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29 18:41:35 +02:00
TODO_dump_cgraph | TODO_dump_func |
TODO_remove_functions | TODO_ggc_collect /* todo_flags_finish */
cgraph.c (first_cgraph_function_insertion_hook): New variable. * cgraph.c (first_cgraph_function_insertion_hook): New variable. (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. From-SVN: r139389
2008-08-21 17:26:59 +02:00
},
ipcp_generate_summary, /* generate_summary */
ipa-cp.c (ipcp_write_summary, [...]): New functions. * ipa-cp.c (ipcp_write_summary, ipcp_read_summary): New functions. (pass_ipa_cp): Register them. (ipcp_init_stage): Analyze all functions for whopr/lto. (ipcp_propagate_stage): Skip external calls. (ipcp_iterate_stage): Call ipa_update_after_lto_read if needed. * ipa-reference.c (write_node_summary_p): Fix thinko about availability. * cgraphunit.c (ipa_passes): When in lto, ne er produce new summaries; when in ltrans, skip executing of ipa passes since everything should've been done. * ipa-inline.c (cgraph_decide_inlining): Remove FIXMEs. (inline_generate_summary): Likewise. (inline_read_summary): New function. (inline_write_summary): New function. (pass_ipa_inline): Register new hooks. * ipa-prop.c: Inlcude lto-streamer.h (ipa_edge_args_vector): Update declaration. (ipa_count_arguments, ipa_compute_jump_functions, ipa_free_edge_args_substructures): Move ipa_edge_args_vector into ggc. (ipa_write_jump_function, ipa_read_jump_function, ipa_write_node_info, ipa_read_node_info): New static functions. (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Update. (duplicate_array): Use xmalloc. (duplicate_ggc_array): New. (ipa_edge_duplication_hook): Use it. (ipa_update_after_lto_read): New function. * ipa-prop.h (ipa_prop_write_jump_functions, ipa_prop_read_jump_functions): Declare. (ipa_pass_through_data, ipa_ancestor_jf_data, ipa_member_ptr_cst, jump_func_value, ipa_member_ptr_cst, ipa_edge_args): Add GTY markers. (ipa_edge_args_vector): Move into GGC. (ipa_check_create_edge_args): Update. (ipa_update_after_lto_read): New. * passes.c (ipa_write_summaries_1): When in wpa, do not write summaries. (ipa_read_summaries): When in ltrans, so not read summaries. * lto-streamer.c (lto_get_section_name): Add LTO_section_jump_functions. * lto-streamer.h (LTO_section_jump_functions): New section. (produce_asm): Declare. * lto-cgraph.c (output_cgraph): Output edges in reverse order. * lto-streamer-out.c (produce_asm): Export. * lto-streamer-in.c: Include tree-pass.h (input_function): Free dominance info when done. (lto_read_body): Push ipa_inline in ltrans stage. * gengtype.c (open_base_files): Add ipa-prop.h into includes. * Makefile.in (GTFILES): Add ipa-prop.h * lto.c (lto_fixup_jump_functions): New function. (lto_fixup_decls): Use it. From-SVN: r153449
2009-10-22 12:02:29 +02:00
ipcp_write_summary, /* write_summary */
ipcp_read_summary, /* read_summary */
NULL, /* write_optimization_summary */
NULL, /* read_optimization_summary */
cgraph.h (struct cgraph_node): New field indirect_calls. 2010-04-28 Martin Jambor <mjambor@suse.cz> * cgraph.h (struct cgraph_node): New field indirect_calls. (struct cgraph_indirect_call_info): New type. (struct cgraph_edge): Removed field indirect_call. New fields indirect_info, indirect_inlining_edge and indirect_unknown_callee. (cgraph_create_indirect_edge): Declare. (cgraph_make_edge_direct): Likewise. (enum LTO_cgraph_tags): New item LTO_cgraph_indirect_edge. * ipa-prop.h (struct ipa_param_call_note): Removed. (struct ipa_node_params): Removed field param_calls. (ipa_create_all_structures_for_iinln): Declare. * cgraph.c: Described indirect edges and uids in initial comment. (cgraph_add_edge_to_call_site_hash): New function. (cgraph_edge): Search also among the indirect edges, use cgraph_add_edge_to_call_site_hash to add edges to the call site hash. (cgraph_set_call_stmt): Possibly turn an indirect edge into a direct one, use cgraph_add_edge_to_call_site_hash to add edges to the call site hash. (initialize_inline_failed): Assign a reason to indirect edges. (cgraph_create_edge_1): New function. (cgraph_create_edge): Moved some functionality to cgraph_create_edge_1. (cgraph_create_indirect_edge): New function. (cgraph_edge_remove_callee): Add an assert checking for non-indirectness. (cgraph_edge_remove_caller): Special-case indirect edges. (cgraph_remove_edge): Likewise. (cgraph_set_edge_callee): New function. (cgraph_redirect_edge_callee): Use cgraph_set_edge_callee. (cgraph_make_edge_direct): New function. (cgraph_update_edges_for_call_stmt_node): Do nothing only when also the declaration of the call statement matches. (cgraph_node_remove_callees): Special-case indirect edges. (cgraph_clone_edge): Likewise. (cgraph_clone_node): Clone also the indirect edges. (dump_cgraph_node): Dump indirect_inlining_edge flag instead of indirect_call, dump count of indirect_calls edges. * ipa-prop.c (iinlining_processed_edges): New variable. (ipa_note_param_call): Create indirect edges instead of creating notes. New parameter node. (ipa_analyze_call_uses): New parameter node, pass it on to ipa_note_param_call. (ipa_analyze_stmt_uses): Likewise. (ipa_analyze_params_uses): Pass node to ipa_analyze_stmt_uses. (print_edge_addition_message): Work on edges rather than on notes. (update_call_notes_after_inlining): Likewise, renamed to update_indirect_edges_after_inlining. (ipa_create_all_structures_for_iinln): New function. (ipa_free_node_params_substructures): Do not free notes. (ipa_edge_duplication_hook): Propagate bits within iinlining_processed_edges bitmap. (ipa_node_duplication_hook): Do not duplicate notes. (free_all_ipa_structures_after_ipa_cp): Renamed to ipa_free_all_structures_after_ipa_cp. (free_all_ipa_structures_after_iinln): Renamed to ipa_free_all_structures_after_iinln.g (ipa_write_param_call_note): Removed. (ipa_read_param_call_note): Removed. (ipa_write_indirect_edge_info): New function. (ipa_read_indirect_edge_info): Likewise. (ipa_write_node_info): Do not stream notes, do stream information in indirect edges. (ipa_read_node_info): Likewise. (lto_ipa_fixup_call_notes): Removed. * ipa-cp.c (pass_ipa_cp): Set stmt_fixup to NULL. * ipa-inline.c (pass_ipa_inline): Likewise. * cgraphunit.c (verify_cgraph_node): Check also indirect edges. * cif-code.def (INDIRECT_UNKNOWN_CALL): New reason. * tree-inline.c (copy_bb): Removed an unnecessary double check for is_gimple_call. * tree-inline.c (get_indirect_callee_fndecl): Do not consider indirect edges. * lto-cgraph.c (output_outgoing_cgraph_edges): New function. (output_cgraph): Stream also indirect edges. (lto_output_edge): Added capability to stream indirect edges. (input_edge): Likewise. (input_cgraph_1): Likewise. * testsuite/gcc.dg/lto/20091209-1_0.c: New testcase. From-SVN: r158827
2010-04-28 16:05:54 +02:00
NULL, /* stmt_fixup */
cgraph.c (first_cgraph_function_insertion_hook): New variable. * cgraph.c (first_cgraph_function_insertion_hook): New variable. (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): New functions. * cgraph.h (cgraph_add_function_insertion_hook, cgraph_remove_function_insertion_hook, cgraph_call_function_insertion_hooks): Declare. * ipa-reference.c (function_insertion_hook_holder): New variable. (check_operand, look_for_address_of): When checking late, do not care about module bitmaps. (add_new_function): New function. (generate_summary): Register hooks; zero module bitmaps. (propagate): Unregister hooks. * ipa-pure-const.c (function_insertion_hook_holder): New variable. (add_new_function): New function. (generate_summary): Register hook. (propagate): Remove hook. * ipa-cp.c (ipcp_need_redirect_p): Fix to not be constant 0. * tree-pass.h (pass_ipa_cp): Make ipa_opt_pass. * ipa-cp.c (ipcp_update_cloned_node): New function. (build_const_val): Handle functions correctly; bring type logic into sync with tree-inline.c (ipcp_init_stage): Take care of computing stuff needed by indirect inlining; update clones. (ipcp_generate_summary): Break out of ipcp_driver. (ipcp_driver): Do only execution and transformation. (pass_ipa_cp): Make IPA_PASS. * tree-ssa-ccp.c (fold_stmt_r): Check type before trying to fold offset to address. * ipa-inline.c (inline_indirect_intraprocedural_analysis): When doing ipcp, some info is already available. * ipa-prop.c (ipa_count_arguments): Grow edge lists as needed. * tree-inline.c (remap_ssa_name): Unshare expression. From-SVN: r139389
2008-08-21 17:26:59 +02:00
0, /* TODOs */
NULL, /* function_transform */
NULL, /* variable_transform */
};