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
This commit is contained in:
parent
98aa3f36a7
commit
b8698a0f37
360 changed files with 9632 additions and 9270 deletions
362
gcc/ChangeLog
362
gcc/ChangeLog
|
@ -1,3 +1,365 @@
|
|||
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.
|
||||
|
||||
2009-11-24 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
* pa.c (output_call): Only use sr4 for long interspace calls if
|
||||
|
|
|
@ -452,8 +452,8 @@ walk_mems_2 (rtx *x, rtx mem)
|
|||
{
|
||||
if (alias_sets_conflict_p (MEM_ALIAS_SET(*x), MEM_ALIAS_SET(mem)))
|
||||
return 1;
|
||||
|
||||
return -1;
|
||||
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ walk_mems_1 (rtx *x, rtx *pat)
|
|||
if (for_each_rtx (pat, (rtx_function) walk_mems_2, *x))
|
||||
/* Indicate that dependence was determined and stop traversal. */
|
||||
return 1;
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -274,7 +274,7 @@ pool_alloc (alloc_pool pool)
|
|||
block = XNEWVEC (char, pool->block_size);
|
||||
block_header = (alloc_pool_list) block;
|
||||
block += align_eight (sizeof (struct alloc_pool_list_def));
|
||||
|
||||
|
||||
/* Throw it on the block list. */
|
||||
block_header->next = pool->block_list;
|
||||
pool->block_list = block_header;
|
||||
|
@ -290,7 +290,7 @@ pool_alloc (alloc_pool pool)
|
|||
pool->blocks_allocated += 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* We now know that we can take the first elt off the virgin list and
|
||||
put it on the returned list. */
|
||||
block = pool->virgin_free_list;
|
||||
|
@ -374,8 +374,8 @@ print_statistics (void **slot, void *b)
|
|||
if (d->allocated)
|
||||
{
|
||||
fprintf (stderr, "%-22s %6d %10lu %10lu(%10lu) %10lu(%10lu) %10lu(%10lu)\n", d->name,
|
||||
d->elt_size, d->created, d->allocated, d->allocated / d->elt_size,
|
||||
d->peak, d->peak / d->elt_size,
|
||||
d->elt_size, d->created, d->allocated, d->allocated / d->elt_size,
|
||||
d->peak, d->peak / d->elt_size,
|
||||
d->current, d->current / d->elt_size);
|
||||
i->total_allocated += d->allocated;
|
||||
i->total_created += d->created;
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct alloc_pool_def
|
|||
char* virgin_free_list;
|
||||
|
||||
/* The number of elements in the virgin_free_list that can be
|
||||
allocated before needing another block. */
|
||||
allocated before needing another block. */
|
||||
size_t virgin_elts_remaining;
|
||||
|
||||
size_t elts_allocated;
|
||||
|
|
|
@ -192,7 +192,7 @@ init_attributes (void)
|
|||
/* Insert a single ATTR into the attribute table. */
|
||||
|
||||
void
|
||||
register_attribute (const struct attribute_spec *attr)
|
||||
register_attribute (const struct attribute_spec *attr)
|
||||
{
|
||||
struct substring str;
|
||||
void **slot;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Discovery of auto-inc and auto-dec instructions.
|
||||
Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
|
||||
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify it under
|
||||
|
@ -74,7 +74,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
...
|
||||
b <- a + c
|
||||
|
||||
(For this case to be true, b must not be assigned or used between
|
||||
(For this case to be true, b must not be assigned or used between
|
||||
the *a and the assignment to b. B must also be a Pmode reg.)
|
||||
|
||||
becomes
|
||||
|
@ -104,9 +104,9 @@ along with GCC; see the file COPYING3. If not see
|
|||
by the pointer. This is useful for machines that have
|
||||
HAVE_PRE_MODIFY_DISP, HAVE_POST_MODIFY_DISP defined.
|
||||
|
||||
3) c is a register. This is useful for machines that have
|
||||
HAVE_PRE_MODIFY_REG, HAVE_POST_MODIFY_REG
|
||||
|
||||
3) c is a register. This is useful for machines that have
|
||||
HAVE_PRE_MODIFY_REG, HAVE_POST_MODIFY_REG
|
||||
|
||||
The is one special case: if a already had an offset equal to it +-
|
||||
its width and that offset is equal to -c when the increment was
|
||||
before the ref or +c if the increment was after the ref, then if we
|
||||
|
@ -129,7 +129,7 @@ enum form
|
|||
ANY is used for constants that are not +-size or 0. REG is used if
|
||||
the forms are reg1 + reg2. */
|
||||
|
||||
enum inc_state
|
||||
enum inc_state
|
||||
{
|
||||
INC_ZERO, /* == 0 */
|
||||
INC_NEG_SIZE, /* == +size */
|
||||
|
@ -295,7 +295,7 @@ init_decision_table (void)
|
|||
/* Parsed fields of an inc insn of the form "reg_res = reg0+reg1" or
|
||||
"reg_res = reg0+c". */
|
||||
|
||||
static struct inc_insn
|
||||
static struct inc_insn
|
||||
{
|
||||
rtx insn; /* The insn being parsed. */
|
||||
rtx pat; /* The pattern of the insn. */
|
||||
|
@ -311,10 +311,10 @@ static struct inc_insn
|
|||
|
||||
/* Dump the parsed inc insn to FILE. */
|
||||
|
||||
static void
|
||||
static void
|
||||
dump_inc_insn (FILE *file)
|
||||
{
|
||||
const char *f = ((inc_insn.form == FORM_PRE_ADD)
|
||||
const char *f = ((inc_insn.form == FORM_PRE_ADD)
|
||||
|| (inc_insn.form == FORM_PRE_INC)) ? "pre" : "post";
|
||||
|
||||
dump_insn_slim (file, inc_insn.insn);
|
||||
|
@ -324,26 +324,26 @@ dump_inc_insn (FILE *file)
|
|||
case FORM_PRE_ADD:
|
||||
case FORM_POST_ADD:
|
||||
if (inc_insn.reg1_is_const)
|
||||
fprintf (file, "found %s add(%d) r[%d]=r[%d]+%d\n",
|
||||
f, INSN_UID (inc_insn.insn),
|
||||
REGNO (inc_insn.reg_res),
|
||||
fprintf (file, "found %s add(%d) r[%d]=r[%d]+%d\n",
|
||||
f, INSN_UID (inc_insn.insn),
|
||||
REGNO (inc_insn.reg_res),
|
||||
REGNO (inc_insn.reg0), (int) inc_insn.reg1_val);
|
||||
else
|
||||
fprintf (file, "found %s add(%d) r[%d]=r[%d]+r[%d]\n",
|
||||
f, INSN_UID (inc_insn.insn),
|
||||
REGNO (inc_insn.reg_res),
|
||||
fprintf (file, "found %s add(%d) r[%d]=r[%d]+r[%d]\n",
|
||||
f, INSN_UID (inc_insn.insn),
|
||||
REGNO (inc_insn.reg_res),
|
||||
REGNO (inc_insn.reg0), REGNO (inc_insn.reg1));
|
||||
break;
|
||||
|
||||
|
||||
case FORM_PRE_INC:
|
||||
case FORM_POST_INC:
|
||||
if (inc_insn.reg1_is_const)
|
||||
fprintf (file, "found %s inc(%d) r[%d]+=%d\n",
|
||||
f, INSN_UID (inc_insn.insn),
|
||||
fprintf (file, "found %s inc(%d) r[%d]+=%d\n",
|
||||
f, INSN_UID (inc_insn.insn),
|
||||
REGNO (inc_insn.reg_res), (int) inc_insn.reg1_val);
|
||||
else
|
||||
fprintf (file, "found %s inc(%d) r[%d]+=r[%d]\n",
|
||||
f, INSN_UID (inc_insn.insn),
|
||||
fprintf (file, "found %s inc(%d) r[%d]+=r[%d]\n",
|
||||
f, INSN_UID (inc_insn.insn),
|
||||
REGNO (inc_insn.reg_res), REGNO (inc_insn.reg1));
|
||||
break;
|
||||
|
||||
|
@ -372,18 +372,18 @@ static struct mem_insn
|
|||
|
||||
/* Dump the parsed mem insn to FILE. */
|
||||
|
||||
static void
|
||||
static void
|
||||
dump_mem_insn (FILE *file)
|
||||
{
|
||||
dump_insn_slim (file, mem_insn.insn);
|
||||
|
||||
if (mem_insn.reg1_is_const)
|
||||
fprintf (file, "found mem(%d) *(r[%d]+%d)\n",
|
||||
INSN_UID (mem_insn.insn),
|
||||
fprintf (file, "found mem(%d) *(r[%d]+%d)\n",
|
||||
INSN_UID (mem_insn.insn),
|
||||
REGNO (mem_insn.reg0), (int) mem_insn.reg1_val);
|
||||
else
|
||||
fprintf (file, "found mem(%d) *(r[%d]+r[%d])\n",
|
||||
INSN_UID (mem_insn.insn),
|
||||
fprintf (file, "found mem(%d) *(r[%d]+r[%d])\n",
|
||||
INSN_UID (mem_insn.insn),
|
||||
REGNO (mem_insn.reg0), REGNO (mem_insn.reg1));
|
||||
}
|
||||
|
||||
|
@ -409,17 +409,17 @@ static rtx *reg_next_def = NULL;
|
|||
insn. Moving the REG_EQUAL and REG_EQUIV is clearly wrong and it
|
||||
does not appear that there are any other kinds of relevant notes. */
|
||||
|
||||
static void
|
||||
static void
|
||||
move_dead_notes (rtx to_insn, rtx from_insn, rtx pattern)
|
||||
{
|
||||
rtx note;
|
||||
rtx note;
|
||||
rtx next_note;
|
||||
rtx prev_note = NULL;
|
||||
|
||||
for (note = REG_NOTES (from_insn); note; note = next_note)
|
||||
{
|
||||
next_note = XEXP (note, 1);
|
||||
|
||||
|
||||
if ((REG_NOTE_KIND (note) == REG_DEAD)
|
||||
&& pattern == XEXP (note, 0))
|
||||
{
|
||||
|
@ -451,7 +451,7 @@ insert_move_insn_before (rtx next_insn, rtx dest_reg, rtx src_reg)
|
|||
return insns;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Change mem_insn.mem_loc so that uses NEW_ADDR which has an
|
||||
increment of INC_REG. To have reached this point, the change is a
|
||||
legitimate one from a dataflow point of view. The only questions
|
||||
|
@ -504,7 +504,7 @@ attempt_change (rtx new_addr, rtx inc_reg)
|
|||
if (! validate_change (mem_insn.insn, mem_insn.mem_loc, new_mem, 0))
|
||||
{
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "validation failure\n");
|
||||
fprintf (dump_file, "validation failure\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -517,7 +517,7 @@ attempt_change (rtx new_addr, rtx inc_reg)
|
|||
/* Replace the addition with a move. Do it at the location of
|
||||
the addition since the operand of the addition may change
|
||||
before the memory reference. */
|
||||
mov_insn = insert_move_insn_before (inc_insn.insn,
|
||||
mov_insn = insert_move_insn_before (inc_insn.insn,
|
||||
inc_insn.reg_res, inc_insn.reg0);
|
||||
move_dead_notes (mov_insn, inc_insn.insn, inc_insn.reg0);
|
||||
|
||||
|
@ -543,7 +543,7 @@ attempt_change (rtx new_addr, rtx inc_reg)
|
|||
break;
|
||||
|
||||
case FORM_POST_ADD:
|
||||
mov_insn = insert_move_insn_before (mem_insn.insn,
|
||||
mov_insn = insert_move_insn_before (mem_insn.insn,
|
||||
inc_insn.reg_res, inc_insn.reg0);
|
||||
move_dead_notes (mov_insn, inc_insn.insn, inc_insn.reg0);
|
||||
|
||||
|
@ -603,7 +603,7 @@ attempt_change (rtx new_addr, rtx inc_reg)
|
|||
Assuming the form is ok, a prototype new address is built which is
|
||||
passed to ATTEMPT_CHANGE for final processing. */
|
||||
|
||||
static bool
|
||||
static bool
|
||||
try_merge (void)
|
||||
{
|
||||
enum gen_form gen_form;
|
||||
|
@ -648,13 +648,13 @@ try_merge (void)
|
|||
return false;
|
||||
}
|
||||
|
||||
mem_insn.reg1_state = (mem_insn.reg1_is_const)
|
||||
mem_insn.reg1_state = (mem_insn.reg1_is_const)
|
||||
? set_inc_state (mem_insn.reg1_val, size) : INC_REG;
|
||||
inc_insn.reg1_state = (inc_insn.reg1_is_const)
|
||||
? set_inc_state (inc_insn.reg1_val, size) : INC_REG;
|
||||
|
||||
/* Now get the form that we are generating. */
|
||||
gen_form = decision_table
|
||||
gen_form = decision_table
|
||||
[inc_insn.reg1_state][mem_insn.reg1_state][inc_insn.form];
|
||||
|
||||
if (dbg_cnt (auto_inc_dec) == false)
|
||||
|
@ -671,25 +671,25 @@ try_merge (void)
|
|||
fprintf (dump_file, "trying SIMPLE_PRE_INC\n");
|
||||
return attempt_change (gen_rtx_PRE_INC (reg_mode, inc_reg), inc_reg);
|
||||
break;
|
||||
|
||||
|
||||
case SIMPLE_POST_INC: /* size++ */
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "trying SIMPLE_POST_INC\n");
|
||||
return attempt_change (gen_rtx_POST_INC (reg_mode, inc_reg), inc_reg);
|
||||
break;
|
||||
|
||||
|
||||
case SIMPLE_PRE_DEC: /* --size */
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "trying SIMPLE_PRE_DEC\n");
|
||||
return attempt_change (gen_rtx_PRE_DEC (reg_mode, inc_reg), inc_reg);
|
||||
break;
|
||||
|
||||
|
||||
case SIMPLE_POST_DEC: /* size-- */
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "trying SIMPLE_POST_DEC\n");
|
||||
return attempt_change (gen_rtx_POST_DEC (reg_mode, inc_reg), inc_reg);
|
||||
break;
|
||||
|
||||
|
||||
case DISP_PRE: /* ++con */
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "trying DISP_PRE\n");
|
||||
|
@ -700,7 +700,7 @@ try_merge (void)
|
|||
inc_insn.reg1)),
|
||||
inc_reg);
|
||||
break;
|
||||
|
||||
|
||||
case DISP_POST: /* con++ */
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "trying POST_DISP\n");
|
||||
|
@ -711,7 +711,7 @@ try_merge (void)
|
|||
inc_insn.reg1)),
|
||||
inc_reg);
|
||||
break;
|
||||
|
||||
|
||||
case REG_PRE: /* ++reg */
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "trying PRE_REG\n");
|
||||
|
@ -722,7 +722,7 @@ try_merge (void)
|
|||
inc_insn.reg1)),
|
||||
inc_reg);
|
||||
break;
|
||||
|
||||
|
||||
case REG_POST: /* reg++ */
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "trying POST_REG\n");
|
||||
|
@ -758,10 +758,10 @@ get_next_ref (int regno, basic_block bb, rtx *next_array)
|
|||
|
||||
/* Reverse the operands in a mem insn. */
|
||||
|
||||
static void
|
||||
static void
|
||||
reverse_mem (void)
|
||||
{
|
||||
rtx tmp = mem_insn.reg1;
|
||||
rtx tmp = mem_insn.reg1;
|
||||
mem_insn.reg1 = mem_insn.reg0;
|
||||
mem_insn.reg0 = tmp;
|
||||
}
|
||||
|
@ -769,10 +769,10 @@ reverse_mem (void)
|
|||
|
||||
/* Reverse the operands in a inc insn. */
|
||||
|
||||
static void
|
||||
static void
|
||||
reverse_inc (void)
|
||||
{
|
||||
rtx tmp = inc_insn.reg1;
|
||||
rtx tmp = inc_insn.reg1;
|
||||
inc_insn.reg1 = inc_insn.reg0;
|
||||
inc_insn.reg0 = tmp;
|
||||
}
|
||||
|
@ -780,8 +780,8 @@ reverse_inc (void)
|
|||
|
||||
/* Return true if INSN is of a form "a = b op c" where a and b are
|
||||
regs. op is + if c is a reg and +|- if c is a const. Fill in
|
||||
INC_INSN with what is found.
|
||||
|
||||
INC_INSN with what is found.
|
||||
|
||||
This function is called in two contexts, if BEFORE_MEM is true,
|
||||
this is called for each insn in the basic block. If BEFORE_MEM is
|
||||
false, it is called for the instruction in the block that uses the
|
||||
|
@ -812,7 +812,7 @@ parse_add_or_inc (rtx insn, bool before_mem)
|
|||
inc_insn.reg0 = XEXP (SET_SRC (pat), 0);
|
||||
if (rtx_equal_p (inc_insn.reg_res, inc_insn.reg0))
|
||||
inc_insn.form = before_mem ? FORM_PRE_INC : FORM_POST_INC;
|
||||
else
|
||||
else
|
||||
inc_insn.form = before_mem ? FORM_PRE_ADD : FORM_POST_ADD;
|
||||
|
||||
if (CONST_INT_P (XEXP (SET_SRC (pat), 1)))
|
||||
|
@ -838,8 +838,8 @@ parse_add_or_inc (rtx insn, bool before_mem)
|
|||
/* Process a = b + c where c is a reg. */
|
||||
inc_insn.reg1 = XEXP (SET_SRC (pat), 1);
|
||||
inc_insn.reg1_is_const = false;
|
||||
|
||||
if (inc_insn.form == FORM_PRE_INC
|
||||
|
||||
if (inc_insn.form == FORM_PRE_INC
|
||||
|| inc_insn.form == FORM_POST_INC)
|
||||
return true;
|
||||
else if (rtx_equal_p (inc_insn.reg_res, inc_insn.reg1))
|
||||
|
@ -850,7 +850,7 @@ parse_add_or_inc (rtx insn, bool before_mem)
|
|||
inc_insn.form = before_mem ? FORM_PRE_INC : FORM_POST_INC;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -862,7 +862,7 @@ parse_add_or_inc (rtx insn, bool before_mem)
|
|||
ADDRESS_OF_X to see if any single one of them is compatible with
|
||||
what has been found in inc_insn.
|
||||
|
||||
-1 is returned for success. 0 is returned if nothing was found and
|
||||
-1 is returned for success. 0 is returned if nothing was found and
|
||||
1 is returned for failure. */
|
||||
|
||||
static int
|
||||
|
@ -897,15 +897,15 @@ find_address (rtx *address_of_x)
|
|||
{
|
||||
/* Match with *(reg0 + reg1) where reg1 is a const. */
|
||||
HOST_WIDE_INT val = INTVAL (b);
|
||||
if (inc_insn.reg1_is_const
|
||||
if (inc_insn.reg1_is_const
|
||||
&& (inc_insn.reg1_val == val || inc_insn.reg1_val == -val))
|
||||
{
|
||||
mem_insn.reg1_val = val;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (!inc_insn.reg1_is_const
|
||||
&& rtx_equal_p (inc_insn.reg1, b))
|
||||
else if (!inc_insn.reg1_is_const
|
||||
&& rtx_equal_p (inc_insn.reg1, b))
|
||||
/* Match with *(reg0 + reg1). */
|
||||
return -1;
|
||||
}
|
||||
|
@ -965,7 +965,7 @@ find_address (rtx *address_of_x)
|
|||
add of the second register. The FIRST_TRY parameter is used to
|
||||
only allow the parameters to be reversed once. */
|
||||
|
||||
static bool
|
||||
static bool
|
||||
find_inc (bool first_try)
|
||||
{
|
||||
rtx insn;
|
||||
|
@ -977,7 +977,7 @@ find_inc (bool first_try)
|
|||
if (count_occurrences (PATTERN (mem_insn.insn), mem_insn.reg0, 1) != 1)
|
||||
{
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "mem count failure\n");
|
||||
fprintf (dump_file, "mem count failure\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -985,8 +985,8 @@ find_inc (bool first_try)
|
|||
dump_mem_insn (dump_file);
|
||||
|
||||
/* Find the next use that is an inc. */
|
||||
insn = get_next_ref (REGNO (mem_insn.reg0),
|
||||
BASIC_BLOCK (BLOCK_NUM (mem_insn.insn)),
|
||||
insn = get_next_ref (REGNO (mem_insn.reg0),
|
||||
BASIC_BLOCK (BLOCK_NUM (mem_insn.insn)),
|
||||
reg_next_inc_use);
|
||||
if (!insn)
|
||||
return false;
|
||||
|
@ -997,11 +997,11 @@ find_inc (bool first_try)
|
|||
{
|
||||
/* Next use was not an add. Look for one extra case. It could be
|
||||
that we have:
|
||||
|
||||
|
||||
*(a + b)
|
||||
...= a;
|
||||
...= b + a
|
||||
|
||||
|
||||
if we reverse the operands in the mem ref we would
|
||||
find this. Only try it once though. */
|
||||
if (first_try && !mem_insn.reg1_is_const)
|
||||
|
@ -1013,13 +1013,13 @@ find_inc (bool first_try)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Need to assure that none of the operands of the inc instruction are
|
||||
/* Need to assure that none of the operands of the inc instruction are
|
||||
assigned to by the mem insn. */
|
||||
for (def_rec = DF_INSN_DEFS (mem_insn.insn); *def_rec; def_rec++)
|
||||
{
|
||||
df_ref def = *def_rec;
|
||||
unsigned int regno = DF_REF_REGNO (def);
|
||||
if ((regno == REGNO (inc_insn.reg0))
|
||||
if ((regno == REGNO (inc_insn.reg0))
|
||||
|| (regno == REGNO (inc_insn.reg_res)))
|
||||
{
|
||||
if (dump_file)
|
||||
|
@ -1041,26 +1041,26 @@ find_inc (bool first_try)
|
|||
{
|
||||
/* Make sure that there is no insn that assigns to inc_insn.res
|
||||
between the mem_insn and the inc_insn. */
|
||||
rtx other_insn = get_next_ref (REGNO (inc_insn.reg_res),
|
||||
BASIC_BLOCK (BLOCK_NUM (mem_insn.insn)),
|
||||
rtx other_insn = get_next_ref (REGNO (inc_insn.reg_res),
|
||||
BASIC_BLOCK (BLOCK_NUM (mem_insn.insn)),
|
||||
reg_next_def);
|
||||
if (other_insn != inc_insn.insn)
|
||||
{
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
fprintf (dump_file,
|
||||
"result of add is assigned to between mem and inc insns.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
other_insn = get_next_ref (REGNO (inc_insn.reg_res),
|
||||
BASIC_BLOCK (BLOCK_NUM (mem_insn.insn)),
|
||||
other_insn = get_next_ref (REGNO (inc_insn.reg_res),
|
||||
BASIC_BLOCK (BLOCK_NUM (mem_insn.insn)),
|
||||
reg_next_use);
|
||||
if (other_insn
|
||||
if (other_insn
|
||||
&& (other_insn != inc_insn.insn)
|
||||
&& (DF_INSN_LUID (inc_insn.insn) > DF_INSN_LUID (other_insn)))
|
||||
{
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
fprintf (dump_file,
|
||||
"result of add is used between mem and inc insns.\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -1087,7 +1087,7 @@ find_inc (bool first_try)
|
|||
int luid = DF_INSN_LUID (inc_insn.insn);
|
||||
if (inc_insn.form == FORM_POST_ADD)
|
||||
{
|
||||
/* The trick is that we are not going to increment r0,
|
||||
/* The trick is that we are not going to increment r0,
|
||||
we are going to increment the result of the add insn.
|
||||
For this trick to be correct, the result reg of
|
||||
the inc must be a valid addressing reg. */
|
||||
|
@ -1102,16 +1102,16 @@ find_inc (bool first_try)
|
|||
|
||||
/* We also need to make sure that the next use of
|
||||
inc result is after the inc. */
|
||||
other_insn
|
||||
other_insn
|
||||
= get_next_ref (REGNO (inc_insn.reg1), bb, reg_next_use);
|
||||
if (other_insn && luid > DF_INSN_LUID (other_insn))
|
||||
return false;
|
||||
|
||||
if (!rtx_equal_p (mem_insn.reg0, inc_insn.reg0))
|
||||
reverse_inc ();
|
||||
reverse_inc ();
|
||||
}
|
||||
|
||||
other_insn
|
||||
other_insn
|
||||
= get_next_ref (REGNO (inc_insn.reg1), bb, reg_next_def);
|
||||
if (other_insn && luid > DF_INSN_LUID (other_insn))
|
||||
return false;
|
||||
|
@ -1130,14 +1130,14 @@ find_inc (bool first_try)
|
|||
need to treat it as if it was *(b + a). It may also be that
|
||||
the add is of the form a + c where c does not match b and
|
||||
then we just abandon this. */
|
||||
|
||||
|
||||
int luid = DF_INSN_LUID (inc_insn.insn);
|
||||
rtx other_insn;
|
||||
|
||||
|
||||
/* Make sure this reg appears only once in this insn. */
|
||||
if (count_occurrences (PATTERN (mem_insn.insn), mem_insn.reg1, 1) != 1)
|
||||
return false;
|
||||
|
||||
|
||||
if (inc_insn.form == FORM_POST_ADD)
|
||||
{
|
||||
/* For this trick to be correct, the result reg of the inc
|
||||
|
@ -1167,7 +1167,7 @@ find_inc (bool first_try)
|
|||
|
||||
/* Need to check that there are no assignments to b
|
||||
before the add insn. */
|
||||
other_insn
|
||||
other_insn
|
||||
= get_next_ref (REGNO (inc_insn.reg1), bb, reg_next_def);
|
||||
if (other_insn && luid > DF_INSN_LUID (other_insn))
|
||||
return false;
|
||||
|
@ -1188,14 +1188,14 @@ find_inc (bool first_try)
|
|||
}
|
||||
/* To have gotten here know that.
|
||||
*(b + a)
|
||||
|
||||
|
||||
... = (b + a)
|
||||
|
||||
|
||||
We also know that the lhs of the inc is not b or a. We
|
||||
need to make sure that there are no assignments to b
|
||||
between the mem ref and the inc. */
|
||||
|
||||
other_insn
|
||||
between the mem ref and the inc. */
|
||||
|
||||
other_insn
|
||||
= get_next_ref (REGNO (inc_insn.reg0), bb, reg_next_def);
|
||||
if (other_insn && luid > DF_INSN_LUID (other_insn))
|
||||
return false;
|
||||
|
@ -1203,13 +1203,13 @@ find_inc (bool first_try)
|
|||
|
||||
/* Need to check that the next use of the add result is later than
|
||||
add insn since this will be the reg incremented. */
|
||||
other_insn
|
||||
other_insn
|
||||
= get_next_ref (REGNO (inc_insn.reg_res), bb, reg_next_use);
|
||||
if (other_insn && luid > DF_INSN_LUID (other_insn))
|
||||
return false;
|
||||
}
|
||||
else /* FORM_POST_INC. There is less to check here because we
|
||||
know that operands must line up. */
|
||||
know that operands must line up. */
|
||||
{
|
||||
if (!rtx_equal_p (mem_insn.reg1, inc_insn.reg1))
|
||||
/* See comment above on find_inc (false) call. */
|
||||
|
@ -1219,19 +1219,19 @@ find_inc (bool first_try)
|
|||
reverse_mem ();
|
||||
return find_inc (false);
|
||||
}
|
||||
else
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* To have gotten here know that.
|
||||
*(a + b)
|
||||
|
||||
|
||||
... = (a + b)
|
||||
|
||||
|
||||
We also know that the lhs of the inc is not b. We need to make
|
||||
sure that there are no assignments to b between the mem ref and
|
||||
the inc. */
|
||||
other_insn
|
||||
other_insn
|
||||
= get_next_ref (REGNO (inc_insn.reg1), bb, reg_next_def);
|
||||
if (other_insn && luid > DF_INSN_LUID (other_insn))
|
||||
return false;
|
||||
|
@ -1240,7 +1240,7 @@ find_inc (bool first_try)
|
|||
|
||||
if (inc_insn.form == FORM_POST_INC)
|
||||
{
|
||||
other_insn
|
||||
other_insn
|
||||
= get_next_ref (REGNO (inc_insn.reg0), bb, reg_next_use);
|
||||
/* When we found inc_insn, we were looking for the
|
||||
next add or inc, not the next insn that used the
|
||||
|
@ -1348,10 +1348,10 @@ merge_in_block (int max_reg, basic_block bb)
|
|||
bool insn_is_add_or_inc = true;
|
||||
|
||||
if (!NONDEBUG_INSN_P (insn))
|
||||
continue;
|
||||
continue;
|
||||
|
||||
/* This continue is deliberate. We do not want the uses of the
|
||||
jump put into reg_next_use because it is not considered safe to
|
||||
jump put into reg_next_use because it is not considered safe to
|
||||
combine a preincrement with a jump. */
|
||||
if (JUMP_P (insn))
|
||||
continue;
|
||||
|
@ -1381,22 +1381,22 @@ merge_in_block (int max_reg, basic_block bb)
|
|||
clear of c because the inc insn is going to move
|
||||
into the mem_insn.insn. */
|
||||
int luid = DF_INSN_LUID (mem_insn.insn);
|
||||
rtx other_insn
|
||||
rtx other_insn
|
||||
= get_next_ref (REGNO (inc_insn.reg1), bb, reg_next_use);
|
||||
|
||||
|
||||
if (other_insn && luid > DF_INSN_LUID (other_insn))
|
||||
ok = false;
|
||||
|
||||
other_insn
|
||||
|
||||
other_insn
|
||||
= get_next_ref (REGNO (inc_insn.reg1), bb, reg_next_def);
|
||||
|
||||
|
||||
if (other_insn && luid > DF_INSN_LUID (other_insn))
|
||||
ok = false;
|
||||
}
|
||||
|
||||
|
||||
if (dump_file)
|
||||
dump_inc_insn (dump_file);
|
||||
|
||||
|
||||
if (ok && find_address (&PATTERN (mem_insn.insn)) == -1)
|
||||
{
|
||||
if (dump_file)
|
||||
|
@ -1417,7 +1417,7 @@ merge_in_block (int max_reg, basic_block bb)
|
|||
if (find_mem (&PATTERN (insn)))
|
||||
success_in_block++;
|
||||
}
|
||||
|
||||
|
||||
/* If the inc insn was merged with a mem, the inc insn is gone
|
||||
and there is noting to update. */
|
||||
if (DF_INSN_UID_GET (uid))
|
||||
|
@ -1432,7 +1432,7 @@ merge_in_block (int max_reg, basic_block bb)
|
|||
reg_next_inc_use[DF_REF_REGNO (def)] = NULL;
|
||||
reg_next_def[DF_REF_REGNO (def)] = insn;
|
||||
}
|
||||
|
||||
|
||||
for (use_rec = DF_INSN_UID_USES (uid); *use_rec; use_rec++)
|
||||
{
|
||||
df_ref use = *use_rec;
|
||||
|
@ -1441,7 +1441,7 @@ merge_in_block (int max_reg, basic_block bb)
|
|||
reg_next_inc_use[DF_REF_REGNO (use)] = insn;
|
||||
else
|
||||
reg_next_inc_use[DF_REF_REGNO (use)] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dump_file)
|
||||
fprintf (dump_file, "skipping update of deleted insn %d\n", uid);
|
||||
|
@ -1464,7 +1464,7 @@ merge_in_block (int max_reg, basic_block bb)
|
|||
|
||||
#endif
|
||||
|
||||
static unsigned int
|
||||
static unsigned int
|
||||
rest_of_handle_auto_inc_dec (void)
|
||||
{
|
||||
#ifdef AUTO_INC_DEC
|
||||
|
@ -1523,7 +1523,7 @@ struct rtl_opt_pass pass_inc_dec =
|
|||
0, /* properties_provided */
|
||||
0, /* properties_destroyed */
|
||||
0, /* todo_flags_start */
|
||||
TODO_dump_func |
|
||||
TODO_dump_func |
|
||||
TODO_df_finish, /* todo_flags_finish */
|
||||
}
|
||||
};
|
||||
|
|
|
@ -463,7 +463,7 @@ struct GTY(()) control_flow_graph {
|
|||
for ((INSN) = BB_HEAD (BB), (CURR) = (INSN) ? NEXT_INSN ((INSN)): NULL; \
|
||||
(INSN) && (INSN) != NEXT_INSN (BB_END (BB)); \
|
||||
(INSN) = (CURR), (CURR) = (INSN) ? NEXT_INSN ((INSN)) : NULL)
|
||||
|
||||
|
||||
#define FOR_BB_INSNS_REVERSE(BB, INSN) \
|
||||
for ((INSN) = BB_END (BB); \
|
||||
(INSN) && (INSN) != PREV_INSN (BB_HEAD (BB)); \
|
||||
|
|
|
@ -1374,7 +1374,7 @@ fix_up_fall_thru_edges (void)
|
|||
edge_iterator ei;
|
||||
|
||||
/* Find EDGE_CAN_FALLTHRU edge. */
|
||||
FOR_EACH_EDGE (e, ei, cur_bb->succs)
|
||||
FOR_EACH_EDGE (e, ei, cur_bb->succs)
|
||||
if (e->flags & EDGE_CAN_FALLTHRU)
|
||||
{
|
||||
fall_thru = e;
|
||||
|
@ -1438,7 +1438,7 @@ fix_up_fall_thru_edges (void)
|
|||
/* This is the case where both edges out of the basic
|
||||
block are crossing edges. Here we will fix up the
|
||||
fall through edge. The jump edge will be taken care
|
||||
of later. The EDGE_CROSSING flag of fall_thru edge
|
||||
of later. The EDGE_CROSSING flag of fall_thru edge
|
||||
is unset before the call to force_nonfallthru
|
||||
function because if a new basic-block is created
|
||||
this edge remains in the current section boundary
|
||||
|
|
|
@ -1417,7 +1417,7 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save)
|
|||
CLEAR_HARD_REG_SET (all_btrs);
|
||||
for (first_btr = -1, reg = 0; reg < FIRST_PSEUDO_REGISTER; reg++)
|
||||
if (TEST_HARD_REG_BIT (reg_class_contents[(int) btr_class], reg)
|
||||
&& (allow_callee_save || call_used_regs[reg]
|
||||
&& (allow_callee_save || call_used_regs[reg]
|
||||
|| df_regs_ever_live_p (reg)))
|
||||
{
|
||||
SET_HARD_REG_BIT (all_btrs, reg);
|
||||
|
|
262
gcc/builtins.c
262
gcc/builtins.c
|
@ -118,7 +118,7 @@ static rtx expand_builtin_strncmp (tree, rtx, enum machine_mode);
|
|||
static rtx builtin_memcpy_read_str (void *, HOST_WIDE_INT, enum machine_mode);
|
||||
static rtx expand_builtin_memcpy (tree, rtx);
|
||||
static rtx expand_builtin_mempcpy (tree, rtx, enum machine_mode);
|
||||
static rtx expand_builtin_mempcpy_args (tree, tree, tree, rtx,
|
||||
static rtx expand_builtin_mempcpy_args (tree, tree, tree, rtx,
|
||||
enum machine_mode, int);
|
||||
static rtx expand_builtin_strcpy (tree, rtx);
|
||||
static rtx expand_builtin_strcpy_args (tree, tree, rtx);
|
||||
|
@ -280,7 +280,7 @@ get_object_alignment (tree exp, unsigned int align, unsigned int max_align)
|
|||
{
|
||||
HOST_WIDE_INT bitsize, bitpos;
|
||||
tree offset;
|
||||
enum machine_mode mode;
|
||||
enum machine_mode mode;
|
||||
int unsignedp, volatilep;
|
||||
|
||||
exp = get_inner_reference (exp, &bitsize, &bitpos, &offset,
|
||||
|
@ -829,7 +829,7 @@ expand_builtin_longjmp (rtx buf_addr, rtx value)
|
|||
rtx fp, lab, stack, insn, last;
|
||||
enum machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL);
|
||||
|
||||
/* DRAP is needed for stack realign if longjmp is expanded to current
|
||||
/* DRAP is needed for stack realign if longjmp is expanded to current
|
||||
function */
|
||||
if (SUPPORTS_STACK_ALIGNMENT)
|
||||
crtl->need_drap = true;
|
||||
|
@ -2430,7 +2430,7 @@ expand_builtin_cexpi (tree exp, rtx target, rtx subtarget)
|
|||
fn = built_in_decls[BUILT_IN_SINCOSL];
|
||||
else
|
||||
gcc_unreachable ();
|
||||
|
||||
|
||||
op1 = assign_temp (TREE_TYPE (arg), 0, 1, 1);
|
||||
op2 = assign_temp (TREE_TYPE (arg), 0, 1, 1);
|
||||
op1a = copy_to_mode_reg (Pmode, XEXP (op1, 0));
|
||||
|
@ -2481,7 +2481,7 @@ expand_builtin_cexpi (tree exp, rtx target, rtx subtarget)
|
|||
|
||||
/* Make sure not to fold the cexp call again. */
|
||||
call = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn);
|
||||
return expand_expr (build_call_nary (ctype, call, 1, narg),
|
||||
return expand_expr (build_call_nary (ctype, call, 1, narg),
|
||||
target, VOIDmode, EXPAND_NORMAL);
|
||||
}
|
||||
|
||||
|
@ -2662,7 +2662,7 @@ expand_builtin_int_roundingfn_2 (tree exp, rtx target)
|
|||
|
||||
if (!validate_arglist (exp, REAL_TYPE, VOID_TYPE))
|
||||
gcc_unreachable ();
|
||||
|
||||
|
||||
arg = CALL_EXPR_ARG (exp, 0);
|
||||
|
||||
switch (DECL_FUNCTION_CODE (fndecl))
|
||||
|
@ -3110,7 +3110,7 @@ expand_builtin_powi (tree exp, rtx target, rtx subtarget)
|
|||
return target;
|
||||
}
|
||||
|
||||
/* Expand expression EXP which is a call to the strlen builtin. Return
|
||||
/* Expand expression EXP which is a call to the strlen builtin. Return
|
||||
NULL_RTX if we failed the caller should emit a normal call, otherwise
|
||||
try to get the result in TARGET, if convenient. */
|
||||
|
||||
|
@ -3268,7 +3268,7 @@ expand_builtin_memcpy (tree exp, rtx target)
|
|||
operation in-line. */
|
||||
if (src_align == 0)
|
||||
return NULL_RTX;
|
||||
|
||||
|
||||
if (currently_expanding_gimple_stmt)
|
||||
stringop_block_profile (currently_expanding_gimple_stmt,
|
||||
&expected_align, &expected_size);
|
||||
|
@ -3485,8 +3485,8 @@ expand_movstr (tree dest, tree src, rtx target, int endp)
|
|||
return target;
|
||||
}
|
||||
|
||||
/* Expand expression EXP, which is a call to the strcpy builtin. Return
|
||||
NULL_RTX if we failed the caller should emit a normal call, otherwise
|
||||
/* Expand expression EXP, which is a call to the strcpy builtin. Return
|
||||
NULL_RTX if we failed the caller should emit a normal call, otherwise
|
||||
try to get the result in TARGET, if convenient (and in mode MODE if that's
|
||||
convenient). */
|
||||
|
||||
|
@ -3606,7 +3606,7 @@ builtin_strncpy_read_str (void *data, HOST_WIDE_INT offset,
|
|||
return c_readstr (str + offset, mode);
|
||||
}
|
||||
|
||||
/* Expand expression EXP, which is a call to the strncpy builtin. Return
|
||||
/* Expand expression EXP, which is a call to the strncpy builtin. Return
|
||||
NULL_RTX if we failed the caller should emit a normal call. */
|
||||
|
||||
static rtx
|
||||
|
@ -3699,8 +3699,8 @@ builtin_memset_gen_str (void *data, HOST_WIDE_INT offset ATTRIBUTE_UNUSED,
|
|||
return force_reg (mode, target);
|
||||
}
|
||||
|
||||
/* Expand expression EXP, which is a call to the memset builtin. Return
|
||||
NULL_RTX if we failed the caller should emit a normal call, otherwise
|
||||
/* Expand expression EXP, which is a call to the memset builtin. Return
|
||||
NULL_RTX if we failed the caller should emit a normal call, otherwise
|
||||
try to get the result in TARGET, if convenient (and in mode MODE if that's
|
||||
convenient). */
|
||||
|
||||
|
@ -3793,7 +3793,7 @@ expand_builtin_memset_args (tree dest, tree val, tree len,
|
|||
dest_align, expected_align,
|
||||
expected_size))
|
||||
goto do_libcall;
|
||||
|
||||
|
||||
dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX);
|
||||
dest_mem = convert_memory_address (ptr_mode, dest_mem);
|
||||
return dest_mem;
|
||||
|
@ -3814,7 +3814,7 @@ expand_builtin_memset_args (tree dest, tree val, tree len,
|
|||
dest_align, expected_align,
|
||||
expected_size))
|
||||
goto do_libcall;
|
||||
|
||||
|
||||
dest_mem = force_operand (XEXP (dest_mem, 0), NULL_RTX);
|
||||
dest_mem = convert_memory_address (ptr_mode, dest_mem);
|
||||
return dest_mem;
|
||||
|
@ -3848,7 +3848,7 @@ expand_builtin_memset_args (tree dest, tree val, tree len,
|
|||
return expand_call (fn, target, target == const0_rtx);
|
||||
}
|
||||
|
||||
/* Expand expression EXP, which is a call to the bzero builtin. Return
|
||||
/* Expand expression EXP, which is a call to the bzero builtin. Return
|
||||
NULL_RTX if we failed the caller should emit a normal call. */
|
||||
|
||||
static rtx
|
||||
|
@ -4122,7 +4122,7 @@ expand_builtin_strcmp (tree exp, ATTRIBUTE_UNUSED rtx target)
|
|||
return NULL_RTX;
|
||||
}
|
||||
|
||||
/* Expand expression EXP, which is a call to the strncmp builtin. Return
|
||||
/* Expand expression EXP, which is a call to the strncmp builtin. Return
|
||||
NULL_RTX if we failed the caller should emit a normal call, otherwise try to get
|
||||
the result in TARGET, if convenient. */
|
||||
|
||||
|
@ -4805,7 +4805,7 @@ expand_builtin_alloca (tree exp, rtx target)
|
|||
rtx result;
|
||||
|
||||
/* Emit normal call if marked not-inlineable. */
|
||||
if (CALL_CANNOT_INLINE_P (exp))
|
||||
if (CALL_CANNOT_INLINE_P (exp))
|
||||
return NULL_RTX;
|
||||
|
||||
if (!validate_arglist (exp, INTEGER_TYPE, VOID_TYPE))
|
||||
|
@ -4871,7 +4871,7 @@ expand_builtin_unop (enum machine_mode target_mode, tree exp, rtx target,
|
|||
return convert_to_mode (target_mode, target, 0);
|
||||
}
|
||||
|
||||
/* Expand a call to __builtin_expect. We just return our argument
|
||||
/* Expand a call to __builtin_expect. We just return our argument
|
||||
as the builtin_expect semantic should've been already executed by
|
||||
tree branch prediction pass. */
|
||||
|
||||
|
@ -5613,7 +5613,7 @@ expand_builtin_fork_or_exec (tree fn, tree exp, rtx target, int ignore)
|
|||
call = rewrite_call_expr (EXPR_LOCATION (exp), exp, 0, decl, 0);
|
||||
return expand_call (call, target, ignore);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Reconstitute a mode for a __sync intrinsic operation. Since the type of
|
||||
|
@ -5774,7 +5774,7 @@ expand_builtin_compare_and_swap (enum machine_mode mode, tree exp,
|
|||
/* Expand the __sync_lock_test_and_set intrinsic. Note that the most
|
||||
general form is actually an atomic exchange, and some targets only
|
||||
support a reduced form with the second argument being a constant 1.
|
||||
EXP is the CALL_EXPR; TARGET is an optional place for us to store
|
||||
EXP is the CALL_EXPR; TARGET is an optional place for us to store
|
||||
the results. */
|
||||
|
||||
static rtx
|
||||
|
@ -6747,7 +6747,7 @@ builtin_mathfn_code (const_tree t)
|
|||
|
||||
if (! more_const_call_expr_args_p (&iter))
|
||||
return END_BUILTINS;
|
||||
|
||||
|
||||
arg = next_const_call_expr_arg (&iter);
|
||||
argtype = TREE_TYPE (arg);
|
||||
|
||||
|
@ -7188,12 +7188,12 @@ fold_builtin_cabs (location_t loc, tree arg, tree type, tree fndecl)
|
|||
&& (res = do_mpfr_arg2 (TREE_REALPART (arg), TREE_IMAGPART (arg),
|
||||
type, mpfr_hypot)))
|
||||
return res;
|
||||
|
||||
|
||||
if (TREE_CODE (arg) == COMPLEX_EXPR)
|
||||
{
|
||||
tree real = TREE_OPERAND (arg, 0);
|
||||
tree imag = TREE_OPERAND (arg, 1);
|
||||
|
||||
|
||||
/* If either part is zero, cabs is fabs of the other. */
|
||||
if (real_zerop (real))
|
||||
return fold_build1_loc (loc, ABS_EXPR, type, imag);
|
||||
|
@ -7265,7 +7265,7 @@ fold_builtin_sqrt (location_t loc, tree arg, tree type)
|
|||
/* Calculate the result when the argument is a constant. */
|
||||
if ((res = do_mpfr_arg1 (arg, type, mpfr_sqrt, &dconst0, NULL, true)))
|
||||
return res;
|
||||
|
||||
|
||||
/* Optimize sqrt(expN(x)) = expN(x*0.5). */
|
||||
fcode = builtin_mathfn_code (arg);
|
||||
if (flag_unsafe_math_optimizations && BUILTIN_EXPONENT_P (fcode))
|
||||
|
@ -7394,7 +7394,7 @@ fold_builtin_cbrt (location_t loc, tree arg, tree type)
|
|||
}
|
||||
|
||||
/* Optimize cbrt(pow(x,y)) -> pow(x,y/3) iff x is nonnegative. */
|
||||
if (fcode == BUILT_IN_POW
|
||||
if (fcode == BUILT_IN_POW
|
||||
|| fcode == BUILT_IN_POWF
|
||||
|| fcode == BUILT_IN_POWL)
|
||||
{
|
||||
|
@ -7430,7 +7430,7 @@ fold_builtin_cos (location_t loc,
|
|||
/* Calculate the result when the argument is a constant. */
|
||||
if ((res = do_mpfr_arg1 (arg, type, mpfr_cos, NULL, NULL, 0)))
|
||||
return res;
|
||||
|
||||
|
||||
/* Optimize cos(-x) into cos (x). */
|
||||
if ((narg = fold_strip_sign_ops (arg)))
|
||||
return build_call_expr_loc (loc, fndecl, 1, narg);
|
||||
|
@ -7451,12 +7451,12 @@ fold_builtin_cosh (location_t loc, tree arg, tree type, tree fndecl)
|
|||
/* Calculate the result when the argument is a constant. */
|
||||
if ((res = do_mpfr_arg1 (arg, type, mpfr_cosh, NULL, NULL, 0)))
|
||||
return res;
|
||||
|
||||
|
||||
/* Optimize cosh(-x) into cosh (x). */
|
||||
if ((narg = fold_strip_sign_ops (arg)))
|
||||
return build_call_expr_loc (loc, fndecl, 1, narg);
|
||||
}
|
||||
|
||||
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
|
@ -7479,7 +7479,7 @@ fold_builtin_ccos (location_t loc,
|
|||
if ((tmp = do_mpc_arg1 (arg, type, (hyper ? mpc_cosh : mpc_cos))))
|
||||
return tmp;
|
||||
#endif
|
||||
|
||||
|
||||
/* Optimize fn(-x) into fn(x). */
|
||||
if ((tmp = fold_strip_sign_ops (arg)))
|
||||
return build_call_expr_loc (loc, fndecl, 1, tmp);
|
||||
|
@ -7503,7 +7503,7 @@ fold_builtin_tan (tree arg, tree type)
|
|||
/* Calculate the result when the argument is a constant. */
|
||||
if ((res = do_mpfr_arg1 (arg, type, mpfr_tan, NULL, NULL, 0)))
|
||||
return res;
|
||||
|
||||
|
||||
/* Optimize tan(atan(x)) = x. */
|
||||
fcode = builtin_mathfn_code (arg);
|
||||
if (flag_unsafe_math_optimizations
|
||||
|
@ -7576,7 +7576,7 @@ fold_builtin_cexp (location_t loc, tree arg0, tree type)
|
|||
if ((res = do_mpc_arg1 (arg0, type, mpc_exp)))
|
||||
return res;
|
||||
#endif
|
||||
|
||||
|
||||
rtype = TREE_TYPE (TREE_TYPE (arg0));
|
||||
|
||||
/* In case we can figure out the real part of arg0 and it is constant zero
|
||||
|
@ -8001,7 +8001,7 @@ fold_builtin_logarithm (location_t loc, tree fndecl, tree arg,
|
|||
{
|
||||
CASE_FLT_FN (BUILT_IN_EXP):
|
||||
/* Prepare to do logN(exp(exponent) -> exponent*logN(e). */
|
||||
x = build_real (type, real_value_truncate (TYPE_MODE (type),
|
||||
x = build_real (type, real_value_truncate (TYPE_MODE (type),
|
||||
dconst_e ()));
|
||||
exponent = CALL_EXPR_ARG (arg, 0);
|
||||
break;
|
||||
|
@ -8068,23 +8068,23 @@ fold_builtin_hypot (location_t loc, tree fndecl,
|
|||
/* Calculate the result when the argument is a constant. */
|
||||
if ((res = do_mpfr_arg2 (arg0, arg1, type, mpfr_hypot)))
|
||||
return res;
|
||||
|
||||
|
||||
/* If either argument to hypot has a negate or abs, strip that off.
|
||||
E.g. hypot(-x,fabs(y)) -> hypot(x,y). */
|
||||
narg0 = fold_strip_sign_ops (arg0);
|
||||
narg1 = fold_strip_sign_ops (arg1);
|
||||
if (narg0 || narg1)
|
||||
{
|
||||
return build_call_expr_loc (loc, fndecl, 2, narg0 ? narg0 : arg0,
|
||||
return build_call_expr_loc (loc, fndecl, 2, narg0 ? narg0 : arg0,
|
||||
narg1 ? narg1 : arg1);
|
||||
}
|
||||
|
||||
|
||||
/* If either argument is zero, hypot is fabs of the other. */
|
||||
if (real_zerop (arg0))
|
||||
return fold_build1_loc (loc, ABS_EXPR, type, arg1);
|
||||
else if (real_zerop (arg1))
|
||||
return fold_build1_loc (loc, ABS_EXPR, type, arg0);
|
||||
|
||||
|
||||
/* hypot(x,x) -> fabs(x)*sqrt(2). */
|
||||
if (flag_unsafe_math_optimizations
|
||||
&& operand_equal_p (arg0, arg1, OEP_PURE_SAME))
|
||||
|
@ -8310,7 +8310,7 @@ fold_builtin_exponent (location_t loc, tree fndecl, tree arg,
|
|||
{
|
||||
tree type = TREE_TYPE (TREE_TYPE (fndecl));
|
||||
tree res;
|
||||
|
||||
|
||||
/* Calculate the result when the argument is a constant. */
|
||||
if ((res = do_mpfr_arg1 (arg, type, func, NULL, NULL, 0)))
|
||||
return res;
|
||||
|
@ -8490,7 +8490,7 @@ fold_builtin_memory_op (location_t loc, tree dest, tree src,
|
|||
src_align = get_pointer_alignment (src, BIGGEST_ALIGNMENT);
|
||||
dest_align = get_pointer_alignment (dest, BIGGEST_ALIGNMENT);
|
||||
|
||||
/* Both DEST and SRC must be pointer types.
|
||||
/* Both DEST and SRC must be pointer types.
|
||||
??? This is what old code did. Is the testing for pointer types
|
||||
really mandatory?
|
||||
|
||||
|
@ -9238,7 +9238,7 @@ fold_builtin_toascii (location_t loc, tree arg)
|
|||
{
|
||||
if (!validate_arg (arg, INTEGER_TYPE))
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
/* Transform toascii(c) -> (c & 0x7f). */
|
||||
return fold_build2_loc (loc, BIT_AND_EXPR, integer_type_node, arg,
|
||||
build_int_cst (NULL_TREE, 0x7f));
|
||||
|
@ -9329,7 +9329,7 @@ fold_builtin_fmin_fmax (location_t loc, tree arg0, tree arg1,
|
|||
/* Transform fmin/fmax(x,x) -> x. */
|
||||
if (operand_equal_p (arg0, arg1, OEP_PURE_SAME))
|
||||
return omit_one_operand_loc (loc, type, arg0, arg1);
|
||||
|
||||
|
||||
/* Convert fmin/fmax to MIN_EXPR/MAX_EXPR. C99 requires these
|
||||
functions to return the numeric arg if the other one is NaN.
|
||||
These tree codes don't honor that, so only transform if
|
||||
|
@ -9352,7 +9352,7 @@ fold_builtin_carg (location_t loc, tree arg, tree type)
|
|||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg))) == REAL_TYPE)
|
||||
{
|
||||
tree atan2_fn = mathfn_built_in (type, BUILT_IN_ATAN2);
|
||||
|
||||
|
||||
if (atan2_fn)
|
||||
{
|
||||
tree new_arg = builtin_save_expr (arg);
|
||||
|
@ -9361,7 +9361,7 @@ fold_builtin_carg (location_t loc, tree arg, tree type)
|
|||
return build_call_expr_loc (loc, atan2_fn, 2, i_arg, r_arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
|
@ -9372,13 +9372,13 @@ fold_builtin_logb (location_t loc, tree arg, tree rettype)
|
|||
{
|
||||
if (! validate_arg (arg, REAL_TYPE))
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg);
|
||||
|
||||
|
||||
if (TREE_CODE (arg) == REAL_CST && ! TREE_OVERFLOW (arg))
|
||||
{
|
||||
const REAL_VALUE_TYPE *const value = TREE_REAL_CST_PTR (arg);
|
||||
|
||||
|
||||
switch (value->cl)
|
||||
{
|
||||
case rvc_nan:
|
||||
|
@ -9403,7 +9403,7 @@ fold_builtin_logb (location_t loc, tree arg, tree rettype)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
|
@ -9414,13 +9414,13 @@ fold_builtin_significand (location_t loc, tree arg, tree rettype)
|
|||
{
|
||||
if (! validate_arg (arg, REAL_TYPE))
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg);
|
||||
|
||||
|
||||
if (TREE_CODE (arg) == REAL_CST && ! TREE_OVERFLOW (arg))
|
||||
{
|
||||
const REAL_VALUE_TYPE *const value = TREE_REAL_CST_PTR (arg);
|
||||
|
||||
|
||||
switch (value->cl)
|
||||
{
|
||||
case rvc_zero:
|
||||
|
@ -9442,7 +9442,7 @@ fold_builtin_significand (location_t loc, tree arg, tree rettype)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
|
@ -9453,12 +9453,12 @@ fold_builtin_frexp (location_t loc, tree arg0, tree arg1, tree rettype)
|
|||
{
|
||||
if (! validate_arg (arg0, REAL_TYPE) || ! validate_arg (arg1, POINTER_TYPE))
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg0);
|
||||
|
||||
|
||||
if (!(TREE_CODE (arg0) == REAL_CST && ! TREE_OVERFLOW (arg0)))
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
arg1 = build_fold_indirect_ref_loc (loc, arg1);
|
||||
|
||||
/* Proceed if a valid pointer type was passed in. */
|
||||
|
@ -9466,7 +9466,7 @@ fold_builtin_frexp (location_t loc, tree arg0, tree arg1, tree rettype)
|
|||
{
|
||||
const REAL_VALUE_TYPE *const value = TREE_REAL_CST_PTR (arg0);
|
||||
tree frac, exp;
|
||||
|
||||
|
||||
switch (value->cl)
|
||||
{
|
||||
case rvc_zero:
|
||||
|
@ -9492,7 +9492,7 @@ fold_builtin_frexp (location_t loc, tree arg0, tree arg1, tree rettype)
|
|||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
||||
|
||||
/* Create the COMPOUND_EXPR (*arg1 = trunc, frac). */
|
||||
arg1 = fold_build2_loc (loc, MODIFY_EXPR, rettype, arg1, exp);
|
||||
TREE_SIDE_EFFECTS (arg1) = 1;
|
||||
|
@ -9520,7 +9520,7 @@ fold_builtin_load_exponent (location_t loc, tree arg0, tree arg1,
|
|||
|| (TREE_CODE (arg0) == REAL_CST
|
||||
&& !real_isfinite (&TREE_REAL_CST (arg0))))
|
||||
return omit_one_operand_loc (loc, type, arg0, arg1);
|
||||
|
||||
|
||||
/* If both arguments are constant, then try to evaluate it. */
|
||||
if ((ldexp || REAL_MODE_FORMAT (TYPE_MODE (type))->b == 2)
|
||||
&& TREE_CODE (arg0) == REAL_CST && !TREE_OVERFLOW (arg0)
|
||||
|
@ -9529,20 +9529,20 @@ fold_builtin_load_exponent (location_t loc, tree arg0, tree arg1,
|
|||
/* Bound the maximum adjustment to twice the range of the
|
||||
mode's valid exponents. Use abs to ensure the range is
|
||||
positive as a sanity check. */
|
||||
const long max_exp_adj = 2 *
|
||||
const long max_exp_adj = 2 *
|
||||
labs (REAL_MODE_FORMAT (TYPE_MODE (type))->emax
|
||||
- REAL_MODE_FORMAT (TYPE_MODE (type))->emin);
|
||||
|
||||
/* Get the user-requested adjustment. */
|
||||
const HOST_WIDE_INT req_exp_adj = tree_low_cst (arg1, 0);
|
||||
|
||||
|
||||
/* The requested adjustment must be inside this range. This
|
||||
is a preliminary cap to avoid things like overflow, we
|
||||
may still fail to compute the result for other reasons. */
|
||||
if (-max_exp_adj < req_exp_adj && req_exp_adj < max_exp_adj)
|
||||
{
|
||||
REAL_VALUE_TYPE initial_result;
|
||||
|
||||
|
||||
real_ldexp (&initial_result, &TREE_REAL_CST (arg0), req_exp_adj);
|
||||
|
||||
/* Ensure we didn't overflow. */
|
||||
|
@ -9550,7 +9550,7 @@ fold_builtin_load_exponent (location_t loc, tree arg0, tree arg1,
|
|||
{
|
||||
const REAL_VALUE_TYPE trunc_result
|
||||
= real_value_truncate (TYPE_MODE (type), initial_result);
|
||||
|
||||
|
||||
/* Only proceed if the target mode can hold the
|
||||
resulting value. */
|
||||
if (REAL_VALUES_EQUAL (initial_result, trunc_result))
|
||||
|
@ -9570,12 +9570,12 @@ fold_builtin_modf (location_t loc, tree arg0, tree arg1, tree rettype)
|
|||
{
|
||||
if (! validate_arg (arg0, REAL_TYPE) || ! validate_arg (arg1, POINTER_TYPE))
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg0);
|
||||
|
||||
|
||||
if (!(TREE_CODE (arg0) == REAL_CST && ! TREE_OVERFLOW (arg0)))
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
arg1 = build_fold_indirect_ref_loc (loc, arg1);
|
||||
|
||||
/* Proceed if a valid pointer type was passed in. */
|
||||
|
@ -9607,7 +9607,7 @@ fold_builtin_modf (location_t loc, tree arg0, tree arg1, tree rettype)
|
|||
frac.sign = value->sign;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* Create the COMPOUND_EXPR (*arg1 = trunc, frac). */
|
||||
arg1 = fold_build2_loc (loc, MODIFY_EXPR, rettype, arg1,
|
||||
build_real (rettype, trunc));
|
||||
|
@ -9615,7 +9615,7 @@ fold_builtin_modf (location_t loc, tree arg0, tree arg1, tree rettype)
|
|||
return fold_build2_loc (loc, COMPOUND_EXPR, rettype, arg1,
|
||||
build_real (rettype, frac));
|
||||
}
|
||||
|
||||
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
|
@ -9760,7 +9760,7 @@ fold_builtin_classify (location_t loc, tree fndecl, tree arg, int builtin_index)
|
|||
signbit_call, integer_zero_node);
|
||||
isinf_call = fold_build2_loc (loc, NE_EXPR, integer_type_node,
|
||||
isinf_call, integer_zero_node);
|
||||
|
||||
|
||||
tmp = fold_build3_loc (loc, COND_EXPR, integer_type_node, signbit_call,
|
||||
integer_minus_one_node, integer_one_node);
|
||||
tmp = fold_build3_loc (loc, COND_EXPR, integer_type_node,
|
||||
|
@ -9818,13 +9818,13 @@ fold_builtin_fpclassify (location_t loc, tree exp)
|
|||
enum machine_mode mode;
|
||||
REAL_VALUE_TYPE r;
|
||||
char buf[128];
|
||||
|
||||
|
||||
/* Verify the required arguments in the original call. */
|
||||
if (!validate_arglist (exp, INTEGER_TYPE, INTEGER_TYPE,
|
||||
INTEGER_TYPE, INTEGER_TYPE,
|
||||
INTEGER_TYPE, REAL_TYPE, VOID_TYPE))
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
fp_nan = CALL_EXPR_ARG (exp, 0);
|
||||
fp_infinite = CALL_EXPR_ARG (exp, 1);
|
||||
fp_normal = CALL_EXPR_ARG (exp, 2);
|
||||
|
@ -9835,12 +9835,12 @@ fold_builtin_fpclassify (location_t loc, tree exp)
|
|||
mode = TYPE_MODE (type);
|
||||
arg = builtin_save_expr (fold_build1_loc (loc, ABS_EXPR, type, arg));
|
||||
|
||||
/* fpclassify(x) ->
|
||||
/* fpclassify(x) ->
|
||||
isnan(x) ? FP_NAN :
|
||||
(fabs(x) == Inf ? FP_INFINITE :
|
||||
(fabs(x) >= DBL_MIN ? FP_NORMAL :
|
||||
(x == 0 ? FP_ZERO : FP_SUBNORMAL))). */
|
||||
|
||||
|
||||
tmp = fold_build2_loc (loc, EQ_EXPR, integer_type_node, arg,
|
||||
build_real (type, dconst0));
|
||||
res = fold_build3_loc (loc, COND_EXPR, integer_type_node,
|
||||
|
@ -9851,7 +9851,7 @@ fold_builtin_fpclassify (location_t loc, tree exp)
|
|||
tmp = fold_build2_loc (loc, GE_EXPR, integer_type_node,
|
||||
arg, build_real (type, r));
|
||||
res = fold_build3_loc (loc, COND_EXPR, integer_type_node, tmp, fp_normal, res);
|
||||
|
||||
|
||||
if (HONOR_INFINITIES (mode))
|
||||
{
|
||||
real_inf (&r);
|
||||
|
@ -9866,7 +9866,7 @@ fold_builtin_fpclassify (location_t loc, tree exp)
|
|||
tmp = fold_build2_loc (loc, ORDERED_EXPR, integer_type_node, arg, arg);
|
||||
res = fold_build3_loc (loc, COND_EXPR, integer_type_node, tmp, res, fp_nan);
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -9991,13 +9991,13 @@ fold_builtin_1 (location_t loc, tree fndecl, tree arg0, bool ignore)
|
|||
|
||||
CASE_FLT_FN (BUILT_IN_CONJ):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return fold_build1_loc (loc, CONJ_EXPR, type, arg0);
|
||||
break;
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CREAL):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return non_lvalue_loc (loc, fold_build1_loc (loc, REALPART_EXPR, type, arg0));;
|
||||
break;
|
||||
|
||||
|
@ -10009,86 +10009,86 @@ fold_builtin_1 (location_t loc, tree fndecl, tree arg0, bool ignore)
|
|||
|
||||
CASE_FLT_FN (BUILT_IN_CCOS):
|
||||
return fold_builtin_ccos(loc, arg0, type, fndecl, /*hyper=*/ false);
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CCOSH):
|
||||
return fold_builtin_ccos(loc, arg0, type, fndecl, /*hyper=*/ true);
|
||||
|
||||
|
||||
#ifdef HAVE_mpc
|
||||
CASE_FLT_FN (BUILT_IN_CSIN):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_sin);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CSINH):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_sinh);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CTAN):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_tan);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CTANH):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_tanh);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CLOG):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_log);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CSQRT):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_sqrt);
|
||||
break;
|
||||
|
||||
|
||||
#ifdef HAVE_mpc_arc
|
||||
CASE_FLT_FN (BUILT_IN_CASIN):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_asin);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CACOS):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_acos);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CATAN):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_atan);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CASINH):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_asinh);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CACOSH):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_acosh);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CATANH):
|
||||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE)
|
||||
return do_mpc_arg1 (arg0, type, mpc_atanh);
|
||||
break;
|
||||
#endif /* HAVE_mpc_arc */
|
||||
#endif /* HAVE_mpc */
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_CABS):
|
||||
return fold_builtin_cabs (loc, arg0, type, fndecl);
|
||||
|
||||
|
@ -10181,7 +10181,7 @@ fold_builtin_1 (location_t loc, tree fndecl, tree arg0, bool ignore)
|
|||
if (validate_arg (arg0, REAL_TYPE))
|
||||
return do_mpfr_arg1 (arg0, type, mpfr_gamma, NULL, NULL, 0);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_EXP):
|
||||
return fold_builtin_exponent (loc, fndecl, arg0, mpfr_exp);
|
||||
|
||||
|
@ -10196,7 +10196,7 @@ fold_builtin_1 (location_t loc, tree fndecl, tree arg0, bool ignore)
|
|||
if (validate_arg (arg0, REAL_TYPE))
|
||||
return do_mpfr_arg1 (arg0, type, mpfr_expm1, NULL, NULL, 0);
|
||||
break;
|
||||
|
||||
|
||||
CASE_FLT_FN (BUILT_IN_LOG):
|
||||
return fold_builtin_logarithm (loc, fndecl, arg0, mpfr_log);
|
||||
|
||||
|
@ -10410,7 +10410,7 @@ fold_builtin_2 (location_t loc, tree fndecl, tree arg0, tree arg1, bool ignore)
|
|||
if (validate_arg (arg0, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg0))) == REAL_TYPE
|
||||
&& validate_arg (arg1, COMPLEX_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg1))) == REAL_TYPE)
|
||||
&& TREE_CODE (TREE_TYPE (TREE_TYPE (arg1))) == REAL_TYPE)
|
||||
return do_mpc_arg2 (arg0, arg1, type, /*do_nonfinite=*/ 0, mpc_pow);
|
||||
break;
|
||||
#endif
|
||||
|
@ -10664,7 +10664,7 @@ fold_builtin_3 (location_t loc, tree fndecl,
|
|||
ARG2, and ARG3. IGNORE is true if the result of the function call is
|
||||
ignored. This function returns NULL_TREE if no simplification was
|
||||
possible. */
|
||||
|
||||
|
||||
static tree
|
||||
fold_builtin_4 (location_t loc, tree fndecl,
|
||||
tree arg0, tree arg1, tree arg2, tree arg3, bool ignore)
|
||||
|
@ -10710,9 +10710,9 @@ fold_builtin_4 (location_t loc, tree fndecl,
|
|||
fixed argument patterns. Foldings that do varargs-to-varargs
|
||||
transformations, or that match calls with more than 4 arguments,
|
||||
need to be handled with fold_builtin_varargs instead. */
|
||||
|
||||
|
||||
#define MAX_ARGS_TO_FOLD_BUILTIN 4
|
||||
|
||||
|
||||
static tree
|
||||
fold_builtin_n (location_t loc, tree fndecl, tree *args, int nargs, bool ignore)
|
||||
{
|
||||
|
@ -10861,10 +10861,10 @@ fold_call_expr (location_t loc, tree exp, bool ignore)
|
|||
}
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
|
||||
/* Conveniently construct a function call expression. FNDECL names the
|
||||
function to be called and ARGLIST is a TREE_LIST of arguments. */
|
||||
|
||||
|
||||
tree
|
||||
build_function_call_expr (location_t loc, tree fndecl, tree arglist)
|
||||
{
|
||||
|
@ -10882,7 +10882,7 @@ build_function_call_expr (location_t loc, tree fndecl, tree arglist)
|
|||
/* Conveniently construct a function call expression. FNDECL names the
|
||||
function to be called, N is the number of arguments, and the "..."
|
||||
parameters are the argument expressions. */
|
||||
|
||||
|
||||
tree
|
||||
build_call_expr_loc (location_t loc, tree fndecl, int n, ...)
|
||||
{
|
||||
|
@ -10987,7 +10987,7 @@ rewrite_call_expr (location_t loc, tree exp, int skip, tree fndecl, int n, ...)
|
|||
for (j = skip; j < oldnargs; j++, i++)
|
||||
buffer[i] = CALL_EXPR_ARG (exp, j);
|
||||
}
|
||||
else
|
||||
else
|
||||
buffer = CALL_EXPR_ARGP (exp) + skip;
|
||||
|
||||
return fold (build_call_array_loc (loc, TREE_TYPE (exp), fn, nargs, buffer));
|
||||
|
@ -10995,7 +10995,7 @@ rewrite_call_expr (location_t loc, tree exp, int skip, tree fndecl, int n, ...)
|
|||
|
||||
/* Validate a single argument ARG against a tree code CODE representing
|
||||
a type. */
|
||||
|
||||
|
||||
static bool
|
||||
validate_arg (const_tree arg, enum tree_code code)
|
||||
{
|
||||
|
@ -11449,7 +11449,7 @@ fold_builtin_strcat (location_t loc ATTRIBUTE_UNUSED, tree dst, tree src)
|
|||
/* If we don't have a movstr we don't want to emit an strcpy
|
||||
call. We have to do that if the length of the source string
|
||||
isn't computable (in that case we can use memcpy probably
|
||||
later expanding to a sequence of mov instructions). If we
|
||||
later expanding to a sequence of mov instructions). If we
|
||||
have movstr instructions we can emit strcpy calls. */
|
||||
if (!HAVE_movstr)
|
||||
{
|
||||
|
@ -11759,7 +11759,7 @@ fold_builtin_next_arg (tree exp, bool va_start_p)
|
|||
arg = SSA_NAME_VAR (arg);
|
||||
|
||||
/* We destructively modify the call to be __builtin_va_start (ap, 0)
|
||||
or __builtin_next_arg (0) the first time we see it, after checking
|
||||
or __builtin_next_arg (0) the first time we see it, after checking
|
||||
the arguments and if needed issuing a warning. */
|
||||
if (!integer_zerop (arg))
|
||||
{
|
||||
|
@ -12129,7 +12129,7 @@ maybe_emit_sprintf_chk_warning (tree exp, enum built_in_function fcode)
|
|||
int nargs = call_expr_nargs (exp);
|
||||
|
||||
/* Verify the required arguments in the original call. */
|
||||
|
||||
|
||||
if (nargs < 4)
|
||||
return;
|
||||
size = CALL_EXPR_ARG (exp, 2);
|
||||
|
@ -13097,7 +13097,7 @@ do_mpfr_arg1 (tree arg, tree type, int (*func)(mpfr_ptr, mpfr_srcptr, mp_rnd_t),
|
|||
bool inclusive)
|
||||
{
|
||||
tree result = NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg);
|
||||
|
||||
/* To proceed, MPFR must exactly represent the target floating point
|
||||
|
@ -13125,7 +13125,7 @@ do_mpfr_arg1 (tree arg, tree type, int (*func)(mpfr_ptr, mpfr_srcptr, mp_rnd_t),
|
|||
mpfr_clear (m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -13140,7 +13140,7 @@ do_mpfr_arg2 (tree arg1, tree arg2, tree type,
|
|||
int (*func)(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mp_rnd_t))
|
||||
{
|
||||
tree result = NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg1);
|
||||
STRIP_NOPS (arg2);
|
||||
|
||||
|
@ -13170,7 +13170,7 @@ do_mpfr_arg2 (tree arg1, tree arg2, tree type,
|
|||
mpfr_clears (m1, m2, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -13185,7 +13185,7 @@ do_mpfr_arg3 (tree arg1, tree arg2, tree arg3, tree type,
|
|||
int (*func)(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mp_rnd_t))
|
||||
{
|
||||
tree result = NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg1);
|
||||
STRIP_NOPS (arg2);
|
||||
STRIP_NOPS (arg3);
|
||||
|
@ -13219,7 +13219,7 @@ do_mpfr_arg3 (tree arg1, tree arg2, tree arg3, tree type,
|
|||
mpfr_clears (m1, m2, m3, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -13235,9 +13235,9 @@ do_mpfr_sincos (tree arg, tree arg_sinp, tree arg_cosp)
|
|||
{
|
||||
tree const type = TREE_TYPE (arg);
|
||||
tree result = NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg);
|
||||
|
||||
|
||||
/* To proceed, MPFR must exactly represent the target floating point
|
||||
format, which only happens when the target base equals two. */
|
||||
if (REAL_MODE_FORMAT (TYPE_MODE (type))->b == 2
|
||||
|
@ -13336,7 +13336,7 @@ do_mpfr_bessel_n (tree arg1, tree arg2, tree type,
|
|||
mpfr_clear (m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -13350,10 +13350,10 @@ do_mpfr_remquo (tree arg0, tree arg1, tree arg_quo)
|
|||
{
|
||||
tree const type = TREE_TYPE (arg0);
|
||||
tree result = NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg0);
|
||||
STRIP_NOPS (arg1);
|
||||
|
||||
|
||||
/* To proceed, MPFR must exactly represent the target floating point
|
||||
format, which only happens when the target base equals two. */
|
||||
if (REAL_MODE_FORMAT (TYPE_MODE (type))->b == 2
|
||||
|
@ -13427,7 +13427,7 @@ do_mpfr_lgamma_r (tree arg, tree arg_sg, tree type)
|
|||
tree result = NULL_TREE;
|
||||
|
||||
STRIP_NOPS (arg);
|
||||
|
||||
|
||||
/* To proceed, MPFR must exactly represent the target floating point
|
||||
format, which only happens when the target base equals two. Also
|
||||
verify ARG is a constant and that ARG_SG is an int pointer. */
|
||||
|
@ -13489,7 +13489,7 @@ static tree
|
|||
do_mpc_arg1 (tree arg, tree type, int (*func)(mpc_ptr, mpc_srcptr, mpc_rnd_t))
|
||||
{
|
||||
tree result = NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg);
|
||||
|
||||
/* To proceed, MPFR must exactly represent the target floating point
|
||||
|
@ -13510,7 +13510,7 @@ do_mpc_arg1 (tree arg, tree type, int (*func)(mpc_ptr, mpc_srcptr, mpc_rnd_t))
|
|||
const mpc_rnd_t crnd = fmt->round_towards_zero ? MPC_RNDZZ : MPC_RNDNN;
|
||||
int inexact;
|
||||
mpc_t m;
|
||||
|
||||
|
||||
mpc_init2 (m, prec);
|
||||
mpfr_from_real (mpc_realref(m), re, rnd);
|
||||
mpfr_from_real (mpc_imagref(m), im, rnd);
|
||||
|
@ -13538,7 +13538,7 @@ do_mpc_arg2 (tree arg0, tree arg1, tree type, int do_nonfinite,
|
|||
int (*func)(mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t))
|
||||
{
|
||||
tree result = NULL_TREE;
|
||||
|
||||
|
||||
STRIP_NOPS (arg0);
|
||||
STRIP_NOPS (arg1);
|
||||
|
||||
|
@ -13566,7 +13566,7 @@ do_mpc_arg2 (tree arg0, tree arg1, tree type, int do_nonfinite,
|
|||
const mpc_rnd_t crnd = fmt->round_towards_zero ? MPC_RNDZZ : MPC_RNDNN;
|
||||
int inexact;
|
||||
mpc_t m0, m1;
|
||||
|
||||
|
||||
mpc_init2 (m0, prec);
|
||||
mpc_init2 (m1, prec);
|
||||
mpfr_from_real (mpc_realref(m0), re0, rnd);
|
||||
|
|
|
@ -643,7 +643,7 @@ DEF_EXT_LIB_BUILTIN (BUILT_IN_FFSL, "ffsl", BT_FN_INT_LONG, ATTR_CONST_NOTHRO
|
|||
DEF_EXT_LIB_BUILTIN (BUILT_IN_FFSLL, "ffsll", BT_FN_INT_LONGLONG, ATTR_CONST_NOTHROW_LIST)
|
||||
DEF_EXT_LIB_BUILTIN (BUILT_IN_FORK, "fork", BT_FN_PID, ATTR_NOTHROW_LIST)
|
||||
DEF_GCC_BUILTIN (BUILT_IN_FRAME_ADDRESS, "frame_address", BT_FN_PTR_UINT, ATTR_NULL)
|
||||
DEF_LIB_BUILTIN (BUILT_IN_FREE, "free", BT_FN_VOID_PTR, ATTR_NOTHROW_LIST)
|
||||
DEF_LIB_BUILTIN (BUILT_IN_FREE, "free", BT_FN_VOID_PTR, ATTR_NOTHROW_LIST)
|
||||
DEF_GCC_BUILTIN (BUILT_IN_FROB_RETURN_ADDR, "frob_return_addr", BT_FN_PTR_PTR, ATTR_NULL)
|
||||
DEF_EXT_LIB_BUILTIN (BUILT_IN_GETTEXT, "gettext", BT_FN_STRING_CONST_STRING, ATTR_FORMAT_ARG_1)
|
||||
DEF_C99_BUILTIN (BUILT_IN_IMAXABS, "imaxabs", BT_FN_INTMAX_INTMAX, ATTR_CONST_NOTHROW_LIST)
|
||||
|
|
160
gcc/c-common.c
160
gcc/c-common.c
|
@ -1542,7 +1542,7 @@ decl_constant_value_for_optimization (tree exp)
|
|||
void
|
||||
constant_expression_warning (tree value)
|
||||
{
|
||||
if (warn_overflow && pedantic
|
||||
if (warn_overflow && pedantic
|
||||
&& (TREE_CODE (value) == INTEGER_CST || TREE_CODE (value) == REAL_CST
|
||||
|| TREE_CODE (value) == FIXED_CST
|
||||
|| TREE_CODE (value) == VECTOR_CST
|
||||
|
@ -1585,12 +1585,12 @@ overflow_warning (location_t loc, tree value)
|
|||
case INTEGER_CST:
|
||||
warning_at (loc, OPT_Woverflow, "integer overflow in expression");
|
||||
break;
|
||||
|
||||
|
||||
case REAL_CST:
|
||||
warning_at (loc, OPT_Woverflow,
|
||||
"floating point overflow in expression");
|
||||
break;
|
||||
|
||||
|
||||
case FIXED_CST:
|
||||
warning_at (loc, OPT_Woverflow, "fixed-point overflow in expression");
|
||||
break;
|
||||
|
@ -1598,7 +1598,7 @@ overflow_warning (location_t loc, tree value)
|
|||
case VECTOR_CST:
|
||||
warning_at (loc, OPT_Woverflow, "vector overflow in expression");
|
||||
break;
|
||||
|
||||
|
||||
case COMPLEX_CST:
|
||||
if (TREE_CODE (TREE_REALPART (value)) == INTEGER_CST)
|
||||
warning_at (loc, OPT_Woverflow,
|
||||
|
@ -1620,7 +1620,7 @@ overflow_warning (location_t loc, tree value)
|
|||
had CODE_LEFT and CODE_RIGHT, into an expression of type TYPE. */
|
||||
void
|
||||
warn_logical_operator (location_t location, enum tree_code code, tree type,
|
||||
enum tree_code code_left, tree op_left,
|
||||
enum tree_code code_left, tree op_left,
|
||||
enum tree_code ARG_UNUSED (code_right), tree op_right)
|
||||
{
|
||||
int or_op = (code == TRUTH_ORIF_EXPR || code == TRUTH_OR_EXPR);
|
||||
|
@ -1677,12 +1677,12 @@ warn_logical_operator (location_t location, enum tree_code code, tree type,
|
|||
|
||||
if (rhs && TREE_CODE (rhs) == C_MAYBE_CONST_EXPR)
|
||||
rhs = C_MAYBE_CONST_EXPR_EXPR (rhs);
|
||||
|
||||
|
||||
/* If this is an OR operation, invert both sides; we will invert
|
||||
again at the end. */
|
||||
if (or_op)
|
||||
in0_p = !in0_p, in1_p = !in1_p;
|
||||
|
||||
|
||||
/* If both expressions are the same, if we can merge the ranges, and we
|
||||
can build the range test, return it or it inverted. */
|
||||
if (lhs && rhs && operand_equal_p (lhs, rhs, 0)
|
||||
|
@ -1741,7 +1741,7 @@ strict_aliasing_warning (tree otype, tree type, tree expr)
|
|||
}
|
||||
else
|
||||
{
|
||||
/* warn_strict_aliasing >= 3. This includes the default (3).
|
||||
/* warn_strict_aliasing >= 3. This includes the default (3).
|
||||
Only warn if the cast is dereferenced immediately. */
|
||||
alias_set_type set1 =
|
||||
get_alias_set (TREE_TYPE (TREE_OPERAND (expr, 0)));
|
||||
|
@ -1806,7 +1806,7 @@ check_main_parameter_types (tree decl)
|
|||
{
|
||||
case 1:
|
||||
if (TYPE_MAIN_VARIANT (type) != integer_type_node)
|
||||
pedwarn (input_location, OPT_Wmain, "first argument of %q+D should be %<int%>",
|
||||
pedwarn (input_location, OPT_Wmain, "first argument of %q+D should be %<int%>",
|
||||
decl);
|
||||
break;
|
||||
|
||||
|
@ -1901,7 +1901,7 @@ vector_types_convertible_p (const_tree t1, const_tree t2, bool emit_lax_note)
|
|||
both args are zero-extended or both are sign-extended.
|
||||
Otherwise, we might change the result.
|
||||
Eg, (short)-1 | (unsigned short)-1 is (int)-1
|
||||
but calculated in (unsigned short) it would be (unsigned short)-1.
|
||||
but calculated in (unsigned short) it would be (unsigned short)-1.
|
||||
*/
|
||||
tree shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwise)
|
||||
{
|
||||
|
@ -1916,13 +1916,13 @@ tree shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwise)
|
|||
from signed char and that RESULT_TYPE is long long int.
|
||||
If we explicitly cast OP0 to RESULT_TYPE, OP0 would look
|
||||
like
|
||||
|
||||
|
||||
(long long int) (unsigned int) signed_char
|
||||
|
||||
which get_narrower would narrow down to
|
||||
|
||||
|
||||
(unsigned int) signed char
|
||||
|
||||
|
||||
If we do not cast OP0 first, get_narrower would return
|
||||
signed_char, which is inconsistent with the case of the
|
||||
explicit cast. */
|
||||
|
@ -1937,7 +1937,7 @@ tree shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwise)
|
|||
|
||||
/* Handle the case that OP0 (or OP1) does not *contain* a conversion
|
||||
but it *requires* conversion to FINAL_TYPE. */
|
||||
|
||||
|
||||
if ((TYPE_PRECISION (TREE_TYPE (op0))
|
||||
== TYPE_PRECISION (TREE_TYPE (arg0)))
|
||||
&& TREE_TYPE (op0) != result_type)
|
||||
|
@ -1946,18 +1946,18 @@ tree shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwise)
|
|||
== TYPE_PRECISION (TREE_TYPE (arg1)))
|
||||
&& TREE_TYPE (op1) != result_type)
|
||||
unsigned1 = TYPE_UNSIGNED (TREE_TYPE (op1));
|
||||
|
||||
|
||||
/* Now UNSIGNED0 is 1 if ARG0 zero-extends to FINAL_TYPE. */
|
||||
|
||||
|
||||
/* For bitwise operations, signedness of nominal type
|
||||
does not matter. Consider only how operands were extended. */
|
||||
if (bitwise)
|
||||
uns = unsigned0;
|
||||
|
||||
|
||||
/* Note that in all three cases below we refrain from optimizing
|
||||
an unsigned operation on sign-extended args.
|
||||
That would not be valid. */
|
||||
|
||||
|
||||
/* Both args variable: if both extended in same way
|
||||
from same width, do it in that width.
|
||||
Do it unsigned if args were zero-extended. */
|
||||
|
@ -2036,7 +2036,7 @@ conversion_warning (tree type, tree expr)
|
|||
/* Conversion from boolean to a signed:1 bit-field (which only
|
||||
can hold the values 0 and -1) doesn't lose information - but
|
||||
it does change the value. */
|
||||
if (TYPE_PRECISION (type) == 1 && !TYPE_UNSIGNED (type))
|
||||
if (TYPE_PRECISION (type) == 1 && !TYPE_UNSIGNED (type))
|
||||
warning (OPT_Wconversion,
|
||||
"conversion to %qT from boolean expression", type);
|
||||
return;
|
||||
|
@ -2057,7 +2057,7 @@ conversion_warning (tree type, tree expr)
|
|||
&& TREE_CODE (type) == INTEGER_TYPE
|
||||
&& !int_fits_type_p (expr, type))
|
||||
{
|
||||
if (TYPE_UNSIGNED (type) && !TYPE_UNSIGNED (expr_type)
|
||||
if (TYPE_UNSIGNED (type) && !TYPE_UNSIGNED (expr_type)
|
||||
&& tree_int_cst_sgn (expr) < 0)
|
||||
warning (OPT_Wsign_conversion,
|
||||
"negative integer implicitly converted to unsigned type");
|
||||
|
@ -2102,7 +2102,7 @@ conversion_warning (tree type, tree expr)
|
|||
tree op1 = TREE_OPERAND (expr, 1);
|
||||
tree op2 = TREE_OPERAND (expr, 2);
|
||||
|
||||
if ((TREE_CODE (op1) == REAL_CST || TREE_CODE (op1) == INTEGER_CST
|
||||
if ((TREE_CODE (op1) == REAL_CST || TREE_CODE (op1) == INTEGER_CST
|
||||
|| TREE_CODE (op1) == COND_EXPR)
|
||||
&& (TREE_CODE (op2) == REAL_CST || TREE_CODE (op2) == INTEGER_CST
|
||||
|| TREE_CODE (op2) == COND_EXPR))
|
||||
|
@ -2129,15 +2129,15 @@ conversion_warning (tree type, tree expr)
|
|||
expr_type = TREE_TYPE (expr);
|
||||
|
||||
/* Don't warn for short y; short x = ((int)y & 0xff); */
|
||||
if (TREE_CODE (expr) == BIT_AND_EXPR
|
||||
|| TREE_CODE (expr) == BIT_IOR_EXPR
|
||||
if (TREE_CODE (expr) == BIT_AND_EXPR
|
||||
|| TREE_CODE (expr) == BIT_IOR_EXPR
|
||||
|| TREE_CODE (expr) == BIT_XOR_EXPR)
|
||||
{
|
||||
/* If both args were extended from a shortest type,
|
||||
use that type if that is safe. */
|
||||
expr_type = shorten_binary_op (expr_type,
|
||||
TREE_OPERAND (expr, 0),
|
||||
TREE_OPERAND (expr, 1),
|
||||
expr_type = shorten_binary_op (expr_type,
|
||||
TREE_OPERAND (expr, 0),
|
||||
TREE_OPERAND (expr, 1),
|
||||
/* bitwise */1);
|
||||
|
||||
if (TREE_CODE (expr) == BIT_AND_EXPR)
|
||||
|
@ -2155,13 +2155,13 @@ conversion_warning (tree type, tree expr)
|
|||
&& int_fits_type_p (op0, c_common_unsigned_type (type)))
|
||||
|| (TREE_CODE (op1) == INTEGER_CST
|
||||
&& int_fits_type_p (op1, c_common_signed_type (type))
|
||||
&& int_fits_type_p (op1,
|
||||
&& int_fits_type_p (op1,
|
||||
c_common_unsigned_type (type))))
|
||||
return;
|
||||
/* If constant is unsigned and fits in the target
|
||||
type, then the result will also fit. */
|
||||
else if ((TREE_CODE (op0) == INTEGER_CST
|
||||
&& unsigned0
|
||||
&& unsigned0
|
||||
&& int_fits_type_p (op0, type))
|
||||
|| (TREE_CODE (op1) == INTEGER_CST
|
||||
&& unsigned1
|
||||
|
@ -2170,7 +2170,7 @@ conversion_warning (tree type, tree expr)
|
|||
}
|
||||
}
|
||||
/* Warn for integer types converted to smaller integer types. */
|
||||
if (TYPE_PRECISION (type) < TYPE_PRECISION (expr_type))
|
||||
if (TYPE_PRECISION (type) < TYPE_PRECISION (expr_type))
|
||||
give_warning = true;
|
||||
|
||||
/* When they are the same width but different signedness,
|
||||
|
@ -2194,9 +2194,9 @@ conversion_warning (tree type, tree expr)
|
|||
{
|
||||
tree type_low_bound = TYPE_MIN_VALUE (expr_type);
|
||||
tree type_high_bound = TYPE_MAX_VALUE (expr_type);
|
||||
REAL_VALUE_TYPE real_low_bound
|
||||
REAL_VALUE_TYPE real_low_bound
|
||||
= real_value_from_int_cst (0, type_low_bound);
|
||||
REAL_VALUE_TYPE real_high_bound
|
||||
REAL_VALUE_TYPE real_high_bound
|
||||
= real_value_from_int_cst (0, type_high_bound);
|
||||
|
||||
if (!exact_real_truncate (TYPE_MODE (type), &real_low_bound)
|
||||
|
@ -2245,7 +2245,7 @@ warnings_for_convert_and_check (tree type, tree expr, tree result)
|
|||
else
|
||||
conversion_warning (type, expr);
|
||||
}
|
||||
else if (!int_fits_type_p (expr, c_common_unsigned_type (type)))
|
||||
else if (!int_fits_type_p (expr, c_common_unsigned_type (type)))
|
||||
warning (OPT_Woverflow,
|
||||
"overflow in implicit constant conversion");
|
||||
/* No warning for converting 0x80000000 to int. */
|
||||
|
@ -2294,7 +2294,7 @@ convert_and_check (tree type, tree expr)
|
|||
|
||||
if (TREE_TYPE (expr) == type)
|
||||
return expr;
|
||||
|
||||
|
||||
result = convert (type, expr);
|
||||
|
||||
if (c_inhibit_evaluation_warnings == 0
|
||||
|
@ -2600,7 +2600,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
|
|||
{
|
||||
call_expr_arg_iterator iter;
|
||||
tree arg;
|
||||
tmp_before = tmp_nosp = 0;
|
||||
tmp_before = tmp_nosp = 0;
|
||||
verify_tree (CALL_EXPR_FN (x), &tmp_before, &tmp_nosp, NULL_TREE);
|
||||
FOR_EACH_CALL_EXPR_ARG (arg, iter, x)
|
||||
{
|
||||
|
@ -3685,7 +3685,7 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
|
|||
&& !(TREE_CODE (primop0) == INTEGER_CST
|
||||
&& !TREE_OVERFLOW (convert (c_common_signed_type (type),
|
||||
primop0))))
|
||||
warning (OPT_Wtype_limits,
|
||||
warning (OPT_Wtype_limits,
|
||||
"comparison of unsigned expression >= 0 is always true");
|
||||
value = truthvalue_true_node;
|
||||
break;
|
||||
|
@ -3695,7 +3695,7 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
|
|||
&& !(TREE_CODE (primop0) == INTEGER_CST
|
||||
&& !TREE_OVERFLOW (convert (c_common_signed_type (type),
|
||||
primop0))))
|
||||
warning (OPT_Wtype_limits,
|
||||
warning (OPT_Wtype_limits,
|
||||
"comparison of unsigned expression < 0 is always false");
|
||||
value = truthvalue_false_node;
|
||||
break;
|
||||
|
@ -3737,19 +3737,19 @@ pointer_int_sum (location_t loc, enum tree_code resultcode,
|
|||
|
||||
if (TREE_CODE (TREE_TYPE (result_type)) == VOID_TYPE)
|
||||
{
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
"pointer of type %<void *%> used in arithmetic");
|
||||
size_exp = integer_one_node;
|
||||
}
|
||||
else if (TREE_CODE (TREE_TYPE (result_type)) == FUNCTION_TYPE)
|
||||
{
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
"pointer to a function used in arithmetic");
|
||||
size_exp = integer_one_node;
|
||||
}
|
||||
else if (TREE_CODE (TREE_TYPE (result_type)) == METHOD_TYPE)
|
||||
{
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
"pointer to member function used in arithmetic");
|
||||
size_exp = integer_one_node;
|
||||
}
|
||||
|
@ -3912,7 +3912,7 @@ c_common_truthvalue_conversion (location_t location, tree expr)
|
|||
if (TREE_TYPE (expr) == truthvalue_type_node)
|
||||
return expr;
|
||||
expr = build2 (TREE_CODE (expr), truthvalue_type_node,
|
||||
c_common_truthvalue_conversion (location,
|
||||
c_common_truthvalue_conversion (location,
|
||||
TREE_OPERAND (expr, 0)),
|
||||
c_common_truthvalue_conversion (location,
|
||||
TREE_OPERAND (expr, 1)));
|
||||
|
@ -4005,7 +4005,7 @@ c_common_truthvalue_conversion (location_t location, tree expr)
|
|||
{
|
||||
expr = build2 (COMPOUND_EXPR, truthvalue_type_node,
|
||||
TREE_OPERAND (expr, 1),
|
||||
c_common_truthvalue_conversion
|
||||
c_common_truthvalue_conversion
|
||||
(location, TREE_OPERAND (expr, 0)));
|
||||
goto ret;
|
||||
}
|
||||
|
@ -4361,7 +4361,7 @@ c_sizeof_or_alignof_type (location_t loc,
|
|||
if (is_sizeof)
|
||||
{
|
||||
if (complain && (pedantic || warn_pointer_arith))
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
"invalid application of %<sizeof%> to a function type");
|
||||
else if (!complain)
|
||||
return error_mark_node;
|
||||
|
@ -4374,7 +4374,7 @@ c_sizeof_or_alignof_type (location_t loc,
|
|||
{
|
||||
if (type_code == VOID_TYPE
|
||||
&& complain && (pedantic || warn_pointer_arith))
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
"invalid application of %qs to a void type", op_name);
|
||||
else if (!complain)
|
||||
return error_mark_node;
|
||||
|
@ -4770,7 +4770,7 @@ c_common_nodes_and_builtins (void)
|
|||
|
||||
/* Only supported decimal floating point extension if the target
|
||||
actually supports underlying modes. */
|
||||
if (targetm.scalar_mode_supported_p (SDmode)
|
||||
if (targetm.scalar_mode_supported_p (SDmode)
|
||||
&& targetm.scalar_mode_supported_p (DDmode)
|
||||
&& targetm.scalar_mode_supported_p (TDmode))
|
||||
{
|
||||
|
@ -5332,7 +5332,7 @@ c_add_case_label (location_t loc, splay_tree cases, tree cond, tree orig_type,
|
|||
|
||||
/* Case ranges are a GNU extension. */
|
||||
if (high_value)
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
"range expressions in switch statements are non-standard");
|
||||
|
||||
type = TREE_TYPE (cond);
|
||||
|
@ -6269,7 +6269,7 @@ get_priority (tree args, bool is_destructor)
|
|||
|
||||
if (!args)
|
||||
return DEFAULT_INIT_PRIORITY;
|
||||
|
||||
|
||||
if (!SUPPORTS_INIT_PRIORITY)
|
||||
{
|
||||
if (is_destructor)
|
||||
|
@ -6293,12 +6293,12 @@ get_priority (tree args, bool is_destructor)
|
|||
if (is_destructor)
|
||||
warning (0,
|
||||
"destructor priorities from 0 to %d are reserved "
|
||||
"for the implementation",
|
||||
"for the implementation",
|
||||
MAX_RESERVED_INIT_PRIORITY);
|
||||
else
|
||||
warning (0,
|
||||
"constructor priorities from 0 to %d are reserved "
|
||||
"for the implementation",
|
||||
"for the implementation",
|
||||
MAX_RESERVED_INIT_PRIORITY);
|
||||
}
|
||||
return pri;
|
||||
|
@ -6578,7 +6578,7 @@ handle_section_attribute (tree *node, tree ARG_UNUSED (name), tree args,
|
|||
&& current_function_decl != NULL_TREE
|
||||
&& !TREE_STATIC (decl))
|
||||
{
|
||||
error_at (DECL_SOURCE_LOCATION (decl),
|
||||
error_at (DECL_SOURCE_LOCATION (decl),
|
||||
"section attribute cannot be specified for "
|
||||
"local variables");
|
||||
*no_add_attrs = true;
|
||||
|
@ -6744,11 +6744,11 @@ handle_alias_attribute (tree *node, tree name, tree args,
|
|||
*no_add_attrs = true;
|
||||
}
|
||||
else if ((TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl))
|
||||
|| (TREE_CODE (decl) != FUNCTION_DECL
|
||||
|| (TREE_CODE (decl) != FUNCTION_DECL
|
||||
&& TREE_PUBLIC (decl) && !DECL_EXTERNAL (decl))
|
||||
/* A static variable declaration is always a tentative definition,
|
||||
but the alias is a non-tentative definition which overrides. */
|
||||
|| (TREE_CODE (decl) != FUNCTION_DECL
|
||||
|| (TREE_CODE (decl) != FUNCTION_DECL
|
||||
&& ! TREE_PUBLIC (decl) && DECL_INITIAL (decl)))
|
||||
{
|
||||
error ("%q+D defined both normally and as an alias", decl);
|
||||
|
@ -7091,11 +7091,11 @@ handle_alloc_size_attribute (tree *node, tree ARG_UNUSED (name), tree args,
|
|||
tree position = TREE_VALUE (args);
|
||||
|
||||
if (TREE_CODE (position) != INTEGER_CST
|
||||
|| TREE_INT_CST_HIGH (position)
|
||||
|| TREE_INT_CST_HIGH (position)
|
||||
|| TREE_INT_CST_LOW (position) < 1
|
||||
|| TREE_INT_CST_LOW (position) > arg_count )
|
||||
{
|
||||
warning (OPT_Wattributes,
|
||||
warning (OPT_Wattributes,
|
||||
"alloc_size parameter outside range");
|
||||
*no_add_attrs = true;
|
||||
return NULL_TREE;
|
||||
|
@ -7653,7 +7653,7 @@ handle_sentinel_attribute (tree *node, tree name, tree args,
|
|||
|
||||
if (TREE_CODE (position) != INTEGER_CST)
|
||||
{
|
||||
warning (OPT_Wattributes,
|
||||
warning (OPT_Wattributes,
|
||||
"requested position is not an integer constant");
|
||||
*no_add_attrs = true;
|
||||
}
|
||||
|
@ -7679,10 +7679,10 @@ handle_type_generic_attribute (tree *node, tree ARG_UNUSED (name),
|
|||
bool * ARG_UNUSED (no_add_attrs))
|
||||
{
|
||||
tree params;
|
||||
|
||||
|
||||
/* Ensure we have a function type. */
|
||||
gcc_assert (TREE_CODE (*node) == FUNCTION_TYPE);
|
||||
|
||||
|
||||
params = TYPE_ARG_TYPES (*node);
|
||||
while (params && ! VOID_TYPE_P (TREE_VALUE (params)))
|
||||
params = TREE_CHAIN (params);
|
||||
|
@ -8054,7 +8054,7 @@ check_builtin_function_arguments (tree fndecl, int nargs, tree *args)
|
|||
if (validate_nargs (fndecl, nargs, 6))
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
|
||||
for (i=0; i<5; i++)
|
||||
if (TREE_CODE (args[i]) != INTEGER_CST)
|
||||
{
|
||||
|
@ -8166,7 +8166,7 @@ catenate_strings (const char *lhs, const char *rhs_start, int rhs_size)
|
|||
TOKEN, which had the associated VALUE. */
|
||||
|
||||
void
|
||||
c_parse_error (const char *gmsgid, enum cpp_ttype token_type,
|
||||
c_parse_error (const char *gmsgid, enum cpp_ttype token_type,
|
||||
tree value, unsigned char token_flags)
|
||||
{
|
||||
#define catenate_messages(M1, M2) catenate_strings ((M1), (M2), sizeof (M2))
|
||||
|
@ -8175,8 +8175,8 @@ c_parse_error (const char *gmsgid, enum cpp_ttype token_type,
|
|||
|
||||
if (token_type == CPP_EOF)
|
||||
message = catenate_messages (gmsgid, " at end of input");
|
||||
else if (token_type == CPP_CHAR
|
||||
|| token_type == CPP_WCHAR
|
||||
else if (token_type == CPP_CHAR
|
||||
|| token_type == CPP_WCHAR
|
||||
|| token_type == CPP_CHAR16
|
||||
|| token_type == CPP_CHAR32)
|
||||
{
|
||||
|
@ -8208,8 +8208,8 @@ c_parse_error (const char *gmsgid, enum cpp_ttype token_type,
|
|||
free (message);
|
||||
message = NULL;
|
||||
}
|
||||
else if (token_type == CPP_STRING
|
||||
|| token_type == CPP_WSTRING
|
||||
else if (token_type == CPP_STRING
|
||||
|| token_type == CPP_WSTRING
|
||||
|| token_type == CPP_STRING16
|
||||
|| token_type == CPP_STRING32
|
||||
|| token_type == CPP_UTF8STRING)
|
||||
|
@ -8585,7 +8585,7 @@ complete_array_type (tree *ptype, tree initial_value, bool do_default)
|
|||
|
||||
/* Make sure we have the canonical MAIN_TYPE. */
|
||||
hashcode = iterative_hash_object (TYPE_HASH (unqual_elt), hashcode);
|
||||
hashcode = iterative_hash_object (TYPE_HASH (TYPE_DOMAIN (main_type)),
|
||||
hashcode = iterative_hash_object (TYPE_HASH (TYPE_DOMAIN (main_type)),
|
||||
hashcode);
|
||||
main_type = type_hash_canon (hashcode, main_type);
|
||||
|
||||
|
@ -8596,7 +8596,7 @@ complete_array_type (tree *ptype, tree initial_value, bool do_default)
|
|||
else if (TYPE_CANONICAL (TREE_TYPE (main_type)) != TREE_TYPE (main_type)
|
||||
|| (TYPE_CANONICAL (TYPE_DOMAIN (main_type))
|
||||
!= TYPE_DOMAIN (main_type)))
|
||||
TYPE_CANONICAL (main_type)
|
||||
TYPE_CANONICAL (main_type)
|
||||
= build_array_type (TYPE_CANONICAL (TREE_TYPE (main_type)),
|
||||
TYPE_CANONICAL (TYPE_DOMAIN (main_type)));
|
||||
else
|
||||
|
@ -8891,7 +8891,7 @@ warn_about_parentheses (enum tree_code code,
|
|||
|| ((CODE) != INTEGER_CST \
|
||||
&& (integer_onep (ARG) || integer_zerop (ARG))))
|
||||
|
||||
switch (code)
|
||||
switch (code)
|
||||
{
|
||||
case LSHIFT_EXPR:
|
||||
if (code_left == PLUS_EXPR || code_right == PLUS_EXPR)
|
||||
|
@ -9041,16 +9041,16 @@ warn_for_div_by_zero (location_t loc, tree divisor)
|
|||
The arguments of this function map directly to local variables
|
||||
of build_binary_op. */
|
||||
|
||||
void
|
||||
void
|
||||
warn_for_sign_compare (location_t location,
|
||||
tree orig_op0, tree orig_op1,
|
||||
tree op0, tree op1,
|
||||
tree orig_op0, tree orig_op1,
|
||||
tree op0, tree op1,
|
||||
tree result_type, enum tree_code resultcode)
|
||||
{
|
||||
int op0_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op0));
|
||||
int op1_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op1));
|
||||
int unsignedp0, unsignedp1;
|
||||
|
||||
|
||||
/* In C++, check for comparison of different enum types. */
|
||||
if (c_dialect_cxx()
|
||||
&& TREE_CODE (TREE_TYPE (orig_op0)) == ENUMERAL_TYPE
|
||||
|
@ -9078,10 +9078,10 @@ warn_for_sign_compare (location_t location,
|
|||
|
||||
if (op0_signed)
|
||||
sop = orig_op0, uop = orig_op1;
|
||||
else
|
||||
else
|
||||
sop = orig_op1, uop = orig_op0;
|
||||
|
||||
STRIP_TYPE_NOPS (sop);
|
||||
STRIP_TYPE_NOPS (sop);
|
||||
STRIP_TYPE_NOPS (uop);
|
||||
base_type = (TREE_CODE (result_type) == COMPLEX_TYPE
|
||||
? TREE_TYPE (result_type) : result_type);
|
||||
|
@ -9107,23 +9107,23 @@ warn_for_sign_compare (location_t location,
|
|||
&& int_fits_type_p (TYPE_MAX_VALUE (TREE_TYPE (uop)),
|
||||
c_common_signed_type (base_type)))
|
||||
/* OK */;
|
||||
else
|
||||
else
|
||||
warning_at (location,
|
||||
OPT_Wsign_compare,
|
||||
OPT_Wsign_compare,
|
||||
"comparison between signed and unsigned integer expressions");
|
||||
}
|
||||
|
||||
|
||||
/* Warn if two unsigned values are being compared in a size larger
|
||||
than their original size, and one (and only one) is the result of
|
||||
a `~' operator. This comparison will always fail.
|
||||
|
||||
|
||||
Also warn if one operand is a constant, and the constant does not
|
||||
have all bits set that are set in the ~ operand when it is
|
||||
extended. */
|
||||
|
||||
op0 = get_narrower (op0, &unsignedp0);
|
||||
op1 = get_narrower (op1, &unsignedp1);
|
||||
|
||||
|
||||
if ((TREE_CODE (op0) == BIT_NOT_EXPR)
|
||||
^ (TREE_CODE (op1) == BIT_NOT_EXPR))
|
||||
{
|
||||
|
@ -9138,7 +9138,7 @@ warn_for_sign_compare (location_t location,
|
|||
HOST_WIDE_INT constant, mask;
|
||||
int unsignedp;
|
||||
unsigned int bits;
|
||||
|
||||
|
||||
if (host_integerp (op0, 0))
|
||||
{
|
||||
primop = op1;
|
||||
|
@ -9151,7 +9151,7 @@ warn_for_sign_compare (location_t location,
|
|||
unsignedp = unsignedp0;
|
||||
constant = tree_low_cst (op1, 0);
|
||||
}
|
||||
|
||||
|
||||
bits = TYPE_PRECISION (TREE_TYPE (primop));
|
||||
if (bits < TYPE_PRECISION (result_type)
|
||||
&& bits < HOST_BITS_PER_LONG && unsignedp)
|
||||
|
@ -9160,10 +9160,10 @@ warn_for_sign_compare (location_t location,
|
|||
if ((mask & constant) != mask)
|
||||
{
|
||||
if (constant == 0)
|
||||
warning (OPT_Wsign_compare,
|
||||
warning (OPT_Wsign_compare,
|
||||
"promoted ~unsigned is always non-zero");
|
||||
else
|
||||
warning_at (location, OPT_Wsign_compare,
|
||||
warning_at (location, OPT_Wsign_compare,
|
||||
"comparison of promoted ~unsigned with constant");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1038,9 +1038,9 @@ extern void warn_about_parentheses (enum tree_code,
|
|||
extern void warn_for_unused_label (tree label);
|
||||
extern void warn_for_div_by_zero (location_t, tree divisor);
|
||||
extern void warn_for_sign_compare (location_t,
|
||||
tree orig_op0, tree orig_op1,
|
||||
tree op0, tree op1,
|
||||
tree result_type,
|
||||
tree orig_op0, tree orig_op1,
|
||||
tree op0, tree op1,
|
||||
tree result_type,
|
||||
enum tree_code resultcode);
|
||||
extern void set_underlying_type (tree x);
|
||||
extern bool is_typedef_decl (tree x);
|
||||
|
|
|
@ -60,7 +60,7 @@ static void builtin_define_type_max (const char *, tree);
|
|||
static void builtin_define_type_minmax (const char *, const char *, tree);
|
||||
static void builtin_define_type_precision (const char *, tree);
|
||||
static void builtin_define_type_sizeof (const char *, tree);
|
||||
static void builtin_define_float_constants (const char *,
|
||||
static void builtin_define_float_constants (const char *,
|
||||
const char *,
|
||||
const char *,
|
||||
tree);
|
||||
|
@ -84,9 +84,9 @@ builtin_define_type_sizeof (const char *name, tree type)
|
|||
/* Define the float.h constants for TYPE using NAME_PREFIX, FP_SUFFIX,
|
||||
and FP_CAST. */
|
||||
static void
|
||||
builtin_define_float_constants (const char *name_prefix,
|
||||
const char *fp_suffix,
|
||||
const char *fp_cast,
|
||||
builtin_define_float_constants (const char *name_prefix,
|
||||
const char *fp_suffix,
|
||||
const char *fp_cast,
|
||||
tree type)
|
||||
{
|
||||
/* Used to convert radix-based values to base 10 values in several cases.
|
||||
|
@ -205,7 +205,7 @@ builtin_define_float_constants (const char *name_prefix,
|
|||
construct the following numbers directly as a hexadecimal
|
||||
constants. */
|
||||
get_max_float (fmt, buf, sizeof (buf));
|
||||
|
||||
|
||||
sprintf (name, "__%s_MAX__", name_prefix);
|
||||
builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix, fp_cast);
|
||||
|
||||
|
@ -260,8 +260,8 @@ builtin_define_float_constants (const char *name_prefix,
|
|||
|
||||
/* Define __DECx__ constants for TYPE using NAME_PREFIX and SUFFIX. */
|
||||
static void
|
||||
builtin_define_decimal_float_constants (const char *name_prefix,
|
||||
const char *suffix,
|
||||
builtin_define_decimal_float_constants (const char *name_prefix,
|
||||
const char *suffix,
|
||||
tree type)
|
||||
{
|
||||
const struct real_format *fmt;
|
||||
|
@ -286,7 +286,7 @@ builtin_define_decimal_float_constants (const char *name_prefix,
|
|||
/* Compute the minimum representable value. */
|
||||
sprintf (name, "__%s_MIN__", name_prefix);
|
||||
sprintf (buf, "1E%d%s", fmt->emin - 1, suffix);
|
||||
builtin_define_with_value (name, buf, 0);
|
||||
builtin_define_with_value (name, buf, 0);
|
||||
|
||||
/* Compute the maximum representable value. */
|
||||
sprintf (name, "__%s_MAX__", name_prefix);
|
||||
|
@ -300,7 +300,7 @@ builtin_define_decimal_float_constants (const char *name_prefix,
|
|||
*p = 0;
|
||||
/* fmt->p plus 1, to account for the decimal point and fmt->emax
|
||||
minus 1 because the digits are nines, not 1.0. */
|
||||
sprintf (&buf[fmt->p + 1], "E%d%s", fmt->emax - 1, suffix);
|
||||
sprintf (&buf[fmt->p + 1], "E%d%s", fmt->emax - 1, suffix);
|
||||
builtin_define_with_value (name, buf, 0);
|
||||
|
||||
/* Compute epsilon (the difference between 1 and least value greater
|
||||
|
@ -319,7 +319,7 @@ builtin_define_decimal_float_constants (const char *name_prefix,
|
|||
*p++ = '.';
|
||||
}
|
||||
*p = 0;
|
||||
sprintf (&buf[fmt->p], "1E%d%s", fmt->emin - 1, suffix);
|
||||
sprintf (&buf[fmt->p], "1E%d%s", fmt->emin - 1, suffix);
|
||||
builtin_define_with_value (name, buf, 0);
|
||||
}
|
||||
|
||||
|
@ -935,7 +935,7 @@ builtin_define_with_int_value (const char *macro, HOST_WIDE_INT value)
|
|||
static void
|
||||
builtin_define_with_hex_fp_value (const char *macro,
|
||||
tree type, int digits,
|
||||
const char *hex_str,
|
||||
const char *hex_str,
|
||||
const char *fp_suffix,
|
||||
const char *fp_cast)
|
||||
{
|
||||
|
@ -961,7 +961,7 @@ builtin_define_with_hex_fp_value (const char *macro,
|
|||
sprintf (buf1, "%s%s", dec_str, fp_suffix);
|
||||
sprintf (buf2, fp_cast, buf1);
|
||||
sprintf (buf1, "%s=%s", macro, buf2);
|
||||
|
||||
|
||||
cpp_define (parse_in, buf1);
|
||||
}
|
||||
|
||||
|
|
48
gcc/c-decl.c
48
gcc/c-decl.c
|
@ -1102,7 +1102,7 @@ pop_scope (void)
|
|||
error ("label %q+D used but not defined", p);
|
||||
DECL_INITIAL (p) = error_mark_node;
|
||||
}
|
||||
else
|
||||
else
|
||||
warn_for_unused_label (p);
|
||||
|
||||
/* Labels go in BLOCK_VARS. */
|
||||
|
@ -1897,7 +1897,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
|
|||
}
|
||||
else if (warn_traditional)
|
||||
{
|
||||
warned |= warning (OPT_Wtraditional,
|
||||
warned |= warning (OPT_Wtraditional,
|
||||
"non-static declaration of %q+D "
|
||||
"follows static declaration", newdecl);
|
||||
}
|
||||
|
@ -1975,7 +1975,7 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
|
|||
}
|
||||
else if (warn_traditional)
|
||||
{
|
||||
warned |= warning (OPT_Wtraditional,
|
||||
warned |= warning (OPT_Wtraditional,
|
||||
"non-static declaration of %q+D "
|
||||
"follows static declaration", newdecl);
|
||||
}
|
||||
|
@ -2046,14 +2046,14 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
|
|||
if (DECL_DECLARED_INLINE_P (newdecl)
|
||||
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (olddecl)))
|
||||
{
|
||||
warned |= warning (OPT_Wattributes,
|
||||
warned |= warning (OPT_Wattributes,
|
||||
"inline declaration of %qD follows "
|
||||
"declaration with attribute noinline", newdecl);
|
||||
}
|
||||
else if (DECL_DECLARED_INLINE_P (olddecl)
|
||||
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (newdecl)))
|
||||
{
|
||||
warned |= warning (OPT_Wattributes,
|
||||
warned |= warning (OPT_Wattributes,
|
||||
"declaration of %q+D with attribute "
|
||||
"noinline follows inline declaration ", newdecl);
|
||||
}
|
||||
|
@ -2812,8 +2812,8 @@ implicit_decl_warning (tree id, tree olddecl)
|
|||
if (flag_isoc99)
|
||||
warned = pedwarn (input_location, OPT_Wimplicit_function_declaration,
|
||||
"implicit declaration of function %qE", id);
|
||||
else
|
||||
warned = warning (OPT_Wimplicit_function_declaration,
|
||||
else
|
||||
warned = warning (OPT_Wimplicit_function_declaration,
|
||||
G_("implicit declaration of function %qE"), id);
|
||||
if (olddecl && warned)
|
||||
locate_old_decl (olddecl);
|
||||
|
@ -3497,10 +3497,10 @@ c_make_fname_decl (location_t loc, tree id, int type_dep)
|
|||
|
||||
if (current_function_decl
|
||||
/* For invalid programs like this:
|
||||
|
||||
|
||||
void foo()
|
||||
const char* p = __FUNCTION__;
|
||||
|
||||
|
||||
the __FUNCTION__ is believed to appear in K&R style function
|
||||
parameter declarator. In that case we still don't have
|
||||
function_scope. */
|
||||
|
@ -4653,7 +4653,7 @@ warn_variable_length_array (tree name, tree size)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (name)
|
||||
if (name)
|
||||
pedwarn (input_location, OPT_Wvla,
|
||||
"ISO C90 forbids variable length array %qE",
|
||||
name);
|
||||
|
@ -4880,11 +4880,11 @@ grokdeclarator (const struct c_declarator *declarator,
|
|||
else
|
||||
{
|
||||
if (name)
|
||||
pedwarn_c99 (loc, flag_isoc99 ? 0 : OPT_Wimplicit_int,
|
||||
pedwarn_c99 (loc, flag_isoc99 ? 0 : OPT_Wimplicit_int,
|
||||
"type defaults to %<int%> in declaration of %qE",
|
||||
name);
|
||||
else
|
||||
pedwarn_c99 (input_location, flag_isoc99 ? 0 : OPT_Wimplicit_int,
|
||||
pedwarn_c99 (input_location, flag_isoc99 ? 0 : OPT_Wimplicit_int,
|
||||
"type defaults to %<int%> in type name");
|
||||
}
|
||||
}
|
||||
|
@ -4946,8 +4946,8 @@ grokdeclarator (const struct c_declarator *declarator,
|
|||
|| storage_class == csc_typedef))
|
||||
{
|
||||
if (storage_class == csc_auto)
|
||||
pedwarn (loc,
|
||||
(current_scope == file_scope) ? 0 : OPT_pedantic,
|
||||
pedwarn (loc,
|
||||
(current_scope == file_scope) ? 0 : OPT_pedantic,
|
||||
"function definition declared %<auto%>");
|
||||
if (storage_class == csc_register)
|
||||
error_at (loc, "function definition declared %<register%>");
|
||||
|
@ -6833,7 +6833,7 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes,
|
|||
|
||||
if (pedantic && TREE_CODE (t) == RECORD_TYPE
|
||||
&& flexible_array_type_p (TREE_TYPE (x)))
|
||||
pedwarn (DECL_SOURCE_LOCATION (x), OPT_pedantic,
|
||||
pedwarn (DECL_SOURCE_LOCATION (x), OPT_pedantic,
|
||||
"invalid use of structure with flexible array member");
|
||||
|
||||
if (DECL_NAME (x))
|
||||
|
@ -7284,7 +7284,7 @@ build_enumerator (location_t loc,
|
|||
(6.4.4.3/2 in the C99 Standard). GCC allows any integer type as
|
||||
an extension. */
|
||||
else if (!int_fits_type_p (value, integer_type_node))
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
"ISO C restricts enumerator values to range of %<int%>");
|
||||
|
||||
/* The ISO C Standard mandates enumerators to have type int, even
|
||||
|
@ -7396,7 +7396,7 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
|
|||
}
|
||||
|
||||
if (warn_about_return_type)
|
||||
pedwarn_c99 (loc, flag_isoc99 ? 0
|
||||
pedwarn_c99 (loc, flag_isoc99 ? 0
|
||||
: (warn_return_type ? OPT_Wreturn_type : OPT_Wimplicit_int),
|
||||
"return type defaults to %<int%>");
|
||||
|
||||
|
@ -7693,7 +7693,7 @@ store_parm_decls_oldstyle (tree fndecl, const struct c_arg_info *arg_info)
|
|||
if (flag_isoc99)
|
||||
pedwarn (DECL_SOURCE_LOCATION (decl),
|
||||
0, "type of %qD defaults to %<int%>", decl);
|
||||
else
|
||||
else
|
||||
warning_at (DECL_SOURCE_LOCATION (decl),
|
||||
OPT_Wmissing_parameter_type,
|
||||
"type of %qD defaults to %<int%>", decl);
|
||||
|
@ -8039,7 +8039,7 @@ finish_function (void)
|
|||
c_determine_visibility (fndecl);
|
||||
|
||||
/* For GNU C extern inline functions disregard inline limits. */
|
||||
if (DECL_EXTERNAL (fndecl)
|
||||
if (DECL_EXTERNAL (fndecl)
|
||||
&& DECL_DECLARED_INLINE_P (fndecl))
|
||||
DECL_DISREGARD_INLINE_LIMITS (fndecl) = 1;
|
||||
|
||||
|
@ -8896,7 +8896,7 @@ declspecs_add_type (location_t loc, struct c_declspecs *specs,
|
|||
case RID_DFLOAT32:
|
||||
case RID_DFLOAT64:
|
||||
case RID_DFLOAT128:
|
||||
{
|
||||
{
|
||||
const char *str;
|
||||
if (i == RID_DFLOAT32)
|
||||
str = "_Decimal32";
|
||||
|
@ -9065,7 +9065,7 @@ declspecs_add_scspec (struct c_declspecs *specs, tree scspec)
|
|||
&& C_IS_RESERVED_WORD (scspec));
|
||||
i = C_RID_CODE (scspec);
|
||||
if (specs->non_sc_seen_p)
|
||||
warning (OPT_Wold_style_declaration,
|
||||
warning (OPT_Wold_style_declaration,
|
||||
"%qE is not at beginning of declaration", scspec);
|
||||
switch (i)
|
||||
{
|
||||
|
@ -9187,7 +9187,7 @@ finish_declspecs (struct c_declspecs *specs)
|
|||
else if (specs->complex_p)
|
||||
{
|
||||
specs->typespec_word = cts_double;
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
"ISO C does not support plain %<complex%> meaning "
|
||||
"%<double complex%>");
|
||||
}
|
||||
|
@ -9232,7 +9232,7 @@ finish_declspecs (struct c_declspecs *specs)
|
|||
specs->type = char_type_node;
|
||||
if (specs->complex_p)
|
||||
{
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
"ISO C does not support complex integer types");
|
||||
specs->type = build_complex_type (specs->type);
|
||||
}
|
||||
|
@ -9258,7 +9258,7 @@ finish_declspecs (struct c_declspecs *specs)
|
|||
: integer_type_node);
|
||||
if (specs->complex_p)
|
||||
{
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
"ISO C does not support complex integer types");
|
||||
specs->type = build_complex_type (specs->type);
|
||||
}
|
||||
|
|
|
@ -1775,7 +1775,7 @@ check_format_info_main (format_check_results *res,
|
|||
scalar_identity_flag = 0;
|
||||
if (fli)
|
||||
{
|
||||
while (fli->name != 0
|
||||
while (fli->name != 0
|
||||
&& strncmp (fli->name, format_chars, strlen (fli->name)))
|
||||
fli++;
|
||||
if (fli->name != 0)
|
||||
|
|
12
gcc/c-lex.c
12
gcc/c-lex.c
|
@ -433,7 +433,7 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags,
|
|||
}
|
||||
*value = build_string (tok->val.str.len, (const char *) tok->val.str.text);
|
||||
break;
|
||||
|
||||
|
||||
case CPP_PRAGMA:
|
||||
*value = build_int_cst (NULL, tok->val.pragma);
|
||||
break;
|
||||
|
@ -588,11 +588,11 @@ interpret_integer (const cpp_token *token, unsigned int flags)
|
|||
type = integer_types[itk];
|
||||
if (itk > itk_unsigned_long
|
||||
&& (flags & CPP_N_WIDTH) != CPP_N_LARGE)
|
||||
emit_diagnostic
|
||||
emit_diagnostic
|
||||
((c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99)
|
||||
? DK_PEDWARN : DK_WARNING,
|
||||
input_location, OPT_Wlong_long,
|
||||
(flags & CPP_N_UNSIGNED)
|
||||
(flags & CPP_N_UNSIGNED)
|
||||
? "integer constant is too large for %<unsigned long%> type"
|
||||
: "integer constant is too large for %<long%> type");
|
||||
}
|
||||
|
@ -689,9 +689,9 @@ interpret_float (const cpp_token *token, unsigned int flags)
|
|||
has any suffixes, cut them off; REAL_VALUE_ATOF/ REAL_VALUE_HTOF
|
||||
can't handle them. */
|
||||
copylen = token->val.str.len;
|
||||
if (flags & CPP_N_DFLOAT)
|
||||
if (flags & CPP_N_DFLOAT)
|
||||
copylen -= 2;
|
||||
else
|
||||
else
|
||||
{
|
||||
if ((flags & CPP_N_WIDTH) != CPP_N_MEDIUM)
|
||||
/* Must be an F or L or machine defined suffix. */
|
||||
|
@ -732,7 +732,7 @@ interpret_float (const cpp_token *token, unsigned int flags)
|
|||
{
|
||||
REAL_VALUE_TYPE realvoidmode;
|
||||
int overflow = real_from_string (&realvoidmode, copy);
|
||||
if (overflow < 0 || !REAL_VALUES_EQUAL (realvoidmode, dconst0))
|
||||
if (overflow < 0 || !REAL_VALUES_EQUAL (realvoidmode, dconst0))
|
||||
warning (OPT_Woverflow, "floating constant truncated to zero");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* This file contains routines to construct GNU OpenMP constructs,
|
||||
/* This file contains routines to construct GNU OpenMP constructs,
|
||||
called from parsing in the C and C++ front ends.
|
||||
|
||||
Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
|
@ -154,7 +154,7 @@ c_finish_omp_atomic (location_t loc, enum tree_code code, tree lhs, tree rhs)
|
|||
input_location, rhs, NULL_TREE);
|
||||
if (x == error_mark_node)
|
||||
return error_mark_node;
|
||||
gcc_assert (TREE_CODE (x) == MODIFY_EXPR);
|
||||
gcc_assert (TREE_CODE (x) == MODIFY_EXPR);
|
||||
rhs = TREE_OPERAND (x, 1);
|
||||
|
||||
/* Punt the actual generation of atomic operations to common code. */
|
||||
|
@ -275,7 +275,7 @@ c_finish_omp_for (location_t locus, tree declv, tree initv, tree condv,
|
|||
fail = true;
|
||||
}
|
||||
|
||||
init = build_modify_expr (elocus, decl, NULL_TREE, NOP_EXPR,
|
||||
init = build_modify_expr (elocus, decl, NULL_TREE, NOP_EXPR,
|
||||
/* FIXME diagnostics: This should
|
||||
be the location of the INIT. */
|
||||
elocus,
|
||||
|
|
10
gcc/c-opts.c
10
gcc/c-opts.c
|
@ -270,7 +270,7 @@ c_common_handle_option (size_t scode, const char *arg, int value)
|
|||
/* Prevent resetting the language standard to a C dialect when the driver
|
||||
has already determined that we're looking at assembler input. */
|
||||
bool preprocessing_asm_p = (cpp_get_options (parse_in)->lang == CLK_ASM);
|
||||
|
||||
|
||||
switch (code)
|
||||
{
|
||||
default:
|
||||
|
@ -466,10 +466,10 @@ c_common_handle_option (size_t scode, const char *arg, int value)
|
|||
global_dc->warning_as_error_requested = value;
|
||||
break;
|
||||
|
||||
case OPT_Werror_implicit_function_declaration:
|
||||
case OPT_Werror_implicit_function_declaration:
|
||||
/* For backward compatibility, this is the same as
|
||||
-Werror=implicit-function-declaration. */
|
||||
enable_warning_as_error ("implicit-function-declaration", value, CL_C | CL_ObjC);
|
||||
enable_warning_as_error ("implicit-function-declaration", value, CL_C | CL_ObjC);
|
||||
break;
|
||||
|
||||
case OPT_Wformat:
|
||||
|
@ -1145,7 +1145,7 @@ c_common_post_options (const char **pfilename)
|
|||
}
|
||||
|
||||
/* -Wimplicit-function-declaration is enabled by default for C99. */
|
||||
if (warn_implicit_function_declaration == -1)
|
||||
if (warn_implicit_function_declaration == -1)
|
||||
warn_implicit_function_declaration = flag_isoc99;
|
||||
|
||||
/* If we're allowing C++0x constructs, don't warn about C++0x
|
||||
|
@ -1435,7 +1435,7 @@ sanitize_cpp_opts (void)
|
|||
|
||||
/* Wlong-long is disabled by default. It is enabled by:
|
||||
[-pedantic | -Wtraditional] -std=[gnu|c]++98 ; or
|
||||
[-pedantic | -Wtraditional] -std=non-c99 .
|
||||
[-pedantic | -Wtraditional] -std=non-c99 .
|
||||
|
||||
Either -Wlong-long or -Wno-long-long override any other settings. */
|
||||
if (warn_long_long == -1)
|
||||
|
|
|
@ -992,7 +992,7 @@ c_parser_translation_unit (c_parser *parser)
|
|||
{
|
||||
if (c_parser_next_token_is (parser, CPP_EOF))
|
||||
{
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
"ISO C forbids an empty translation unit");
|
||||
}
|
||||
else
|
||||
|
@ -1078,7 +1078,7 @@ c_parser_external_declaration (c_parser *parser)
|
|||
}
|
||||
break;
|
||||
case CPP_SEMICOLON:
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
"ISO C does not allow extra %<;%> outside of a function");
|
||||
c_parser_consume_token (parser);
|
||||
break;
|
||||
|
@ -1158,9 +1158,9 @@ c_parser_external_declaration (c_parser *parser)
|
|||
C we also allow but diagnose declarations without declaration
|
||||
specifiers, but only at top level (elsewhere they conflict with
|
||||
other syntax).
|
||||
|
||||
|
||||
OpenMP:
|
||||
|
||||
|
||||
declaration:
|
||||
threadprivate-directive */
|
||||
|
||||
|
@ -1908,7 +1908,7 @@ c_parser_struct_or_union_specifier (c_parser *parser)
|
|||
/* Parse any stray semicolon. */
|
||||
if (c_parser_next_token_is (parser, CPP_SEMICOLON))
|
||||
{
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
"extra semicolon in struct or union specified");
|
||||
c_parser_consume_token (parser);
|
||||
continue;
|
||||
|
@ -1937,7 +1937,7 @@ c_parser_struct_or_union_specifier (c_parser *parser)
|
|||
else
|
||||
{
|
||||
if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE))
|
||||
pedwarn (c_parser_peek_token (parser)->location, 0,
|
||||
pedwarn (c_parser_peek_token (parser)->location, 0,
|
||||
"no semicolon at end of struct or union");
|
||||
else
|
||||
{
|
||||
|
@ -2033,7 +2033,7 @@ c_parser_struct_declaration (c_parser *parser)
|
|||
tree ret;
|
||||
if (!specs->type_seen_p)
|
||||
{
|
||||
pedwarn (decl_loc, OPT_pedantic,
|
||||
pedwarn (decl_loc, OPT_pedantic,
|
||||
"ISO C forbids member declarations with no members");
|
||||
shadow_tag_warned (specs, pedantic);
|
||||
ret = NULL_TREE;
|
||||
|
@ -2414,7 +2414,7 @@ c_parser_direct_declarator_inner (c_parser *parser, bool id_present,
|
|||
/* Parse a sequence of array declarators and parameter lists. */
|
||||
if (c_parser_next_token_is (parser, CPP_OPEN_SQUARE))
|
||||
{
|
||||
location_t brace_loc = c_parser_peek_token (parser)->location;
|
||||
location_t brace_loc = c_parser_peek_token (parser)->location;
|
||||
struct c_declarator *declarator;
|
||||
struct c_declspecs *quals_attrs = build_null_declspecs ();
|
||||
bool static_seen;
|
||||
|
@ -3143,7 +3143,7 @@ c_parser_initelt (c_parser *parser)
|
|||
/* Old-style structure member designator. */
|
||||
set_init_label (c_parser_peek_token (parser)->value);
|
||||
/* Use the colon as the error location. */
|
||||
pedwarn (c_parser_peek_2nd_token (parser)->location, OPT_pedantic,
|
||||
pedwarn (c_parser_peek_2nd_token (parser)->location, OPT_pedantic,
|
||||
"obsolete use of designated initializer with %<:%>");
|
||||
c_parser_consume_token (parser);
|
||||
c_parser_consume_token (parser);
|
||||
|
@ -3278,7 +3278,7 @@ c_parser_initelt (c_parser *parser)
|
|||
c_parser_consume_token (parser);
|
||||
set_init_index (first, second);
|
||||
if (second)
|
||||
pedwarn (ellipsis_loc, OPT_pedantic,
|
||||
pedwarn (ellipsis_loc, OPT_pedantic,
|
||||
"ISO C forbids specifying range of elements to initialize");
|
||||
}
|
||||
else
|
||||
|
@ -3291,14 +3291,14 @@ c_parser_initelt (c_parser *parser)
|
|||
if (c_parser_next_token_is (parser, CPP_EQ))
|
||||
{
|
||||
if (!flag_isoc99)
|
||||
pedwarn (des_loc, OPT_pedantic,
|
||||
pedwarn (des_loc, OPT_pedantic,
|
||||
"ISO C90 forbids specifying subobject to initialize");
|
||||
c_parser_consume_token (parser);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (des_seen == 1)
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
"obsolete use of designated initializer without %<=%>");
|
||||
else
|
||||
{
|
||||
|
@ -3385,9 +3385,9 @@ c_parser_initval (c_parser *parser, struct c_expr *after)
|
|||
old parser in requiring something after label declarations.
|
||||
Although they are erroneous if the labels declared aren't defined,
|
||||
is it useful for the syntax to be this way?
|
||||
|
||||
|
||||
OpenMP:
|
||||
|
||||
|
||||
block-item:
|
||||
openmp-directive
|
||||
|
||||
|
@ -3496,7 +3496,7 @@ c_parser_compound_statement_nostart (c_parser *parser)
|
|||
mark_valid_location_for_stdc_pragma (false);
|
||||
c_parser_declaration_or_fndef (parser, true, true, true, true);
|
||||
if (last_stmt)
|
||||
pedwarn_c90 (loc,
|
||||
pedwarn_c90 (loc,
|
||||
(pedantic && !flag_isoc99)
|
||||
? OPT_pedantic
|
||||
: OPT_Wdeclaration_after_statement,
|
||||
|
@ -3553,13 +3553,13 @@ c_parser_compound_statement_nostart (c_parser *parser)
|
|||
}
|
||||
else if (c_parser_next_token_is_keyword (parser, RID_ELSE))
|
||||
{
|
||||
if (parser->in_if_block)
|
||||
if (parser->in_if_block)
|
||||
{
|
||||
mark_valid_location_for_stdc_pragma (save_valid_for_pragma);
|
||||
error_at (loc, """expected %<}%> before %<else%>");
|
||||
return;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
error_at (loc, "%<else%> without a previous %<if%>");
|
||||
c_parser_consume_token (parser);
|
||||
|
@ -3658,7 +3658,7 @@ c_parser_label (c_parser *parser)
|
|||
error_at (c_parser_peek_token (parser)->location,
|
||||
"a label can only be part of a statement and "
|
||||
"a declaration is not a statement");
|
||||
c_parser_declaration_or_fndef (parser, /*fndef_ok*/ false,
|
||||
c_parser_declaration_or_fndef (parser, /*fndef_ok*/ false,
|
||||
/*nested*/ true, /*empty_ok*/ false,
|
||||
/*start_attr_ok*/ true);
|
||||
}
|
||||
|
@ -4014,7 +4014,7 @@ c_parser_else_body (c_parser *parser)
|
|||
add_stmt (build_empty_stmt (loc));
|
||||
c_parser_consume_token (parser);
|
||||
}
|
||||
else
|
||||
else
|
||||
c_parser_statement_after_labels (parser);
|
||||
return c_end_compound_stmt (else_loc, block, flag_isoc99);
|
||||
}
|
||||
|
@ -4501,7 +4501,7 @@ c_parser_asm_clobbers (c_parser *parser)
|
|||
}
|
||||
|
||||
/* Parse asm goto labels, a GNU extension.
|
||||
|
||||
|
||||
asm-goto-operands:
|
||||
identifier
|
||||
asm-goto-operands , identifier
|
||||
|
@ -4652,7 +4652,7 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after)
|
|||
if (c_parser_next_token_is (parser, CPP_COLON))
|
||||
{
|
||||
tree eptype = NULL_TREE;
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
"ISO C forbids omitting the middle term of a ?: expression");
|
||||
if (TREE_CODE (cond.value) == EXCESS_PRECISION_EXPR)
|
||||
{
|
||||
|
@ -5436,7 +5436,7 @@ c_parser_postfix_expression (c_parser *parser)
|
|||
c_parser_compound_statement_nostart (parser);
|
||||
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN,
|
||||
"expected %<)%>");
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
"ISO C forbids braced-groups within expressions");
|
||||
expr.value = c_finish_stmt_expr (brace_loc, stmt);
|
||||
}
|
||||
|
@ -6216,7 +6216,7 @@ c_parser_objc_class_instance_variables (c_parser *parser)
|
|||
/* Parse any stray semicolon. */
|
||||
if (c_parser_next_token_is (parser, CPP_SEMICOLON))
|
||||
{
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
"extra semicolon in struct or union specified");
|
||||
c_parser_consume_token (parser);
|
||||
continue;
|
||||
|
@ -6433,7 +6433,7 @@ c_parser_objc_method_definition (c_parser *parser)
|
|||
if (c_parser_next_token_is (parser, CPP_SEMICOLON))
|
||||
{
|
||||
c_parser_consume_token (parser);
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
"extra semicolon in method definition specified");
|
||||
}
|
||||
if (!c_parser_next_token_is (parser, CPP_OPEN_BRACE))
|
||||
|
@ -6470,7 +6470,7 @@ c_parser_objc_methodprotolist (c_parser *parser)
|
|||
switch (c_parser_peek_token (parser)->type)
|
||||
{
|
||||
case CPP_SEMICOLON:
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
pedwarn (c_parser_peek_token (parser)->location, OPT_pedantic,
|
||||
"ISO C does not allow extra %<;%> outside of a function");
|
||||
c_parser_consume_token (parser);
|
||||
break;
|
||||
|
@ -7046,7 +7046,7 @@ c_parser_pragma (c_parser *parser, enum pragma_context context)
|
|||
c_parser_consume_pragma (parser);
|
||||
c_invoke_pragma_handler (id);
|
||||
|
||||
/* Skip to EOL, but suppress any error message. Those will have been
|
||||
/* Skip to EOL, but suppress any error message. Those will have been
|
||||
generated by the handler routine through calling error, as opposed
|
||||
to calling c_parser_error. */
|
||||
parser->error = true;
|
||||
|
@ -7810,7 +7810,7 @@ c_parser_omp_structured_block (c_parser *parser)
|
|||
binop:
|
||||
+, *, -, /, &, ^, |, <<, >>
|
||||
|
||||
where x is an lvalue expression with scalar type.
|
||||
where x is an lvalue expression with scalar type.
|
||||
|
||||
LOC is the location of the #pragma token. */
|
||||
|
||||
|
@ -8320,7 +8320,7 @@ c_parser_omp_ordered (location_t loc, c_parser *parser)
|
|||
|
||||
section-sequence:
|
||||
section-directive[opt] structured-block
|
||||
section-sequence section-directive structured-block
|
||||
section-sequence section-directive structured-block
|
||||
|
||||
SECTIONS_LOC is the location of the #pragma omp sections. */
|
||||
|
||||
|
|
|
@ -847,7 +847,7 @@ pp_c_integer_constant (c_pretty_printer *pp, tree i)
|
|||
high = ~high + !low;
|
||||
low = -low;
|
||||
}
|
||||
sprintf (pp_buffer (pp)->digit_buffer, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
|
||||
sprintf (pp_buffer (pp)->digit_buffer, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
|
||||
(unsigned HOST_WIDE_INT) high, (unsigned HOST_WIDE_INT) low);
|
||||
pp_string (pp, pp_buffer (pp)->digit_buffer);
|
||||
}
|
||||
|
@ -1953,7 +1953,7 @@ pp_c_conditional_expression (c_pretty_printer *pp, tree e)
|
|||
static void
|
||||
pp_c_assignment_expression (c_pretty_printer *pp, tree e)
|
||||
{
|
||||
if (TREE_CODE (e) == MODIFY_EXPR
|
||||
if (TREE_CODE (e) == MODIFY_EXPR
|
||||
|| TREE_CODE (e) == INIT_EXPR)
|
||||
{
|
||||
pp_c_unary_expression (pp, TREE_OPERAND (e, 0));
|
||||
|
|
|
@ -521,7 +521,7 @@ extern struct c_expr c_expr_sizeof_expr (location_t, struct c_expr);
|
|||
extern struct c_expr c_expr_sizeof_type (location_t, struct c_type_name *);
|
||||
extern struct c_expr parser_build_unary_op (location_t, enum tree_code,
|
||||
struct c_expr);
|
||||
extern struct c_expr parser_build_binary_op (location_t,
|
||||
extern struct c_expr parser_build_binary_op (location_t,
|
||||
enum tree_code, struct c_expr,
|
||||
struct c_expr);
|
||||
extern tree build_conditional_expr (location_t, tree, bool, tree, tree,
|
||||
|
|
|
@ -566,7 +566,7 @@ composite_type (tree t1, tree t2)
|
|||
{
|
||||
TREE_VALUE (n) = composite_type (TREE_TYPE (memb),
|
||||
TREE_VALUE (p2));
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
"function types not truly compatible in ISO C");
|
||||
goto parm_done;
|
||||
}
|
||||
|
@ -591,7 +591,7 @@ composite_type (tree t1, tree t2)
|
|||
{
|
||||
TREE_VALUE (n) = composite_type (TREE_TYPE (memb),
|
||||
TREE_VALUE (p1));
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
pedwarn (input_location, OPT_pedantic,
|
||||
"function types not truly compatible in ISO C");
|
||||
goto parm_done;
|
||||
}
|
||||
|
@ -2261,10 +2261,10 @@ build_array_ref (location_t loc, tree array, tree index)
|
|||
while (TREE_CODE (foo) == COMPONENT_REF)
|
||||
foo = TREE_OPERAND (foo, 0);
|
||||
if (TREE_CODE (foo) == VAR_DECL && C_DECL_REGISTER (foo))
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
"ISO C forbids subscripting %<register%> array");
|
||||
else if (!flag_isoc99 && !lvalue_p (foo))
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
"ISO C90 forbids subscripting non-lvalue array");
|
||||
}
|
||||
|
||||
|
@ -2347,7 +2347,7 @@ build_external_ref (location_t loc, tree id, int fun, tree *type)
|
|||
warn_deprecated_use (ref, NULL_TREE);
|
||||
|
||||
/* Recursive call does not count as usage. */
|
||||
if (ref != current_function_decl)
|
||||
if (ref != current_function_decl)
|
||||
{
|
||||
TREE_USED (ref) = 1;
|
||||
}
|
||||
|
@ -2566,7 +2566,7 @@ build_function_call_vec (location_t loc, tree function, VEC(tree,gc) *params,
|
|||
tree tem;
|
||||
int nargs;
|
||||
tree *argarray;
|
||||
|
||||
|
||||
|
||||
/* Strip NON_LVALUE_EXPRs, etc., since we aren't using as an lvalue. */
|
||||
STRIP_TYPE_NOPS (function);
|
||||
|
@ -2690,7 +2690,7 @@ build_function_call_vec (location_t loc, tree function, VEC(tree,gc) *params,
|
|||
&& !strncmp (IDENTIFIER_POINTER (name), "__builtin_", 10))
|
||||
{
|
||||
if (require_constant_value)
|
||||
result =
|
||||
result =
|
||||
fold_build_call_array_initializer_loc (loc, TREE_TYPE (fntype),
|
||||
function, nargs, argarray);
|
||||
else
|
||||
|
@ -3107,8 +3107,8 @@ parser_build_binary_op (location_t location, enum tree_code code,
|
|||
warning_at (location, OPT_Waddress,
|
||||
"comparison with string literal results in unspecified behavior");
|
||||
|
||||
if (TREE_OVERFLOW_P (result.value)
|
||||
&& !TREE_OVERFLOW_P (arg1.value)
|
||||
if (TREE_OVERFLOW_P (result.value)
|
||||
&& !TREE_OVERFLOW_P (arg1.value)
|
||||
&& !TREE_OVERFLOW_P (arg2.value))
|
||||
overflow_warning (location, result.value);
|
||||
|
||||
|
@ -3170,10 +3170,10 @@ pointer_diff (location_t loc, tree op0, tree op1)
|
|||
|
||||
|
||||
if (TREE_CODE (target_type) == VOID_TYPE)
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
"pointer of type %<void *%> used in subtraction");
|
||||
if (TREE_CODE (target_type) == FUNCTION_TYPE)
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
"pointer to a function used in subtraction");
|
||||
|
||||
/* If the conversion to ptrdiff_type does anything like widening or
|
||||
|
@ -3337,7 +3337,7 @@ build_unary_op (location_t location,
|
|||
else if (typecode == COMPLEX_TYPE)
|
||||
{
|
||||
code = CONJ_EXPR;
|
||||
pedwarn (location, OPT_pedantic,
|
||||
pedwarn (location, OPT_pedantic,
|
||||
"ISO C does not support %<~%> for complex conjugation");
|
||||
if (!noconvert)
|
||||
arg = default_conversion (arg);
|
||||
|
@ -3456,7 +3456,7 @@ build_unary_op (location_t location,
|
|||
{
|
||||
tree real, imag;
|
||||
|
||||
pedwarn (location, OPT_pedantic,
|
||||
pedwarn (location, OPT_pedantic,
|
||||
"ISO C does not support %<++%> and %<--%> on complex types");
|
||||
|
||||
arg = stabilize_reference (arg);
|
||||
|
@ -3507,10 +3507,10 @@ build_unary_op (location_t location,
|
|||
|| TREE_CODE (TREE_TYPE (argtype)) == VOID_TYPE)
|
||||
{
|
||||
if (code == PREINCREMENT_EXPR || code == POSTINCREMENT_EXPR)
|
||||
pedwarn (location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
pedwarn (location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
"wrong type argument to increment");
|
||||
else
|
||||
pedwarn (location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
pedwarn (location, pedantic ? OPT_pedantic : OPT_Wpointer_arith,
|
||||
"wrong type argument to decrement");
|
||||
}
|
||||
|
||||
|
@ -4229,7 +4229,7 @@ build_compound_expr (location_t loc, tree expr1, tree expr2)
|
|||
&& CONVERT_EXPR_P (TREE_OPERAND (expr1, 1)))
|
||||
; /* (void) a, (void) b, c */
|
||||
else
|
||||
warning_at (loc, OPT_Wunused_value,
|
||||
warning_at (loc, OPT_Wunused_value,
|
||||
"left-hand operand of comma expression has no effect");
|
||||
}
|
||||
}
|
||||
|
@ -4348,7 +4348,7 @@ handle_warn_cast_qual (tree type, tree otype)
|
|||
while (TREE_CODE (in_type) == POINTER_TYPE);
|
||||
}
|
||||
|
||||
/* Build an expression representing a cast to type TYPE of expression EXPR.
|
||||
/* Build an expression representing a cast to type TYPE of expression EXPR.
|
||||
LOC is the location of the cast-- typically the open paren of the cast. */
|
||||
|
||||
tree
|
||||
|
@ -4395,7 +4395,7 @@ build_c_cast (location_t loc, tree type, tree expr)
|
|||
{
|
||||
if (TREE_CODE (type) == RECORD_TYPE
|
||||
|| TREE_CODE (type) == UNION_TYPE)
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
pedwarn (loc, OPT_pedantic,
|
||||
"ISO C forbids casting nonscalar to the same type");
|
||||
}
|
||||
else if (TREE_CODE (type) == UNION_TYPE)
|
||||
|
@ -4633,7 +4633,7 @@ c_cast_expr (location_t loc, struct c_type_name *type_name, tree expr)
|
|||
|
||||
tree
|
||||
build_modify_expr (location_t location, tree lhs, tree lhs_origtype,
|
||||
enum tree_code modifycode,
|
||||
enum tree_code modifycode,
|
||||
location_t rhs_loc, tree rhs, tree rhs_origtype)
|
||||
{
|
||||
tree result;
|
||||
|
@ -5096,7 +5096,7 @@ convert_for_assignment (location_t location, tree type, tree rhs,
|
|||
}
|
||||
|
||||
if (!fundecl || !DECL_IN_SYSTEM_HEADER (fundecl))
|
||||
pedwarn (location, OPT_pedantic,
|
||||
pedwarn (location, OPT_pedantic,
|
||||
"ISO C prohibits argument conversion to union type");
|
||||
|
||||
rhs = fold_convert_loc (location, TREE_TYPE (memb), rhs);
|
||||
|
@ -5435,7 +5435,7 @@ store_init_value (location_t init_loc, tree decl, tree init, tree origtype)
|
|||
|
||||
/* ANSI wants warnings about out-of-range constant initializers. */
|
||||
STRIP_TYPE_NOPS (value);
|
||||
if (TREE_STATIC (decl))
|
||||
if (TREE_STATIC (decl))
|
||||
constant_expression_warning (value);
|
||||
|
||||
/* Check if we need to set array size from compound literal size. */
|
||||
|
@ -5620,7 +5620,7 @@ pedwarn_init (location_t location, int opt, const char *msgid)
|
|||
pedwarn (location, opt, "(near initialization for %qs)", ofwhat);
|
||||
}
|
||||
|
||||
/* Issue a warning for a bad initializer component.
|
||||
/* Issue a warning for a bad initializer component.
|
||||
|
||||
OPT is the OPT_W* value corresponding to the warning option that
|
||||
controls this warning. MSGID identifies the message. The
|
||||
|
@ -5648,7 +5648,7 @@ maybe_warn_string_init (tree type, struct c_expr expr)
|
|||
&& TREE_CODE (type) == ARRAY_TYPE
|
||||
&& TREE_CODE (expr.value) == STRING_CST
|
||||
&& expr.original_code != STRING_CST)
|
||||
pedwarn_init (input_location, OPT_pedantic,
|
||||
pedwarn_init (input_location, OPT_pedantic,
|
||||
"array initialized from parenthesized string constant");
|
||||
}
|
||||
|
||||
|
@ -8264,7 +8264,7 @@ c_finish_return (location_t loc, tree retval, tree origtype)
|
|||
if ((warn_return_type || flag_isoc99)
|
||||
&& valtype != 0 && TREE_CODE (valtype) != VOID_TYPE)
|
||||
{
|
||||
pedwarn_c99 (loc, flag_isoc99 ? 0 : OPT_Wreturn_type,
|
||||
pedwarn_c99 (loc, flag_isoc99 ? 0 : OPT_Wreturn_type,
|
||||
"%<return%> with no value, in "
|
||||
"function returning non-void");
|
||||
no_warning = true;
|
||||
|
@ -8274,9 +8274,9 @@ c_finish_return (location_t loc, tree retval, tree origtype)
|
|||
{
|
||||
current_function_returns_null = 1;
|
||||
if (TREE_CODE (TREE_TYPE (retval)) != VOID_TYPE)
|
||||
pedwarn (loc, 0,
|
||||
pedwarn (loc, 0,
|
||||
"%<return%> with a value, in function returning void");
|
||||
else
|
||||
else
|
||||
pedwarn (loc, OPT_pedantic, "ISO C forbids "
|
||||
"%<return%> with expression, in function returning void");
|
||||
}
|
||||
|
@ -9499,7 +9499,7 @@ build_binary_op (location_t location, enum tree_code code,
|
|||
{
|
||||
result_type = type0;
|
||||
if (pedantic)
|
||||
pedwarn (location, OPT_pedantic,
|
||||
pedwarn (location, OPT_pedantic,
|
||||
"ordered comparison of pointer with integer zero");
|
||||
else if (extra_warnings)
|
||||
warning_at (location, OPT_Wextra,
|
||||
|
@ -9508,7 +9508,7 @@ build_binary_op (location_t location, enum tree_code code,
|
|||
else if (code1 == POINTER_TYPE && null_pointer_constant_p (orig_op0))
|
||||
{
|
||||
result_type = type1;
|
||||
pedwarn (location, OPT_pedantic,
|
||||
pedwarn (location, OPT_pedantic,
|
||||
"ordered comparison of pointer with integer zero");
|
||||
}
|
||||
else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE)
|
||||
|
@ -9653,7 +9653,7 @@ build_binary_op (location_t location, enum tree_code code,
|
|||
if (shorten && none_complex)
|
||||
{
|
||||
final_type = result_type;
|
||||
result_type = shorten_binary_op (result_type, op0, op1,
|
||||
result_type = shorten_binary_op (result_type, op0, op1,
|
||||
shorten == -1);
|
||||
}
|
||||
|
||||
|
@ -10220,11 +10220,11 @@ c_build_qualified_type (tree type, int type_quals)
|
|||
else if (TYPE_CANONICAL (element_type) != element_type
|
||||
|| (domain && TYPE_CANONICAL (domain) != domain))
|
||||
{
|
||||
tree unqualified_canon
|
||||
tree unqualified_canon
|
||||
= build_array_type (TYPE_CANONICAL (element_type),
|
||||
domain? TYPE_CANONICAL (domain)
|
||||
domain? TYPE_CANONICAL (domain)
|
||||
: NULL_TREE);
|
||||
TYPE_CANONICAL (t)
|
||||
TYPE_CANONICAL (t)
|
||||
= c_build_qualified_type (unqualified_canon, type_quals);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -311,7 +311,7 @@ init_save_areas (void)
|
|||
for (j = 1; j <= MOVE_MAX_WORDS; j++)
|
||||
regno_save_mem[i][j] = 0;
|
||||
save_slots_num = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* The structure represents a hard register which should be saved
|
||||
|
@ -394,7 +394,7 @@ saved_hard_reg_compare_func (const void *v1p, const void *v2p)
|
|||
{
|
||||
const struct saved_hard_reg *p1 = *(struct saved_hard_reg * const *) v1p;
|
||||
const struct saved_hard_reg *p2 = *(struct saved_hard_reg * const *) v2p;
|
||||
|
||||
|
||||
if (flag_omit_frame_pointer)
|
||||
{
|
||||
if (p1->call_freq - p2->call_freq != 0)
|
||||
|
@ -467,7 +467,7 @@ setup_save_areas (void)
|
|||
int best_slot_num;
|
||||
int prev_save_slots_num;
|
||||
rtx prev_save_slots[FIRST_PSEUDO_REGISTER];
|
||||
|
||||
|
||||
initiate_saved_hard_regs ();
|
||||
/* Create hard reg saved regs. */
|
||||
for (chain = reload_insn_chain; chain != 0; chain = next)
|
||||
|
@ -510,10 +510,10 @@ setup_save_areas (void)
|
|||
{
|
||||
int r = reg_renumber[regno];
|
||||
int bound;
|
||||
|
||||
|
||||
if (r < 0)
|
||||
continue;
|
||||
|
||||
|
||||
bound = r + hard_regno_nregs[r][PSEUDO_REGNO_MODE (regno)];
|
||||
for (; r < bound; r++)
|
||||
if (TEST_HARD_REG_BIT (used_regs, r))
|
||||
|
@ -568,7 +568,7 @@ setup_save_areas (void)
|
|||
{
|
||||
int r = reg_renumber[regno];
|
||||
int bound;
|
||||
|
||||
|
||||
if (r < 0)
|
||||
continue;
|
||||
|
||||
|
@ -686,17 +686,17 @@ setup_save_areas (void)
|
|||
/* Now run through all the call-used hard-registers and allocate
|
||||
space for them in the caller-save area. Try to allocate space
|
||||
in a manner which allows multi-register saves/restores to be done. */
|
||||
|
||||
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
for (j = MOVE_MAX_WORDS; j > 0; j--)
|
||||
{
|
||||
int do_save = 1;
|
||||
|
||||
|
||||
/* If no mode exists for this size, try another. Also break out
|
||||
if we have already saved this hard register. */
|
||||
if (regno_save_mode[i][j] == VOIDmode || regno_save_mem[i][1] != 0)
|
||||
continue;
|
||||
|
||||
|
||||
/* See if any register in this group has been saved. */
|
||||
for (k = 0; k < j; k++)
|
||||
if (regno_save_mem[i + k][1])
|
||||
|
@ -706,7 +706,7 @@ setup_save_areas (void)
|
|||
}
|
||||
if (! do_save)
|
||||
continue;
|
||||
|
||||
|
||||
for (k = 0; k < j; k++)
|
||||
if (! TEST_HARD_REG_BIT (hard_regs_used, i + k))
|
||||
{
|
||||
|
@ -715,7 +715,7 @@ setup_save_areas (void)
|
|||
}
|
||||
if (! do_save)
|
||||
continue;
|
||||
|
||||
|
||||
/* We have found an acceptable mode to store in. Since
|
||||
hard register is always saved in the widest mode
|
||||
available, the mode may be wider than necessary, it is
|
||||
|
@ -727,7 +727,7 @@ setup_save_areas (void)
|
|||
= assign_stack_local_1 (regno_save_mode[i][j],
|
||||
GET_MODE_SIZE (regno_save_mode[i][j]),
|
||||
0, true);
|
||||
|
||||
|
||||
/* Setup single word save area just in case... */
|
||||
for (k = 0; k < j; k++)
|
||||
/* This should not depend on WORDS_BIG_ENDIAN.
|
||||
|
|
|
@ -903,7 +903,7 @@ store_unaligned_arguments_into_pseudos (struct arg_data *args, int num_actuals)
|
|||
}
|
||||
|
||||
/* Fill in ARGS_SIZE and ARGS array based on the parameters found in
|
||||
CALL_EXPR EXP.
|
||||
CALL_EXPR EXP.
|
||||
|
||||
NUM_ACTUALS is the total number of parameters.
|
||||
|
||||
|
@ -1343,7 +1343,7 @@ precompute_arguments (int num_actuals, struct arg_data *args)
|
|||
compute and return the final value for MUST_PREALLOCATE. */
|
||||
|
||||
static int
|
||||
finalize_must_preallocate (int must_preallocate, int num_actuals,
|
||||
finalize_must_preallocate (int must_preallocate, int num_actuals,
|
||||
struct arg_data *args, struct args_size *args_size)
|
||||
{
|
||||
/* See if we have or want to preallocate stack space.
|
||||
|
|
24
gcc/cfg.c
24
gcc/cfg.c
|
@ -92,9 +92,9 @@ init_flow (struct function *the_fun)
|
|||
EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun)
|
||||
= GGC_CNEW (struct basic_block_def);
|
||||
EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun)->index = EXIT_BLOCK;
|
||||
ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun)->next_bb
|
||||
ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun)->next_bb
|
||||
= EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun);
|
||||
EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun)->prev_bb
|
||||
EXIT_BLOCK_PTR_FOR_FUNCTION (the_fun)->prev_bb
|
||||
= ENTRY_BLOCK_PTR_FOR_FUNCTION (the_fun);
|
||||
}
|
||||
|
||||
|
@ -171,13 +171,13 @@ compact_blocks (void)
|
|||
|
||||
SET_BASIC_BLOCK (ENTRY_BLOCK, ENTRY_BLOCK_PTR);
|
||||
SET_BASIC_BLOCK (EXIT_BLOCK, EXIT_BLOCK_PTR);
|
||||
|
||||
|
||||
if (df)
|
||||
df_compact_blocks ();
|
||||
else
|
||||
else
|
||||
{
|
||||
basic_block bb;
|
||||
|
||||
|
||||
i = NUM_FIXED_BLOCKS;
|
||||
FOR_EACH_BB (bb)
|
||||
{
|
||||
|
@ -433,7 +433,7 @@ clear_bb_flags (void)
|
|||
basic_block bb;
|
||||
|
||||
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
|
||||
bb->flags = (BB_PARTITION (bb)
|
||||
bb->flags = (BB_PARTITION (bb)
|
||||
| (bb->flags & (BB_DISABLE_SCHEDULE + BB_RTL + BB_NON_LOCAL_GOTO_TARGET)));
|
||||
}
|
||||
|
||||
|
@ -544,7 +544,7 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags,
|
|||
fprintf (file, HOST_WIDEST_INT_PRINT_DEC, bb->count);
|
||||
fprintf (file, ", freq %i", bb->frequency);
|
||||
/* Both maybe_hot_bb_p & probably_never_executed_bb_p functions
|
||||
crash without cfun. */
|
||||
crash without cfun. */
|
||||
if (cfun && maybe_hot_bb_p (bb))
|
||||
fputs (", maybe hot", file);
|
||||
if (cfun && probably_never_executed_bb_p (bb))
|
||||
|
@ -584,7 +584,7 @@ dump_bb_info (basic_block bb, bool header, bool footer, int flags,
|
|||
|
||||
/* Dump the register info to FILE. */
|
||||
|
||||
void
|
||||
void
|
||||
dump_reg_info (FILE *file)
|
||||
{
|
||||
unsigned int i, max = max_reg_num ();
|
||||
|
@ -598,14 +598,14 @@ dump_reg_info (FILE *file)
|
|||
for (i = FIRST_PSEUDO_REGISTER; i < max; i++)
|
||||
{
|
||||
enum reg_class rclass, altclass;
|
||||
|
||||
|
||||
if (regstat_n_sets_and_refs)
|
||||
fprintf (file, "\nRegister %d used %d times across %d insns",
|
||||
i, REG_N_REFS (i), REG_LIVE_LENGTH (i));
|
||||
else if (df)
|
||||
fprintf (file, "\nRegister %d used %d times across %d insns",
|
||||
i, DF_REG_USE_COUNT (i) + DF_REG_DEF_COUNT (i), REG_LIVE_LENGTH (i));
|
||||
|
||||
|
||||
if (REG_BASIC_BLOCK (i) >= NUM_FIXED_BLOCKS)
|
||||
fprintf (file, " in block %d", REG_BASIC_BLOCK (i));
|
||||
if (regstat_n_sets_and_refs)
|
||||
|
@ -627,7 +627,7 @@ dump_reg_info (FILE *file)
|
|||
if (regno_reg_rtx[i] != NULL
|
||||
&& PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD)
|
||||
fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i));
|
||||
|
||||
|
||||
rclass = reg_preferred_class (i);
|
||||
altclass = reg_alternate_class (i);
|
||||
if (rclass != GENERAL_REGS || altclass != ALL_REGS)
|
||||
|
@ -641,7 +641,7 @@ dump_reg_info (FILE *file)
|
|||
reg_class_names[(int) rclass],
|
||||
reg_class_names[(int) altclass]);
|
||||
}
|
||||
|
||||
|
||||
if (regno_reg_rtx[i] != NULL && REG_POINTER (regno_reg_rtx[i]))
|
||||
fputs ("; pointer", file);
|
||||
fputs (".\n", file);
|
||||
|
|
|
@ -653,7 +653,7 @@ connect_infinite_loops_to_exit (void)
|
|||
true, unreachable blocks are deleted. */
|
||||
|
||||
int
|
||||
post_order_compute (int *post_order, bool include_entry_exit,
|
||||
post_order_compute (int *post_order, bool include_entry_exit,
|
||||
bool delete_unreachable)
|
||||
{
|
||||
edge_iterator *stack;
|
||||
|
@ -719,9 +719,9 @@ post_order_compute (int *post_order, bool include_entry_exit,
|
|||
post_order[post_order_num++] = ENTRY_BLOCK;
|
||||
count = post_order_num;
|
||||
}
|
||||
else
|
||||
else
|
||||
count = post_order_num + 2;
|
||||
|
||||
|
||||
/* Delete the unreachable blocks if some were found and we are
|
||||
supposed to do it. */
|
||||
if (delete_unreachable && (count != n_basic_blocks))
|
||||
|
@ -731,11 +731,11 @@ post_order_compute (int *post_order, bool include_entry_exit,
|
|||
for (b = ENTRY_BLOCK_PTR->next_bb; b != EXIT_BLOCK_PTR; b = next_bb)
|
||||
{
|
||||
next_bb = b->next_bb;
|
||||
|
||||
|
||||
if (!(TEST_BIT (visited, b->index)))
|
||||
delete_basic_block (b);
|
||||
}
|
||||
|
||||
|
||||
tidy_fallthru_edges ();
|
||||
}
|
||||
|
||||
|
@ -745,7 +745,7 @@ post_order_compute (int *post_order, bool include_entry_exit,
|
|||
}
|
||||
|
||||
|
||||
/* Helper routine for inverted_post_order_compute.
|
||||
/* Helper routine for inverted_post_order_compute.
|
||||
BB has to belong to a region of CFG
|
||||
unreachable by inverted traversal from the exit.
|
||||
i.e. there's no control flow path from ENTRY to EXIT
|
||||
|
@ -753,8 +753,8 @@ post_order_compute (int *post_order, bool include_entry_exit,
|
|||
This can happen in two cases - if there's an infinite loop
|
||||
or if there's a block that has no successor
|
||||
(call to a function with no return).
|
||||
Some RTL passes deal with this condition by
|
||||
calling connect_infinite_loops_to_exit () and/or
|
||||
Some RTL passes deal with this condition by
|
||||
calling connect_infinite_loops_to_exit () and/or
|
||||
add_noreturn_fake_exit_edges ().
|
||||
However, those methods involve modifying the CFG itself
|
||||
which may not be desirable.
|
||||
|
@ -801,12 +801,12 @@ dfs_find_deadend (basic_block bb)
|
|||
with no successors can't visit all blocks.
|
||||
To solve this problem, we first do inverted traversal
|
||||
starting from the blocks with no successor.
|
||||
And if there's any block left that's not visited by the regular
|
||||
And if there's any block left that's not visited by the regular
|
||||
inverted traversal from EXIT,
|
||||
those blocks are in such problematic region.
|
||||
Among those, we find one block that has
|
||||
Among those, we find one block that has
|
||||
any visited predecessor (which is an entry into such a region),
|
||||
and start looking for a "dead end" from that block
|
||||
and start looking for a "dead end" from that block
|
||||
and do another inverted traversal from that block. */
|
||||
|
||||
int
|
||||
|
@ -833,14 +833,14 @@ inverted_post_order_compute (int *post_order)
|
|||
if (EDGE_COUNT (bb->succs) == 0)
|
||||
{
|
||||
/* Push the initial edge on to the stack. */
|
||||
if (EDGE_COUNT (bb->preds) > 0)
|
||||
if (EDGE_COUNT (bb->preds) > 0)
|
||||
{
|
||||
stack[sp++] = ei_start (bb->preds);
|
||||
SET_BIT (visited, bb->index);
|
||||
}
|
||||
}
|
||||
|
||||
do
|
||||
do
|
||||
{
|
||||
bool has_unvisited_bb = false;
|
||||
|
||||
|
@ -880,7 +880,7 @@ inverted_post_order_compute (int *post_order)
|
|||
}
|
||||
}
|
||||
|
||||
/* Detect any infinite loop and activate the kludge.
|
||||
/* Detect any infinite loop and activate the kludge.
|
||||
Note that this doesn't check EXIT_BLOCK itself
|
||||
since EXIT_BLOCK is always added after the outer do-while loop. */
|
||||
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
|
||||
|
@ -914,7 +914,7 @@ inverted_post_order_compute (int *post_order)
|
|||
|
||||
if (has_unvisited_bb && sp == 0)
|
||||
{
|
||||
/* No blocks are reachable from EXIT at all.
|
||||
/* No blocks are reachable from EXIT at all.
|
||||
Find a dead-end from the ENTRY, and restart the iteration. */
|
||||
basic_block be = dfs_find_deadend (ENTRY_BLOCK_PTR);
|
||||
gcc_assert (be != NULL);
|
||||
|
@ -922,7 +922,7 @@ inverted_post_order_compute (int *post_order)
|
|||
stack[sp++] = ei_start (be->preds);
|
||||
}
|
||||
|
||||
/* The only case the below while fires is
|
||||
/* The only case the below while fires is
|
||||
when there's an infinite loop. */
|
||||
}
|
||||
while (sp);
|
||||
|
@ -940,14 +940,14 @@ inverted_post_order_compute (int *post_order)
|
|||
REV_POST_ORDER is nonzero, return the reverse completion number for each
|
||||
node. Returns the number of nodes visited. A depth first search
|
||||
tries to get as far away from the starting point as quickly as
|
||||
possible.
|
||||
possible.
|
||||
|
||||
pre_order is a really a preorder numbering of the graph.
|
||||
rev_post_order is really a reverse postorder numbering of the graph.
|
||||
*/
|
||||
|
||||
int
|
||||
pre_and_rev_post_order_compute (int *pre_order, int *rev_post_order,
|
||||
pre_and_rev_post_order_compute (int *pre_order, int *rev_post_order,
|
||||
bool include_entry_exit)
|
||||
{
|
||||
edge_iterator *stack;
|
||||
|
@ -968,7 +968,7 @@ pre_and_rev_post_order_compute (int *pre_order, int *rev_post_order,
|
|||
if (rev_post_order)
|
||||
rev_post_order[rev_post_order_num--] = ENTRY_BLOCK;
|
||||
}
|
||||
else
|
||||
else
|
||||
rev_post_order_num -= NUM_FIXED_BLOCKS;
|
||||
|
||||
/* Allocate bitmap to track nodes that have been visited. */
|
||||
|
@ -1165,12 +1165,12 @@ dfs_enumerate_from (basic_block bb, int reverse,
|
|||
static sbitmap visited;
|
||||
static unsigned v_size;
|
||||
|
||||
#define MARK_VISITED(BB) (SET_BIT (visited, (BB)->index))
|
||||
#define UNMARK_VISITED(BB) (RESET_BIT (visited, (BB)->index))
|
||||
#define VISITED_P(BB) (TEST_BIT (visited, (BB)->index))
|
||||
#define MARK_VISITED(BB) (SET_BIT (visited, (BB)->index))
|
||||
#define UNMARK_VISITED(BB) (RESET_BIT (visited, (BB)->index))
|
||||
#define VISITED_P(BB) (TEST_BIT (visited, (BB)->index))
|
||||
|
||||
/* Resize the VISITED sbitmap if necessary. */
|
||||
size = last_basic_block;
|
||||
size = last_basic_block;
|
||||
if (size < 10)
|
||||
size = 10;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ gimple_assign_rhs_to_tree (gimple stmt)
|
|||
{
|
||||
tree t;
|
||||
enum gimple_rhs_class grhs_class;
|
||||
|
||||
|
||||
grhs_class = get_gimple_rhs_class (gimple_expr_code (stmt));
|
||||
|
||||
if (grhs_class == GIMPLE_BINARY_RHS)
|
||||
|
@ -373,7 +373,7 @@ stack_var_conflict_p (size_t x, size_t y)
|
|||
gcc_assert (index < stack_vars_conflict_alloc);
|
||||
return stack_vars_conflict[index];
|
||||
}
|
||||
|
||||
|
||||
/* Returns true if TYPE is or contains a union type. */
|
||||
|
||||
static bool
|
||||
|
@ -962,7 +962,7 @@ defer_stack_allocation (tree var, bool toplevel)
|
|||
|
||||
/* A subroutine of expand_used_vars. Expand one variable according to
|
||||
its flavor. Variables to be placed on the stack are not actually
|
||||
expanded yet, merely recorded.
|
||||
expanded yet, merely recorded.
|
||||
When REALLY_EXPAND is false, only add stack values to be allocated.
|
||||
Return stack usage this variable is supposed to take.
|
||||
*/
|
||||
|
@ -1285,7 +1285,7 @@ account_used_vars_for_block (tree block, bool toplevel)
|
|||
}
|
||||
|
||||
/* Prepare for expanding variables. */
|
||||
static void
|
||||
static void
|
||||
init_vars_expansion (void)
|
||||
{
|
||||
tree t;
|
||||
|
@ -1554,7 +1554,7 @@ label_rtx_for_bb (basic_block bb ATTRIBUTE_UNUSED)
|
|||
return (rtx) *elt;
|
||||
|
||||
/* Find the tree label if it is present. */
|
||||
|
||||
|
||||
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
|
||||
{
|
||||
lab_stmt = gsi_stmt (gsi);
|
||||
|
@ -3188,7 +3188,7 @@ expand_gimple_basic_block (basic_block bb)
|
|||
/* Ignore this stmt if it is in the list of
|
||||
replaceable expressions. */
|
||||
if (SA.values
|
||||
&& bitmap_bit_p (SA.values,
|
||||
&& bitmap_bit_p (SA.values,
|
||||
SSA_NAME_VERSION (DEF_FROM_PTR (def_p))))
|
||||
continue;
|
||||
}
|
||||
|
@ -3451,7 +3451,7 @@ expand_stack_alignment (void)
|
|||
|
||||
if (! SUPPORTS_STACK_ALIGNMENT)
|
||||
return;
|
||||
|
||||
|
||||
if (cfun->calls_alloca
|
||||
|| cfun->has_nonlocal_label
|
||||
|| crtl->has_nonlocal_goto)
|
||||
|
@ -3496,7 +3496,7 @@ expand_stack_alignment (void)
|
|||
/* Target has to redefine TARGET_GET_DRAP_RTX to support stack
|
||||
alignment. */
|
||||
gcc_assert (targetm.calls.get_drap_rtx != NULL);
|
||||
drap_rtx = targetm.calls.get_drap_rtx ();
|
||||
drap_rtx = targetm.calls.get_drap_rtx ();
|
||||
|
||||
/* stack_realign_drap and drap_rtx must match. */
|
||||
gcc_assert ((stack_realign_drap != 0) == (drap_rtx != NULL));
|
||||
|
@ -3575,10 +3575,10 @@ gimple_expand_cfg (void)
|
|||
if (warn_stack_protect)
|
||||
{
|
||||
if (cfun->calls_alloca)
|
||||
warning (OPT_Wstack_protector,
|
||||
warning (OPT_Wstack_protector,
|
||||
"not protecting local variables: variable length buffer");
|
||||
if (has_short_buffer && !crtl->stack_protect_guard)
|
||||
warning (OPT_Wstack_protector,
|
||||
warning (OPT_Wstack_protector,
|
||||
"not protecting function: no buffer at least %d bytes long",
|
||||
(int) PARAM_VALUE (PARAM_SSP_BUFFER_SIZE));
|
||||
}
|
||||
|
|
|
@ -770,7 +770,7 @@ make_forwarder_block (basic_block bb, bool (*redirect_edge_p) (edge),
|
|||
&& dummy->loop_father->header == dummy
|
||||
&& dummy->loop_father->latch == e_src)
|
||||
dummy->loop_father->latch = jump;
|
||||
|
||||
|
||||
if (new_bb_cbk != NULL)
|
||||
new_bb_cbk (jump);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ struct cfg_hooks
|
|||
/* Creates a new basic block just after basic block B by splitting
|
||||
everything after specified instruction I. */
|
||||
basic_block (*split_block) (basic_block b, void * i);
|
||||
|
||||
|
||||
/* Move block B immediately after block A. */
|
||||
bool (*move_block_after) (basic_block b, basic_block a);
|
||||
|
||||
|
|
|
@ -694,7 +694,7 @@ relink_block_chain (bool stay_in_cfglayout_mode)
|
|||
free_original_copy_tables ();
|
||||
if (stay_in_cfglayout_mode)
|
||||
initialize_original_copy_tables ();
|
||||
|
||||
|
||||
/* Finally, put basic_block_info in the new order. */
|
||||
compact_blocks ();
|
||||
}
|
||||
|
@ -928,7 +928,7 @@ fixup_reorder_chain (void)
|
|||
FOR_EACH_EDGE (e, ei, bb->succs)
|
||||
if (e->flags & EDGE_FALLTHRU)
|
||||
break;
|
||||
|
||||
|
||||
if (e && !can_fallthru (e->src, e->dest))
|
||||
force_nonfallthru (e);
|
||||
}
|
||||
|
|
|
@ -523,7 +523,7 @@ flow_loops_find (struct loops *loops)
|
|||
profile is usually too flat and unreliable for this (and it is mostly based
|
||||
on the loop structure of the program, so it does not make much sense to
|
||||
derive the loop structure from it). */
|
||||
|
||||
|
||||
static edge
|
||||
find_subloop_latch_edge_by_profile (VEC (edge, heap) *latches)
|
||||
{
|
||||
|
@ -656,7 +656,7 @@ form_subloop (struct loop *loop, edge latch)
|
|||
edge_iterator ei;
|
||||
edge e, new_entry;
|
||||
struct loop *new_loop;
|
||||
|
||||
|
||||
mfb_reis_set = pointer_set_create ();
|
||||
FOR_EACH_EDGE (e, ei, loop->header->preds)
|
||||
{
|
||||
|
@ -892,7 +892,7 @@ get_loop_body_in_dom_order (const struct loop *loop)
|
|||
/* Gets body of a LOOP sorted via provided BB_COMPARATOR. */
|
||||
|
||||
basic_block *
|
||||
get_loop_body_in_custom_order (const struct loop *loop,
|
||||
get_loop_body_in_custom_order (const struct loop *loop,
|
||||
int (*bb_comparator) (const void *, const void *))
|
||||
{
|
||||
basic_block *bbs = get_loop_body (loop);
|
||||
|
@ -983,7 +983,7 @@ loop_exit_free (void *ex)
|
|||
for (; exit; exit = next)
|
||||
{
|
||||
next = exit->next_e;
|
||||
|
||||
|
||||
exit->next->prev = exit->prev;
|
||||
exit->prev->next = exit->next;
|
||||
|
||||
|
@ -1037,7 +1037,7 @@ rescan_loop_exit (edge e, bool new_edge, bool removed)
|
|||
exit->next_e = exits;
|
||||
exits = exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!exits && new_edge)
|
||||
return;
|
||||
|
@ -1523,7 +1523,7 @@ verify_loop_structure (void)
|
|||
exit = get_exit_descriptions (e);
|
||||
if (!exit)
|
||||
{
|
||||
error ("Exit %d->%d not recorded",
|
||||
error ("Exit %d->%d not recorded",
|
||||
e->src->index, e->dest->index);
|
||||
err = 1;
|
||||
}
|
||||
|
@ -1541,7 +1541,7 @@ verify_loop_structure (void)
|
|||
|
||||
if (eloops != 0)
|
||||
{
|
||||
error ("Wrong list of exited loops for edge %d->%d",
|
||||
error ("Wrong list of exited loops for edge %d->%d",
|
||||
e->src->index, e->dest->index);
|
||||
err = 1;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ struct GTY ((chain_next ("%h.next"))) nb_iter_bound {
|
|||
b) it is consistent with the result of number_of_iterations_exit. */
|
||||
double_int bound;
|
||||
|
||||
/* True if the statement will cause the loop to be leaved the (at most)
|
||||
/* True if the statement will cause the loop to be leaved the (at most)
|
||||
BOUND + 1-st time it is executed, that is, all the statements after it
|
||||
are executed at most BOUND times. */
|
||||
bool is_exit;
|
||||
|
@ -240,7 +240,7 @@ extern unsigned get_loop_body_with_size (const struct loop *, basic_block *,
|
|||
unsigned);
|
||||
extern basic_block *get_loop_body_in_dom_order (const struct loop *);
|
||||
extern basic_block *get_loop_body_in_bfs_order (const struct loop *);
|
||||
extern basic_block *get_loop_body_in_custom_order (const struct loop *,
|
||||
extern basic_block *get_loop_body_in_custom_order (const struct loop *,
|
||||
int (*) (const void *, const void *));
|
||||
|
||||
extern VEC (edge, heap) *get_loop_exit_edges (const struct loop *);
|
||||
|
@ -293,7 +293,7 @@ extern struct loop *create_empty_loop_on_edge (edge, tree, tree, tree, tree,
|
|||
tree *, tree *, struct loop *);
|
||||
extern struct loop * duplicate_loop (struct loop *, struct loop *);
|
||||
extern void duplicate_subloops (struct loop *, struct loop *);
|
||||
extern bool duplicate_loop_to_header_edge (struct loop *, edge,
|
||||
extern bool duplicate_loop_to_header_edge (struct loop *, edge,
|
||||
unsigned, sbitmap, edge,
|
||||
VEC (edge, heap) **, int);
|
||||
extern struct loop *loopify (edge, edge,
|
||||
|
|
|
@ -164,7 +164,7 @@ fix_loop_placement (struct loop *loop)
|
|||
placement of subloops of FROM->loop_father, that might also be altered due
|
||||
to this change; the condition for them is similar, except that instead of
|
||||
successors we consider edges coming out of the loops.
|
||||
|
||||
|
||||
If the changes may invalidate the information about irreducible regions,
|
||||
IRRED_INVALIDATED is set to true. */
|
||||
|
||||
|
@ -330,7 +330,7 @@ remove_path (edge e)
|
|||
{
|
||||
SET_BIT (seen, ae->dest->index);
|
||||
bord_bbs[n_bord_bbs++] = ae->dest;
|
||||
|
||||
|
||||
if (ae->flags & EDGE_IRREDUCIBLE_LOOP)
|
||||
irred_invalidated = true;
|
||||
}
|
||||
|
@ -504,7 +504,7 @@ update_dominators_in_loop (struct loop *loop)
|
|||
}
|
||||
|
||||
/* Creates an if region as shown above. CONDITION is used to create
|
||||
the test for the if.
|
||||
the test for the if.
|
||||
|
||||
|
|
||||
| ------------- -------------
|
||||
|
@ -549,7 +549,7 @@ create_empty_if_region_on_edge (edge entry_edge, tree condition)
|
|||
|
||||
succ_bb = entry_edge->dest;
|
||||
cond_bb = split_edge (entry_edge);
|
||||
|
||||
|
||||
/* Insert condition in cond_bb. */
|
||||
gsi = gsi_last_bb (cond_bb);
|
||||
simple_cond =
|
||||
|
@ -558,7 +558,7 @@ create_empty_if_region_on_edge (edge entry_edge, tree condition)
|
|||
cond_stmt = gimple_build_cond_from_tree (simple_cond, NULL_TREE, NULL_TREE);
|
||||
gsi = gsi_last_bb (cond_bb);
|
||||
gsi_insert_after (&gsi, cond_stmt, GSI_NEW_STMT);
|
||||
|
||||
|
||||
join_bb = split_edge (single_succ_edge (cond_bb));
|
||||
|
||||
e_true = single_succ_edge (cond_bb);
|
||||
|
@ -839,7 +839,7 @@ unloop (struct loop *loop, bool *irred_invalidated)
|
|||
condition stated in description of fix_loop_placement holds for them.
|
||||
It is used in case when we removed some edges coming out of LOOP, which
|
||||
may cause the right placement of LOOP inside loop tree to change.
|
||||
|
||||
|
||||
IRRED_INVALIDATED is set to true if a change in the loop structures might
|
||||
invalidate the information about irreducible regions. */
|
||||
|
||||
|
@ -1320,7 +1320,7 @@ has_preds_from_loop (basic_block block, struct loop *loop)
|
|||
{
|
||||
edge e;
|
||||
edge_iterator ei;
|
||||
|
||||
|
||||
FOR_EACH_EDGE (e, ei, block->preds)
|
||||
if (e->src->loop_father == loop)
|
||||
return true;
|
||||
|
@ -1331,7 +1331,7 @@ has_preds_from_loop (basic_block block, struct loop *loop)
|
|||
CP_SIMPLE_PREHEADERS is set in FLAGS, we only force LOOP to have single
|
||||
entry; otherwise we also force preheader block to have only one successor.
|
||||
When CP_FALLTHRU_PREHEADERS is set in FLAGS, we force the preheader block
|
||||
to be a fallthru predecessor to the loop header and to have only
|
||||
to be a fallthru predecessor to the loop header and to have only
|
||||
predecessors from outside of the loop.
|
||||
The function also updates dominators. */
|
||||
|
||||
|
@ -1360,7 +1360,7 @@ create_preheader (struct loop *loop, int flags)
|
|||
if (nentry == 1)
|
||||
{
|
||||
bool need_forwarder_block = false;
|
||||
|
||||
|
||||
/* We do not allow entry block to be the loop preheader, since we
|
||||
cannot emit code there. */
|
||||
if (single_entry->src == ENTRY_BLOCK_PTR)
|
||||
|
@ -1416,7 +1416,7 @@ create_preheader (struct loop *loop, int flags)
|
|||
if (dump_file)
|
||||
fprintf (dump_file, "Created preheader block for loop %i\n",
|
||||
loop->num);
|
||||
|
||||
|
||||
if (flags & CP_FALLTHRU_PREHEADERS)
|
||||
gcc_assert ((single_succ_edge (dummy)->flags & EDGE_FALLTHRU)
|
||||
&& !JUMP_P (BB_END (dummy)));
|
||||
|
@ -1524,7 +1524,7 @@ lv_adjust_loop_entry_edge (basic_block first_head, basic_block second_head,
|
|||
is the ratio by that the frequencies in the original loop should
|
||||
be scaled. ELSE_SCALE is the ratio by that the frequencies in the
|
||||
new loop should be scaled.
|
||||
|
||||
|
||||
If PLACE_AFTER is true, we place the new loop after LOOP in the
|
||||
instruction stream, otherwise it is placed before LOOP. */
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ emit_insn_at_entry (rtx insn)
|
|||
}
|
||||
|
||||
/* Update BLOCK_FOR_INSN of insns between BEGIN and END
|
||||
(or BARRIER if found) and notify df of the bb change.
|
||||
(or BARRIER if found) and notify df of the bb change.
|
||||
The insn chain range is inclusive
|
||||
(i.e. both BEGIN and END will be updated. */
|
||||
|
||||
|
@ -1256,7 +1256,7 @@ force_nonfallthru_and_redirect (edge e, basic_block target)
|
|||
if (abnormal_edge_flags)
|
||||
make_edge (src, target, abnormal_edge_flags);
|
||||
|
||||
df_mark_solutions_dirty ();
|
||||
df_mark_solutions_dirty ();
|
||||
return new_bb;
|
||||
}
|
||||
|
||||
|
@ -1612,7 +1612,7 @@ rtl_dump_bb (basic_block bb, FILE *outf, int indent, int flags ATTRIBUTE_UNUSED)
|
|||
s_indent = (char *) alloca ((size_t) indent + 1);
|
||||
memset (s_indent, ' ', (size_t) indent);
|
||||
s_indent[indent] = '\0';
|
||||
|
||||
|
||||
if (df)
|
||||
{
|
||||
df_dump_top (bb, outf);
|
||||
|
@ -1679,7 +1679,7 @@ print_rtl_with_bb (FILE *outf, const_rtx rtx_first)
|
|||
{
|
||||
edge e;
|
||||
edge_iterator ei;
|
||||
|
||||
|
||||
fprintf (outf, ";; Start of basic block (");
|
||||
FOR_EACH_EDGE (e, ei, bb->preds)
|
||||
fprintf (outf, " %d", e->src->index);
|
||||
|
|
|
@ -795,8 +795,8 @@ cgraph_set_call_stmt_including_clones (struct cgraph_node *orig,
|
|||
}
|
||||
|
||||
/* Like cgraph_create_edge walk the clone tree and update all clones sharing
|
||||
same function body.
|
||||
|
||||
same function body.
|
||||
|
||||
TODO: COUNT and LOOP_DEPTH should be properly distributed based on relative
|
||||
frequencies of the clones. */
|
||||
|
||||
|
@ -1853,7 +1853,7 @@ clone_function_name (tree decl)
|
|||
}
|
||||
|
||||
/* Create callgraph node clone with new declaration. The actual body will
|
||||
be copied later at compilation stage.
|
||||
be copied later at compilation stage.
|
||||
|
||||
TODO: after merging in ipa-sra use function call notes instead of args_to_skip
|
||||
bitmap interface.
|
||||
|
@ -2004,7 +2004,7 @@ cgraph_function_body_availability (struct cgraph_node *node)
|
|||
GIMPLE.
|
||||
|
||||
The function is assumed to be reachable and have address taken (so no
|
||||
API breaking optimizations are performed on it).
|
||||
API breaking optimizations are performed on it).
|
||||
|
||||
Main work done by this function is to enqueue the function for later
|
||||
processing to avoid need the passes to be re-entrant. */
|
||||
|
|
|
@ -227,7 +227,7 @@ struct GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) cgraph_node {
|
|||
ABSTRACT_DECL_ORIGIN of a reachable function. */
|
||||
unsigned abstract_and_needed : 1;
|
||||
/* Set when function is reachable by call from other function
|
||||
that is either reachable or needed.
|
||||
that is either reachable or needed.
|
||||
This flag is computed at original cgraph construction and then
|
||||
updated in cgraph_remove_unreachable_nodes. Note that after
|
||||
cgraph_remove_unreachable_nodes cgraph still can contain unreachable
|
||||
|
@ -312,7 +312,7 @@ struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) cgrap
|
|||
cgraph_inline_failed_t inline_failed;
|
||||
/* Expected number of executions: calculated in profile.c. */
|
||||
gcov_type count;
|
||||
/* Expected frequency of executions within the function.
|
||||
/* Expected frequency of executions within the function.
|
||||
When set to CGRAPH_FREQ_BASE, the edge is expected to be called once
|
||||
per function call. The range is 0 to CGRAPH_FREQ_MAX. */
|
||||
int frequency;
|
||||
|
@ -669,7 +669,7 @@ cgraph_node_set_size (cgraph_node_set set)
|
|||
struct GTY(()) constant_descriptor_tree {
|
||||
/* A MEM for the constant. */
|
||||
rtx rtl;
|
||||
|
||||
|
||||
/* The value of the constant. */
|
||||
tree value;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
#include "tree-pass.h"
|
||||
|
||||
/* Walk tree and record all calls and references to functions/variables.
|
||||
Called via walk_tree: TP is pointer to tree to be examined.
|
||||
Called via walk_tree: TP is pointer to tree to be examined.
|
||||
When DATA is non-null, record references to callgraph.
|
||||
*/
|
||||
|
||||
|
@ -222,14 +222,14 @@ struct gimple_opt_pass pass_build_cgraph_edges =
|
|||
};
|
||||
|
||||
/* Record references to functions and other variables present in the
|
||||
initial value of DECL, a variable.
|
||||
initial value of DECL, a variable.
|
||||
When ONLY_VARS is true, we mark needed only variables, not functions. */
|
||||
|
||||
void
|
||||
record_references_in_initializer (tree decl, bool only_vars)
|
||||
{
|
||||
struct pointer_set_t *visited_nodes = pointer_set_create ();
|
||||
walk_tree (&DECL_INITIAL (decl), record_reference,
|
||||
walk_tree (&DECL_INITIAL (decl), record_reference,
|
||||
only_vars ? NULL : decl, visited_nodes);
|
||||
pointer_set_destroy (visited_nodes);
|
||||
}
|
||||
|
|
|
@ -151,8 +151,8 @@ static GTY (()) VEC(tree, gc) *static_dtors;
|
|||
|
||||
/* When target does not have ctors and dtors, we call all constructor
|
||||
and destructor by special initialization/destruction function
|
||||
recognized by collect2.
|
||||
|
||||
recognized by collect2.
|
||||
|
||||
When we are going to build this function, collect all constructors and
|
||||
destructors and turn them into normal functions. */
|
||||
|
||||
|
@ -239,7 +239,7 @@ compare_ctor (const void *p1, const void *p2)
|
|||
f2 = *(const tree *)p2;
|
||||
priority1 = DECL_INIT_PRIORITY (f1);
|
||||
priority2 = DECL_INIT_PRIORITY (f2);
|
||||
|
||||
|
||||
if (priority1 < priority2)
|
||||
return -1;
|
||||
else if (priority1 > priority2)
|
||||
|
@ -265,7 +265,7 @@ compare_dtor (const void *p1, const void *p2)
|
|||
f2 = *(const tree *)p2;
|
||||
priority1 = DECL_FINI_PRIORITY (f1);
|
||||
priority2 = DECL_FINI_PRIORITY (f2);
|
||||
|
||||
|
||||
if (priority1 < priority2)
|
||||
return -1;
|
||||
else if (priority1 > priority2)
|
||||
|
@ -286,12 +286,12 @@ cgraph_build_cdtor_fns (void)
|
|||
{
|
||||
gcc_assert (!targetm.have_ctors_dtors);
|
||||
qsort (VEC_address (tree, static_ctors),
|
||||
VEC_length (tree, static_ctors),
|
||||
VEC_length (tree, static_ctors),
|
||||
sizeof (tree),
|
||||
compare_ctor);
|
||||
build_cdtor (/*ctor_p=*/true,
|
||||
VEC_address (tree, static_ctors),
|
||||
VEC_length (tree, static_ctors));
|
||||
VEC_length (tree, static_ctors));
|
||||
VEC_truncate (tree, static_ctors, 0);
|
||||
}
|
||||
|
||||
|
@ -299,12 +299,12 @@ cgraph_build_cdtor_fns (void)
|
|||
{
|
||||
gcc_assert (!targetm.have_ctors_dtors);
|
||||
qsort (VEC_address (tree, static_dtors),
|
||||
VEC_length (tree, static_dtors),
|
||||
VEC_length (tree, static_dtors),
|
||||
sizeof (tree),
|
||||
compare_dtor);
|
||||
build_cdtor (/*ctor_p=*/false,
|
||||
VEC_address (tree, static_dtors),
|
||||
VEC_length (tree, static_dtors));
|
||||
VEC_length (tree, static_dtors));
|
||||
VEC_truncate (tree, static_dtors, 0);
|
||||
}
|
||||
}
|
||||
|
@ -1689,7 +1689,7 @@ cgraph_copy_node_for_versioning (struct cgraph_node *old_version,
|
|||
TREE_MAP is a mapping of tree nodes we want to replace with
|
||||
new ones (according to results of prior analysis).
|
||||
OLD_VERSION_NODE is the node that is versioned.
|
||||
It returns the new version's cgraph node.
|
||||
It returns the new version's cgraph node.
|
||||
ARGS_TO_SKIP lists arguments to be omitted from functions
|
||||
*/
|
||||
|
||||
|
@ -1739,7 +1739,7 @@ cgraph_function_versioning (struct cgraph_node *old_version_node,
|
|||
|
||||
/* Update the call_expr on the edges to call the new version node. */
|
||||
update_call_expr (new_version_node);
|
||||
|
||||
|
||||
cgraph_call_function_insertion_hooks (new_version_node);
|
||||
return new_version_node;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ DEFCIFCODE(MAX_INLINE_INSNS_SINGLE_LIMIT,
|
|||
DEFCIFCODE(MAX_INLINE_INSNS_AUTO_LIMIT,
|
||||
N_("--param max-inline-insns-auto limit reached"))
|
||||
DEFCIFCODE(INLINE_UNIT_GROWTH_LIMIT,
|
||||
N_("--param inline-unit-growth limit reached"))
|
||||
N_("--param inline-unit-growth limit reached"))
|
||||
|
||||
/* Recursive inlining. */
|
||||
DEFCIFCODE(RECURSIVE_INLINING, N_("recursive inlining"))
|
||||
|
|
|
@ -349,7 +349,7 @@ typedef enum {
|
|||
enum scanfilter_masks {
|
||||
SCAN_NOTHING = 0,
|
||||
|
||||
SCAN_CTOR = 1 << SYM_CTOR,
|
||||
SCAN_CTOR = 1 << SYM_CTOR,
|
||||
SCAN_DTOR = 1 << SYM_DTOR,
|
||||
SCAN_INIT = 1 << SYM_INIT,
|
||||
SCAN_FINI = 1 << SYM_FINI,
|
||||
|
@ -1157,7 +1157,7 @@ main (int argc, char **argv)
|
|||
char **ld1_argv;
|
||||
const char **ld1;
|
||||
bool use_plugin = false;
|
||||
|
||||
|
||||
/* The kinds of symbols we will have to consider when scanning the
|
||||
outcome of a first pass link. This is ALL to start with, then might
|
||||
be adjusted before getting to the first pass link per se, typically on
|
||||
|
@ -1653,25 +1653,25 @@ main (int argc, char **argv)
|
|||
would otherwise reference them all, hence drag all the corresponding
|
||||
objects even if nothing else is referenced. */
|
||||
{
|
||||
const char **export_object_lst
|
||||
const char **export_object_lst
|
||||
= CONST_CAST2 (const char **, char **, object_lst);
|
||||
|
||||
|
||||
struct id *list = libs.first;
|
||||
|
||||
/* Compute the filter to use from the current one, do scan, then adjust
|
||||
the "current" filter to remove what we just included here. This will
|
||||
control whether we need a first pass link later on or not, and what
|
||||
will remain to be scanned there. */
|
||||
|
||||
|
||||
scanfilter this_filter
|
||||
= shared_obj ? ld1_filter : (ld1_filter & ~SCAN_DWEH);
|
||||
|
||||
|
||||
while (export_object_lst < object)
|
||||
scan_prog_file (*export_object_lst++, PASS_OBJ, this_filter);
|
||||
|
||||
|
||||
for (; list; list = list->next)
|
||||
scan_prog_file (list->name, PASS_FIRST, this_filter);
|
||||
|
||||
|
||||
ld1_filter = ld1_filter & ~this_filter;
|
||||
}
|
||||
|
||||
|
@ -1744,9 +1744,9 @@ main (int argc, char **argv)
|
|||
|
||||
/* Load the program, searching all libraries and attempting to provide
|
||||
undefined symbols from repository information.
|
||||
|
||||
|
||||
If -r or they will be run via some other method, do not build the
|
||||
constructor or destructor list, just return now. */
|
||||
constructor or destructor list, just return now. */
|
||||
{
|
||||
bool early_exit
|
||||
= rflag || (! DO_COLLECT_EXPORT_LIST && ! do_collecting);
|
||||
|
@ -1759,10 +1759,10 @@ main (int argc, char **argv)
|
|||
objects and libraries has performed above. In the !shared_obj case, we
|
||||
expect the relevant tables to be dragged together with their associated
|
||||
functions from precise cross reference insertions by the compiler. */
|
||||
|
||||
|
||||
if (early_exit || ld1_filter != SCAN_NOTHING)
|
||||
do_tlink (ld1_argv, object_lst);
|
||||
|
||||
|
||||
if (early_exit)
|
||||
{
|
||||
#ifdef COLLECT_EXPORT_LIST
|
||||
|
|
|
@ -767,7 +767,7 @@ do_SUBST_MODE (rtx *into, enum machine_mode newval)
|
|||
/* Subroutine of try_combine. Determine whether the combine replacement
|
||||
patterns NEWPAT, NEWI2PAT and NEWOTHERPAT are cheaper according to
|
||||
insn_rtx_cost that the original instruction sequence I1, I2, I3 and
|
||||
undobuf.other_insn. Note that I1 and/or NEWI2PAT may be NULL_RTX.
|
||||
undobuf.other_insn. Note that I1 and/or NEWI2PAT may be NULL_RTX.
|
||||
NEWOTHERPAT and undobuf.other_insn may also both be NULL_RTX. This
|
||||
function returns false, if the costs of all instructions can be
|
||||
estimated, and the replacements are more expensive than the original
|
||||
|
@ -912,7 +912,7 @@ create_log_links (void)
|
|||
register and establishing log links when def is encountered.
|
||||
Note that we do not clear next_use array in order to save time,
|
||||
so we have to test whether the use is in the same basic block as def.
|
||||
|
||||
|
||||
There are a few cases below when we do not consider the definition or
|
||||
usage -- these are taken from original flow.c did. Don't ask me why it is
|
||||
done this way; I don't know and if it works, I don't want to know. */
|
||||
|
@ -1367,7 +1367,7 @@ setup_incoming_promotions (rtx first)
|
|||
mode2 = TYPE_MODE (DECL_ARG_TYPE (arg));
|
||||
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
|
||||
|
||||
/* The mode and signedness of the argument as it is actually passed,
|
||||
/* The mode and signedness of the argument as it is actually passed,
|
||||
after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
|
||||
mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
|
||||
TREE_TYPE (cfun->decl), 0);
|
||||
|
@ -3887,7 +3887,7 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
|
|||
|
||||
if (newi2pat && new_i2_notes)
|
||||
distribute_notes (new_i2_notes, i2, i2, NULL_RTX, NULL_RTX, NULL_RTX);
|
||||
|
||||
|
||||
if (new_i3_notes)
|
||||
distribute_notes (new_i3_notes, i3, i3, NULL_RTX, NULL_RTX, NULL_RTX);
|
||||
|
||||
|
@ -4033,7 +4033,7 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
|
|||
}
|
||||
df_insn_rescan (i3);
|
||||
}
|
||||
|
||||
|
||||
/* Set new_direct_jump_p if a new return or simple jump instruction
|
||||
has been created. Adjust the CFG accordingly. */
|
||||
|
||||
|
@ -4061,7 +4061,7 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
|
|||
*new_direct_jump_p = 1;
|
||||
update_cfg_for_uncondjump (i3);
|
||||
}
|
||||
|
||||
|
||||
combine_successes++;
|
||||
undo_commit ();
|
||||
|
||||
|
@ -5272,7 +5272,7 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest)
|
|||
}
|
||||
|
||||
/* Try simplify a*(b/c) as (a*b)/c. */
|
||||
if (FLOAT_MODE_P (mode) && flag_associative_math
|
||||
if (FLOAT_MODE_P (mode) && flag_associative_math
|
||||
&& GET_CODE (XEXP (x, 0)) == DIV)
|
||||
{
|
||||
rtx tem = simplify_binary_operation (MULT, mode,
|
||||
|
@ -10175,7 +10175,7 @@ recog_for_combine (rtx *pnewpat, rtx insn, rtx *pnotes)
|
|||
if (REG_P (XEXP (XVECEXP (newpat, 0, i), 0))
|
||||
&& ! reg_dead_at_p (XEXP (XVECEXP (newpat, 0, i), 0), insn))
|
||||
return -1;
|
||||
if (GET_CODE (XEXP (XVECEXP (newpat, 0, i), 0)) != SCRATCH)
|
||||
if (GET_CODE (XEXP (XVECEXP (newpat, 0, i), 0)) != SCRATCH)
|
||||
{
|
||||
gcc_assert (REG_P (XEXP (XVECEXP (newpat, 0, i), 0)));
|
||||
notes = alloc_reg_note (REG_UNUSED,
|
||||
|
|
|
@ -434,7 +434,7 @@ convert_to_integer (tree type, tree expr)
|
|||
tree s_intype = TREE_TYPE (s_expr);
|
||||
const enum built_in_function fcode = builtin_mathfn_code (s_expr);
|
||||
tree fn = 0;
|
||||
|
||||
|
||||
switch (fcode)
|
||||
{
|
||||
CASE_FLT_FN (BUILT_IN_CEIL):
|
||||
|
@ -494,7 +494,7 @@ convert_to_integer (tree type, tree expr)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (fn)
|
||||
{
|
||||
tree newexpr = build_call_expr (fn, 1, CALL_EXPR_ARG (s_expr, 0));
|
||||
|
@ -515,7 +515,7 @@ convert_to_integer (tree type, tree expr)
|
|||
tree s_intype = TREE_TYPE (s_expr);
|
||||
const enum built_in_function fcode = builtin_mathfn_code (s_expr);
|
||||
tree fn = 0;
|
||||
|
||||
|
||||
switch (fcode)
|
||||
{
|
||||
CASE_FLT_FN (BUILT_IN_LOGB):
|
||||
|
|
|
@ -201,7 +201,7 @@ read_counts_file (void)
|
|||
|
||||
/* Read and discard the stamp. */
|
||||
gcov_read_unsigned ();
|
||||
|
||||
|
||||
counts_hash = htab_create (10,
|
||||
htab_counts_entry_hash, htab_counts_entry_eq,
|
||||
htab_counts_entry_del);
|
||||
|
@ -779,7 +779,7 @@ build_ctr_info_value (unsigned int counter, tree type)
|
|||
varpool_finalize_decl (tree_ctr_tables[counter]);
|
||||
|
||||
value = tree_cons (fields,
|
||||
build1 (ADDR_EXPR, TREE_TYPE (fields),
|
||||
build1 (ADDR_EXPR, TREE_TYPE (fields),
|
||||
tree_ctr_tables[counter]),
|
||||
value);
|
||||
}
|
||||
|
@ -1003,14 +1003,14 @@ coverage_init (const char *filename)
|
|||
int len = strlen (filename);
|
||||
/* + 1 for extra '/', in case prefix doesn't end with /. */
|
||||
int prefix_len;
|
||||
|
||||
|
||||
if (profile_data_prefix == 0 && filename[0] != '/')
|
||||
profile_data_prefix = getpwd ();
|
||||
|
||||
prefix_len = (profile_data_prefix) ? strlen (profile_data_prefix) + 1 : 0;
|
||||
|
||||
/* Name of da file. */
|
||||
da_file_name = XNEWVEC (char, len + strlen (GCOV_DATA_SUFFIX)
|
||||
da_file_name = XNEWVEC (char, len + strlen (GCOV_DATA_SUFFIX)
|
||||
+ prefix_len + 1);
|
||||
|
||||
if (profile_data_prefix)
|
||||
|
|
|
@ -135,7 +135,7 @@ call_ ## FUNC (void) \
|
|||
declaration for functions that we want to have weak references.
|
||||
|
||||
Neither way is particularly good. */
|
||||
|
||||
|
||||
/* References to __register_frame_info and __deregister_frame_info should
|
||||
be weak in this file if at all possible. */
|
||||
extern void __register_frame_info (const void *, struct object *)
|
||||
|
@ -254,7 +254,7 @@ void *__dso_handle = 0;
|
|||
extern void __cxa_finalize (void *) TARGET_ATTRIBUTE_WEAK;
|
||||
|
||||
/* Run all the global destructors on exit from the program. */
|
||||
|
||||
|
||||
/* Some systems place the number of pointers in the first word of the
|
||||
table. On SVR4 however, that word is -1. In all cases, the table is
|
||||
null-terminated. On SVR4, we start from the beginning of the list and
|
||||
|
@ -546,7 +546,7 @@ STATIC EH_FRAME_SECTION_CONST int32 __FRAME_END__[]
|
|||
|
||||
#ifdef JCR_SECTION_NAME
|
||||
/* Null terminate the .jcr section array. */
|
||||
STATIC void *__JCR_END__[1]
|
||||
STATIC void *__JCR_END__[1]
|
||||
__attribute__ ((unused, section(JCR_SECTION_NAME),
|
||||
aligned(sizeof(void *))))
|
||||
= { 0 };
|
||||
|
|
40
gcc/cse.c
40
gcc/cse.c
|
@ -2237,7 +2237,7 @@ hash_rtx_string (const char *ps)
|
|||
return hash;
|
||||
}
|
||||
|
||||
/* Same as hash_rtx, but call CB on each rtx if it is not NULL.
|
||||
/* Same as hash_rtx, but call CB on each rtx if it is not NULL.
|
||||
When the callback returns true, we continue with the new rtx. */
|
||||
|
||||
unsigned
|
||||
|
@ -2260,7 +2260,7 @@ hash_rtx_cb (const_rtx x, enum machine_mode mode,
|
|||
return hash;
|
||||
|
||||
/* Invoke the callback first. */
|
||||
if (cb != NULL
|
||||
if (cb != NULL
|
||||
&& ((*cb) (x, mode, &newx, &newmode)))
|
||||
{
|
||||
hash += hash_rtx_cb (newx, newmode, do_not_record_p,
|
||||
|
@ -2370,7 +2370,7 @@ hash_rtx_cb (const_rtx x, enum machine_mode mode,
|
|||
{
|
||||
elt = CONST_VECTOR_ELT (x, i);
|
||||
hash += hash_rtx_cb (elt, GET_MODE (elt),
|
||||
do_not_record_p, hash_arg_in_memory_p,
|
||||
do_not_record_p, hash_arg_in_memory_p,
|
||||
have_reg_qty, cb);
|
||||
}
|
||||
|
||||
|
@ -2516,7 +2516,7 @@ hash_rtx_cb (const_rtx x, enum machine_mode mode,
|
|||
x = XEXP (x, i);
|
||||
goto repeat;
|
||||
}
|
||||
|
||||
|
||||
hash += hash_rtx_cb (XEXP (x, i), VOIDmode, do_not_record_p,
|
||||
hash_arg_in_memory_p,
|
||||
have_reg_qty, cb);
|
||||
|
@ -2684,8 +2684,8 @@ exp_equiv_p (const_rtx x, const_rtx y, int validate, bool for_gcse)
|
|||
They could e.g. be two different entities allocated into the
|
||||
same space on the stack (see e.g. PR25130). In that case, the
|
||||
MEM addresses can be the same, even though the two MEMs are
|
||||
absolutely not equivalent.
|
||||
|
||||
absolutely not equivalent.
|
||||
|
||||
But because really all MEM attributes should be the same for
|
||||
equivalent MEMs, we just use the invariant that MEMs that have
|
||||
the same attributes share the same mem_attrs data structure. */
|
||||
|
@ -3427,7 +3427,7 @@ fold_rtx (rtx x, rtx insn)
|
|||
constant through simplifications. */
|
||||
p = lookup (folded_arg0, SAFE_HASH (folded_arg0, mode_arg0),
|
||||
mode_arg0);
|
||||
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
cheapest_simplification = x;
|
||||
|
@ -6001,7 +6001,7 @@ cse_process_notes (rtx x, rtx object, bool *changed)
|
|||
describe the path.
|
||||
It is filled with a queue of basic blocks, starting with FIRST_BB
|
||||
and following a trace through the CFG.
|
||||
|
||||
|
||||
If all paths starting at FIRST_BB have been followed, or no new path
|
||||
starting at FIRST_BB can be constructed, this function returns FALSE.
|
||||
Otherwise, DATA->path is filled and the function returns TRUE indicating
|
||||
|
@ -6017,7 +6017,7 @@ cse_find_path (basic_block first_bb, struct cse_basic_block_data *data,
|
|||
basic_block bb;
|
||||
edge e;
|
||||
int path_size;
|
||||
|
||||
|
||||
SET_BIT (cse_visited_basic_blocks, first_bb->index);
|
||||
|
||||
/* See if there is a previous path. */
|
||||
|
@ -6178,7 +6178,7 @@ cse_prescan_path (struct cse_basic_block_data *data)
|
|||
int path_entry;
|
||||
|
||||
/* Scan to end of each basic block in the path. */
|
||||
for (path_entry = 0; path_entry < path_size; path_entry++)
|
||||
for (path_entry = 0; path_entry < path_size; path_entry++)
|
||||
{
|
||||
basic_block bb;
|
||||
rtx insn;
|
||||
|
@ -6784,7 +6784,7 @@ cse_change_cc_mode (rtx *loc, void *data)
|
|||
&& GET_MODE (*loc) != GET_MODE (args->newreg))
|
||||
{
|
||||
validate_change (args->insn, loc, args->newreg, 1);
|
||||
|
||||
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -6804,10 +6804,10 @@ cse_change_cc_mode_insn (rtx insn, rtx newreg)
|
|||
|
||||
args.insn = insn;
|
||||
args.newreg = newreg;
|
||||
|
||||
|
||||
for_each_rtx (&PATTERN (insn), cse_change_cc_mode, &args);
|
||||
for_each_rtx (®_NOTES (insn), cse_change_cc_mode, &args);
|
||||
|
||||
|
||||
/* If the following assertion was triggered, there is most probably
|
||||
something wrong with the cc_modes_compatible back end function.
|
||||
CC modes only can be considered compatible if the insn - with the mode
|
||||
|
@ -6926,7 +6926,7 @@ cse_cc_succs (basic_block bb, basic_block orig_bb, rtx cc_reg, rtx cc_src,
|
|||
XEXP (SET_SRC (set), 0))
|
||||
&& rtx_equal_p (XEXP (cc_src, 1),
|
||||
XEXP (SET_SRC (set), 1)))
|
||||
|
||||
|
||||
{
|
||||
comp_mode = targetm.cc_modes_compatible (mode, set_mode);
|
||||
if (comp_mode != VOIDmode
|
||||
|
@ -7183,8 +7183,8 @@ struct rtl_opt_pass pass_cse =
|
|||
{
|
||||
RTL_PASS,
|
||||
"cse1", /* name */
|
||||
gate_handle_cse, /* gate */
|
||||
rest_of_handle_cse, /* execute */
|
||||
gate_handle_cse, /* gate */
|
||||
rest_of_handle_cse, /* execute */
|
||||
NULL, /* sub */
|
||||
NULL, /* next */
|
||||
0, /* static_pass_number */
|
||||
|
@ -7246,8 +7246,8 @@ struct rtl_opt_pass pass_cse2 =
|
|||
{
|
||||
RTL_PASS,
|
||||
"cse2", /* name */
|
||||
gate_handle_cse2, /* gate */
|
||||
rest_of_handle_cse2, /* execute */
|
||||
gate_handle_cse2, /* gate */
|
||||
rest_of_handle_cse2, /* execute */
|
||||
NULL, /* sub */
|
||||
NULL, /* next */
|
||||
0, /* static_pass_number */
|
||||
|
@ -7307,8 +7307,8 @@ struct rtl_opt_pass pass_cse_after_global_opts =
|
|||
{
|
||||
RTL_PASS,
|
||||
"cse_local", /* name */
|
||||
gate_handle_cse_after_global_opts, /* gate */
|
||||
rest_of_handle_cse_after_global_opts, /* execute */
|
||||
gate_handle_cse_after_global_opts, /* gate */
|
||||
rest_of_handle_cse_after_global_opts, /* execute */
|
||||
NULL, /* sub */
|
||||
NULL, /* next */
|
||||
0, /* static_pass_number */
|
||||
|
|
46
gcc/cselib.c
46
gcc/cselib.c
|
@ -278,7 +278,7 @@ entry_and_rtx_equal_p (const void *entry, const void *x_arg)
|
|||
|
||||
gcc_assert (!CONST_INT_P (x) && GET_CODE (x) != CONST_FIXED
|
||||
&& (mode != VOIDmode || GET_CODE (x) != CONST_DOUBLE));
|
||||
|
||||
|
||||
if (mode != GET_MODE (v->val_rtx))
|
||||
return 0;
|
||||
|
||||
|
@ -815,10 +815,10 @@ cselib_hash_rtx (rtx x, int create)
|
|||
{
|
||||
rtx tem = XEXP (x, i);
|
||||
unsigned int tem_hash = cselib_hash_rtx (tem, create);
|
||||
|
||||
|
||||
if (tem_hash == 0)
|
||||
return 0;
|
||||
|
||||
|
||||
hash += tem_hash;
|
||||
}
|
||||
break;
|
||||
|
@ -827,10 +827,10 @@ cselib_hash_rtx (rtx x, int create)
|
|||
{
|
||||
unsigned int tem_hash
|
||||
= cselib_hash_rtx (XVECEXP (x, i, j), create);
|
||||
|
||||
|
||||
if (tem_hash == 0)
|
||||
return 0;
|
||||
|
||||
|
||||
hash += tem_hash;
|
||||
}
|
||||
break;
|
||||
|
@ -838,13 +838,13 @@ cselib_hash_rtx (rtx x, int create)
|
|||
case 's':
|
||||
{
|
||||
const unsigned char *p = (const unsigned char *) XSTR (x, i);
|
||||
|
||||
|
||||
if (p)
|
||||
while (*p)
|
||||
hash += *p++;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 'i':
|
||||
hash += XINT (x, i);
|
||||
break;
|
||||
|
@ -853,7 +853,7 @@ cselib_hash_rtx (rtx x, int create)
|
|||
case 't':
|
||||
/* unused */
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
@ -971,7 +971,7 @@ cselib_lookup_mem (rtx x, int create)
|
|||
non-reg results, we just take the first one because they will all
|
||||
expand to the same place. */
|
||||
|
||||
static rtx
|
||||
static rtx
|
||||
expand_loc (struct elt_loc_list *p, struct expand_value_data *evd,
|
||||
int max_depth)
|
||||
{
|
||||
|
@ -983,8 +983,8 @@ expand_loc (struct elt_loc_list *p, struct expand_value_data *evd,
|
|||
{
|
||||
/* Avoid infinite recursion trying to expand a reg into a
|
||||
the same reg. */
|
||||
if ((REG_P (p->loc))
|
||||
&& (REGNO (p->loc) < regno)
|
||||
if ((REG_P (p->loc))
|
||||
&& (REGNO (p->loc) < regno)
|
||||
&& !bitmap_bit_p (evd->regs_active, REGNO (p->loc)))
|
||||
{
|
||||
reg_result = p->loc;
|
||||
|
@ -992,7 +992,7 @@ expand_loc (struct elt_loc_list *p, struct expand_value_data *evd,
|
|||
}
|
||||
/* Avoid infinite recursion and do not try to expand the
|
||||
value. */
|
||||
else if (GET_CODE (p->loc) == VALUE
|
||||
else if (GET_CODE (p->loc) == VALUE
|
||||
&& CSELIB_VAL_PTR (p->loc)->locs == p_in)
|
||||
continue;
|
||||
else if (!REG_P (p->loc))
|
||||
|
@ -1013,9 +1013,9 @@ expand_loc (struct elt_loc_list *p, struct expand_value_data *evd,
|
|||
if (result)
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (regno != UINT_MAX)
|
||||
{
|
||||
rtx result;
|
||||
|
@ -1034,7 +1034,7 @@ expand_loc (struct elt_loc_list *p, struct expand_value_data *evd,
|
|||
print_inline_rtx (dump_file, reg_result, 0);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
else
|
||||
else
|
||||
fprintf (dump_file, "NULL\n");
|
||||
}
|
||||
return reg_result;
|
||||
|
@ -1045,7 +1045,7 @@ expand_loc (struct elt_loc_list *p, struct expand_value_data *evd,
|
|||
This is the opposite of common subexpression. Because local value
|
||||
numbering is such a weak optimization, the expanded expression is
|
||||
pretty much unique (not from a pointer equals point of view but
|
||||
from a tree shape point of view.
|
||||
from a tree shape point of view.
|
||||
|
||||
This function returns NULL if the expansion fails. The expansion
|
||||
will fail if there is no value number for one of the operands or if
|
||||
|
@ -1124,7 +1124,7 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd,
|
|||
{
|
||||
rtx result;
|
||||
int regno = REGNO (orig);
|
||||
|
||||
|
||||
/* The only thing that we are not willing to do (this
|
||||
is requirement of dse and if others potential uses
|
||||
need this function we should add a parm to control
|
||||
|
@ -1156,11 +1156,11 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd,
|
|||
|
||||
if (result)
|
||||
return result;
|
||||
else
|
||||
else
|
||||
return orig;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case CONST_INT:
|
||||
case CONST_DOUBLE:
|
||||
case CONST_VECTOR:
|
||||
|
@ -1979,7 +1979,7 @@ cselib_process_insn (rtx insn)
|
|||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
if (call_used_regs[i]
|
||||
|| (REG_VALUES (i) && REG_VALUES (i)->elt
|
||||
&& HARD_REGNO_CALL_PART_CLOBBERED (i,
|
||||
&& HARD_REGNO_CALL_PART_CLOBBERED (i,
|
||||
GET_MODE (REG_VALUES (i)->elt->val_rtx))))
|
||||
cselib_invalidate_regno (i, reg_raw_mode[i]);
|
||||
|
||||
|
@ -2025,11 +2025,11 @@ cselib_process_insn (rtx insn)
|
|||
void
|
||||
cselib_init (bool record_memory)
|
||||
{
|
||||
elt_list_pool = create_alloc_pool ("elt_list",
|
||||
elt_list_pool = create_alloc_pool ("elt_list",
|
||||
sizeof (struct elt_list), 10);
|
||||
elt_loc_list_pool = create_alloc_pool ("elt_loc_list",
|
||||
elt_loc_list_pool = create_alloc_pool ("elt_loc_list",
|
||||
sizeof (struct elt_loc_list), 10);
|
||||
cselib_val_pool = create_alloc_pool ("cselib_val_list",
|
||||
cselib_val_pool = create_alloc_pool ("cselib_val_list",
|
||||
sizeof (cselib_val), 10);
|
||||
value_pool = create_alloc_pool ("value", RTX_CODE_SIZE (VALUE), 100);
|
||||
cselib_record_memory = record_memory;
|
||||
|
|
10
gcc/dbgcnt.c
10
gcc/dbgcnt.c
|
@ -15,7 +15,7 @@ for more details.
|
|||
|
||||
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/>.
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
See dbgcnt.def for usage information. */
|
||||
|
||||
|
@ -62,7 +62,7 @@ dbg_cnt (enum debug_counter index)
|
|||
{
|
||||
count[index]++;
|
||||
if (dump_file && count[index] == limit[index])
|
||||
fprintf (dump_file, "***dbgcnt: limit reached for %s.***\n",
|
||||
fprintf (dump_file, "***dbgcnt: limit reached for %s.***\n",
|
||||
map[index].name);
|
||||
|
||||
return dbg_cnt_is_enabled (index);
|
||||
|
@ -104,7 +104,7 @@ dbg_cnt_process_single_pair (const char *arg)
|
|||
const char *colon = strchr (arg, ':');
|
||||
char *endptr = NULL;
|
||||
int value;
|
||||
|
||||
|
||||
if (colon == NULL)
|
||||
return NULL;
|
||||
|
||||
|
@ -113,7 +113,7 @@ dbg_cnt_process_single_pair (const char *arg)
|
|||
if (endptr != NULL && endptr != colon + 1
|
||||
&& dbg_cnt_set_limit_by_name (arg, colon - arg, value))
|
||||
return endptr;
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ dbg_cnt_process_opt (const char *arg)
|
|||
|
||||
/* Print name, limit and count of all counters. */
|
||||
|
||||
void
|
||||
void
|
||||
dbg_cnt_list_all_counters (void)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -71,7 +71,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
assuming that the following script is called binarySearch,
|
||||
the command:
|
||||
|
||||
binarySearch tryTest
|
||||
binarySearch tryTest
|
||||
|
||||
will automatically find the highest value of the counter for which
|
||||
the program fails. If tryTest never fails, binarySearch will
|
||||
|
@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
dump_file of the form:
|
||||
|
||||
***dbgcnt: limit reached for %s.***
|
||||
|
||||
|
||||
Assuming that the dump file is logging the analysis/transformations
|
||||
it is making, this pinpoints the exact position in the log file
|
||||
where the problem transformation is being logged.
|
||||
|
|
|
@ -15,7 +15,7 @@ for more details.
|
|||
|
||||
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/>.
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
See dbgcnt.def for usage information. */
|
||||
|
||||
|
|
40
gcc/dbxout.c
40
gcc/dbxout.c
|
@ -216,8 +216,8 @@ struct dbx_file
|
|||
struct dbx_file *prev; /* Chain to traverse all pending bincls. */
|
||||
};
|
||||
|
||||
/* This is the top of the stack.
|
||||
|
||||
/* This is the top of the stack.
|
||||
|
||||
This is not saved for PCH, because restoring a PCH should not change it.
|
||||
next_file_number does have to be saved, because the PCH may use some
|
||||
file numbers; however, just before restoring a PCH, next_file_number
|
||||
|
@ -306,7 +306,7 @@ static void emit_pending_bincls (void);
|
|||
static inline void emit_pending_bincls_if_required (void);
|
||||
|
||||
static void dbxout_init (const char *);
|
||||
|
||||
|
||||
static void dbxout_finish (const char *);
|
||||
static void dbxout_start_source_file (unsigned, const char *);
|
||||
static void dbxout_end_source_file (unsigned);
|
||||
|
@ -848,7 +848,7 @@ do { \
|
|||
SYM is the DECL of the symbol under consideration; it is used only
|
||||
for its DECL_SOURCE_LINE. The other arguments are all passed directly
|
||||
to DBX_FINISH_STABS; see above for details. */
|
||||
|
||||
|
||||
static void
|
||||
dbxout_finish_complex_stabs (tree sym, stab_code_type code,
|
||||
rtx addr, const char *label, int number)
|
||||
|
@ -902,7 +902,7 @@ dbxout_finish_complex_stabs (tree sym, stab_code_type code,
|
|||
obstack_grow (&stabstr_ob, "\",", 2);
|
||||
len = obstack_object_size (&stabstr_ob);
|
||||
str = XOBFINISH (&stabstr_ob, char *);
|
||||
|
||||
|
||||
fwrite (str, 1, len, asm_out_file);
|
||||
DBX_FINISH_STABS (sym, code, line, addr, label, number);
|
||||
}
|
||||
|
@ -919,7 +919,7 @@ dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
|
|||
/* The Lscope label must be emitted even if we aren't doing anything
|
||||
else; dbxout_block needs it. */
|
||||
switch_to_section (function_section (current_function_decl));
|
||||
|
||||
|
||||
/* Convert Lscope into the appropriate format for local labels in case
|
||||
the system doesn't insert underscores in front of user generated
|
||||
labels. */
|
||||
|
@ -939,10 +939,10 @@ dbxout_function_end (tree decl ATTRIBUTE_UNUSED)
|
|||
if (flag_reorder_blocks_and_partition)
|
||||
{
|
||||
dbxout_begin_empty_stabs (N_FUN);
|
||||
dbxout_stab_value_label_diff (crtl->subsections.hot_section_end_label,
|
||||
dbxout_stab_value_label_diff (crtl->subsections.hot_section_end_label,
|
||||
crtl->subsections.hot_section_label);
|
||||
dbxout_begin_empty_stabs (N_FUN);
|
||||
dbxout_stab_value_label_diff (crtl->subsections.cold_section_end_label,
|
||||
dbxout_stab_value_label_diff (crtl->subsections.cold_section_end_label,
|
||||
crtl->subsections.cold_section_label);
|
||||
}
|
||||
else
|
||||
|
@ -1178,7 +1178,7 @@ dbxout_start_source_file (unsigned int line ATTRIBUTE_UNUSED,
|
|||
|
||||
n->next = current_file;
|
||||
n->next_type_number = 1;
|
||||
/* Do not assign file number now.
|
||||
/* Do not assign file number now.
|
||||
Delay it until we actually emit BINCL. */
|
||||
n->file_number = 0;
|
||||
n->prev = NULL;
|
||||
|
@ -1259,7 +1259,7 @@ dbxout_source_file (const char *filename)
|
|||
}
|
||||
}
|
||||
|
||||
/* Output N_BNSYM, line number symbol entry, and local symbol at
|
||||
/* Output N_BNSYM, line number symbol entry, and local symbol at
|
||||
function scope */
|
||||
|
||||
static void
|
||||
|
@ -1275,7 +1275,7 @@ dbxout_begin_prologue (unsigned int lineno, const char *filename)
|
|||
scope_labelno++;
|
||||
|
||||
dbxout_source_line (lineno, filename, 0, true);
|
||||
/* Output function begin block at function scope, referenced
|
||||
/* Output function begin block at function scope, referenced
|
||||
by dbxout_block, dbxout_source_line and dbxout_function_end. */
|
||||
emit_pending_bincls_if_required ();
|
||||
targetm.asm_out.internal_label (asm_out_file, "LFBB", scope_labelno);
|
||||
|
@ -1299,7 +1299,7 @@ dbxout_source_line (unsigned int lineno, const char *filename,
|
|||
char begin_label[20];
|
||||
dbxout_begin_stabn_sline (lineno);
|
||||
/* Reference current function start using LFBB. */
|
||||
ASM_GENERATE_INTERNAL_LABEL (begin_label, "LFBB", scope_labelno);
|
||||
ASM_GENERATE_INTERNAL_LABEL (begin_label, "LFBB", scope_labelno);
|
||||
dbxout_stab_value_internal_label_diff ("LM", &dbxout_source_line_counter,
|
||||
begin_label);
|
||||
}
|
||||
|
@ -2093,7 +2093,7 @@ dbxout_type (tree type, int full)
|
|||
int i;
|
||||
tree child;
|
||||
VEC(tree,gc) *accesses = BINFO_BASE_ACCESSES (binfo);
|
||||
|
||||
|
||||
if (use_gnu_debug_info_extensions)
|
||||
{
|
||||
if (BINFO_N_BASE_BINFOS (binfo))
|
||||
|
@ -2320,7 +2320,7 @@ static void
|
|||
dbxout_type_name (tree type)
|
||||
{
|
||||
tree t = TYPE_NAME (type);
|
||||
|
||||
|
||||
gcc_assert (t);
|
||||
switch (TREE_CODE (t))
|
||||
{
|
||||
|
@ -3138,7 +3138,7 @@ dbxout_symbol_name (tree decl, const char *suffix, int letter)
|
|||
{
|
||||
tree name;
|
||||
|
||||
if (DECL_CONTEXT (decl)
|
||||
if (DECL_CONTEXT (decl)
|
||||
&& (TYPE_P (DECL_CONTEXT (decl))
|
||||
|| TREE_CODE (DECL_CONTEXT (decl)) == NAMESPACE_DECL))
|
||||
/* One slight hitch: if this is a VAR_DECL which is a class member
|
||||
|
@ -3190,12 +3190,12 @@ dbxout_common_check (tree decl, int *value)
|
|||
rtx home;
|
||||
rtx sym_addr;
|
||||
const char *name = NULL;
|
||||
|
||||
|
||||
/* If the decl isn't a VAR_DECL, or if it isn't static, or if
|
||||
it does not have a value (the offset into the common area), or if it
|
||||
is thread local (as opposed to global) then it isn't common, and shouldn't
|
||||
be handled as such.
|
||||
|
||||
|
||||
??? DECL_THREAD_LOCAL_P check prevents problems with improper .stabs
|
||||
for thread-local symbols. Can be handled via same mechanism as used
|
||||
in dwarf2out.c. */
|
||||
|
@ -3206,7 +3206,7 @@ dbxout_common_check (tree decl, int *value)
|
|||
|| !is_fortran ())
|
||||
return NULL;
|
||||
|
||||
home = DECL_RTL (decl);
|
||||
home = DECL_RTL (decl);
|
||||
if (home == NULL_RTX || GET_CODE (home) != MEM)
|
||||
return NULL;
|
||||
|
||||
|
@ -3431,7 +3431,7 @@ dbxout_parms (tree parms)
|
|||
that it was actually passed by invisible reference. */
|
||||
|
||||
code = DBX_REGPARM_STABS_CODE;
|
||||
|
||||
|
||||
/* GDB likes this marked with a special letter. */
|
||||
letter = (use_gnu_debug_info_extensions
|
||||
? 'a' : DBX_REGPARM_STABS_LETTER);
|
||||
|
@ -3502,7 +3502,7 @@ dbxout_parms (tree parms)
|
|||
continue;
|
||||
|
||||
dbxout_begin_complex_stabs ();
|
||||
|
||||
|
||||
if (DECL_NAME (parms))
|
||||
{
|
||||
stabstr_I (DECL_NAME (parms));
|
||||
|
|
32
gcc/dce.c
32
gcc/dce.c
|
@ -622,7 +622,7 @@ mark_artificial_uses (void)
|
|||
|
||||
FOR_ALL_BB (bb)
|
||||
{
|
||||
for (use_rec = df_get_artificial_uses (bb->index);
|
||||
for (use_rec = df_get_artificial_uses (bb->index);
|
||||
*use_rec; use_rec++)
|
||||
for (defs = DF_REF_CHAIN (*use_rec); defs; defs = defs->next)
|
||||
if (! DF_REF_IS_ARTIFICIAL (defs->ref))
|
||||
|
@ -825,7 +825,7 @@ byte_dce_process_block (basic_block bb, bool redo_out, bitmap au)
|
|||
mark_insn (insn, true);
|
||||
goto quickexit;
|
||||
}
|
||||
|
||||
|
||||
last = start + len;
|
||||
while (start < last)
|
||||
if (bitmap_bit_p (local_live, start++))
|
||||
|
@ -834,9 +834,9 @@ byte_dce_process_block (basic_block bb, bool redo_out, bitmap au)
|
|||
goto quickexit;
|
||||
}
|
||||
}
|
||||
|
||||
quickexit:
|
||||
|
||||
|
||||
quickexit:
|
||||
|
||||
/* No matter if the instruction is needed or not, we remove
|
||||
any regno in the defs from the live set. */
|
||||
df_byte_lr_simulate_defs (insn, local_live);
|
||||
|
@ -848,12 +848,12 @@ byte_dce_process_block (basic_block bb, bool redo_out, bitmap au)
|
|||
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (dump_file, "finished processing insn %d live out = ",
|
||||
fprintf (dump_file, "finished processing insn %d live out = ",
|
||||
INSN_UID (insn));
|
||||
df_print_byte_regset (dump_file, local_live);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
df_byte_lr_simulate_artificial_refs_at_top (bb, local_live);
|
||||
|
||||
block_changed = !bitmap_equal_p (local_live, DF_BYTE_LR_IN (bb));
|
||||
|
@ -913,10 +913,10 @@ dce_process_block (basic_block bb, bool redo_out, bitmap au)
|
|||
needed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (needed)
|
||||
mark_insn (insn, true);
|
||||
|
||||
|
||||
/* No matter if the instruction is needed or not, we remove
|
||||
any regno in the defs from the live set. */
|
||||
df_simulate_defs (insn, local_live);
|
||||
|
@ -926,7 +926,7 @@ dce_process_block (basic_block bb, bool redo_out, bitmap au)
|
|||
if (marked_insn_p (insn))
|
||||
df_simulate_uses (insn, local_live);
|
||||
}
|
||||
|
||||
|
||||
df_simulate_finalize_backwards (bb, local_live);
|
||||
|
||||
block_changed = !bitmap_equal_p (local_live, DF_LR_IN (bb));
|
||||
|
@ -986,15 +986,15 @@ fast_dce (bool byte_level)
|
|||
}
|
||||
|
||||
if (byte_level)
|
||||
local_changed
|
||||
local_changed
|
||||
= byte_dce_process_block (bb, bitmap_bit_p (redo_out, index),
|
||||
bb_has_eh_pred (bb) ? au_eh : au);
|
||||
else
|
||||
local_changed
|
||||
local_changed
|
||||
= dce_process_block (bb, bitmap_bit_p (redo_out, index),
|
||||
bb_has_eh_pred (bb) ? au_eh : au);
|
||||
bitmap_set_bit (processed, index);
|
||||
|
||||
|
||||
if (local_changed)
|
||||
{
|
||||
edge e;
|
||||
|
@ -1010,7 +1010,7 @@ fast_dce (bool byte_level)
|
|||
bitmap_set_bit (redo_out, e->src->index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (global_changed)
|
||||
{
|
||||
/* Turn off the RUN_DCE flag to prevent recursive calls to
|
||||
|
@ -1023,11 +1023,11 @@ fast_dce (bool byte_level)
|
|||
sbitmap_zero (marked);
|
||||
bitmap_clear (processed);
|
||||
bitmap_clear (redo_out);
|
||||
|
||||
|
||||
/* We do not need to rescan any instructions. We only need
|
||||
to redo the dataflow equations for the blocks that had a
|
||||
change at the top of the block. Then we need to redo the
|
||||
iteration. */
|
||||
iteration. */
|
||||
if (byte_level)
|
||||
df_analyze_problem (df_byte_lr, all_blocks, postorder, n_blocks);
|
||||
else
|
||||
|
|
10
gcc/ddg.c
10
gcc/ddg.c
|
@ -355,7 +355,7 @@ add_inter_loop_mem_dep (ddg_ptr g, ddg_node_ptr from, ddg_node_ptr to)
|
|||
if (!insn_alias_sets_conflict_p (from->insn, to->insn))
|
||||
/* Do not create edge if memory references have disjoint alias sets. */
|
||||
return;
|
||||
|
||||
|
||||
if (mem_write_insn_p (from->insn))
|
||||
{
|
||||
if (mem_read_insn_p (to->insn))
|
||||
|
@ -523,10 +523,10 @@ create_ddg (basic_block bb, int closing_branch_deps)
|
|||
g->nodes[i++].insn = insn;
|
||||
first_note = NULL_RTX;
|
||||
}
|
||||
|
||||
|
||||
/* We must have found a branch in DDG. */
|
||||
gcc_assert (g->closing_branch);
|
||||
|
||||
|
||||
|
||||
/* Build the data dependency graph. */
|
||||
build_intra_loop_deps (g);
|
||||
|
@ -869,9 +869,9 @@ static int
|
|||
compare_sccs (const void *s1, const void *s2)
|
||||
{
|
||||
const int rec_l1 = (*(const ddg_scc_ptr *)s1)->recurrence_length;
|
||||
const int rec_l2 = (*(const ddg_scc_ptr *)s2)->recurrence_length;
|
||||
const int rec_l2 = (*(const ddg_scc_ptr *)s2)->recurrence_length;
|
||||
return ((rec_l2 > rec_l1) - (rec_l2 < rec_l1));
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Order the backarcs in descending recMII order using compare_sccs. */
|
||||
|
|
|
@ -27,7 +27,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
/* For basic_block. */
|
||||
#include "basic-block.h"
|
||||
#include "df.h"
|
||||
|
||||
|
||||
typedef struct ddg_node *ddg_node_ptr;
|
||||
typedef struct ddg_edge *ddg_edge_ptr;
|
||||
typedef struct ddg *ddg_ptr;
|
||||
|
|
|
@ -460,11 +460,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||
|
||||
#ifndef DECIMAL32_TYPE_SIZE
|
||||
#define DECIMAL32_TYPE_SIZE 32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DECIMAL64_TYPE_SIZE
|
||||
#ifndef DECIMAL64_TYPE_SIZE
|
||||
#define DECIMAL64_TYPE_SIZE 64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DECIMAL128_TYPE_SIZE
|
||||
#define DECIMAL128_TYPE_SIZE 128
|
||||
|
|
|
@ -43,12 +43,12 @@ along with GCC; see the file COPYING3. If not see
|
|||
/* Helper for df_compute_accessed_bytes. Ref is some sort of extract.
|
||||
Return true if this effects the entire reg in REF. Return false if
|
||||
otherwise and set START_BYTE and LAST_BYTE. See the description of
|
||||
df_compute_accessed_bytes for a description of MM. */
|
||||
df_compute_accessed_bytes for a description of MM. */
|
||||
|
||||
static bool
|
||||
static bool
|
||||
df_compute_accessed_bytes_extract (df_ref ref,
|
||||
enum df_mm mm ,
|
||||
unsigned int *start_byte,
|
||||
unsigned int *start_byte,
|
||||
unsigned int *last_byte)
|
||||
{
|
||||
int start;
|
||||
|
@ -61,12 +61,12 @@ df_compute_accessed_bytes_extract (df_ref ref,
|
|||
|
||||
/* (*_extract:M1 (reg:M2 X) WIDTH POS)
|
||||
(*_extract:M1 (subreg:M1 (reg:M2 X N) WIDTH POS)
|
||||
|
||||
|
||||
This is a bitfield extraction. The assignment clobbers/extracts
|
||||
exactly the bits named by WIDTH and POS and does not affect the
|
||||
other bits in register X. It is also technically possible that
|
||||
the bits asked for are longer than units per word. */
|
||||
|
||||
|
||||
int offset = DF_REF_EXTRACT_OFFSET (ref);
|
||||
int width = DF_REF_EXTRACT_WIDTH (ref);
|
||||
|
||||
|
@ -134,9 +134,9 @@ df_compute_accessed_bytes_extract (df_ref ref,
|
|||
last = m2_size;
|
||||
|
||||
if (dump_file)
|
||||
fprintf (dump_file, " cpb extract regno=%d start=%d last=%d\n",
|
||||
fprintf (dump_file, " cpb extract regno=%d start=%d last=%d\n",
|
||||
DF_REF_REGNO (ref), start, last);
|
||||
|
||||
|
||||
*start_byte = start;
|
||||
*last_byte = last;
|
||||
return false;
|
||||
|
@ -145,11 +145,11 @@ df_compute_accessed_bytes_extract (df_ref ref,
|
|||
|
||||
/* Helper for df_compute_accessed_bytes. Ref is a strict_low_part.
|
||||
Return true if this effects the entire reg in REF. Return false if
|
||||
otherwise and set START_BYTE and LAST_BYTE. */
|
||||
otherwise and set START_BYTE and LAST_BYTE. */
|
||||
|
||||
static bool
|
||||
df_compute_accessed_bytes_strict_low_part (df_ref ref,
|
||||
unsigned int *start_byte,
|
||||
static bool
|
||||
df_compute_accessed_bytes_strict_low_part (df_ref ref,
|
||||
unsigned int *start_byte,
|
||||
unsigned int *last_byte)
|
||||
{
|
||||
int start;
|
||||
|
@ -177,17 +177,17 @@ df_compute_accessed_bytes_strict_low_part (df_ref ref,
|
|||
gcc_assert (m1_size <= m2_size);
|
||||
|
||||
/* (set (strict_low_part (subreg:M1 (reg:M2 X) N)) ...)
|
||||
|
||||
|
||||
This is a bitfield insertion. The assignment clobbers exactly the
|
||||
bits named by the subreg--the M1 bits at position N. It is also
|
||||
technically possible that the bits asked for are longer than units
|
||||
per word. */
|
||||
|
||||
|
||||
start = offset;
|
||||
last = offset + m1_size;
|
||||
|
||||
if (dump_file)
|
||||
fprintf (dump_file, " cpb strict low part regno=%d start=%d last=%d\n",
|
||||
fprintf (dump_file, " cpb strict low part regno=%d start=%d last=%d\n",
|
||||
DF_REF_REGNO (ref), start, last);
|
||||
|
||||
*start_byte = start;
|
||||
|
@ -197,10 +197,10 @@ df_compute_accessed_bytes_strict_low_part (df_ref ref,
|
|||
|
||||
/* Helper for df_compute_accessed_bytes. Ref is a naked subreg.
|
||||
Return true if this effects the entire reg in REF. Return false if
|
||||
otherwise and set START_BYTE and LAST_BYTE. */
|
||||
otherwise and set START_BYTE and LAST_BYTE. */
|
||||
|
||||
static bool
|
||||
df_compute_accessed_bytes_subreg (df_ref ref, unsigned int *start_byte,
|
||||
static bool
|
||||
df_compute_accessed_bytes_subreg (df_ref ref, unsigned int *start_byte,
|
||||
unsigned int *last_byte)
|
||||
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ df_compute_accessed_bytes_subreg (df_ref ref, unsigned int *start_byte,
|
|||
/* Defs and uses are different in the amount of the reg that touch. */
|
||||
if (DF_REF_REG_DEF_P (ref))
|
||||
{
|
||||
/* This is an lvalue. */
|
||||
/* This is an lvalue. */
|
||||
|
||||
if (m2_size > UNITS_PER_WORD)
|
||||
{
|
||||
|
@ -239,23 +239,23 @@ df_compute_accessed_bytes_subreg (df_ref ref, unsigned int *start_byte,
|
|||
Look at the bytes named by the subreg, and expand it to
|
||||
cover a UNITS_PER_WORD part of register X. That part of
|
||||
register X is clobbered, the rest is not.
|
||||
|
||||
|
||||
E.g., (subreg:SI (reg:DI X) 0), where UNITS_PER_WORD is the
|
||||
size of SImode, clobbers the first SImode part of X, and does
|
||||
not affect the second SImode part.
|
||||
|
||||
|
||||
E.g., (subreg:QI (reg:DI X) 0), where UNITS_PER_WORD is the
|
||||
size of SImode, clobbers the first SImode part of X, and does
|
||||
not affect the second SImode part. Here the QImode byte is
|
||||
expanded to a UNITS_PER_WORD portion of the register for
|
||||
purposes of determining what is clobbered.
|
||||
|
||||
|
||||
If this is an rvalue, then it touches just the bytes that it
|
||||
talks about. */
|
||||
int offset = SUBREG_BYTE (reg);
|
||||
|
||||
|
||||
start = offset & ~(UNITS_PER_WORD - 1);
|
||||
last = (offset + m1_size + UNITS_PER_WORD - 1)
|
||||
last = (offset + m1_size + UNITS_PER_WORD - 1)
|
||||
& ~(UNITS_PER_WORD - 1);
|
||||
}
|
||||
else
|
||||
|
@ -264,7 +264,7 @@ df_compute_accessed_bytes_subreg (df_ref ref, unsigned int *start_byte,
|
|||
X. */
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* This is an rvalue. It touches just the bytes they explicitly
|
||||
mentioned. */
|
||||
|
@ -272,9 +272,9 @@ df_compute_accessed_bytes_subreg (df_ref ref, unsigned int *start_byte,
|
|||
start = offset;
|
||||
last = start + m1_size;
|
||||
}
|
||||
|
||||
|
||||
if (dump_file)
|
||||
fprintf (dump_file, " cpb subreg regno=%d start=%d last=%d\n",
|
||||
fprintf (dump_file, " cpb subreg regno=%d start=%d last=%d\n",
|
||||
DF_REF_REGNO (ref), start, last);
|
||||
|
||||
*start_byte = start;
|
||||
|
@ -299,15 +299,15 @@ df_compute_accessed_bytes_subreg (df_ref ref, unsigned int *start_byte,
|
|||
in, START_BYTE and LAST_BYTE are set to 0 and false is returned.
|
||||
This means that this use can be ignored. */
|
||||
|
||||
bool
|
||||
df_compute_accessed_bytes (df_ref ref, enum df_mm mm,
|
||||
unsigned int *start_byte,
|
||||
bool
|
||||
df_compute_accessed_bytes (df_ref ref, enum df_mm mm,
|
||||
unsigned int *start_byte,
|
||||
unsigned int *last_byte)
|
||||
{
|
||||
if (!dbg_cnt (df_byte_scan))
|
||||
return true;
|
||||
|
||||
if (!DF_REF_REG_DEF_P (ref)
|
||||
if (!DF_REF_REG_DEF_P (ref)
|
||||
&& DF_REF_FLAGS_IS_SET (ref, DF_REF_READ_WRITE))
|
||||
{
|
||||
if (DF_REF_FLAGS_IS_SET (ref, DF_REF_PRE_POST_MODIFY))
|
||||
|
@ -331,7 +331,7 @@ df_compute_accessed_bytes (df_ref ref, enum df_mm mm,
|
|||
if (DF_REF_FLAGS_IS_SET (ref, DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT))
|
||||
return df_compute_accessed_bytes_extract (ref, mm, start_byte, last_byte);
|
||||
else if (DF_REF_FLAGS_IS_SET (ref, DF_REF_STRICT_LOW_PART))
|
||||
return df_compute_accessed_bytes_strict_low_part (ref,
|
||||
return df_compute_accessed_bytes_strict_low_part (ref,
|
||||
start_byte, last_byte);
|
||||
else if (GET_CODE (DF_REF_REG (ref)) == SUBREG)
|
||||
return df_compute_accessed_bytes_subreg (ref, start_byte, last_byte);
|
||||
|
|
178
gcc/df-core.c
178
gcc/df-core.c
|
@ -1,7 +1,7 @@
|
|||
/* Allocation for dataflow support routines.
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008, 2009 Free Software Foundation, Inc.
|
||||
Originally contributed by Michael P. Hayes
|
||||
Originally contributed by Michael P. Hayes
|
||||
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
|
||||
Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
|
||||
and Kenneth Zadeck (zadeck@naturalbridge.com).
|
||||
|
@ -43,7 +43,7 @@ There are three variations of the live variable problem that are
|
|||
available whenever dataflow is available. The LR problem finds the
|
||||
areas that can reach a use of a variable, the UR problems finds the
|
||||
areas that can be reached from a definition of a variable. The LIVE
|
||||
problem finds the intersection of these two areas.
|
||||
problem finds the intersection of these two areas.
|
||||
|
||||
There are several optional problems. These can be enabled when they
|
||||
are needed and disabled when they are not needed.
|
||||
|
@ -59,7 +59,7 @@ section.
|
|||
In the middle layer, basic blocks are scanned to produce transfer
|
||||
functions which describe the effects of that block on the global
|
||||
dataflow solution. The transfer functions are only rebuilt if the
|
||||
some instruction within the block has changed.
|
||||
some instruction within the block has changed.
|
||||
|
||||
The top layer is the dataflow solution itself. The dataflow solution
|
||||
is computed by using an efficient iterative solver and the transfer
|
||||
|
@ -200,7 +200,7 @@ There are four ways of doing the incremental scanning:
|
|||
4) Do it yourself - In this mechanism, the pass updates the insns
|
||||
itself using the low level df primitives. Currently no pass does
|
||||
this, but it has the advantage that it is quite efficient given
|
||||
that the pass generally has exact knowledge of what it is changing.
|
||||
that the pass generally has exact knowledge of what it is changing.
|
||||
|
||||
DATA STRUCTURES
|
||||
|
||||
|
@ -247,7 +247,7 @@ to the engine that resolves the dataflow equations.
|
|||
|
||||
DATA STRUCTURES:
|
||||
|
||||
The basic object is a DF_REF (reference) and this may either be a
|
||||
The basic object is a DF_REF (reference) and this may either be a
|
||||
DEF (definition) or a USE of a register.
|
||||
|
||||
These are linked into a variety of lists; namely reg-def, reg-use,
|
||||
|
@ -291,12 +291,12 @@ There are 4 ways to obtain access to refs:
|
|||
|
||||
1) References are divided into two categories, REAL and ARTIFICIAL.
|
||||
|
||||
REAL refs are associated with instructions.
|
||||
REAL refs are associated with instructions.
|
||||
|
||||
ARTIFICIAL refs are associated with basic blocks. The heads of
|
||||
these lists can be accessed by calling df_get_artificial_defs or
|
||||
df_get_artificial_uses for the particular basic block.
|
||||
|
||||
df_get_artificial_uses for the particular basic block.
|
||||
|
||||
Artificial defs and uses occur both at the beginning and ends of blocks.
|
||||
|
||||
For blocks that area at the destination of eh edges, the
|
||||
|
@ -315,14 +315,14 @@ There are 4 ways to obtain access to refs:
|
|||
Artificial defs occur at the end of the entry block. These arise
|
||||
from registers that are live at entry to the function.
|
||||
|
||||
2) There are three types of refs: defs, uses and eq_uses. (Eq_uses are
|
||||
2) There are three types of refs: defs, uses and eq_uses. (Eq_uses are
|
||||
uses that appear inside a REG_EQUAL or REG_EQUIV note.)
|
||||
|
||||
All of the eq_uses, uses and defs associated with each pseudo or
|
||||
hard register may be linked in a bidirectional chain. These are
|
||||
called reg-use or reg_def chains. If the changeable flag
|
||||
DF_EQ_NOTES is set when the chains are built, the eq_uses will be
|
||||
treated like uses. If it is not set they are ignored.
|
||||
treated like uses. If it is not set they are ignored.
|
||||
|
||||
The first use, eq_use or def for a register can be obtained using
|
||||
the DF_REG_USE_CHAIN, DF_REG_EQ_USE_CHAIN or DF_REG_DEF_CHAIN
|
||||
|
@ -347,14 +347,14 @@ There are 4 ways to obtain access to refs:
|
|||
has been set the array will contain the eq_uses. Otherwise these
|
||||
are ignored when building the array and assigning the ids. Note
|
||||
that the values in the id field of a ref may change across calls to
|
||||
df_analyze or df_reorganize_defs or df_reorganize_uses.
|
||||
df_analyze or df_reorganize_defs or df_reorganize_uses.
|
||||
|
||||
If the only use of this array is to find all of the refs, it is
|
||||
better to traverse all of the registers and then traverse all of
|
||||
reg-use or reg-def chains.
|
||||
|
||||
NOTES:
|
||||
|
||||
|
||||
Embedded addressing side-effects, such as POST_INC or PRE_INC, generate
|
||||
both a use and a def. These are both marked read/write to show that they
|
||||
are dependent. For example, (set (reg 40) (mem (post_inc (reg 42))))
|
||||
|
@ -371,7 +371,7 @@ operation. We generate both a use and a def and again mark them
|
|||
read/write.
|
||||
|
||||
Paradoxical subreg writes do not leave a trace of the old content, so they
|
||||
are write-only operations.
|
||||
are write-only operations.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -448,7 +448,7 @@ df_add_problem (struct df_problem *problem)
|
|||
However for this to work, the computation of RI must be pushed
|
||||
after which ever of those problems is defined, but we do not
|
||||
require any of those except for LR to have actually been
|
||||
defined. */
|
||||
defined. */
|
||||
df->num_problems_defined++;
|
||||
for (i = df->num_problems_defined - 2; i >= 0; i--)
|
||||
{
|
||||
|
@ -492,7 +492,7 @@ df_clear_flags (int changeable_flags)
|
|||
not called or is called with null, the entire function in
|
||||
analyzed. */
|
||||
|
||||
void
|
||||
void
|
||||
df_set_blocks (bitmap blocks)
|
||||
{
|
||||
if (blocks)
|
||||
|
@ -515,7 +515,7 @@ df_set_blocks (bitmap blocks)
|
|||
{
|
||||
bitmap_iterator bi;
|
||||
unsigned int bb_index;
|
||||
|
||||
|
||||
EXECUTE_IF_SET_IN_BITMAP (diff, 0, bb_index, bi)
|
||||
{
|
||||
basic_block bb = BASIC_BLOCK (bb_index);
|
||||
|
@ -552,7 +552,7 @@ df_set_blocks (bitmap blocks)
|
|||
BITMAP_ALLOC (&df_bitmap_obstack);
|
||||
FOR_ALL_BB(bb)
|
||||
{
|
||||
bitmap_set_bit (blocks_to_reset, bb->index);
|
||||
bitmap_set_bit (blocks_to_reset, bb->index);
|
||||
}
|
||||
}
|
||||
dflow->problem->reset_fun (blocks_to_reset);
|
||||
|
@ -729,7 +729,7 @@ rest_of_handle_df_initialize (void)
|
|||
gcc_assert (df->n_blocks == df->n_blocks_inverted);
|
||||
|
||||
df->hard_regs_live_count = XNEWVEC (unsigned int, FIRST_PSEUDO_REGISTER);
|
||||
memset (df->hard_regs_live_count, 0,
|
||||
memset (df->hard_regs_live_count, 0,
|
||||
sizeof (unsigned int) * FIRST_PSEUDO_REGISTER);
|
||||
|
||||
df_hard_reg_init ();
|
||||
|
@ -809,7 +809,7 @@ rest_of_handle_df_finish (void)
|
|||
for (i = 0; i < df->num_problems_defined; i++)
|
||||
{
|
||||
struct dataflow *dflow = df->problems_in_order[i];
|
||||
dflow->problem->free_fun ();
|
||||
dflow->problem->free_fun ();
|
||||
}
|
||||
|
||||
if (df->postorder)
|
||||
|
@ -854,7 +854,7 @@ struct rtl_opt_pass pass_df_finish =
|
|||
|
||||
|
||||
/* Helper function for df_worklist_dataflow.
|
||||
Propagate the dataflow forward.
|
||||
Propagate the dataflow forward.
|
||||
Given a BB_INDEX, do the dataflow propagation
|
||||
and set bits on for successors in PENDING
|
||||
if the out set of the dataflow has changed. */
|
||||
|
@ -873,16 +873,16 @@ df_worklist_propagate_forward (struct dataflow *dataflow,
|
|||
/* Calculate <conf_op> of incoming edges. */
|
||||
if (EDGE_COUNT (bb->preds) > 0)
|
||||
FOR_EACH_EDGE (e, ei, bb->preds)
|
||||
{
|
||||
if (TEST_BIT (considered, e->src->index))
|
||||
{
|
||||
if (TEST_BIT (considered, e->src->index))
|
||||
dataflow->problem->con_fun_n (e);
|
||||
}
|
||||
}
|
||||
else if (dataflow->problem->con_fun_0)
|
||||
dataflow->problem->con_fun_0 (bb);
|
||||
|
||||
if (dataflow->problem->trans_fun (bb_index))
|
||||
{
|
||||
/* The out set of this block has changed.
|
||||
/* The out set of this block has changed.
|
||||
Propagate to the outgoing blocks. */
|
||||
FOR_EACH_EDGE (e, ei, bb->succs)
|
||||
{
|
||||
|
@ -912,16 +912,16 @@ df_worklist_propagate_backward (struct dataflow *dataflow,
|
|||
/* Calculate <conf_op> of incoming edges. */
|
||||
if (EDGE_COUNT (bb->succs) > 0)
|
||||
FOR_EACH_EDGE (e, ei, bb->succs)
|
||||
{
|
||||
if (TEST_BIT (considered, e->dest->index))
|
||||
{
|
||||
if (TEST_BIT (considered, e->dest->index))
|
||||
dataflow->problem->con_fun_n (e);
|
||||
}
|
||||
}
|
||||
else if (dataflow->problem->con_fun_0)
|
||||
dataflow->problem->con_fun_0 (bb);
|
||||
|
||||
if (dataflow->problem->trans_fun (bb_index))
|
||||
{
|
||||
/* The out set of this block has changed.
|
||||
/* The out set of this block has changed.
|
||||
Propagate to the outgoing blocks. */
|
||||
FOR_EACH_EDGE (e, ei, bb->preds)
|
||||
{
|
||||
|
@ -937,7 +937,7 @@ df_worklist_propagate_backward (struct dataflow *dataflow,
|
|||
|
||||
/* This will free "pending". */
|
||||
|
||||
static void
|
||||
static void
|
||||
df_worklist_dataflow_doublequeue (struct dataflow *dataflow,
|
||||
bitmap pending,
|
||||
sbitmap considered,
|
||||
|
@ -972,7 +972,7 @@ df_worklist_dataflow_doublequeue (struct dataflow *dataflow,
|
|||
df_worklist_propagate_forward (dataflow, bb_index,
|
||||
bbindex_to_postorder,
|
||||
pending, considered);
|
||||
else
|
||||
else
|
||||
df_worklist_propagate_backward (dataflow, bb_index,
|
||||
bbindex_to_postorder,
|
||||
pending, considered);
|
||||
|
@ -993,13 +993,13 @@ df_worklist_dataflow_doublequeue (struct dataflow *dataflow,
|
|||
}
|
||||
|
||||
/* Worklist-based dataflow solver. It uses sbitmap as a worklist,
|
||||
with "n"-th bit representing the n-th block in the reverse-postorder order.
|
||||
with "n"-th bit representing the n-th block in the reverse-postorder order.
|
||||
The solver is a double-queue algorithm similar to the "double stack" solver
|
||||
from Cooper, Harvey and Kennedy, "Iterative data-flow analysis, Revisited".
|
||||
The only significant difference is that the worklist in this implementation
|
||||
is always sorted in RPO of the CFG visiting direction. */
|
||||
|
||||
void
|
||||
void
|
||||
df_worklist_dataflow (struct dataflow *dataflow,
|
||||
bitmap blocks_to_consider,
|
||||
int *blocks_in_postorder,
|
||||
|
@ -1069,16 +1069,16 @@ df_prune_to_subcfg (int list[], unsigned len, bitmap blocks)
|
|||
}
|
||||
|
||||
|
||||
/* Execute dataflow analysis on a single dataflow problem.
|
||||
/* Execute dataflow analysis on a single dataflow problem.
|
||||
|
||||
BLOCKS_TO_CONSIDER are the blocks whose solution can either be
|
||||
examined or will be computed. For calls from DF_ANALYZE, this is
|
||||
the set of blocks that has been passed to DF_SET_BLOCKS.
|
||||
the set of blocks that has been passed to DF_SET_BLOCKS.
|
||||
*/
|
||||
|
||||
void
|
||||
df_analyze_problem (struct dataflow *dflow,
|
||||
bitmap blocks_to_consider,
|
||||
df_analyze_problem (struct dataflow *dflow,
|
||||
bitmap blocks_to_consider,
|
||||
int *postorder, int n_blocks)
|
||||
{
|
||||
timevar_push (dflow->problem->tv_id);
|
||||
|
@ -1088,7 +1088,7 @@ df_analyze_problem (struct dataflow *dflow,
|
|||
dflow->problem->verify_start_fun ();
|
||||
#endif
|
||||
|
||||
/* (Re)Allocate the datastructures necessary to solve the problem. */
|
||||
/* (Re)Allocate the datastructures necessary to solve the problem. */
|
||||
if (dflow->problem->alloc_fun)
|
||||
dflow->problem->alloc_fun (blocks_to_consider);
|
||||
|
||||
|
@ -1125,7 +1125,7 @@ df_analyze (void)
|
|||
bitmap current_all_blocks = BITMAP_ALLOC (&df_bitmap_obstack);
|
||||
bool everything;
|
||||
int i;
|
||||
|
||||
|
||||
if (df->postorder)
|
||||
free (df->postorder);
|
||||
if (df->postorder_inverted)
|
||||
|
@ -1167,10 +1167,10 @@ df_analyze (void)
|
|||
{
|
||||
everything = false;
|
||||
bitmap_and_into (df->blocks_to_analyze, current_all_blocks);
|
||||
df->n_blocks = df_prune_to_subcfg (df->postorder,
|
||||
df->n_blocks = df_prune_to_subcfg (df->postorder,
|
||||
df->n_blocks, df->blocks_to_analyze);
|
||||
df->n_blocks_inverted = df_prune_to_subcfg (df->postorder_inverted,
|
||||
df->n_blocks_inverted,
|
||||
df->n_blocks_inverted = df_prune_to_subcfg (df->postorder_inverted,
|
||||
df->n_blocks_inverted,
|
||||
df->blocks_to_analyze);
|
||||
BITMAP_FREE (current_all_blocks);
|
||||
}
|
||||
|
@ -1214,7 +1214,7 @@ df_analyze (void)
|
|||
|
||||
/* Return the number of basic blocks from the last call to df_analyze. */
|
||||
|
||||
int
|
||||
int
|
||||
df_get_n_blocks (enum df_flow_dir dir)
|
||||
{
|
||||
gcc_assert (dir != DF_NONE);
|
||||
|
@ -1230,7 +1230,7 @@ df_get_n_blocks (enum df_flow_dir dir)
|
|||
}
|
||||
|
||||
|
||||
/* Return a pointer to the array of basic blocks in the reverse postorder.
|
||||
/* Return a pointer to the array of basic blocks in the reverse postorder.
|
||||
Depending on the direction of the dataflow problem,
|
||||
it returns either the usual reverse postorder array
|
||||
or the reverse postorder of inverted traversal. */
|
||||
|
@ -1248,7 +1248,7 @@ df_get_postorder (enum df_flow_dir dir)
|
|||
return df->postorder;
|
||||
}
|
||||
|
||||
static struct df_problem user_problem;
|
||||
static struct df_problem user_problem;
|
||||
static struct dataflow user_dflow;
|
||||
|
||||
/* Interface for calling iterative dataflow with user defined
|
||||
|
@ -1277,7 +1277,7 @@ df_simple_dataflow (enum df_flow_dir dir,
|
|||
df_worklist_dataflow (&user_dflow, blocks, postorder, n_blocks);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Functions to support limited incremental change.
|
||||
|
@ -1300,7 +1300,7 @@ df_get_bb_info (struct dataflow *dflow, unsigned int index)
|
|||
/* Set basic block info. */
|
||||
|
||||
static void
|
||||
df_set_bb_info (struct dataflow *dflow, unsigned int index,
|
||||
df_set_bb_info (struct dataflow *dflow, unsigned int index,
|
||||
void *bb_info)
|
||||
{
|
||||
gcc_assert (dflow->block_info);
|
||||
|
@ -1310,12 +1310,12 @@ df_set_bb_info (struct dataflow *dflow, unsigned int index,
|
|||
|
||||
/* Mark the solutions as being out of date. */
|
||||
|
||||
void
|
||||
void
|
||||
df_mark_solutions_dirty (void)
|
||||
{
|
||||
if (df)
|
||||
{
|
||||
int p;
|
||||
int p;
|
||||
for (p = 1; p < df->num_problems_defined; p++)
|
||||
df->problems_in_order[p]->solutions_dirty = true;
|
||||
}
|
||||
|
@ -1324,12 +1324,12 @@ df_mark_solutions_dirty (void)
|
|||
|
||||
/* Return true if BB needs it's transfer functions recomputed. */
|
||||
|
||||
bool
|
||||
bool
|
||||
df_get_bb_dirty (basic_block bb)
|
||||
{
|
||||
if (df && df_live)
|
||||
return bitmap_bit_p (df_live->out_of_date_transfer_functions, bb->index);
|
||||
else
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1337,12 +1337,12 @@ df_get_bb_dirty (basic_block bb)
|
|||
/* Mark BB as needing it's transfer functions as being out of
|
||||
date. */
|
||||
|
||||
void
|
||||
void
|
||||
df_set_bb_dirty (basic_block bb)
|
||||
{
|
||||
if (df)
|
||||
{
|
||||
int p;
|
||||
int p;
|
||||
for (p = 1; p < df->num_problems_defined; p++)
|
||||
{
|
||||
struct dataflow *dflow = df->problems_in_order[p];
|
||||
|
@ -1359,7 +1359,7 @@ df_set_bb_dirty (basic_block bb)
|
|||
static void
|
||||
df_clear_bb_dirty (basic_block bb)
|
||||
{
|
||||
int p;
|
||||
int p;
|
||||
for (p = 1; p < df->num_problems_defined; p++)
|
||||
{
|
||||
struct dataflow *dflow = df->problems_in_order[p];
|
||||
|
@ -1370,7 +1370,7 @@ df_clear_bb_dirty (basic_block bb)
|
|||
/* Called from the rtl_compact_blocks to reorganize the problems basic
|
||||
block info. */
|
||||
|
||||
void
|
||||
void
|
||||
df_compact_blocks (void)
|
||||
{
|
||||
int i, p;
|
||||
|
@ -1396,7 +1396,7 @@ df_compact_blocks (void)
|
|||
bitmap_set_bit (dflow->out_of_date_transfer_functions, EXIT_BLOCK);
|
||||
|
||||
i = NUM_FIXED_BLOCKS;
|
||||
FOR_EACH_BB (bb)
|
||||
FOR_EACH_BB (bb)
|
||||
{
|
||||
if (bitmap_bit_p (tmp, bb->index))
|
||||
bitmap_set_bit (dflow->out_of_date_transfer_functions, i);
|
||||
|
@ -1414,20 +1414,20 @@ df_compact_blocks (void)
|
|||
place in the block_info vector. Null out the copied
|
||||
item. The entry and exit blocks never move. */
|
||||
i = NUM_FIXED_BLOCKS;
|
||||
FOR_EACH_BB (bb)
|
||||
FOR_EACH_BB (bb)
|
||||
{
|
||||
df_set_bb_info (dflow, i, problem_temps[bb->index]);
|
||||
problem_temps[bb->index] = NULL;
|
||||
i++;
|
||||
}
|
||||
memset (dflow->block_info + i, 0,
|
||||
memset (dflow->block_info + i, 0,
|
||||
(last_basic_block - i) *sizeof (void *));
|
||||
|
||||
/* Free any block infos that were not copied (and NULLed).
|
||||
These are from orphaned blocks. */
|
||||
for (i = NUM_FIXED_BLOCKS; i < last_basic_block; i++)
|
||||
{
|
||||
basic_block bb = BASIC_BLOCK (i);
|
||||
basic_block bb = BASIC_BLOCK (i);
|
||||
if (problem_temps[i] && bb)
|
||||
dflow->problem->free_bb_fun
|
||||
(bb, problem_temps[i]);
|
||||
|
@ -1446,7 +1446,7 @@ df_compact_blocks (void)
|
|||
bitmap_copy (tmp, df->blocks_to_analyze);
|
||||
bitmap_clear (df->blocks_to_analyze);
|
||||
i = NUM_FIXED_BLOCKS;
|
||||
FOR_EACH_BB (bb)
|
||||
FOR_EACH_BB (bb)
|
||||
{
|
||||
if (bitmap_bit_p (tmp, bb->index))
|
||||
bitmap_set_bit (df->blocks_to_analyze, i);
|
||||
|
@ -1459,7 +1459,7 @@ df_compact_blocks (void)
|
|||
free (problem_temps);
|
||||
|
||||
i = NUM_FIXED_BLOCKS;
|
||||
FOR_EACH_BB (bb)
|
||||
FOR_EACH_BB (bb)
|
||||
{
|
||||
SET_BASIC_BLOCK (i, bb);
|
||||
bb->index = i;
|
||||
|
@ -1481,7 +1481,7 @@ df_compact_blocks (void)
|
|||
/* Shove NEW_BLOCK in at OLD_INDEX. Called from ifcvt to hack a
|
||||
block. There is no excuse for people to do this kind of thing. */
|
||||
|
||||
void
|
||||
void
|
||||
df_bb_replace (int old_index, basic_block new_block)
|
||||
{
|
||||
int new_block_index = new_block->index;
|
||||
|
@ -1500,7 +1500,7 @@ df_bb_replace (int old_index, basic_block new_block)
|
|||
{
|
||||
df_grow_bb_info (dflow);
|
||||
gcc_assert (df_get_bb_info (dflow, old_index) == NULL);
|
||||
df_set_bb_info (dflow, old_index,
|
||||
df_set_bb_info (dflow, old_index,
|
||||
df_get_bb_info (dflow, new_block_index));
|
||||
}
|
||||
}
|
||||
|
@ -1525,7 +1525,7 @@ df_bb_delete (int bb_index)
|
|||
|
||||
if (!df)
|
||||
return;
|
||||
|
||||
|
||||
for (i = 0; i < df->num_problems_defined; i++)
|
||||
{
|
||||
struct dataflow *dflow = df->problems_in_order[i];
|
||||
|
@ -1534,7 +1534,7 @@ df_bb_delete (int bb_index)
|
|||
void *bb_info = df_get_bb_info (dflow, bb_index);
|
||||
if (bb_info)
|
||||
{
|
||||
dflow->problem->free_bb_fun (bb, bb_info);
|
||||
dflow->problem->free_bb_fun (bb, bb_info);
|
||||
df_set_bb_info (dflow, bb_index, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -1620,7 +1620,7 @@ df_check_cfg_clean (void)
|
|||
if (df_lr->solutions_dirty)
|
||||
return;
|
||||
|
||||
if (saved_cfg == NULL)
|
||||
if (saved_cfg == NULL)
|
||||
return;
|
||||
|
||||
new_map = df_compute_cfg_image ();
|
||||
|
@ -1648,7 +1648,7 @@ df_set_clean_cfg (void)
|
|||
|
||||
/* Return first def of REGNO within BB. */
|
||||
|
||||
df_ref
|
||||
df_ref
|
||||
df_bb_regno_first_def_find (basic_block bb, unsigned int regno)
|
||||
{
|
||||
rtx insn;
|
||||
|
@ -1674,7 +1674,7 @@ df_bb_regno_first_def_find (basic_block bb, unsigned int regno)
|
|||
|
||||
/* Return last def of REGNO within BB. */
|
||||
|
||||
df_ref
|
||||
df_ref
|
||||
df_bb_regno_last_def_find (basic_block bb, unsigned int regno)
|
||||
{
|
||||
rtx insn;
|
||||
|
@ -1701,7 +1701,7 @@ df_bb_regno_last_def_find (basic_block bb, unsigned int regno)
|
|||
/* Finds the reference corresponding to the definition of REG in INSN.
|
||||
DF is the dataflow object. */
|
||||
|
||||
df_ref
|
||||
df_ref
|
||||
df_find_def (rtx insn, rtx reg)
|
||||
{
|
||||
unsigned int uid;
|
||||
|
@ -1723,19 +1723,19 @@ df_find_def (rtx insn, rtx reg)
|
|||
}
|
||||
|
||||
|
||||
/* Return true if REG is defined in INSN, zero otherwise. */
|
||||
/* Return true if REG is defined in INSN, zero otherwise. */
|
||||
|
||||
bool
|
||||
df_reg_defined (rtx insn, rtx reg)
|
||||
{
|
||||
return df_find_def (insn, reg) != NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Finds the reference corresponding to the use of REG in INSN.
|
||||
DF is the dataflow object. */
|
||||
|
||||
df_ref
|
||||
|
||||
df_ref
|
||||
df_find_use (rtx insn, rtx reg)
|
||||
{
|
||||
unsigned int uid;
|
||||
|
@ -1751,26 +1751,26 @@ df_find_use (rtx insn, rtx reg)
|
|||
df_ref use = *use_rec;
|
||||
if (rtx_equal_p (DF_REF_REAL_REG (use), reg))
|
||||
return use;
|
||||
}
|
||||
}
|
||||
if (df->changeable_flags & DF_EQ_NOTES)
|
||||
for (use_rec = DF_INSN_UID_EQ_USES (uid); *use_rec; use_rec++)
|
||||
{
|
||||
df_ref use = *use_rec;
|
||||
if (rtx_equal_p (DF_REF_REAL_REG (use), reg))
|
||||
return use;
|
||||
return use;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Return true if REG is referenced in INSN, zero otherwise. */
|
||||
/* Return true if REG is referenced in INSN, zero otherwise. */
|
||||
|
||||
bool
|
||||
df_reg_used (rtx insn, rtx reg)
|
||||
{
|
||||
return df_find_use (insn, reg) != NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Debugging and printing functions.
|
||||
|
@ -1895,18 +1895,18 @@ df_dump_region (FILE *file)
|
|||
|
||||
fprintf (file, "\n\nstarting region dump\n");
|
||||
df_dump_start (file);
|
||||
|
||||
EXECUTE_IF_SET_IN_BITMAP (df->blocks_to_analyze, 0, bb_index, bi)
|
||||
|
||||
EXECUTE_IF_SET_IN_BITMAP (df->blocks_to_analyze, 0, bb_index, bi)
|
||||
{
|
||||
basic_block bb = BASIC_BLOCK (bb_index);
|
||||
|
||||
|
||||
df_print_bb_index (bb, file);
|
||||
df_dump_top (bb, file);
|
||||
df_dump_bottom (bb, file);
|
||||
}
|
||||
fprintf (file, "\n");
|
||||
}
|
||||
else
|
||||
else
|
||||
df_dump (file);
|
||||
}
|
||||
|
||||
|
@ -1934,13 +1934,13 @@ df_dump_start (FILE *file)
|
|||
{
|
||||
df_dump_problem_function fun = dflow->problem->dump_start_fun;
|
||||
if (fun)
|
||||
fun(file);
|
||||
fun(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Dump the top of the block information for BB. */
|
||||
/* Dump the top of the block information for BB. */
|
||||
|
||||
void
|
||||
df_dump_top (basic_block bb, FILE *file)
|
||||
|
@ -1957,13 +1957,13 @@ df_dump_top (basic_block bb, FILE *file)
|
|||
{
|
||||
df_dump_bb_problem_function bbfun = dflow->problem->dump_top_fun;
|
||||
if (bbfun)
|
||||
bbfun (bb, file);
|
||||
bbfun (bb, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Dump the bottom of the block information for BB. */
|
||||
/* Dump the bottom of the block information for BB. */
|
||||
|
||||
void
|
||||
df_dump_bottom (basic_block bb, FILE *file)
|
||||
|
@ -1980,7 +1980,7 @@ df_dump_bottom (basic_block bb, FILE *file)
|
|||
{
|
||||
df_dump_bb_problem_function bbfun = dflow->problem->dump_bottom_fun;
|
||||
if (bbfun)
|
||||
bbfun (bb, file);
|
||||
bbfun (bb, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2028,7 +2028,7 @@ df_mws_dump (struct df_mw_hardreg **mws, FILE *file)
|
|||
{
|
||||
while (*mws)
|
||||
{
|
||||
fprintf (file, "mw %c r[%d..%d]\n",
|
||||
fprintf (file, "mw %c r[%d..%d]\n",
|
||||
(DF_MWS_REG_DEF_P (*mws)) ? 'd' : 'u',
|
||||
(*mws)->start_regno, (*mws)->end_regno);
|
||||
mws++;
|
||||
|
@ -2036,8 +2036,8 @@ df_mws_dump (struct df_mw_hardreg **mws, FILE *file)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
df_insn_uid_debug (unsigned int uid,
|
||||
static void
|
||||
df_insn_uid_debug (unsigned int uid,
|
||||
bool follow_chain, FILE *file)
|
||||
{
|
||||
fprintf (file, "insn %d luid %d",
|
||||
|
@ -2085,7 +2085,7 @@ df_insn_debug_regno (rtx insn, FILE *file)
|
|||
INSN_UID (insn), BLOCK_FOR_INSN (insn)->index,
|
||||
DF_INSN_INFO_LUID (insn_info));
|
||||
df_refs_chain_dump (DF_INSN_INFO_DEFS (insn_info), false, file);
|
||||
|
||||
|
||||
fprintf (file, " uses ");
|
||||
df_refs_chain_dump (DF_INSN_INFO_USES (insn_info), false, file);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
580
gcc/df-scan.c
580
gcc/df-scan.c
File diff suppressed because it is too large
Load diff
100
gcc/df.h
100
gcc/df.h
|
@ -2,7 +2,7 @@
|
|||
for GNU compiler. This is part of flow optimization.
|
||||
Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
Free Software Foundation, Inc.
|
||||
Originally contributed by Michael P. Hayes
|
||||
Originally contributed by Michael P. Hayes
|
||||
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
|
||||
Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
|
||||
and Kenneth Zadeck (zadeck@naturalbridge.com).
|
||||
|
@ -38,14 +38,14 @@ struct df_link;
|
|||
struct df_insn_info;
|
||||
union df_ref_d;
|
||||
|
||||
/* Data flow problems. All problems must have a unique id here. */
|
||||
/* Data flow problems. All problems must have a unique id here. */
|
||||
|
||||
/* Scanning is not really a dataflow problem, but it is useful to have
|
||||
the basic block functions in the vector so that things get done in
|
||||
a uniform manner. The last four problems can be added or deleted
|
||||
at any time are always defined (though LIVE is always there at -O2
|
||||
or higher); the others are always there. */
|
||||
#define DF_SCAN 0
|
||||
#define DF_SCAN 0
|
||||
#define DF_LR 1 /* Live Registers backward. */
|
||||
#define DF_LIVE 2 /* Live Registers & Uninitialized Registers */
|
||||
#define DF_RD 3 /* Reaching Defs. */
|
||||
|
@ -105,7 +105,7 @@ enum df_ref_flags
|
|||
/* This flag is set if this ref is a partial use or def of the
|
||||
associated register. */
|
||||
DF_REF_PARTIAL = 1 << 4,
|
||||
|
||||
|
||||
/* Read-modify-write refs generate both a use and a def and
|
||||
these are marked with this flag to show that they are not
|
||||
independent. */
|
||||
|
@ -120,7 +120,7 @@ enum df_ref_flags
|
|||
|
||||
/* This flag is set if this ref, generally a def, is a real
|
||||
clobber. This is not currently set for registers live across a
|
||||
call because that clobbering may or may not happen.
|
||||
call because that clobbering may or may not happen.
|
||||
|
||||
Most of the uses of this are with sets that have a
|
||||
GET_CODE(..)==CLOBBER. Note that this is set even if the
|
||||
|
@ -133,7 +133,7 @@ enum df_ref_flags
|
|||
/* If the ref has one of the following two flags set, then the
|
||||
struct df_ref can be cast to struct df_ref_extract to access
|
||||
the width and offset fields. */
|
||||
|
||||
|
||||
/* This flag is set if the ref contains a SIGN_EXTRACT. */
|
||||
DF_REF_SIGN_EXTRACT = 1 << 8,
|
||||
|
||||
|
@ -165,14 +165,14 @@ enum df_ref_flags
|
|||
/* The possible ordering of refs within the df_ref_info. */
|
||||
enum df_ref_order
|
||||
{
|
||||
/* There is not table. */
|
||||
/* There is not table. */
|
||||
DF_REF_ORDER_NO_TABLE,
|
||||
|
||||
/* There is a table of refs but it is not (or no longer) organized
|
||||
by one of the following methods. */
|
||||
DF_REF_ORDER_UNORDERED,
|
||||
DF_REF_ORDER_UNORDERED_WITH_NOTES,
|
||||
|
||||
|
||||
/* Organize the table by reg order, all of the refs with regno 0
|
||||
followed by all of the refs with regno 1 ... . Within all of
|
||||
the regs for a particular regno, the refs are unordered. */
|
||||
|
@ -183,7 +183,7 @@ enum df_ref_order
|
|||
DF_REF_ORDER_BY_REG_WITH_NOTES,
|
||||
|
||||
/* Organize the refs in insn order. The insns are ordered within a
|
||||
block, and the blocks are ordered by FOR_ALL_BB. */
|
||||
block, and the blocks are ordered by FOR_ALL_BB. */
|
||||
DF_REF_ORDER_BY_INSN,
|
||||
|
||||
/* For uses, the refs within eq notes may be added for
|
||||
|
@ -255,7 +255,7 @@ typedef void (*df_verify_solution_end) (void);
|
|||
struct df_problem {
|
||||
/* The unique id of the problem. This is used it index into
|
||||
df->defined_problems to make accessing the problem data easy. */
|
||||
unsigned int id;
|
||||
unsigned int id;
|
||||
enum df_flow_dir dir; /* Dataflow direction. */
|
||||
df_alloc_function alloc_fun;
|
||||
df_reset_function reset_fun;
|
||||
|
@ -296,7 +296,7 @@ struct dataflow
|
|||
unsigned int block_info_size;
|
||||
|
||||
/* The pool to allocate the block_info from. */
|
||||
alloc_pool block_pool;
|
||||
alloc_pool block_pool;
|
||||
|
||||
/* The lr and live problems have their transfer functions recomputed
|
||||
only if necessary. This is possible for them because, the
|
||||
|
@ -313,7 +313,7 @@ struct dataflow
|
|||
|
||||
/* Local flags for some of the problems. */
|
||||
unsigned int local_flags;
|
||||
|
||||
|
||||
/* True if this problem of this instance has been initialized. This
|
||||
is used by the dumpers to keep garbage out of the dumps if, for
|
||||
debugging a dump is produced before the first call to
|
||||
|
@ -321,7 +321,7 @@ struct dataflow
|
|||
bool computed;
|
||||
|
||||
/* True if the something has changed which invalidates the dataflow
|
||||
solutions. Note that this bit is always true for all problems except
|
||||
solutions. Note that this bit is always true for all problems except
|
||||
lr and live. */
|
||||
bool solutions_dirty;
|
||||
|
||||
|
@ -338,7 +338,7 @@ struct dataflow
|
|||
REG_UNUSED notes. */
|
||||
struct df_mw_hardreg
|
||||
{
|
||||
rtx mw_reg; /* The multiword hardreg. */
|
||||
rtx mw_reg; /* The multiword hardreg. */
|
||||
/* These two bitfields are intentionally oversized, in the hope that
|
||||
accesses to 16-bit fields will usually be quicker. */
|
||||
ENUM_BITFIELD(df_ref_type) type : 16;
|
||||
|
@ -348,7 +348,7 @@ struct df_mw_hardreg
|
|||
unsigned int end_regno; /* Last word of the multi word subreg. */
|
||||
unsigned int mw_order; /* Same as df_ref.ref_order. */
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* Define a register reference structure. One of these is allocated
|
||||
for every register reference (use or def). Note some register
|
||||
|
@ -364,9 +364,9 @@ struct df_base_ref
|
|||
int flags : 16; /* Various df_ref_flags. */
|
||||
rtx reg; /* The register referenced. */
|
||||
struct df_link *chain; /* Head of def-use, use-def. */
|
||||
/* Pointer to the insn info of the containing instruction. FIXME!
|
||||
/* Pointer to the insn info of the containing instruction. FIXME!
|
||||
Currently this is NULL for artificial refs but this will be used
|
||||
when FUDs are added. */
|
||||
when FUDs are added. */
|
||||
struct df_insn_info *insn_info;
|
||||
/* For each regno, there are three chains of refs, one for the uses,
|
||||
the eq_uses and the defs. These chains go thru the refs
|
||||
|
@ -374,7 +374,7 @@ struct df_base_ref
|
|||
union df_ref_d *next_reg; /* Next ref with same regno and type. */
|
||||
union df_ref_d *prev_reg; /* Prev ref with same regno and type. */
|
||||
unsigned int regno; /* The register number referenced. */
|
||||
/* Location in the ref table. This is only valid after a call to
|
||||
/* Location in the ref table. This is only valid after a call to
|
||||
df_maybe_reorganize_[use,def]_refs which is an expensive operation. */
|
||||
int id;
|
||||
/* The index at which the operand was scanned in the insn. This is
|
||||
|
@ -384,7 +384,7 @@ struct df_base_ref
|
|||
|
||||
|
||||
/* The three types of df_refs. Note that the df_ref_extract is an
|
||||
extension of the df_regular_ref, not the df_base_ref. */
|
||||
extension of the df_regular_ref, not the df_base_ref. */
|
||||
struct df_artificial_ref
|
||||
{
|
||||
struct df_base_ref base;
|
||||
|
@ -436,14 +436,14 @@ struct df_insn_info
|
|||
df_ref *defs; /* Head of insn-def chain. */
|
||||
df_ref *uses; /* Head of insn-use chain. */
|
||||
/* Head of insn-use chain for uses in REG_EQUAL/EQUIV notes. */
|
||||
df_ref *eq_uses;
|
||||
df_ref *eq_uses;
|
||||
struct df_mw_hardreg **mw_hardregs;
|
||||
/* The logical uid of the insn in the basic block. This is valid
|
||||
after any call to df_analyze but may rot after insns are added,
|
||||
deleted or moved. */
|
||||
int luid;
|
||||
int luid;
|
||||
};
|
||||
|
||||
|
||||
/* These links are used for ref-ref chains. Currently only DEF-USE and
|
||||
USE-DEF chains can be built by DF. */
|
||||
struct df_link
|
||||
|
@ -456,11 +456,11 @@ struct df_link
|
|||
enum df_chain_flags
|
||||
{
|
||||
/* Flags that control the building of chains. */
|
||||
DF_DU_CHAIN = 1, /* Build DU chains. */
|
||||
DF_DU_CHAIN = 1, /* Build DU chains. */
|
||||
DF_UD_CHAIN = 2 /* Build UD chains. */
|
||||
};
|
||||
|
||||
enum df_changeable_flags
|
||||
enum df_changeable_flags
|
||||
{
|
||||
/* Scanning flags. */
|
||||
/* Flag to control the running of dce as a side effect of building LR. */
|
||||
|
@ -533,13 +533,13 @@ struct df
|
|||
the problem local data without having to search the first
|
||||
array. */
|
||||
|
||||
struct dataflow *problems_in_order[DF_LAST_PROBLEM_PLUS1];
|
||||
struct dataflow *problems_by_index[DF_LAST_PROBLEM_PLUS1];
|
||||
struct dataflow *problems_in_order[DF_LAST_PROBLEM_PLUS1];
|
||||
struct dataflow *problems_by_index[DF_LAST_PROBLEM_PLUS1];
|
||||
|
||||
/* If not NULL, this subset of blocks of the program to be
|
||||
considered for analysis. At certain times, this will contain all
|
||||
the blocks in the function so it cannot be used as an indicator
|
||||
of if we are analyzing a subset. See analyze_subset. */
|
||||
of if we are analyzing a subset. See analyze_subset. */
|
||||
bitmap blocks_to_analyze;
|
||||
|
||||
/* The following information is really the problem data for the
|
||||
|
@ -578,12 +578,12 @@ struct df
|
|||
bitmap insns_to_delete;
|
||||
bitmap insns_to_rescan;
|
||||
bitmap insns_to_notes_rescan;
|
||||
int *postorder; /* The current set of basic blocks
|
||||
int *postorder; /* The current set of basic blocks
|
||||
in reverse postorder. */
|
||||
int *postorder_inverted; /* The current set of basic blocks
|
||||
int *postorder_inverted; /* The current set of basic blocks
|
||||
in reverse postorder of inverted CFG. */
|
||||
int n_blocks; /* The number of blocks in reverse postorder. */
|
||||
int n_blocks_inverted; /* The number of blocks
|
||||
int n_blocks_inverted; /* The number of blocks
|
||||
in reverse postorder of inverted CFG. */
|
||||
|
||||
/* An array [FIRST_PSEUDO_REGISTER], indexed by regno, of the number
|
||||
|
@ -624,20 +624,20 @@ struct df
|
|||
|
||||
/* Most transformations that wish to use live register analysis will
|
||||
use these macros. This info is the and of the lr and live sets. */
|
||||
#define DF_LIVE_IN(BB) (DF_LIVE_BB_INFO(BB)->in)
|
||||
#define DF_LIVE_OUT(BB) (DF_LIVE_BB_INFO(BB)->out)
|
||||
#define DF_LIVE_IN(BB) (DF_LIVE_BB_INFO(BB)->in)
|
||||
#define DF_LIVE_OUT(BB) (DF_LIVE_BB_INFO(BB)->out)
|
||||
|
||||
/* These macros are used by passes that are not tolerant of
|
||||
uninitialized variables. This intolerance should eventually
|
||||
be fixed. */
|
||||
#define DF_LR_IN(BB) (DF_LR_BB_INFO(BB)->in)
|
||||
#define DF_LR_OUT(BB) (DF_LR_BB_INFO(BB)->out)
|
||||
#define DF_LR_IN(BB) (DF_LR_BB_INFO(BB)->in)
|
||||
#define DF_LR_OUT(BB) (DF_LR_BB_INFO(BB)->out)
|
||||
|
||||
/* These macros are used by passes that are not tolerant of
|
||||
uninitialized variables. This intolerance should eventually
|
||||
be fixed. */
|
||||
#define DF_BYTE_LR_IN(BB) (DF_BYTE_LR_BB_INFO(BB)->in)
|
||||
#define DF_BYTE_LR_OUT(BB) (DF_BYTE_LR_BB_INFO(BB)->out)
|
||||
#define DF_BYTE_LR_IN(BB) (DF_BYTE_LR_BB_INFO(BB)->in)
|
||||
#define DF_BYTE_LR_OUT(BB) (DF_BYTE_LR_BB_INFO(BB)->out)
|
||||
|
||||
/* Macros to access the elements within the ref structure. */
|
||||
|
||||
|
@ -674,8 +674,8 @@ struct df
|
|||
#define DF_REF_IS_REG_MARKED(REF) (DF_REF_FLAGS_IS_SET ((REF),DF_REF_REG_MARKER))
|
||||
#define DF_REF_NEXT_REG(REF) ((REF)->base.next_reg)
|
||||
#define DF_REF_PREV_REG(REF) ((REF)->base.prev_reg)
|
||||
/* The following two macros may only be applied if one of
|
||||
DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT is true. */
|
||||
/* The following two macros may only be applied if one of
|
||||
DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT is true. */
|
||||
#define DF_REF_EXTRACT_WIDTH(REF) ((REF)->extract_ref.width)
|
||||
#define DF_REF_EXTRACT_OFFSET(REF) ((REF)->extract_ref.offset)
|
||||
#define DF_REF_EXTRACT_MODE(REF) ((REF)->extract_ref.mode)
|
||||
|
@ -695,7 +695,7 @@ struct df
|
|||
/* Macros to get the refs out of def_info or use_info refs table. If
|
||||
the focus of the dataflow has been set to some subset of blocks
|
||||
with df_set_blocks, these macros will only find the uses and defs
|
||||
in that subset of blocks.
|
||||
in that subset of blocks.
|
||||
|
||||
These macros should be used with care. The def macros are only
|
||||
usable after a call to df_maybe_reorganize_def_refs and the use
|
||||
|
@ -791,10 +791,10 @@ struct df_scan_bb_info
|
|||
|
||||
/* Reaching definitions. All bitmaps are indexed by the id field of
|
||||
the ref except sparse_kill which is indexed by regno. */
|
||||
struct df_rd_bb_info
|
||||
struct df_rd_bb_info
|
||||
{
|
||||
/* Local sets to describe the basic blocks. */
|
||||
bitmap kill;
|
||||
bitmap kill;
|
||||
bitmap sparse_kill;
|
||||
bitmap gen; /* The set of defs generated in this block. */
|
||||
|
||||
|
@ -807,7 +807,7 @@ struct df_rd_bb_info
|
|||
/* Multiple reaching definitions. All bitmaps are referenced by the
|
||||
register number. */
|
||||
|
||||
struct df_md_bb_info
|
||||
struct df_md_bb_info
|
||||
{
|
||||
/* Local sets to describe the basic blocks. */
|
||||
bitmap gen; /* Partial/conditional definitions live at BB out. */
|
||||
|
@ -823,10 +823,10 @@ struct df_md_bb_info
|
|||
/* Live registers, a backwards dataflow problem. All bitmaps are
|
||||
referenced by the register number. */
|
||||
|
||||
struct df_lr_bb_info
|
||||
struct df_lr_bb_info
|
||||
{
|
||||
/* Local sets to describe the basic blocks. */
|
||||
bitmap def; /* The set of registers set in this block
|
||||
bitmap def; /* The set of registers set in this block
|
||||
- except artificial defs at the top. */
|
||||
bitmap use; /* The set of registers used in this block. */
|
||||
|
||||
|
@ -840,7 +840,7 @@ struct df_lr_bb_info
|
|||
register number. Anded results of the forwards and backward live
|
||||
info. Note that the forwards live information is not available
|
||||
separately. */
|
||||
struct df_live_bb_info
|
||||
struct df_live_bb_info
|
||||
{
|
||||
/* Local sets to describe the basic blocks. */
|
||||
bitmap kill; /* The set of registers unset in this block. Calls,
|
||||
|
@ -856,10 +856,10 @@ struct df_live_bb_info
|
|||
/* Live registers, a backwards dataflow problem. These bitmaps are
|
||||
indexed by the df_byte_lr_offset array which is indexed by pseudo. */
|
||||
|
||||
struct df_byte_lr_bb_info
|
||||
struct df_byte_lr_bb_info
|
||||
{
|
||||
/* Local sets to describe the basic blocks. */
|
||||
bitmap def; /* The set of registers set in this block
|
||||
bitmap def; /* The set of registers set in this block
|
||||
- except artificial defs at the top. */
|
||||
bitmap use; /* The set of registers used in this block. */
|
||||
|
||||
|
@ -871,7 +871,7 @@ struct df_byte_lr_bb_info
|
|||
|
||||
/* This is used for debugging and for the dumpers to find the latest
|
||||
instance so that the df info can be added to the dumps. This
|
||||
should not be used by regular code. */
|
||||
should not be used by regular code. */
|
||||
extern struct df *df;
|
||||
#define df_scan (df->problems_by_index[DF_SCAN])
|
||||
#define df_rd (df->problems_by_index[DF_RD])
|
||||
|
@ -993,7 +993,7 @@ extern void df_scan_add_problem (void);
|
|||
extern void df_grow_reg_info (void);
|
||||
extern void df_grow_insn_info (void);
|
||||
extern void df_scan_blocks (void);
|
||||
extern df_ref df_ref_create (rtx, rtx *, rtx,basic_block,
|
||||
extern df_ref df_ref_create (rtx, rtx *, rtx,basic_block,
|
||||
enum df_ref_type, int ref_flags,
|
||||
int, int, enum machine_mode);
|
||||
extern void df_ref_remove (df_ref);
|
||||
|
@ -1023,7 +1023,7 @@ extern bool df_read_modify_subreg_p (rtx);
|
|||
extern void df_scan_verify (void);
|
||||
|
||||
/* Functions defined in df-byte-scan.c. */
|
||||
extern bool df_compute_accessed_bytes (df_ref, enum df_mm,
|
||||
extern bool df_compute_accessed_bytes (df_ref, enum df_mm,
|
||||
unsigned int *, unsigned int *);
|
||||
|
||||
|
||||
|
|
22
gcc/dfp.c
22
gcc/dfp.c
|
@ -138,7 +138,7 @@ encode_decimal32 (const struct real_format *fmt ATTRIBUTE_UNUSED,
|
|||
decContextDefault (&set, DEC_INIT_DECIMAL128);
|
||||
set.traps = 0;
|
||||
|
||||
decimal_to_decnumber (r, &dn);
|
||||
decimal_to_decnumber (r, &dn);
|
||||
decimal32FromNumber (&d32, &dn, &set);
|
||||
|
||||
memcpy (&image, d32.bytes, sizeof (int32_t));
|
||||
|
@ -163,7 +163,7 @@ decode_decimal32 (const struct real_format *fmt ATTRIBUTE_UNUSED,
|
|||
memcpy (&d32.bytes, &image, sizeof (int32_t));
|
||||
|
||||
decimal32ToNumber (&d32, &dn);
|
||||
decimal_from_decnumber (r, &dn, &set);
|
||||
decimal_from_decnumber (r, &dn, &set);
|
||||
}
|
||||
|
||||
/* Encode a real into an IEEE 754 decimal64 type. */
|
||||
|
@ -204,7 +204,7 @@ encode_decimal64 (const struct real_format *fmt ATTRIBUTE_UNUSED,
|
|||
void
|
||||
decode_decimal64 (const struct real_format *fmt ATTRIBUTE_UNUSED,
|
||||
REAL_VALUE_TYPE *r, const long *buf)
|
||||
{
|
||||
{
|
||||
decNumber dn;
|
||||
decimal64 d64;
|
||||
decContext set;
|
||||
|
@ -229,7 +229,7 @@ decode_decimal64 (const struct real_format *fmt ATTRIBUTE_UNUSED,
|
|||
}
|
||||
|
||||
decimal64ToNumber (&d64, &dn);
|
||||
decimal_from_decnumber (r, &dn, &set);
|
||||
decimal_from_decnumber (r, &dn, &set);
|
||||
}
|
||||
|
||||
/* Encode a real into an IEEE 754 decimal128 type. */
|
||||
|
@ -311,7 +311,7 @@ decode_decimal128 (const struct real_format *fmt ATTRIBUTE_UNUSED,
|
|||
}
|
||||
|
||||
decimal128ToNumber (&d128, &dn);
|
||||
decimal_from_decnumber (r, &dn, &set);
|
||||
decimal_from_decnumber (r, &dn, &set);
|
||||
}
|
||||
|
||||
/* Helper function to convert from a binary real internal
|
||||
|
@ -365,10 +365,10 @@ decimal_do_compare (const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b,
|
|||
decimal_from_binary (&b1, b);
|
||||
b = &b1;
|
||||
}
|
||||
|
||||
|
||||
/* Convert into decNumber form for comparison operation. */
|
||||
decContextDefault (&set, DEC_INIT_DECIMAL128);
|
||||
set.traps = 0;
|
||||
set.traps = 0;
|
||||
decimal128ToNumber ((const decimal128 *) a->sig, &dn2);
|
||||
decimal128ToNumber ((const decimal128 *) b->sig, &dn3);
|
||||
|
||||
|
@ -382,7 +382,7 @@ decimal_do_compare (const REAL_VALUE_TYPE *a, const REAL_VALUE_TYPE *b,
|
|||
return 0;
|
||||
else if (decNumberIsNegative (&dn))
|
||||
return -1;
|
||||
else
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -435,7 +435,7 @@ decimal_round_for_format (const struct real_format *fmt, REAL_VALUE_TYPE *r)
|
|||
binary and decimal types. */
|
||||
|
||||
void
|
||||
decimal_real_convert (REAL_VALUE_TYPE *r, enum machine_mode mode,
|
||||
decimal_real_convert (REAL_VALUE_TYPE *r, enum machine_mode mode,
|
||||
const REAL_VALUE_TYPE *a)
|
||||
{
|
||||
const struct real_format *fmt = REAL_MODE_FORMAT (mode);
|
||||
|
@ -484,7 +484,7 @@ decimal_do_add (REAL_VALUE_TYPE *r, const REAL_VALUE_TYPE *op0,
|
|||
|
||||
if (subtract_p)
|
||||
decNumberSubtract (&dn, &dn2, &dn3, &set);
|
||||
else
|
||||
else
|
||||
decNumberAdd (&dn, &dn2, &dn3, &set);
|
||||
|
||||
decimal_from_decnumber (r, &dn, &set);
|
||||
|
@ -697,7 +697,7 @@ decimal_real_arithmetic (REAL_VALUE_TYPE *r, enum tree_code code,
|
|||
|
||||
void
|
||||
decimal_real_maxval (REAL_VALUE_TYPE *r, int sign, enum machine_mode mode)
|
||||
{
|
||||
{
|
||||
const char *max;
|
||||
|
||||
switch (mode)
|
||||
|
|
|
@ -300,7 +300,7 @@ diagnostic_classify_diagnostic (diagnostic_context *context,
|
|||
DC. This function is *the* subroutine in terms of which front-ends
|
||||
should implement their specific diagnostic handling modules. The
|
||||
front-end independent format specifiers are exactly those described
|
||||
in the documentation of output_format.
|
||||
in the documentation of output_format.
|
||||
Return true if a diagnostic was printed, false otherwise. */
|
||||
|
||||
bool
|
||||
|
@ -320,9 +320,9 @@ diagnostic_report_diagnostic (diagnostic_context *context,
|
|||
if (diagnostic->kind == DK_NOTE && flag_compare_debug)
|
||||
return false;
|
||||
|
||||
if (diagnostic->kind == DK_PEDWARN)
|
||||
if (diagnostic->kind == DK_PEDWARN)
|
||||
diagnostic->kind = pedantic_warning_kind ();
|
||||
|
||||
|
||||
if (context->lock > 0)
|
||||
{
|
||||
/* If we're reporting an ICE in the middle of some other error,
|
||||
|
@ -344,7 +344,7 @@ diagnostic_report_diagnostic (diagnostic_context *context,
|
|||
diagnostic->kind = DK_ERROR;
|
||||
maybe_print_warnings_as_errors_message = true;
|
||||
}
|
||||
|
||||
|
||||
if (diagnostic->option_index)
|
||||
{
|
||||
/* This tests if the user provided the appropriate -Wfoo or
|
||||
|
@ -384,7 +384,7 @@ diagnostic_report_diagnostic (diagnostic_context *context,
|
|||
dump_active_plugins (stderr);
|
||||
}
|
||||
|
||||
if (diagnostic->kind == DK_ICE)
|
||||
if (diagnostic->kind == DK_ICE)
|
||||
{
|
||||
#ifndef ENABLE_CHECKING
|
||||
/* When not checking, ICEs are converted to fatal errors when an
|
||||
|
@ -405,13 +405,13 @@ diagnostic_report_diagnostic (diagnostic_context *context,
|
|||
diagnostic->message.args_ptr);
|
||||
}
|
||||
++diagnostic_kind_count (context, diagnostic->kind);
|
||||
|
||||
|
||||
saved_format_spec = diagnostic->message.format_spec;
|
||||
if (context->show_option_requested && diagnostic->option_index)
|
||||
diagnostic->message.format_spec
|
||||
= ACONCAT ((diagnostic->message.format_spec,
|
||||
" [", cl_options[diagnostic->option_index].opt_text, "]", NULL));
|
||||
|
||||
|
||||
diagnostic->message.locus = &diagnostic->location;
|
||||
diagnostic->message.abstract_origin = &diagnostic->abstract_origin;
|
||||
diagnostic->abstract_origin = NULL;
|
||||
|
@ -482,7 +482,7 @@ verbatim (const char *gmsgid, ...)
|
|||
}
|
||||
|
||||
bool
|
||||
emit_diagnostic (diagnostic_t kind, location_t location, int opt,
|
||||
emit_diagnostic (diagnostic_t kind, location_t location, int opt,
|
||||
const char *gmsgid, ...)
|
||||
{
|
||||
diagnostic_info diagnostic;
|
||||
|
@ -520,7 +520,7 @@ inform (location_t location, const char *gmsgid, ...)
|
|||
}
|
||||
|
||||
/* A warning at INPUT_LOCATION. Use this for code which is correct according
|
||||
to the relevant language specification but is likely to be buggy anyway.
|
||||
to the relevant language specification but is likely to be buggy anyway.
|
||||
Returns true if the warning was printed, false if it was inhibited. */
|
||||
bool
|
||||
warning (int opt, const char *gmsgid, ...)
|
||||
|
|
|
@ -28,7 +28,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
/* Constants used to discriminate diagnostics. */
|
||||
typedef enum
|
||||
{
|
||||
#define DEFINE_DIAGNOSTIC_KIND(K, msgid) K,
|
||||
#define DEFINE_DIAGNOSTIC_KIND(K, msgid) K,
|
||||
#include "diagnostic.def"
|
||||
#undef DEFINE_DIAGNOSTIC_KIND
|
||||
DK_LAST_DIAGNOSTIC_KIND
|
||||
|
@ -70,7 +70,7 @@ struct diagnostic_context
|
|||
/* True if we should display the "warnings are being tread as error"
|
||||
message, usually displayed once per compiler run. */
|
||||
bool issue_warnings_are_errors_message;
|
||||
|
||||
|
||||
/* True if it has been requested that warnings be treated as errors. */
|
||||
bool warning_as_error_requested;
|
||||
|
||||
|
|
|
@ -717,7 +717,7 @@ set_immediate_dominator (enum cdi_direction dir, basic_block bb,
|
|||
{
|
||||
unsigned int dir_index = dom_convert_dir_to_idx (dir);
|
||||
struct et_node *node = bb->dom[dir_index];
|
||||
|
||||
|
||||
gcc_assert (dom_computed[dir_index]);
|
||||
|
||||
if (node->father)
|
||||
|
@ -758,7 +758,7 @@ get_dominated_by (enum cdi_direction dir, basic_block bb)
|
|||
/* Returns the list of basic blocks that are immediately dominated (in
|
||||
direction DIR) by some block between N_REGION ones stored in REGION,
|
||||
except for blocks in the REGION itself. */
|
||||
|
||||
|
||||
VEC (basic_block, heap) *
|
||||
get_dominated_by_region (enum cdi_direction dir, basic_block *region,
|
||||
unsigned n_region)
|
||||
|
@ -815,7 +815,7 @@ redirect_immediate_dominators (enum cdi_direction dir, basic_block bb,
|
|||
{
|
||||
unsigned int dir_index = dom_convert_dir_to_idx (dir);
|
||||
struct et_node *bb_node, *to_node, *son;
|
||||
|
||||
|
||||
bb_node = bb->dom[dir_index];
|
||||
to_node = to->dom[dir_index];
|
||||
|
||||
|
@ -862,7 +862,7 @@ nearest_common_dominator_for_set (enum cdi_direction dir, bitmap blocks)
|
|||
unsigned i, first;
|
||||
bitmap_iterator bi;
|
||||
basic_block dom;
|
||||
|
||||
|
||||
first = bitmap_first_set_bit (blocks);
|
||||
dom = BASIC_BLOCK (first);
|
||||
EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, bi)
|
||||
|
@ -881,11 +881,11 @@ nearest_common_dominator_for_set (enum cdi_direction dir, bitmap blocks)
|
|||
You can view these as bounds for the range of dfs numbers the
|
||||
nodes in the subtree of the dominator tree rooted at that node
|
||||
will contain.
|
||||
|
||||
|
||||
The dominator tree is always a simple acyclic tree, so there are
|
||||
only three possible relations two nodes in the dominator tree have
|
||||
to each other:
|
||||
|
||||
|
||||
1. Node A is above Node B (and thus, Node A dominates node B)
|
||||
|
||||
A
|
||||
|
@ -899,10 +899,10 @@ nearest_common_dominator_for_set (enum cdi_direction dir, bitmap blocks)
|
|||
B, and DFS_Number_Out of A will be >= DFS_Number_Out of B. This is
|
||||
because we must hit A in the dominator tree *before* B on the walk
|
||||
down, and we will hit A *after* B on the walk back up
|
||||
|
||||
|
||||
2. Node A is below node B (and thus, node B dominates node A)
|
||||
|
||||
|
||||
|
||||
|
||||
B
|
||||
|
|
||||
A
|
||||
|
@ -911,10 +911,10 @@ nearest_common_dominator_for_set (enum cdi_direction dir, bitmap blocks)
|
|||
|
||||
In the above case, DFS_Number_In of A will be >= DFS_Number_In of
|
||||
B, and DFS_Number_Out of A will be <= DFS_Number_Out of B.
|
||||
|
||||
|
||||
This is because we must hit A in the dominator tree *after* B on
|
||||
the walk down, and we will hit A *before* B on the walk back up
|
||||
|
||||
|
||||
3. Node A and B are siblings (and thus, neither dominates the other)
|
||||
|
||||
C
|
||||
|
@ -937,7 +937,7 @@ nearest_common_dominator_for_set (enum cdi_direction dir, bitmap blocks)
|
|||
|
||||
A_Dominates_B (node A, node B)
|
||||
{
|
||||
return DFS_Number_In(A) <= DFS_Number_In(B)
|
||||
return DFS_Number_In(A) <= DFS_Number_In(B)
|
||||
&& DFS_Number_Out (A) >= DFS_Number_Out(B);
|
||||
}
|
||||
|
||||
|
@ -950,10 +950,10 @@ nearest_common_dominator_for_set (enum cdi_direction dir, bitmap blocks)
|
|||
/* Return TRUE in case BB1 is dominated by BB2. */
|
||||
bool
|
||||
dominated_by_p (enum cdi_direction dir, const_basic_block bb1, const_basic_block bb2)
|
||||
{
|
||||
{
|
||||
unsigned int dir_index = dom_convert_dir_to_idx (dir);
|
||||
struct et_node *n1 = bb1->dom[dir_index], *n2 = bb2->dom[dir_index];
|
||||
|
||||
|
||||
gcc_assert (dom_computed[dir_index]);
|
||||
|
||||
if (dom_computed[dir_index] == DOM_OK)
|
||||
|
@ -1389,7 +1389,7 @@ add_to_dominance_info (enum cdi_direction dir, basic_block bb)
|
|||
gcc_assert (!bb->dom[dir_index]);
|
||||
|
||||
n_bbs_in_dom_tree[dir_index]++;
|
||||
|
||||
|
||||
bb->dom[dir_index] = et_new_tree (bb);
|
||||
|
||||
if (dom_computed[dir_index] == DOM_OK)
|
||||
|
|
|
@ -27,7 +27,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
#include "domwalk.h"
|
||||
#include "ggc.h"
|
||||
|
||||
/* This file implements a generic walker for dominator trees.
|
||||
/* This file implements a generic walker for dominator trees.
|
||||
|
||||
To understand the dominator walker one must first have a grasp of dominators,
|
||||
immediate dominators and the dominator tree.
|
||||
|
@ -69,8 +69,8 @@ along with GCC; see the file COPYING3. If not see
|
|||
| +--9 11
|
||||
| / |
|
||||
+--- 10 ---> 12
|
||||
|
||||
|
||||
|
||||
|
||||
We have a dominator tree which looks like
|
||||
|
||||
1
|
||||
|
@ -88,34 +88,34 @@ along with GCC; see the file COPYING3. If not see
|
|||
9
|
||||
|
|
||||
10
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The dominator tree is the basis for a number of analysis, transformation
|
||||
and optimization algorithms that operate on a semi-global basis.
|
||||
|
||||
|
||||
The dominator walker is a generic routine which visits blocks in the CFG
|
||||
via a depth first search of the dominator tree. In the example above
|
||||
the dominator walker might visit blocks in the following order
|
||||
1, 2, 3, 4, 5, 8, 9, 10, 6, 7, 11, 12.
|
||||
|
||||
|
||||
The dominator walker has a number of callbacks to perform actions
|
||||
during the walk of the dominator tree. There are two callbacks
|
||||
which walk statements, one before visiting the dominator children,
|
||||
one after visiting the dominator children. There is a callback
|
||||
one after visiting the dominator children. There is a callback
|
||||
before and after each statement walk callback. In addition, the
|
||||
dominator walker manages allocation/deallocation of data structures
|
||||
which are local to each block visited.
|
||||
|
||||
|
||||
The dominator walker is meant to provide a generic means to build a pass
|
||||
which can analyze or transform/optimize a function based on walking
|
||||
the dominator tree. One simply fills in the dominator walker data
|
||||
structure with the appropriate callbacks and calls the walker.
|
||||
|
||||
|
||||
We currently use the dominator walker to prune the set of variables
|
||||
which might need PHI nodes (which can greatly improve compile-time
|
||||
performance in some cases).
|
||||
|
||||
|
||||
We also use the dominator walker to rewrite the function into SSA form
|
||||
which reduces code duplication since the rewriting phase is inherently
|
||||
a walk of the dominator tree.
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/* Operations with long integers.
|
||||
Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
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/>. */
|
||||
|
@ -50,7 +50,7 @@ double_int_mask (unsigned prec)
|
|||
/* Clears the bits of CST over the precision PREC. If UNS is false, the bits
|
||||
outside of the precision are set to the sign bit (i.e., the PREC-th one),
|
||||
otherwise they are set to zero.
|
||||
|
||||
|
||||
This corresponds to returning the value represented by PREC lowermost bits
|
||||
of CST, with the given signedness. */
|
||||
|
||||
|
@ -102,7 +102,7 @@ double_int_sext (double_int cst, unsigned prec)
|
|||
{
|
||||
r.low = cst.low & mask.low;
|
||||
r.high = cst.high & mask.high;
|
||||
}
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
@ -450,7 +450,7 @@ mpz_get_double_int (const_tree type, mpz_t val, bool wrap)
|
|||
double_int res;
|
||||
|
||||
if (!wrap)
|
||||
{
|
||||
{
|
||||
mpz_t min, max;
|
||||
|
||||
mpz_init (min);
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/* Operations with long integers.
|
||||
Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
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/>. */
|
||||
|
@ -72,7 +72,7 @@ static inline double_int
|
|||
shwi_to_double_int (HOST_WIDE_INT cst)
|
||||
{
|
||||
double_int r;
|
||||
|
||||
|
||||
r.low = (unsigned HOST_WIDE_INT) cst;
|
||||
r.high = cst < 0 ? -1 : 0;
|
||||
|
||||
|
@ -94,7 +94,7 @@ static inline double_int
|
|||
uhwi_to_double_int (unsigned HOST_WIDE_INT cst)
|
||||
{
|
||||
double_int r;
|
||||
|
||||
|
||||
r.low = cst;
|
||||
r.high = 0;
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ dw2_asm_output_addr_rtx (int size, rtx addr,
|
|||
If COMMENT is not NULL and comments in the debug information
|
||||
have been requested by the user, append the given COMMENT
|
||||
to the generated output. */
|
||||
|
||||
|
||||
void
|
||||
dw2_asm_output_nstring (const char *str, size_t orig_len,
|
||||
const char *comment, ...)
|
||||
|
@ -528,7 +528,7 @@ eh_data_format_name (int format)
|
|||
};
|
||||
|
||||
gcc_assert (format >= 0 && format < 0x100 && format_names[format]);
|
||||
|
||||
|
||||
return format_names[format];
|
||||
#else
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ extern void dw2_asm_output_delta (int, const char *, const char *,
|
|||
const char *, ...)
|
||||
ATTRIBUTE_NULL_PRINTF_4;
|
||||
|
||||
extern void dw2_asm_output_offset (int, const char *, section *,
|
||||
extern void dw2_asm_output_offset (int, const char *, section *,
|
||||
const char *, ...)
|
||||
ATTRIBUTE_NULL_PRINTF_4;
|
||||
|
||||
|
|
|
@ -804,7 +804,7 @@ add_fde_cfi (const char *label, dw_cfi_ref cfi)
|
|||
|
||||
/* Emit the state save. */
|
||||
emit_cfa_remember = false;
|
||||
cfi_remember = new_cfi ();
|
||||
cfi_remember = new_cfi ();
|
||||
cfi_remember->dw_cfi_opc = DW_CFA_remember_state;
|
||||
add_fde_cfi (label, cfi_remember);
|
||||
}
|
||||
|
@ -1042,7 +1042,7 @@ def_cfa_1 (const char *label, dw_cfa_location *loc_p)
|
|||
if (loc.reg == old_cfa.reg && !loc.indirect)
|
||||
{
|
||||
/* Construct a "DW_CFA_def_cfa_offset <offset>" instruction, indicating
|
||||
the CFA register did not change but the offset did. The data
|
||||
the CFA register did not change but the offset did. The data
|
||||
factoring for DW_CFA_def_cfa_offset_sf happens in output_cfi, or
|
||||
in the assembler via the .cfi_def_cfa_offset directive. */
|
||||
if (loc.offset < 0)
|
||||
|
@ -1882,7 +1882,7 @@ dwarf2out_frame_debug_cfa_offset (rtx set, const char *label)
|
|||
addr = XEXP (set, 0);
|
||||
gcc_assert (MEM_P (addr));
|
||||
addr = XEXP (addr, 0);
|
||||
|
||||
|
||||
/* As documented, only consider extremely simple addresses. */
|
||||
switch (GET_CODE (addr))
|
||||
{
|
||||
|
@ -2870,7 +2870,7 @@ dwarf2out_begin_epilogue (rtx insn)
|
|||
void
|
||||
dwarf2out_frame_debug_restore_state (void)
|
||||
{
|
||||
dw_cfi_ref cfi = new_cfi ();
|
||||
dw_cfi_ref cfi = new_cfi ();
|
||||
const char *label = dwarf2out_cfi_label (false);
|
||||
|
||||
cfi->dw_cfi_opc = DW_CFA_restore_state;
|
||||
|
@ -9605,7 +9605,7 @@ htab_decl_del (void *what)
|
|||
free (entry);
|
||||
}
|
||||
|
||||
/* Copy DIE and its ancestors, up to, but not including, the compile unit
|
||||
/* Copy DIE and its ancestors, up to, but not including, the compile unit
|
||||
or type unit entry, to a new tree. Adds the new tree to UNIT and returns
|
||||
a pointer to the copy of DIE. If DECL_TABLE is provided, it is used
|
||||
to check if the ancestor has already been copied into UNIT. */
|
||||
|
@ -14044,7 +14044,7 @@ add_loc_descr_to_each (dw_loc_list_ref list, dw_loc_descr_ref ref)
|
|||
|
||||
TODO: We handle only simple cases of RET or LIST having at most one
|
||||
element. General case would inolve sorting the lists in program order
|
||||
and merging them that will need some additional work.
|
||||
and merging them that will need some additional work.
|
||||
Adding that will improve quality of debug info especially for SRA-ed
|
||||
structures. */
|
||||
|
||||
|
@ -14432,7 +14432,7 @@ loc_list_from_tree (tree loc, int want_address)
|
|||
if (bytepos > 0)
|
||||
add_loc_descr_to_each (list_ret, new_loc_descr (DW_OP_plus_uconst, bytepos, 0));
|
||||
else if (bytepos < 0)
|
||||
loc_list_plus_const (list_ret, bytepos);
|
||||
loc_list_plus_const (list_ret, bytepos);
|
||||
|
||||
have_address = 1;
|
||||
break;
|
||||
|
@ -15041,11 +15041,11 @@ add_data_member_location_attribute (dw_die_ref die, tree decl)
|
|||
else
|
||||
{
|
||||
enum dwarf_location_atom op;
|
||||
|
||||
|
||||
/* The DWARF2 standard says that we should assume that the structure
|
||||
address is already on the stack, so we can specify a structure
|
||||
field address by using DW_OP_plus_uconst. */
|
||||
|
||||
|
||||
#ifdef MIPS_DEBUGGING_INFO
|
||||
/* ??? The SGI dwarf reader does not handle the DW_OP_plus_uconst
|
||||
operator correctly. It works only if we leave the offset on the
|
||||
|
@ -15054,7 +15054,7 @@ add_data_member_location_attribute (dw_die_ref die, tree decl)
|
|||
#else
|
||||
op = DW_OP_plus_uconst;
|
||||
#endif
|
||||
|
||||
|
||||
loc_descr = new_loc_descr (op, offset, 0);
|
||||
}
|
||||
}
|
||||
|
@ -16889,7 +16889,7 @@ gen_array_type_die (tree type, dw_die_ref context_die)
|
|||
add_subscript_info (array_die, type, collapse_nested_arrays);
|
||||
|
||||
/* Add representation of the type of the elements of this array type and
|
||||
emit the corresponding DIE if we haven't done it already. */
|
||||
emit the corresponding DIE if we haven't done it already. */
|
||||
element_type = TREE_TYPE (type);
|
||||
if (collapse_nested_arrays)
|
||||
while (TREE_CODE (element_type) == ARRAY_TYPE)
|
||||
|
@ -17834,7 +17834,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
|
|||
of the pack. Note that the set of pack arguments can be empty.
|
||||
In that case, the DW_TAG_GNU_formal_parameter_pack DIE will not have any
|
||||
children DIE.
|
||||
|
||||
|
||||
Otherwise, we just consider the parameters of DECL. */
|
||||
while (generic_decl_parm || parm)
|
||||
{
|
||||
|
@ -19922,7 +19922,7 @@ gen_remaining_tmpl_value_param_die_attribute (void)
|
|||
|
||||
|
||||
/* Replace DW_AT_name for the decl with name. */
|
||||
|
||||
|
||||
static void
|
||||
dwarf2out_set_name (tree decl, tree name)
|
||||
{
|
||||
|
@ -20577,7 +20577,7 @@ prune_unused_types_mark (dw_die_ref die, int dokids)
|
|||
breaking out types into comdat sections, do this
|
||||
for all type definitions. */
|
||||
if (die->die_tag == DW_TAG_array_type
|
||||
|| (dwarf_version >= 4
|
||||
|| (dwarf_version >= 4
|
||||
&& is_type_die (die) && ! is_declaration_die (die)))
|
||||
FOR_EACH_CHILD (die, c, prune_unused_types_mark (c, 1));
|
||||
else
|
||||
|
|
|
@ -88,7 +88,7 @@ ebitmap_last_set_bit (ebitmap map)
|
|||
unsigned int i = 0;
|
||||
ebitmap_iterator ebi;
|
||||
bool foundbit = false;
|
||||
|
||||
|
||||
/* This is not the fastest way to do this, we could simply look for
|
||||
the popcount, and start there, but this function is not used
|
||||
anywhere speed critical. */
|
||||
|
@ -96,7 +96,7 @@ ebitmap_last_set_bit (ebitmap map)
|
|||
{
|
||||
foundbit = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (foundbit)
|
||||
return i;
|
||||
|
@ -176,7 +176,7 @@ ebitmap_array_init (ebitmap map, unsigned int size)
|
|||
static inline void
|
||||
ebitmap_array_clear (ebitmap map)
|
||||
{
|
||||
if (map->elts)
|
||||
if (map->elts)
|
||||
{
|
||||
free (map->elts);
|
||||
map->elts = NULL;
|
||||
|
@ -225,7 +225,7 @@ ebitmap_clear_bit (ebitmap map, unsigned int bit)
|
|||
unsigned int bitindex, shift;
|
||||
bool have_eltwordindex = false;
|
||||
EBITMAP_ELT_TYPE *elt_ptr;
|
||||
|
||||
|
||||
/* If the bit can't exist in our bitmap, just return. */
|
||||
if (map->numwords == 0)
|
||||
return;
|
||||
|
@ -233,7 +233,7 @@ ebitmap_clear_bit (ebitmap map, unsigned int bit)
|
|||
if (wordindex >= map->wordmask->n_bits
|
||||
|| !TEST_BIT (map->wordmask, wordindex))
|
||||
return;
|
||||
|
||||
|
||||
if (map->cache != NULL && map->cacheindex == wordindex)
|
||||
elt_ptr = map->cache;
|
||||
else
|
||||
|
@ -242,10 +242,10 @@ ebitmap_clear_bit (ebitmap map, unsigned int bit)
|
|||
elt_ptr = &map->elts[eltwordindex];
|
||||
have_eltwordindex = true;
|
||||
}
|
||||
|
||||
|
||||
bitindex = bit % EBITMAP_ELT_BITS;
|
||||
shift = bitindex;
|
||||
|
||||
|
||||
*(elt_ptr) &= ~(((EBITMAP_ELT_TYPE)1) << shift);
|
||||
|
||||
/* Clear out the empty words. */
|
||||
|
@ -253,7 +253,7 @@ ebitmap_clear_bit (ebitmap map, unsigned int bit)
|
|||
{
|
||||
if (!have_eltwordindex)
|
||||
eltwordindex = sbitmap_popcount (map->wordmask, wordindex);
|
||||
|
||||
|
||||
if (map->cache != NULL && map->cacheindex == eltwordindex)
|
||||
map->cache = NULL;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
#define EBITMAP_ELT_TYPE unsigned HOST_WIDEST_FAST_INT
|
||||
|
||||
typedef struct ebitmap_def
|
||||
{
|
||||
{
|
||||
unsigned int n_elts; /* number of elements in the array. */
|
||||
sbitmap wordmask; /* wordmask saying which words are
|
||||
nonzero. */
|
||||
|
@ -86,11 +86,11 @@ typedef struct {
|
|||
/* The word mask iterator. */
|
||||
sbitmap_iterator maskiter;
|
||||
} ebitmap_iterator;
|
||||
|
||||
|
||||
static inline void
|
||||
ebitmap_iter_init (ebitmap_iterator *i, ebitmap bmp, unsigned int min)
|
||||
{
|
||||
sbitmap_iter_init (&i->maskiter, bmp->wordmask,
|
||||
sbitmap_iter_init (&i->maskiter, bmp->wordmask,
|
||||
min / EBITMAP_ELT_BITS);
|
||||
i->size = bmp->numwords;
|
||||
if (i->size == 0)
|
||||
|
|
|
@ -73,7 +73,7 @@ enum machine_mode ptr_mode; /* Mode whose width is POINTER_SIZE. */
|
|||
struct rtl_data x_rtl;
|
||||
|
||||
/* Indexed by pseudo register number, gives the rtx for that pseudo.
|
||||
Allocated in parallel with regno_pointer_align.
|
||||
Allocated in parallel with regno_pointer_align.
|
||||
FIXME: We could put it into emit_status struct, but gengtype is not able to deal
|
||||
with length attribute nested in top level structures. */
|
||||
|
||||
|
@ -535,7 +535,7 @@ immed_double_const (HOST_WIDE_INT i0, HOST_WIDE_INT i1, enum machine_mode mode)
|
|||
gen_int_mode.
|
||||
2) GET_MODE_BITSIZE (mode) == 2 * HOST_BITS_PER_WIDE_INT, but the value of
|
||||
the integer fits into HOST_WIDE_INT anyway (i.e., i1 consists only
|
||||
from copies of the sign bit, and sign of i0 and i1 are the same), then
|
||||
from copies of the sign bit, and sign of i0 and i1 are the same), then
|
||||
we return a CONST_INT for i0.
|
||||
3) Otherwise, we create a CONST_DOUBLE for i0 and i1. */
|
||||
if (mode != VOIDmode)
|
||||
|
@ -865,7 +865,7 @@ gen_reg_rtx (enum machine_mode mode)
|
|||
/* If a virtual register with bigger mode alignment is generated,
|
||||
increase stack alignment estimation because it might be spilled
|
||||
to stack later. */
|
||||
if (SUPPORTS_STACK_ALIGNMENT
|
||||
if (SUPPORTS_STACK_ALIGNMENT
|
||||
&& crtl->stack_alignment_estimated < align
|
||||
&& !crtl->stack_realign_processed)
|
||||
{
|
||||
|
@ -1189,7 +1189,7 @@ gen_lowpart_common (enum machine_mode mode, rtx x)
|
|||
innermode = mode_for_size (HOST_BITS_PER_WIDE_INT, MODE_INT, 0);
|
||||
else if (innermode == VOIDmode)
|
||||
innermode = mode_for_size (HOST_BITS_PER_WIDE_INT * 2, MODE_INT, 0);
|
||||
|
||||
|
||||
xsize = GET_MODE_SIZE (innermode);
|
||||
|
||||
gcc_assert (innermode != VOIDmode && innermode != BLKmode);
|
||||
|
@ -1250,7 +1250,7 @@ gen_highpart (enum machine_mode mode, rtx x)
|
|||
result = simplify_gen_subreg (mode, x, GET_MODE (x),
|
||||
subreg_highpart_offset (mode, GET_MODE (x)));
|
||||
gcc_assert (result);
|
||||
|
||||
|
||||
/* simplify_gen_subreg is not guaranteed to return a valid operand for
|
||||
the target if we have a MEM. gen_highpart must return a valid operand,
|
||||
emitting code if necessary to do so. */
|
||||
|
@ -1259,7 +1259,7 @@ gen_highpart (enum machine_mode mode, rtx x)
|
|||
result = validize_mem (result);
|
||||
gcc_assert (result);
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1583,11 +1583,11 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
|
|||
|
||||
/* We can set the alignment from the type if we are making an object,
|
||||
this is an INDIRECT_REF, or if TYPE_ALIGN_OK. */
|
||||
if (objectp || TREE_CODE (t) == INDIRECT_REF
|
||||
|| TREE_CODE (t) == ALIGN_INDIRECT_REF
|
||||
if (objectp || TREE_CODE (t) == INDIRECT_REF
|
||||
|| TREE_CODE (t) == ALIGN_INDIRECT_REF
|
||||
|| TYPE_ALIGN_OK (type))
|
||||
align = MAX (align, TYPE_ALIGN (type));
|
||||
else
|
||||
else
|
||||
if (TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
|
||||
{
|
||||
if (integer_zerop (TREE_OPERAND (t, 1)))
|
||||
|
@ -2465,7 +2465,7 @@ verify_rtx_sharing (rtx orig, rtx insn)
|
|||
}
|
||||
#endif
|
||||
gcc_assert (!RTX_FLAG (x, used));
|
||||
|
||||
|
||||
RTX_FLAG (x, used) = 1;
|
||||
|
||||
/* Now scan the subexpressions recursively. */
|
||||
|
@ -2673,7 +2673,7 @@ repeat:
|
|||
format_ptr = GET_RTX_FORMAT (code);
|
||||
length = GET_RTX_LENGTH (code);
|
||||
last_ptr = NULL;
|
||||
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
switch (*format_ptr++)
|
||||
|
@ -2689,12 +2689,12 @@ repeat:
|
|||
{
|
||||
int j;
|
||||
int len = XVECLEN (x, i);
|
||||
|
||||
|
||||
/* Copy the vector iff I copied the rtx and the length
|
||||
is nonzero. */
|
||||
if (copied && len > 0)
|
||||
XVEC (x, i) = gen_rtvec_v (len, XVEC (x, i)->elem);
|
||||
|
||||
|
||||
/* Call recursively on all inside the vector. */
|
||||
for (j = 0; j < len; j++)
|
||||
{
|
||||
|
@ -2769,7 +2769,7 @@ repeat:
|
|||
|
||||
format_ptr = GET_RTX_FORMAT (code);
|
||||
length = GET_RTX_LENGTH (code);
|
||||
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
switch (*format_ptr++)
|
||||
|
@ -3812,7 +3812,7 @@ add_insn_before (rtx insn, rtx before, basic_block bb)
|
|||
gcc_assert (stack);
|
||||
}
|
||||
|
||||
if (!bb
|
||||
if (!bb
|
||||
&& !BARRIER_P (before)
|
||||
&& !BARRIER_P (insn))
|
||||
bb = BLOCK_FOR_INSN (before);
|
||||
|
@ -5009,15 +5009,15 @@ rtx
|
|||
emit_note_copy (rtx orig)
|
||||
{
|
||||
rtx note;
|
||||
|
||||
|
||||
note = rtx_alloc (NOTE);
|
||||
|
||||
|
||||
INSN_UID (note) = cur_insn_uid++;
|
||||
NOTE_DATA (note) = NOTE_DATA (orig);
|
||||
NOTE_KIND (note) = NOTE_KIND (orig);
|
||||
BLOCK_FOR_INSN (note) = NULL;
|
||||
add_insn (note);
|
||||
|
||||
|
||||
return note;
|
||||
}
|
||||
|
||||
|
@ -5996,7 +5996,7 @@ emit_copy_of_insn_after (rtx insn, rtx after)
|
|||
SIBLING_CALL_P (new_rtx) = SIBLING_CALL_P (insn);
|
||||
RTL_CONST_CALL_P (new_rtx) = RTL_CONST_CALL_P (insn);
|
||||
RTL_PURE_CALL_P (new_rtx) = RTL_PURE_CALL_P (insn);
|
||||
RTL_LOOPING_CONST_OR_PURE_CALL_P (new_rtx)
|
||||
RTL_LOOPING_CONST_OR_PURE_CALL_P (new_rtx)
|
||||
= RTL_LOOPING_CONST_OR_PURE_CALL_P (insn);
|
||||
break;
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ record_path_before_1 (struct et_occ *occ, int depth)
|
|||
|
||||
if (occ->prev)
|
||||
{
|
||||
m = record_path_before_1 (occ->prev, depth);
|
||||
m = record_path_before_1 (occ->prev, depth);
|
||||
if (m < mn)
|
||||
mn = m;
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ check_path_after_1 (struct et_occ *occ, int depth)
|
|||
|
||||
if (occ->next)
|
||||
{
|
||||
m = check_path_after_1 (occ->next, depth);
|
||||
m = check_path_after_1 (occ->next, depth);
|
||||
if (m < mn)
|
||||
mn = m;
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ et_splay (struct et_occ *occ)
|
|||
record_path_before (occ);
|
||||
et_check_tree_sanity (occ);
|
||||
#endif
|
||||
|
||||
|
||||
while (occ->parent)
|
||||
{
|
||||
occ_depth = occ->depth;
|
||||
|
@ -444,7 +444,7 @@ static struct et_occ *
|
|||
et_new_occ (struct et_node *node)
|
||||
{
|
||||
struct et_occ *nw;
|
||||
|
||||
|
||||
if (!et_occurrences)
|
||||
et_occurrences = create_alloc_pool ("et_occ pool", sizeof (struct et_occ), 300);
|
||||
nw = (struct et_occ *) pool_alloc (et_occurrences);
|
||||
|
@ -467,7 +467,7 @@ struct et_node *
|
|||
et_new_tree (void *data)
|
||||
{
|
||||
struct et_node *nw;
|
||||
|
||||
|
||||
if (!et_nodes)
|
||||
et_nodes = create_alloc_pool ("et_node pool", sizeof (struct et_node), 300);
|
||||
nw = (struct et_node *) pool_alloc (et_nodes);
|
||||
|
@ -590,7 +590,7 @@ et_split (struct et_node *t)
|
|||
|
||||
for (r = rmost->next; r->prev; r = r->prev)
|
||||
continue;
|
||||
et_splay (r);
|
||||
et_splay (r);
|
||||
|
||||
r->prev->parent = NULL;
|
||||
p_occ = t->parent_occ;
|
||||
|
|
12
gcc/except.c
12
gcc/except.c
|
@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
a given statement does throw. During this lowering process,
|
||||
we create an EH_LANDING_PAD node for each EH_REGION that has
|
||||
some code within the function that needs to be executed if a
|
||||
throw does happen. We also create RESX statements that are
|
||||
throw does happen. We also create RESX statements that are
|
||||
used to transfer control from an inner EH_REGION to an outer
|
||||
EH_REGION. We also create EH_DISPATCH statements as placeholders
|
||||
for a runtime type comparison that should be made in order to
|
||||
|
@ -75,7 +75,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
handler for the exception must be within a function somewhere
|
||||
up the call chain, so we call back into the exception runtime
|
||||
(__builtin_unwind_resume).
|
||||
|
||||
|
||||
During pass_expand (cfgexpand.c), we generate REG_EH_REGION notes
|
||||
that create an rtl to eh_region mapping that corresponds to the
|
||||
gimple to eh_region mapping that had been recorded in the
|
||||
|
@ -93,7 +93,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
frame are emitted at this time.
|
||||
|
||||
During pass_convert_to_eh_region_ranges (except.c), we transform
|
||||
the REG_EH_REGION notes attached to individual insns into
|
||||
the REG_EH_REGION notes attached to individual insns into
|
||||
non-overlapping ranges of insns bounded by NOTE_INSN_EH_REGION_BEG
|
||||
and NOTE_INSN_EH_REGION_END. Each insn within such ranges has the
|
||||
same associated action within the exception region tree, meaning
|
||||
|
@ -611,7 +611,7 @@ duplicate_eh_regions (struct function *ifun,
|
|||
data.eh_map = pointer_map_create ();
|
||||
|
||||
outer_region = get_eh_region_from_lp_number (outer_lp);
|
||||
|
||||
|
||||
/* Copy all the regions in the subtree. */
|
||||
if (copy_region)
|
||||
duplicate_eh_regions_1 (&data, copy_region, outer_region);
|
||||
|
@ -1490,7 +1490,7 @@ remove_eh_landing_pad (eh_landing_pad lp)
|
|||
for (pp = &lp->region->landing_pads; *pp != lp; pp = &(*pp)->next_lp)
|
||||
continue;
|
||||
*pp = lp->next_lp;
|
||||
|
||||
|
||||
if (lp->post_landing_pad)
|
||||
EH_LANDING_PAD_NR (lp->post_landing_pad) = 0;
|
||||
VEC_replace (eh_landing_pad, cfun->eh->lp_array, lp->index, NULL);
|
||||
|
@ -1555,7 +1555,7 @@ for_each_eh_label (void (*callback) (rtx))
|
|||
}
|
||||
|
||||
/* Create the REG_EH_REGION note for INSN, given its ECF_FLAGS for a
|
||||
call insn.
|
||||
call insn.
|
||||
|
||||
At the gimple level, we use LP_NR
|
||||
> 0 : The statement transfers to landing pad LP_NR
|
||||
|
|
|
@ -156,7 +156,7 @@ struct GTY(()) eh_region_d
|
|||
The normal way for this to happen is for there to be a CLEANUP region
|
||||
contained within this MUST_NOT_THROW region. Note that if the
|
||||
runtime handles the MUST_NOT_THROW region, we have no control over
|
||||
what termination function is called; it will be decided by the
|
||||
what termination function is called; it will be decided by the
|
||||
personality function in effect for this CIE. */
|
||||
tree failure_decl;
|
||||
/* The location assigned to the call of FAILURE_DECL, if expanded. */
|
||||
|
|
24
gcc/expmed.c
24
gcc/expmed.c
|
@ -390,7 +390,7 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
|||
always get higher addresses. */
|
||||
int inner_mode_size = GET_MODE_SIZE (GET_MODE (SUBREG_REG (op0)));
|
||||
int outer_mode_size = GET_MODE_SIZE (GET_MODE (op0));
|
||||
|
||||
|
||||
byte_offset = 0;
|
||||
|
||||
/* Paradoxical subregs need special handling on big endian machines. */
|
||||
|
@ -2365,7 +2365,7 @@ struct alg_hash_entry {
|
|||
Otherwise, the cost within which multiplication by T is
|
||||
impossible. */
|
||||
struct mult_cost cost;
|
||||
|
||||
|
||||
/* OPtimized for speed? */
|
||||
bool speed;
|
||||
};
|
||||
|
@ -3198,7 +3198,7 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
|
|||
target, unsignedp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* We used to test optimize here, on the grounds that it's better to
|
||||
produce a smaller program when -O is not used. But this causes
|
||||
such a terrible slowdown sometimes that it seems better to always
|
||||
|
@ -3577,8 +3577,8 @@ expand_mult_highpart (enum machine_mode mode, rtx op0, rtx op1,
|
|||
|
||||
cnst1 = INTVAL (op1) & GET_MODE_MASK (mode);
|
||||
|
||||
/* We can't optimize modes wider than BITS_PER_WORD.
|
||||
??? We might be able to perform double-word arithmetic if
|
||||
/* We can't optimize modes wider than BITS_PER_WORD.
|
||||
??? We might be able to perform double-word arithmetic if
|
||||
mode == word_mode, however all the cost calculations in
|
||||
synth_mult etc. assume single-word operations. */
|
||||
if (GET_MODE_BITSIZE (wider_mode) > BITS_PER_WORD)
|
||||
|
@ -4944,7 +4944,7 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode,
|
|||
if (!remainder)
|
||||
{
|
||||
remainder = gen_reg_rtx (compute_mode);
|
||||
if (!expand_twoval_binop_libfunc
|
||||
if (!expand_twoval_binop_libfunc
|
||||
(unsignedp ? udivmod_optab : sdivmod_optab,
|
||||
op0, op1,
|
||||
NULL_RTX, remainder,
|
||||
|
@ -4987,12 +4987,12 @@ make_tree (tree type, rtx x)
|
|||
&& (GET_MODE_BITSIZE (TYPE_MODE (type))
|
||||
< HOST_BITS_PER_WIDE_INT)))
|
||||
hi = -1;
|
||||
|
||||
|
||||
t = build_int_cst_wide (type, INTVAL (x), hi);
|
||||
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
case CONST_DOUBLE:
|
||||
if (GET_MODE (x) == VOIDmode)
|
||||
t = build_int_cst_wide (type,
|
||||
|
@ -5154,7 +5154,7 @@ emit_cstore (rtx target, enum insn_code icode, enum rtx_code code,
|
|||
target_mode = result_mode;
|
||||
if (!target)
|
||||
target = gen_reg_rtx (target_mode);
|
||||
|
||||
|
||||
if (optimize
|
||||
|| !(insn_data[(int) icode].operand[0].predicate (target, result_mode)))
|
||||
subtarget = gen_reg_rtx (result_mode);
|
||||
|
@ -5530,7 +5530,7 @@ emit_store_flag (rtx target, enum rtx_code code, rtx op0, rtx op1,
|
|||
/* Cannot split ORDERED and UNORDERED, only try the above trick. */
|
||||
if (code == ORDERED || code == UNORDERED)
|
||||
return 0;
|
||||
|
||||
|
||||
and_them = split_comparison (code, mode, &first_code, &code);
|
||||
|
||||
/* If there are no NaNs, the first comparison should always fall through.
|
||||
|
@ -5783,7 +5783,7 @@ emit_store_flag_force (rtx target, enum rtx_code code, rtx op0, rtx op1,
|
|||
/* If this failed, we have to do this with set/compare/jump/set code.
|
||||
For foo != 0, if foo is in OP0, just replace it with 1 if nonzero. */
|
||||
trueval = normalizep ? GEN_INT (normalizep) : const1_rtx;
|
||||
if (code == NE
|
||||
if (code == NE
|
||||
&& GET_MODE_CLASS (mode) == MODE_INT
|
||||
&& REG_P (target)
|
||||
&& op0 == target
|
||||
|
|
18
gcc/expr.c
18
gcc/expr.c
|
@ -2311,7 +2311,7 @@ can_store_by_pieces (unsigned HOST_WIDE_INT len,
|
|||
if (len == 0)
|
||||
return 1;
|
||||
|
||||
if (! (memsetp
|
||||
if (! (memsetp
|
||||
? SET_BY_PIECES_P (len, align)
|
||||
: STORE_BY_PIECES_P (len, align)))
|
||||
return 0;
|
||||
|
@ -4511,7 +4511,7 @@ emit_storent_insn (rtx to, rtx from)
|
|||
|
||||
If CALL_PARAM_P is nonzero, this is a store into a call param on the
|
||||
stack, and block moves may need to be treated specially.
|
||||
|
||||
|
||||
If NONTEMPORAL is true, try using a nontemporal store instruction. */
|
||||
|
||||
rtx
|
||||
|
@ -5753,7 +5753,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
|
|||
ALIAS_SET is the alias set for the destination. This value will
|
||||
(in general) be different from that for TARGET, since TARGET is a
|
||||
reference to the containing structure.
|
||||
|
||||
|
||||
If NONTEMPORAL is true, try generating a nontemporal store. */
|
||||
|
||||
static rtx
|
||||
|
@ -6143,7 +6143,7 @@ contains_packed_reference (const_tree exp)
|
|||
case COMPONENT_REF:
|
||||
{
|
||||
tree field = TREE_OPERAND (exp, 1);
|
||||
packed_p = DECL_PACKED (field)
|
||||
packed_p = DECL_PACKED (field)
|
||||
|| TYPE_PACKED (TREE_TYPE (field))
|
||||
|| TYPE_PACKED (TREE_TYPE (exp));
|
||||
if (packed_p)
|
||||
|
@ -6750,7 +6750,7 @@ highest_pow2_factor_for_target (const_tree target, const_tree exp)
|
|||
{
|
||||
unsigned HOST_WIDE_INT talign = target_align (target) / BITS_PER_UNIT;
|
||||
unsigned HOST_WIDE_INT factor = highest_pow2_factor (exp);
|
||||
|
||||
|
||||
return MAX (factor, talign);
|
||||
}
|
||||
|
||||
|
@ -6940,7 +6940,7 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode,
|
|||
|
||||
if (modifier != EXPAND_NORMAL)
|
||||
result = force_operand (result, NULL);
|
||||
tmp = expand_expr (offset, NULL_RTX, tmode,
|
||||
tmp = expand_expr (offset, NULL_RTX, tmode,
|
||||
modifier == EXPAND_INITIALIZER
|
||||
? EXPAND_INITIALIZER : EXPAND_NORMAL);
|
||||
|
||||
|
@ -7390,9 +7390,9 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
|
|||
return CONST0_RTX (mode);
|
||||
}
|
||||
|
||||
case POINTER_PLUS_EXPR:
|
||||
case POINTER_PLUS_EXPR:
|
||||
/* Even though the sizetype mode and the pointer's mode can be different
|
||||
expand is able to handle this correctly and get the correct result out
|
||||
expand is able to handle this correctly and get the correct result out
|
||||
of the PLUS_EXPR code. */
|
||||
/* Make sure to sign-extend the sizetype offset in a POINTER_PLUS_EXPR
|
||||
if sizetype precision is smaller than pointer precision. */
|
||||
|
@ -9330,7 +9330,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
|||
/* If both modes are integral, then we can convert from one to the
|
||||
other. */
|
||||
else if (SCALAR_INT_MODE_P (GET_MODE (op0)) && SCALAR_INT_MODE_P (mode))
|
||||
op0 = convert_modes (mode, GET_MODE (op0), op0,
|
||||
op0 = convert_modes (mode, GET_MODE (op0), op0,
|
||||
TYPE_UNSIGNED (TREE_TYPE (treeop0)));
|
||||
/* As a last resort, spill op0 to memory, and reload it in a
|
||||
different mode. */
|
||||
|
|
|
@ -395,7 +395,7 @@ extern rtx builtin_strncpy_read_str (void *, HOST_WIDE_INT, enum machine_mode);
|
|||
|
||||
/* Functions from expr.c: */
|
||||
|
||||
/* This is run during target initialization to set up which modes can be
|
||||
/* This is run during target initialization to set up which modes can be
|
||||
used directly in memory and to initialize the block move optab. */
|
||||
extern void init_expr_target (void);
|
||||
|
||||
|
@ -484,7 +484,7 @@ extern rtx clear_storage_hints (rtx, rtx, enum block_op_methods,
|
|||
rtx set_storage_via_libcall (rtx, rtx, rtx, bool);
|
||||
|
||||
/* Expand a setmem pattern; return true if successful. */
|
||||
extern bool set_storage_via_setmem (rtx, rtx, rtx, unsigned int,
|
||||
extern bool set_storage_via_setmem (rtx, rtx, rtx, unsigned int,
|
||||
unsigned int, HOST_WIDE_INT);
|
||||
|
||||
/* Determine whether the LEN bytes can be moved by using several move
|
||||
|
@ -546,7 +546,7 @@ extern rtx store_expr (tree, rtx, int, bool);
|
|||
extern rtx force_operand (rtx, rtx);
|
||||
|
||||
/* Work horses for expand_expr. */
|
||||
extern rtx expand_expr_real (tree, rtx, enum machine_mode,
|
||||
extern rtx expand_expr_real (tree, rtx, enum machine_mode,
|
||||
enum expand_modifier, rtx *);
|
||||
extern rtx expand_expr_real_1 (tree, rtx, enum machine_mode,
|
||||
enum expand_modifier, rtx *);
|
||||
|
|
|
@ -1413,7 +1413,7 @@ int
|
|||
asm_str_count (const char *templ)
|
||||
{
|
||||
int count = 1;
|
||||
|
||||
|
||||
if (!*templ)
|
||||
return 0;
|
||||
|
||||
|
|
10
gcc/flags.h
10
gcc/flags.h
|
@ -114,7 +114,7 @@ extern int optimize_size;
|
|||
/* True if this is the LTO front end (lto1). This is used to disable
|
||||
gimple generation and lowering passes that are normally run on the
|
||||
output of a front end. These passes must be bypassed for lto since
|
||||
they have already been done before the gimple was written. */
|
||||
they have already been done before the gimple was written. */
|
||||
|
||||
extern bool in_lto_p;
|
||||
|
||||
|
@ -122,9 +122,9 @@ extern bool in_lto_p;
|
|||
|
||||
extern int flag_generate_lto;
|
||||
|
||||
/* Used to set the level of -Wstrict-aliasing, when no level is specified.
|
||||
/* Used to set the level of -Wstrict-aliasing, when no level is specified.
|
||||
The external way to set the default level is to use
|
||||
-Wstrict-aliasing=level.
|
||||
-Wstrict-aliasing=level.
|
||||
ONOFF is assumed to take value 1 when -Wstrict-aliasing is specified,
|
||||
and 0 otherwise. After calling this function, wstrict_aliasing will be
|
||||
set to the default value of -Wstrict_aliasing=level. */
|
||||
|
@ -264,8 +264,8 @@ extern bool sel_sched_switch_set;
|
|||
/* Whether to run the warn_unused_result attribute pass. */
|
||||
extern bool flag_warn_unused_result;
|
||||
|
||||
/* Values of the -falign-* flags: how much to align labels in code.
|
||||
0 means `use default', 1 means `don't align'.
|
||||
/* Values of the -falign-* flags: how much to align labels in code.
|
||||
0 means `use default', 1 means `don't align'.
|
||||
For each variable, there is an _log variant which is the power
|
||||
of two not less than the variable, for .align output. */
|
||||
|
||||
|
|
114
gcc/fold-const.c
114
gcc/fold-const.c
|
@ -1064,7 +1064,7 @@ negate_mathfn_p (enum built_in_function code)
|
|||
CASE_FLT_FN (BUILT_IN_NEARBYINT):
|
||||
CASE_FLT_FN (BUILT_IN_RINT):
|
||||
return !flag_rounding_math;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1244,7 +1244,7 @@ fold_negate_expr (location_t loc, tree t)
|
|||
return fold_build2_loc (loc, PLUS_EXPR, type, TREE_OPERAND (t, 0),
|
||||
build_int_cst (type, 1));
|
||||
break;
|
||||
|
||||
|
||||
case INTEGER_CST:
|
||||
tem = fold_negate_const (t, type);
|
||||
if (TREE_OVERFLOW (tem) == TREE_OVERFLOW (t)
|
||||
|
@ -1282,7 +1282,7 @@ fold_negate_expr (location_t loc, tree t)
|
|||
fold_negate_expr (loc, TREE_OPERAND (t, 0)),
|
||||
fold_negate_expr (loc, TREE_OPERAND (t, 1)));
|
||||
break;
|
||||
|
||||
|
||||
case CONJ_EXPR:
|
||||
if (negate_expr_p (t))
|
||||
return fold_build1_loc (loc, CONJ_EXPR, type,
|
||||
|
@ -2034,7 +2034,7 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc)
|
|||
tree compare = fold_build2 (LT_EXPR, boolean_type_node,
|
||||
fold_abs_const (r2, TREE_TYPE (type)),
|
||||
fold_abs_const (i2, TREE_TYPE (type)));
|
||||
|
||||
|
||||
if (integer_nonzerop (compare))
|
||||
{
|
||||
/* In the TRUE branch, we compute
|
||||
|
@ -2096,17 +2096,17 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc)
|
|||
tree type = TREE_TYPE(arg1);
|
||||
int count = TYPE_VECTOR_SUBPARTS (type), i;
|
||||
tree elements1, elements2, list = NULL_TREE;
|
||||
|
||||
|
||||
if(TREE_CODE(arg2) != VECTOR_CST)
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
elements1 = TREE_VECTOR_CST_ELTS (arg1);
|
||||
elements2 = TREE_VECTOR_CST_ELTS (arg2);
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
tree elem1, elem2, elem;
|
||||
|
||||
|
||||
/* The trailing elements can be empty and should be treated as 0 */
|
||||
if(!elements1)
|
||||
elem1 = fold_convert_const (NOP_EXPR, TREE_TYPE (type), integer_zero_node);
|
||||
|
@ -2114,8 +2114,8 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc)
|
|||
{
|
||||
elem1 = TREE_VALUE(elements1);
|
||||
elements1 = TREE_CHAIN (elements1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!elements2)
|
||||
elem2 = fold_convert_const (NOP_EXPR, TREE_TYPE (type), integer_zero_node);
|
||||
else
|
||||
|
@ -2123,17 +2123,17 @@ const_binop (enum tree_code code, tree arg1, tree arg2, int notrunc)
|
|||
elem2 = TREE_VALUE(elements2);
|
||||
elements2 = TREE_CHAIN (elements2);
|
||||
}
|
||||
|
||||
|
||||
elem = const_binop (code, elem1, elem2, notrunc);
|
||||
|
||||
|
||||
/* It is possible that const_binop cannot handle the given
|
||||
code and return NULL_TREE */
|
||||
if(elem == NULL_TREE)
|
||||
return NULL_TREE;
|
||||
|
||||
|
||||
list = tree_cons (NULL_TREE, elem, list);
|
||||
}
|
||||
return build_vector(type, nreverse(list));
|
||||
return build_vector(type, nreverse(list));
|
||||
}
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
@ -2573,7 +2573,7 @@ build_zero_vector (tree type)
|
|||
|
||||
elem = fold_convert_const (NOP_EXPR, TREE_TYPE (type), integer_zero_node);
|
||||
units = TYPE_VECTOR_SUBPARTS (type);
|
||||
|
||||
|
||||
list = NULL_TREE;
|
||||
for (i = 0; i < units; i++)
|
||||
list = tree_cons (NULL_TREE, elem, list);
|
||||
|
@ -3250,7 +3250,7 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
|
|||
TREE_REAL_CST (arg1)))
|
||||
return 1;
|
||||
|
||||
|
||||
|
||||
if (!HONOR_SIGNED_ZEROS (TYPE_MODE (TREE_TYPE (arg0))))
|
||||
{
|
||||
/* If we do not distinguish between signed and unsigned zero,
|
||||
|
@ -3409,7 +3409,7 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
|
|||
|
||||
case COND_EXPR:
|
||||
return OP_SAME (0) && OP_SAME (1) && OP_SAME (2);
|
||||
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -4126,7 +4126,7 @@ make_bit_field_ref (location_t loc, tree inner, tree type,
|
|||
tree size = TYPE_SIZE (TREE_TYPE (inner));
|
||||
if ((INTEGRAL_TYPE_P (TREE_TYPE (inner))
|
||||
|| POINTER_TYPE_P (TREE_TYPE (inner)))
|
||||
&& host_integerp (size, 0)
|
||||
&& host_integerp (size, 0)
|
||||
&& tree_low_cst (size, 0) == bitsize)
|
||||
return fold_convert_loc (loc, type, inner);
|
||||
}
|
||||
|
@ -5536,7 +5536,7 @@ fold_cond_expr_with_comparison (location_t loc, tree type,
|
|||
tem = fold_build2_loc (loc, MIN_EXPR, TREE_TYPE (arg00), arg00,
|
||||
fold_convert_loc (loc, TREE_TYPE (arg00),
|
||||
arg2));
|
||||
return pedantic_non_lvalue_loc (loc,
|
||||
return pedantic_non_lvalue_loc (loc,
|
||||
fold_convert_loc (loc, type, tem));
|
||||
}
|
||||
break;
|
||||
|
@ -7271,7 +7271,7 @@ fold_single_bit_test (location_t loc, enum tree_code code,
|
|||
operations as unsigned. If we must use the AND, we have a choice.
|
||||
Normally unsigned is faster, but for some machines signed is. */
|
||||
#ifdef LOAD_EXTEND_OP
|
||||
ops_unsigned = (LOAD_EXTEND_OP (operand_mode) == SIGN_EXTEND
|
||||
ops_unsigned = (LOAD_EXTEND_OP (operand_mode) == SIGN_EXTEND
|
||||
&& !flag_syntax_only) ? 0 : 1;
|
||||
#else
|
||||
ops_unsigned = 1;
|
||||
|
@ -7556,7 +7556,7 @@ try_move_mult_to_index (location_t loc, tree addr, tree op1)
|
|||
|
||||
STRIP_NOPS (arg0);
|
||||
STRIP_NOPS (arg1);
|
||||
|
||||
|
||||
if (TREE_CODE (arg0) == INTEGER_CST)
|
||||
{
|
||||
s = arg0;
|
||||
|
@ -8445,7 +8445,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0)
|
|||
case FIX_TRUNC_EXPR:
|
||||
if (TREE_TYPE (op0) == type)
|
||||
return op0;
|
||||
|
||||
|
||||
/* If we have (type) (a CMP b) and type is an integral type, return
|
||||
new expression involving the new type. */
|
||||
if (COMPARISON_CLASS_P (op0) && INTEGRAL_TYPE_P (type))
|
||||
|
@ -9377,7 +9377,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
|
|||
&& (code == EQ_EXPR
|
||||
|| code == NE_EXPR
|
||||
|| POINTER_TYPE_OVERFLOW_UNDEFINED))
|
||||
|
||||
|
||||
{
|
||||
if (code != EQ_EXPR
|
||||
&& code != NE_EXPR
|
||||
|
@ -9652,7 +9652,7 @@ fold_comparison (location_t loc, enum tree_code code, tree type,
|
|||
|
||||
/* Likewise, we can simplify a comparison of a real constant with
|
||||
a MINUS_EXPR whose first operand is also a real constant, i.e.
|
||||
(c1 - x) < c2 becomes x > c1-c2. Reordering is allowed on
|
||||
(c1 - x) < c2 becomes x > c1-c2. Reordering is allowed on
|
||||
floating-point types only if -fassociative-math is set. */
|
||||
if (flag_associative_math
|
||||
&& TREE_CODE (arg1) == REAL_CST
|
||||
|
@ -9976,7 +9976,7 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue,
|
|||
tree op0, op1;
|
||||
unsigned HOST_WIDE_INT modulus;
|
||||
enum tree_code inner_code;
|
||||
|
||||
|
||||
op0 = TREE_OPERAND (expr, 0);
|
||||
STRIP_NOPS (op0);
|
||||
modulus = get_pointer_modulus_and_residue (op0, residue,
|
||||
|
@ -9996,7 +9996,7 @@ get_pointer_modulus_and_residue (tree expr, unsigned HOST_WIDE_INT *residue,
|
|||
if (TREE_CODE (op1) == INTEGER_CST)
|
||||
{
|
||||
unsigned HOST_WIDE_INT align;
|
||||
|
||||
|
||||
/* Compute the greatest power-of-2 divisor of op1. */
|
||||
align = TREE_INT_CST_LOW (op1);
|
||||
align &= -align;
|
||||
|
@ -10165,7 +10165,7 @@ fold_binary_loc (location_t loc,
|
|||
if (TREE_CODE (arg0) == COND_EXPR || COMPARISON_CLASS_P (arg0))
|
||||
{
|
||||
tem = fold_binary_op_with_conditional_arg (loc, code, type, op0, op1,
|
||||
arg0, arg1,
|
||||
arg0, arg1,
|
||||
/*cond_first_p=*/1);
|
||||
if (tem != NULL_TREE)
|
||||
return tem;
|
||||
|
@ -10174,7 +10174,7 @@ fold_binary_loc (location_t loc,
|
|||
if (TREE_CODE (arg1) == COND_EXPR || COMPARISON_CLASS_P (arg1))
|
||||
{
|
||||
tem = fold_binary_op_with_conditional_arg (loc, code, type, op0, op1,
|
||||
arg1, arg0,
|
||||
arg1, arg0,
|
||||
/*cond_first_p=*/0);
|
||||
if (tem != NULL_TREE)
|
||||
return tem;
|
||||
|
@ -10456,7 +10456,7 @@ fold_binary_loc (location_t loc,
|
|||
return fold_build2_loc (loc, MULT_EXPR, type, arg0,
|
||||
build_real (type, dconst2));
|
||||
|
||||
/* Convert a + (b*c + d*e) into (a + b*c) + d*e.
|
||||
/* Convert a + (b*c + d*e) into (a + b*c) + d*e.
|
||||
We associate floats only if the user has specified
|
||||
-fassociative-math. */
|
||||
if (flag_associative_math
|
||||
|
@ -10473,7 +10473,7 @@ fold_binary_loc (location_t loc,
|
|||
return fold_build2_loc (loc, PLUS_EXPR, type, tree0, tree11);
|
||||
}
|
||||
}
|
||||
/* Convert (b*c + d*e) + a into b*c + (d*e +a).
|
||||
/* Convert (b*c + d*e) + a into b*c + (d*e +a).
|
||||
We associate floats only if the user has specified
|
||||
-fassociative-math. */
|
||||
if (flag_associative_math
|
||||
|
@ -10909,7 +10909,7 @@ fold_binary_loc (location_t loc,
|
|||
tree diff = build2 (MINUS_EXPR, type, op0, op1);
|
||||
return fold_build2_loc (loc, MULT_EXPR, type, diff,
|
||||
fold_convert_loc (loc, type, esz));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11288,7 +11288,7 @@ fold_binary_loc (location_t loc,
|
|||
|
||||
if (width > HOST_BITS_PER_WIDE_INT)
|
||||
{
|
||||
mhi = (unsigned HOST_WIDE_INT) -1
|
||||
mhi = (unsigned HOST_WIDE_INT) -1
|
||||
>> (2 * HOST_BITS_PER_WIDE_INT - width);
|
||||
mlo = -1;
|
||||
}
|
||||
|
@ -11475,7 +11475,7 @@ fold_binary_loc (location_t loc,
|
|||
fold_convert_loc (loc, type, t1));
|
||||
return t1;
|
||||
}
|
||||
|
||||
|
||||
/* Convert ~X ^ ~Y to X ^ Y. */
|
||||
if (TREE_CODE (arg0) == BIT_NOT_EXPR
|
||||
&& TREE_CODE (arg1) == BIT_NOT_EXPR)
|
||||
|
@ -11505,7 +11505,7 @@ fold_binary_loc (location_t loc,
|
|||
&& operand_equal_p (TREE_OPERAND (arg0, 1), arg1, 0))
|
||||
{
|
||||
tem = fold_convert_loc (loc, type, TREE_OPERAND (arg0, 0));
|
||||
return fold_build2_loc (loc, BIT_AND_EXPR, type,
|
||||
return fold_build2_loc (loc, BIT_AND_EXPR, type,
|
||||
fold_build1_loc (loc, BIT_NOT_EXPR, type, tem),
|
||||
fold_convert_loc (loc, type, arg1));
|
||||
}
|
||||
|
@ -11624,7 +11624,7 @@ fold_binary_loc (location_t loc,
|
|||
&& operand_equal_p (TREE_OPERAND (arg0, 1), arg1, 0))
|
||||
{
|
||||
tem = fold_convert_loc (loc, type, TREE_OPERAND (arg0, 0));
|
||||
return fold_build2_loc (loc, BIT_AND_EXPR, type,
|
||||
return fold_build2_loc (loc, BIT_AND_EXPR, type,
|
||||
fold_build1_loc (loc, BIT_NOT_EXPR, type, tem),
|
||||
fold_convert_loc (loc, type, arg1));
|
||||
}
|
||||
|
@ -11889,7 +11889,7 @@ fold_binary_loc (location_t loc,
|
|||
}
|
||||
}
|
||||
}
|
||||
/* Convert A/B/C to A/(B*C). */
|
||||
/* Convert A/B/C to A/(B*C). */
|
||||
if (flag_reciprocal_math
|
||||
&& TREE_CODE (arg0) == RDIV_EXPR)
|
||||
return fold_build2_loc (loc, RDIV_EXPR, type, TREE_OPERAND (arg0, 0),
|
||||
|
@ -14222,7 +14222,7 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, htab_t ht)
|
|||
enum tree_code code;
|
||||
union tree_node buf;
|
||||
int i, len;
|
||||
|
||||
|
||||
recursive_label:
|
||||
|
||||
gcc_assert ((sizeof (struct tree_exp) + 5 * sizeof (tree)
|
||||
|
@ -14332,7 +14332,7 @@ recursive_label:
|
|||
}
|
||||
if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_WITH_VIS))
|
||||
fold_checksum_tree (DECL_SECTION_NAME (expr), ctx, ht);
|
||||
|
||||
|
||||
if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_NON_COMMON))
|
||||
{
|
||||
fold_checksum_tree (DECL_VINDEX (expr), ctx, ht);
|
||||
|
@ -14377,7 +14377,7 @@ debug_fold_checksum (const_tree t)
|
|||
unsigned char checksum[16];
|
||||
struct md5_ctx ctx;
|
||||
htab_t ht = htab_create (32, htab_hash_pointer, htab_eq_pointer, NULL);
|
||||
|
||||
|
||||
md5_init_ctx (&ctx);
|
||||
fold_checksum_tree (t, &ctx, ht);
|
||||
md5_finish_ctx (&ctx, checksum);
|
||||
|
@ -14412,14 +14412,14 @@ fold_build1_stat_loc (location_t loc,
|
|||
md5_finish_ctx (&ctx, checksum_before);
|
||||
htab_empty (ht);
|
||||
#endif
|
||||
|
||||
|
||||
tem = fold_unary_loc (loc, code, type, op0);
|
||||
if (!tem)
|
||||
{
|
||||
tem = build1_stat (code, type, op0 PASS_MEM_STAT);
|
||||
SET_EXPR_LOCATION (tem, loc);
|
||||
}
|
||||
|
||||
|
||||
#ifdef ENABLE_FOLD_CHECKING
|
||||
md5_init_ctx (&ctx);
|
||||
fold_checksum_tree (op0, &ctx, ht);
|
||||
|
@ -14470,7 +14470,7 @@ fold_build2_stat_loc (location_t loc,
|
|||
tem = build2_stat (code, type, op0, op1 PASS_MEM_STAT);
|
||||
SET_EXPR_LOCATION (tem, loc);
|
||||
}
|
||||
|
||||
|
||||
#ifdef ENABLE_FOLD_CHECKING
|
||||
md5_init_ctx (&ctx);
|
||||
fold_checksum_tree (op0, &ctx, ht);
|
||||
|
@ -14479,7 +14479,7 @@ fold_build2_stat_loc (location_t loc,
|
|||
|
||||
if (memcmp (checksum_before_op0, checksum_after_op0, 16))
|
||||
fold_check_failed (op0, tem);
|
||||
|
||||
|
||||
md5_init_ctx (&ctx);
|
||||
fold_checksum_tree (op1, &ctx, ht);
|
||||
md5_finish_ctx (&ctx, checksum_after_op1);
|
||||
|
@ -14535,7 +14535,7 @@ fold_build3_stat_loc (location_t loc, enum tree_code code, tree type,
|
|||
tem = build3_stat (code, type, op0, op1, op2 PASS_MEM_STAT);
|
||||
SET_EXPR_LOCATION (tem, loc);
|
||||
}
|
||||
|
||||
|
||||
#ifdef ENABLE_FOLD_CHECKING
|
||||
md5_init_ctx (&ctx);
|
||||
fold_checksum_tree (op0, &ctx, ht);
|
||||
|
@ -14544,7 +14544,7 @@ fold_build3_stat_loc (location_t loc, enum tree_code code, tree type,
|
|||
|
||||
if (memcmp (checksum_before_op0, checksum_after_op0, 16))
|
||||
fold_check_failed (op0, tem);
|
||||
|
||||
|
||||
md5_init_ctx (&ctx);
|
||||
fold_checksum_tree (op1, &ctx, ht);
|
||||
md5_finish_ctx (&ctx, checksum_after_op1);
|
||||
|
@ -14552,7 +14552,7 @@ fold_build3_stat_loc (location_t loc, enum tree_code code, tree type,
|
|||
|
||||
if (memcmp (checksum_before_op1, checksum_after_op1, 16))
|
||||
fold_check_failed (op1, tem);
|
||||
|
||||
|
||||
md5_init_ctx (&ctx);
|
||||
fold_checksum_tree (op2, &ctx, ht);
|
||||
md5_finish_ctx (&ctx, checksum_after_op2);
|
||||
|
@ -14597,7 +14597,7 @@ fold_build_call_array_loc (location_t loc, tree type, tree fn,
|
|||
#endif
|
||||
|
||||
tem = fold_builtin_call_array (loc, type, fn, nargs, argarray);
|
||||
|
||||
|
||||
#ifdef ENABLE_FOLD_CHECKING
|
||||
md5_init_ctx (&ctx);
|
||||
fold_checksum_tree (fn, &ctx, ht);
|
||||
|
@ -14606,7 +14606,7 @@ fold_build_call_array_loc (location_t loc, tree type, tree fn,
|
|||
|
||||
if (memcmp (checksum_before_fn, checksum_after_fn, 16))
|
||||
fold_check_failed (fn, tem);
|
||||
|
||||
|
||||
md5_init_ctx (&ctx);
|
||||
for (i = 0; i < nargs; i++)
|
||||
fold_checksum_tree (argarray[i], &ctx, ht);
|
||||
|
@ -14952,10 +14952,10 @@ tree_binary_nonnegative_warnv_p (enum tree_code code, tree type, tree op0,
|
|||
&& (TREE_CODE (op0) == NOP_EXPR || TREE_CODE (op0) == INTEGER_CST)
|
||||
&& (TREE_CODE (op1) == NOP_EXPR || TREE_CODE (op1) == INTEGER_CST))
|
||||
{
|
||||
tree inner0 = (TREE_CODE (op0) == NOP_EXPR)
|
||||
tree inner0 = (TREE_CODE (op0) == NOP_EXPR)
|
||||
? TREE_TYPE (TREE_OPERAND (op0, 0))
|
||||
: TREE_TYPE (op0);
|
||||
tree inner1 = (TREE_CODE (op1) == NOP_EXPR)
|
||||
tree inner1 = (TREE_CODE (op1) == NOP_EXPR)
|
||||
? TREE_TYPE (TREE_OPERAND (op1, 0))
|
||||
: TREE_TYPE (op1);
|
||||
|
||||
|
@ -16003,7 +16003,7 @@ fold_build_cleanup_point_expr (tree type, tree expr)
|
|||
if (!TREE_SIDE_EFFECTS (op))
|
||||
return expr;
|
||||
}
|
||||
|
||||
|
||||
return build1 (CLEANUP_POINT_EXPR, type, expr);
|
||||
}
|
||||
|
||||
|
@ -16067,17 +16067,17 @@ fold_indirect_ref_1 (location_t loc, tree type, tree op0)
|
|||
/* ((foo*)&vectorfoo)[1] => BIT_FIELD_REF<vectorfoo,...> */
|
||||
if (TREE_CODE (sub) == POINTER_PLUS_EXPR
|
||||
&& TREE_CODE (TREE_OPERAND (sub, 1)) == INTEGER_CST)
|
||||
{
|
||||
{
|
||||
tree op00 = TREE_OPERAND (sub, 0);
|
||||
tree op01 = TREE_OPERAND (sub, 1);
|
||||
tree op00type;
|
||||
|
||||
|
||||
STRIP_NOPS (op00);
|
||||
op00type = TREE_TYPE (op00);
|
||||
if (TREE_CODE (op00) == ADDR_EXPR
|
||||
&& TREE_CODE (TREE_TYPE (op00type)) == VECTOR_TYPE
|
||||
&& type == TREE_TYPE (TREE_TYPE (op00type)))
|
||||
{
|
||||
{
|
||||
HOST_WIDE_INT offset = tree_low_cst (op01, 0);
|
||||
tree part_width = TYPE_SIZE (type);
|
||||
unsigned HOST_WIDE_INT part_widthi = tree_low_cst (part_width, 0)/BITS_PER_UNIT;
|
||||
|
@ -16088,7 +16088,7 @@ fold_indirect_ref_1 (location_t loc, tree type, tree op0)
|
|||
return fold_build3_loc (loc,
|
||||
BIT_FIELD_REF, type, TREE_OPERAND (op00, 0),
|
||||
part_width, index);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16113,7 +16113,7 @@ fold_indirect_ref_1 (location_t loc, tree type, tree op0)
|
|||
TREE_OPERAND (op00, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* *(foo *)fooarrptr => (*fooarrptr)[0] */
|
||||
if (TREE_CODE (TREE_TYPE (subtype)) == ARRAY_TYPE
|
||||
&& type == TREE_TYPE (TREE_TYPE (subtype)))
|
||||
|
@ -16437,7 +16437,7 @@ fold_strip_sign_ops (tree exp)
|
|||
if (arg1)
|
||||
return fold_build2_loc (loc, COMPOUND_EXPR, TREE_TYPE (exp), arg0, arg1);
|
||||
break;
|
||||
|
||||
|
||||
case COND_EXPR:
|
||||
arg0 = fold_strip_sign_ops (TREE_OPERAND (exp, 1));
|
||||
arg1 = fold_strip_sign_ops (TREE_OPERAND (exp, 2));
|
||||
|
@ -16447,7 +16447,7 @@ fold_strip_sign_ops (tree exp)
|
|||
arg0 ? arg0 : TREE_OPERAND (exp, 1),
|
||||
arg1 ? arg1 : TREE_OPERAND (exp, 2));
|
||||
break;
|
||||
|
||||
|
||||
case CALL_EXPR:
|
||||
{
|
||||
const enum built_in_function fcode = builtin_mathfn_code (exp);
|
||||
|
|
|
@ -243,7 +243,7 @@ get_frame_size (void)
|
|||
|
||||
bool
|
||||
frame_offset_overflow (HOST_WIDE_INT offset, tree func)
|
||||
{
|
||||
{
|
||||
unsigned HOST_WIDE_INT size = FRAME_GROWS_DOWNWARD ? -offset : offset;
|
||||
|
||||
if (size > ((unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (Pmode) - 1))
|
||||
|
@ -710,7 +710,7 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
|
|||
/* Try to find an available, already-allocated temporary of the proper
|
||||
mode which meets the size and alignment requirements. Choose the
|
||||
smallest one with the closest alignment.
|
||||
|
||||
|
||||
If assign_stack_temp is called outside of the tree->rtl expansion,
|
||||
we cannot reuse the stack slots (that may still refer to
|
||||
VIRTUAL_STACK_VARS_REGNUM). */
|
||||
|
@ -1844,7 +1844,7 @@ aggregate_value_p (const_tree exp, const_tree fntype)
|
|||
check for by-invisible-reference returns, typically for CALL_EXPR input
|
||||
EXPressions. */
|
||||
const_tree fndecl = NULL_TREE;
|
||||
|
||||
|
||||
if (fntype)
|
||||
switch (TREE_CODE (fntype))
|
||||
{
|
||||
|
@ -1887,7 +1887,7 @@ aggregate_value_p (const_tree exp, const_tree fntype)
|
|||
if (TREE_CODE (exp) == CALL_EXPR && fndecl && DECL_RESULT (fndecl)
|
||||
&& DECL_BY_REFERENCE (DECL_RESULT (fndecl)))
|
||||
return 1;
|
||||
|
||||
|
||||
if (targetm.calls.return_in_memory (type, fntype))
|
||||
return 1;
|
||||
/* Types that are TREE_ADDRESSABLE must be constructed in memory,
|
||||
|
@ -1921,7 +1921,7 @@ use_register_for_decl (const_tree decl)
|
|||
{
|
||||
if (!targetm.calls.allocate_stack_slots_for_args())
|
||||
return true;
|
||||
|
||||
|
||||
/* Honor volatile. */
|
||||
if (TREE_SIDE_EFFECTS (decl))
|
||||
return false;
|
||||
|
@ -2501,7 +2501,7 @@ assign_parm_adjust_entry_rtl (struct assign_parm_data_one *data)
|
|||
locations. The Irix 6 ABI has examples of this. */
|
||||
if (GET_CODE (entry_parm) == PARALLEL)
|
||||
emit_group_store (validize_mem (stack_parm), entry_parm,
|
||||
data->passed_type,
|
||||
data->passed_type,
|
||||
int_size_in_bytes (data->passed_type));
|
||||
else
|
||||
{
|
||||
|
@ -2626,7 +2626,7 @@ assign_parm_setup_block_p (struct assign_parm_data_one *data)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* A subroutine of assign_parms. Arrange for the parameter to be
|
||||
/* A subroutine of assign_parms. Arrange for the parameter to be
|
||||
present and valid in DATA->STACK_RTL. */
|
||||
|
||||
static void
|
||||
|
@ -3167,7 +3167,7 @@ assign_parms (tree fndecl)
|
|||
crtl->stack_alignment_estimated = align;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (cfun->stdarg && !TREE_CHAIN (parm))
|
||||
assign_parms_setup_varargs (&all, &data, false);
|
||||
|
||||
|
@ -3224,7 +3224,7 @@ assign_parms (tree fndecl)
|
|||
crtl->stack_alignment_estimated = align;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If we are receiving a struct value address as the first argument, set up
|
||||
|
@ -3747,7 +3747,7 @@ setjmp_vars_warning (bitmap setjmp_crosses, tree block)
|
|||
&& DECL_RTL_SET_P (decl)
|
||||
&& REG_P (DECL_RTL (decl))
|
||||
&& regno_clobbered_at_setjmp (setjmp_crosses, REGNO (DECL_RTL (decl))))
|
||||
warning (OPT_Wclobbered, "variable %q+D might be clobbered by"
|
||||
warning (OPT_Wclobbered, "variable %q+D might be clobbered by"
|
||||
" %<longjmp%> or %<vfork%>", decl);
|
||||
}
|
||||
|
||||
|
@ -3767,14 +3767,14 @@ setjmp_args_warning (bitmap setjmp_crosses)
|
|||
if (DECL_RTL (decl) != 0
|
||||
&& REG_P (DECL_RTL (decl))
|
||||
&& regno_clobbered_at_setjmp (setjmp_crosses, REGNO (DECL_RTL (decl))))
|
||||
warning (OPT_Wclobbered,
|
||||
warning (OPT_Wclobbered,
|
||||
"argument %q+D might be clobbered by %<longjmp%> or %<vfork%>",
|
||||
decl);
|
||||
}
|
||||
|
||||
/* Generate warning messages for variables live across setjmp. */
|
||||
|
||||
void
|
||||
void
|
||||
generate_setjmp_warnings (void)
|
||||
{
|
||||
bitmap setjmp_crosses = regstat_get_setjmp_crosses ();
|
||||
|
@ -4076,7 +4076,7 @@ pop_cfun (void)
|
|||
|
||||
/* Return value of funcdef and increase it. */
|
||||
int
|
||||
get_next_funcdef_no (void)
|
||||
get_next_funcdef_no (void)
|
||||
{
|
||||
return funcdef_no++;
|
||||
}
|
||||
|
@ -4135,7 +4135,7 @@ allocate_struct_function (tree fndecl, bool abstract_p)
|
|||
&& TYPE_ARG_TYPES (fntype) != 0
|
||||
&& (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
|
||||
!= void_type_node));
|
||||
|
||||
|
||||
/* Assume all registers in stdarg functions need to be saved. */
|
||||
cfun->va_list_gpr_size = VA_LIST_MAX_GPR_SIZE;
|
||||
cfun->va_list_fpr_size = VA_LIST_MAX_FPR_SIZE;
|
||||
|
@ -4229,8 +4229,8 @@ struct rtl_opt_pass pass_init_function =
|
|||
{
|
||||
RTL_PASS,
|
||||
"*init_function", /* name */
|
||||
NULL, /* gate */
|
||||
init_function_for_compilation, /* execute */
|
||||
NULL, /* gate */
|
||||
init_function_for_compilation, /* execute */
|
||||
NULL, /* sub */
|
||||
NULL, /* next */
|
||||
0, /* static_pass_number */
|
||||
|
@ -5005,7 +5005,7 @@ thread_prologue_and_epilogue_insns (void)
|
|||
seq = gen_prologue ();
|
||||
emit_insn (seq);
|
||||
|
||||
/* Insert an explicit USE for the frame pointer
|
||||
/* Insert an explicit USE for the frame pointer
|
||||
if the profiling is on and the frame pointer is required. */
|
||||
if (crtl->profile && frame_pointer_needed)
|
||||
emit_use (hard_frame_pointer_rtx);
|
||||
|
@ -5013,7 +5013,7 @@ thread_prologue_and_epilogue_insns (void)
|
|||
/* Retain a map of the prologue insns. */
|
||||
record_insns (seq, NULL, &prologue_insn_hash);
|
||||
emit_note (NOTE_INSN_PROLOGUE_END);
|
||||
|
||||
|
||||
#ifndef PROFILE_BEFORE_PROLOGUE
|
||||
/* Ensure that instructions are not moved into the prologue when
|
||||
profiling is on. The call to the profiling routine can be
|
||||
|
@ -5286,7 +5286,7 @@ epilogue_done:
|
|||
for (insn = epilogue_end; insn; insn = next)
|
||||
{
|
||||
next = NEXT_INSN (insn);
|
||||
if (NOTE_P (insn)
|
||||
if (NOTE_P (insn)
|
||||
&& (NOTE_KIND (insn) == NOTE_INSN_FUNCTION_BEG))
|
||||
reorder_insns (insn, insn, PREV_INSN (epilogue_end));
|
||||
}
|
||||
|
@ -5389,7 +5389,7 @@ reposition_prologue_and_epilogue_notes (void)
|
|||
if (note)
|
||||
{
|
||||
/* If the function has a single basic block, and no real
|
||||
epilogue insns (e.g. sibcall with no cleanup), the
|
||||
epilogue insns (e.g. sibcall with no cleanup), the
|
||||
epilogue note can get scheduled before the prologue
|
||||
note. If we have frame related prologue insns, having
|
||||
them scanned during the epilogue will result in a crash.
|
||||
|
@ -5586,7 +5586,7 @@ struct rtl_opt_pass pass_thread_prologue_and_epilogue =
|
|||
|
||||
|
||||
/* This mini-pass fixes fall-out from SSA in asm statements that have
|
||||
in-out constraints. Say you start with
|
||||
in-out constraints. Say you start with
|
||||
|
||||
orig = inout;
|
||||
asm ("": "+mr" (inout));
|
||||
|
|
|
@ -86,7 +86,7 @@ struct GTY(()) emit_status {
|
|||
|
||||
|
||||
/* Indexed by pseudo register number, gives the rtx for that pseudo.
|
||||
Allocated in parallel with regno_pointer_align.
|
||||
Allocated in parallel with regno_pointer_align.
|
||||
FIXME: We could put it into emit_status struct, but gengtype is not able to deal
|
||||
with length attribute nested in top level structures. */
|
||||
|
||||
|
@ -335,7 +335,7 @@ struct GTY(()) rtl_data {
|
|||
/* The stack alignment estimated before reload, with consideration of
|
||||
following factors:
|
||||
1. Alignment of local stack variables (max_used_stack_slot_alignment)
|
||||
2. Alignment requirement to call other functions
|
||||
2. Alignment requirement to call other functions
|
||||
(preferred_stack_boundary)
|
||||
3. Alignment of non-local stack variables but might be spilled in
|
||||
local stack. */
|
||||
|
@ -361,7 +361,7 @@ struct GTY(()) rtl_data {
|
|||
/* Nonzero if function being compiled has nonlocal gotos to parent
|
||||
function. */
|
||||
bool has_nonlocal_goto;
|
||||
|
||||
|
||||
/* Nonzero if function being compiled has an asm statement. */
|
||||
bool has_asm_statement;
|
||||
|
||||
|
@ -488,7 +488,7 @@ struct GTY(()) function {
|
|||
tree static_chain_decl;
|
||||
|
||||
/* An expression that contains the non-local goto save area. The first
|
||||
word is the saved frame pointer and the second is the saved stack
|
||||
word is the saved frame pointer and the second is the saved stack
|
||||
pointer. */
|
||||
tree nonlocal_goto_save_area;
|
||||
|
||||
|
@ -553,7 +553,7 @@ struct GTY(()) function {
|
|||
from nested functions. */
|
||||
unsigned int has_nonlocal_label : 1;
|
||||
|
||||
/* Nonzero if we've set cannot_be_copied_reason. I.e. if
|
||||
/* Nonzero if we've set cannot_be_copied_reason. I.e. if
|
||||
(cannot_be_copied_set && !cannot_be_copied_reason), the function
|
||||
can in fact be copied. */
|
||||
unsigned int cannot_be_copied_set : 1;
|
||||
|
|
|
@ -905,7 +905,7 @@ update_df (rtx insn, rtx *loc, df_ref *use_rec, enum df_ref_type type,
|
|||
use was within a MEM. */
|
||||
new_use = df_ref_create (DF_REF_REG (orig_use), new_loc,
|
||||
insn, BLOCK_FOR_INSN (insn),
|
||||
type, DF_REF_FLAGS (orig_use) | new_flags,
|
||||
type, DF_REF_FLAGS (orig_use) | new_flags,
|
||||
width, offset, mode);
|
||||
|
||||
/* Set up the use-def chain. */
|
||||
|
|
16
gcc/gcc.c
16
gcc/gcc.c
|
@ -2960,7 +2960,7 @@ execute (void)
|
|||
|
||||
commands[0].prog = argbuf[0]; /* first command. */
|
||||
commands[0].argv = &argbuf[0];
|
||||
|
||||
|
||||
if (!wrapper_string)
|
||||
{
|
||||
string = find_a_file (&exec_prefixes, commands[0].prog, X_OK, false);
|
||||
|
@ -4309,7 +4309,7 @@ process_command (int argc, const char **argv)
|
|||
/* Set up the search paths. We add directories that we expect to
|
||||
contain GNU Toolchain components before directories specified by
|
||||
the machine description so that we will find GNU components (like
|
||||
the GNU assembler) before those of the host system. */
|
||||
the GNU assembler) before those of the host system. */
|
||||
|
||||
/* If we don't know where the toolchain has been installed, use the
|
||||
configured-in locations. */
|
||||
|
@ -6265,7 +6265,7 @@ handle_braces (const char *p)
|
|||
if (atom == end_atom)
|
||||
{
|
||||
if (!n_way_choice || disj_matched || *p == '|'
|
||||
|| a_is_negated || a_is_suffix || a_is_spectype
|
||||
|| a_is_negated || a_is_suffix || a_is_spectype
|
||||
|| a_is_starred)
|
||||
goto invalid;
|
||||
|
||||
|
@ -7048,9 +7048,9 @@ main (int argc, char **argv)
|
|||
else if (*cross_compile == '0')
|
||||
{
|
||||
add_prefix (&startfile_prefixes,
|
||||
concat (gcc_exec_prefix
|
||||
? gcc_exec_prefix : standard_exec_prefix,
|
||||
machine_suffix,
|
||||
concat (gcc_exec_prefix
|
||||
? gcc_exec_prefix : standard_exec_prefix,
|
||||
machine_suffix,
|
||||
standard_startfile_prefix, NULL),
|
||||
NULL, PREFIX_PRIORITY_LAST, 0, 1);
|
||||
}
|
||||
|
@ -8564,9 +8564,9 @@ getenv_spec_function (int argc, const char **argv)
|
|||
ptr[0] = '\\';
|
||||
ptr[1] = *value++;
|
||||
}
|
||||
|
||||
|
||||
strcpy (ptr, argv[1]);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ dump_file (const char *filename)
|
|||
const char *type = NULL;
|
||||
int endianness = 0;
|
||||
char m[4], v[4];
|
||||
|
||||
|
||||
if ((endianness = gcov_magic (magic, GCOV_DATA_MAGIC)))
|
||||
type = "data";
|
||||
else if ((endianness = gcov_magic (magic, GCOV_NOTE_MAGIC)))
|
||||
|
@ -171,13 +171,13 @@ dump_file (const char *filename)
|
|||
version = gcov_read_unsigned ();
|
||||
GCOV_UNSIGNED2STRING (v, version);
|
||||
GCOV_UNSIGNED2STRING (m, magic);
|
||||
|
||||
|
||||
printf ("%s:%s:magic `%.4s':version `%.4s'%s\n", filename, type,
|
||||
m, v, endianness < 0 ? " (swapped endianness)" : "");
|
||||
if (version != GCOV_VERSION)
|
||||
{
|
||||
char e[4];
|
||||
|
||||
|
||||
GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
|
||||
printf ("%s:warning:current version is `%.4s'\n", filename, e);
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ dump_file (const char *filename)
|
|||
|
||||
printf ("%s:stamp %lu\n", filename, (unsigned long)stamp);
|
||||
}
|
||||
|
||||
|
||||
while (1)
|
||||
{
|
||||
gcov_position_t base, position = gcov_position ();
|
||||
|
|
|
@ -73,7 +73,7 @@ gcov_open (const char *name, int mode)
|
|||
s_flock.l_len = 0; /* Until EOF. */
|
||||
s_flock.l_pid = getpid ();
|
||||
#endif
|
||||
|
||||
|
||||
gcc_assert (!gcov_var.file);
|
||||
gcov_var.start = 0;
|
||||
gcov_var.offset = gcov_var.length = 0;
|
||||
|
@ -145,7 +145,7 @@ gcov_open (const char *name, int mode)
|
|||
#endif
|
||||
|
||||
setbuf (gcov_var.file, (char *)0);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -200,12 +200,12 @@ static void
|
|||
gcov_allocate (unsigned length)
|
||||
{
|
||||
size_t new_size = gcov_var.alloc;
|
||||
|
||||
|
||||
if (!new_size)
|
||||
new_size = GCOV_BLOCK_SIZE;
|
||||
new_size += length;
|
||||
new_size *= 2;
|
||||
|
||||
|
||||
gcov_var.alloc = new_size;
|
||||
gcov_var.buffer = XRESIZEVAR (gcov_unsigned_t, gcov_var.buffer, new_size << 2);
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ gcov_write_words (unsigned words)
|
|||
#endif
|
||||
result = &gcov_var.buffer[gcov_var.offset];
|
||||
gcov_var.offset += words;
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ gcov_write_string (const char *string)
|
|||
length = strlen (string);
|
||||
alloc = (length + 4) >> 2;
|
||||
}
|
||||
|
||||
|
||||
buffer = gcov_write_words (1 + alloc);
|
||||
|
||||
buffer[0] = alloc;
|
||||
|
@ -317,7 +317,7 @@ gcov_write_tag (gcov_unsigned_t tag)
|
|||
|
||||
buffer[0] = tag;
|
||||
buffer[1] = 0;
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ gcov_read_words (unsigned words)
|
|||
{
|
||||
const gcov_unsigned_t *result;
|
||||
unsigned excess = gcov_var.length - gcov_var.offset;
|
||||
|
||||
|
||||
gcc_assert (gcov_var.mode > 0);
|
||||
if (excess < words)
|
||||
{
|
||||
|
@ -472,7 +472,7 @@ GCOV_LINKAGE const char *
|
|||
gcov_read_string (void)
|
||||
{
|
||||
unsigned length = gcov_read_unsigned ();
|
||||
|
||||
|
||||
if (!length)
|
||||
return 0;
|
||||
|
||||
|
@ -485,7 +485,7 @@ gcov_read_summary (struct gcov_summary *summary)
|
|||
{
|
||||
unsigned ix;
|
||||
struct gcov_ctr_summary *csum;
|
||||
|
||||
|
||||
summary->checksum = gcov_read_unsigned ();
|
||||
for (csum = summary->ctrs, ix = GCOV_COUNTERS_SUMMABLE; ix--; csum++)
|
||||
{
|
||||
|
@ -538,7 +538,7 @@ GCOV_LINKAGE time_t
|
|||
gcov_time (void)
|
||||
{
|
||||
struct stat status;
|
||||
|
||||
|
||||
if (fstat (fileno (gcov_var.file), &status))
|
||||
return 0;
|
||||
else
|
||||
|
|
|
@ -61,7 +61,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||
file. It need not be an absolute time stamp, merely a ticker that
|
||||
increments fast enough and cycles slow enough to distinguish
|
||||
different compile/run/compile cycles.
|
||||
|
||||
|
||||
Although the ident and version are formally 32 bit numbers, they
|
||||
are derived from 4 character ASCII strings. The version number
|
||||
consists of the single character major version number, a two
|
||||
|
@ -338,11 +338,11 @@ typedef HOST_WIDEST_INT gcov_type;
|
|||
/* Number of counters used for value profiling. */
|
||||
#define GCOV_N_VALUE_COUNTERS \
|
||||
(GCOV_LAST_VALUE_COUNTER - GCOV_FIRST_VALUE_COUNTER + 1)
|
||||
|
||||
|
||||
/* A list of human readable names of the counters */
|
||||
#define GCOV_COUNTER_NAMES {"arcs", "interval", "pow2", "single", \
|
||||
"delta","indirect_call", "average", "ior"}
|
||||
|
||||
|
||||
/* Names of merge functions for counters. */
|
||||
#define GCOV_MERGE_FUNCTIONS {"__gcov_merge_add", \
|
||||
"__gcov_merge_add", \
|
||||
|
@ -352,7 +352,7 @@ typedef HOST_WIDEST_INT gcov_type;
|
|||
"__gcov_merge_single", \
|
||||
"__gcov_merge_add", \
|
||||
"__gcov_merge_ior"}
|
||||
|
||||
|
||||
/* Convert a counter index to a tag. */
|
||||
#define GCOV_TAG_FOR_COUNTER(COUNT) \
|
||||
(GCOV_TAG_COUNTER_BASE + ((gcov_unsigned_t)(COUNT) << 17))
|
||||
|
@ -438,7 +438,7 @@ struct gcov_info
|
|||
|
||||
gcov_unsigned_t stamp; /* uniquifying time stamp */
|
||||
const char *filename; /* output file name */
|
||||
|
||||
|
||||
unsigned n_functions; /* number of functions */
|
||||
const struct gcov_fn_info *functions; /* table of functions */
|
||||
|
||||
|
@ -469,7 +469,7 @@ extern void __gcov_merge_delta (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
|
|||
extern void __gcov_merge_ior (gcov_type *, unsigned) ATTRIBUTE_HIDDEN;
|
||||
|
||||
/* The profiler functions. */
|
||||
extern void __gcov_interval_profiler (gcov_type *, gcov_type, int, unsigned);
|
||||
extern void __gcov_interval_profiler (gcov_type *, gcov_type, int, unsigned);
|
||||
extern void __gcov_pow2_profiler (gcov_type *, gcov_type);
|
||||
extern void __gcov_one_value_profiler (gcov_type *, gcov_type);
|
||||
extern void __gcov_indirect_call_profiler (gcov_type *, gcov_type, void *, void *);
|
||||
|
|
10
gcc/gcov.c
10
gcc/gcov.c
|
@ -684,7 +684,7 @@ create_file_names (const char *file_name)
|
|||
*cptr = 0;
|
||||
|
||||
length = strlen (name);
|
||||
|
||||
|
||||
bbg_file_name = XNEWVEC (char, length + strlen (GCOV_NOTE_SUFFIX) + 1);
|
||||
strcpy (bbg_file_name, name);
|
||||
strcpy (bbg_file_name + length, GCOV_NOTE_SUFFIX);
|
||||
|
@ -721,7 +721,7 @@ find_source (const char *file_name)
|
|||
src->index = source_index++;
|
||||
src->next = sources;
|
||||
sources = src;
|
||||
|
||||
|
||||
if (!stat (file_name, &status))
|
||||
src->file_time = status.st_mtime;
|
||||
}
|
||||
|
@ -1043,7 +1043,7 @@ read_count_file (void)
|
|||
|
||||
GCOV_UNSIGNED2STRING (v, version);
|
||||
GCOV_UNSIGNED2STRING (e, GCOV_VERSION);
|
||||
|
||||
|
||||
fnotice (stderr, "%s:version '%.4s', prefer version '%.4s'\n",
|
||||
da_file_name, v, e);
|
||||
}
|
||||
|
@ -1896,11 +1896,11 @@ output_lines (FILE *gcov_file, const source_t *src)
|
|||
{
|
||||
arc_t *arc = fn->blocks[fn->num_blocks - 1].pred;
|
||||
gcov_type return_count = fn->blocks[fn->num_blocks - 1].count;
|
||||
|
||||
|
||||
for (; arc; arc = arc->pred_next)
|
||||
if (arc->fake)
|
||||
return_count -= arc->count;
|
||||
|
||||
|
||||
fprintf (gcov_file, "function %s", fn->name);
|
||||
fprintf (gcov_file, " called %s",
|
||||
format_gcov (fn->blocks[0].count, 0, -1));
|
||||
|
|
32
gcc/gcse.c
32
gcc/gcse.c
|
@ -214,7 +214,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
|
||||
In addition, expressions in REG_EQUAL notes are candidates for GXSE-ing.
|
||||
This allows PRE to hoist expressions that are expressed in multiple insns,
|
||||
such as comprex address calculations (e.g. for PIC code, or loads with a
|
||||
such as comprex address calculations (e.g. for PIC code, or loads with a
|
||||
high part and as lowe part).
|
||||
|
||||
PRE handles moving invariant expressions out of loops (by treating them as
|
||||
|
@ -843,17 +843,17 @@ can_assign_to_reg_without_clobbers_p (rtx x)
|
|||
valid. */
|
||||
PUT_MODE (SET_DEST (PATTERN (test_insn)), GET_MODE (x));
|
||||
SET_SRC (PATTERN (test_insn)) = x;
|
||||
|
||||
|
||||
icode = recog (PATTERN (test_insn), test_insn, &num_clobbers);
|
||||
if (icode < 0)
|
||||
return false;
|
||||
|
||||
|
||||
if (num_clobbers > 0 && added_clobbers_hard_reg_p (icode))
|
||||
return false;
|
||||
|
||||
|
||||
if (targetm.cannot_copy_insn_p && targetm.cannot_copy_insn_p (test_insn))
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2094,7 +2094,7 @@ compute_transp (const_rtx x, int indx, sbitmap *bmap, int set_p)
|
|||
|
||||
/* Now iterate over the blocks which have memory modifications
|
||||
but which do not have any calls. */
|
||||
EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set,
|
||||
EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set,
|
||||
blocks_with_calls,
|
||||
0, bb_index, bi)
|
||||
{
|
||||
|
@ -2993,7 +2993,7 @@ bypass_block (basic_block bb, rtx setcc, rtx jump)
|
|||
for (ei = ei_start (bb->preds); (e = ei_safe_edge (ei)); )
|
||||
{
|
||||
removed_p = 0;
|
||||
|
||||
|
||||
if (e->flags & EDGE_COMPLEX)
|
||||
{
|
||||
ei_next (&ei);
|
||||
|
@ -3328,7 +3328,7 @@ pre_expr_reaches_here_p_work (basic_block occr_bb, struct expr *expr, basic_bloc
|
|||
{
|
||||
edge pred;
|
||||
edge_iterator ei;
|
||||
|
||||
|
||||
FOR_EACH_EDGE (pred, ei, bb->preds)
|
||||
{
|
||||
basic_block pred_bb = pred->src;
|
||||
|
@ -3410,7 +3410,7 @@ process_insert_insn (struct expr *expr)
|
|||
if (insn_invalid_p (insn))
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
pat = get_insns ();
|
||||
end_sequence ();
|
||||
|
@ -4980,7 +4980,7 @@ one_cprop_pass (void)
|
|||
FIXME: This local pass should not be necessary after CSE (but for
|
||||
some reason it still is). It is also (proven) not necessary
|
||||
to run the local pass right after FWPWOP.
|
||||
|
||||
|
||||
FIXME: The global analysis would not get into infinite loops if it
|
||||
would use the DF solver (via df_simple_dataflow) instead of
|
||||
the solver implemented in this file. */
|
||||
|
@ -5127,8 +5127,8 @@ struct rtl_opt_pass pass_rtl_cprop =
|
|||
{
|
||||
RTL_PASS,
|
||||
"cprop", /* name */
|
||||
gate_rtl_cprop, /* gate */
|
||||
execute_rtl_cprop, /* execute */
|
||||
gate_rtl_cprop, /* gate */
|
||||
execute_rtl_cprop, /* execute */
|
||||
NULL, /* sub */
|
||||
NULL, /* next */
|
||||
0, /* static_pass_number */
|
||||
|
@ -5148,8 +5148,8 @@ struct rtl_opt_pass pass_rtl_pre =
|
|||
{
|
||||
RTL_PASS,
|
||||
"rtl pre", /* name */
|
||||
gate_rtl_pre, /* gate */
|
||||
execute_rtl_pre, /* execute */
|
||||
gate_rtl_pre, /* gate */
|
||||
execute_rtl_pre, /* execute */
|
||||
NULL, /* sub */
|
||||
NULL, /* next */
|
||||
0, /* static_pass_number */
|
||||
|
@ -5169,8 +5169,8 @@ struct rtl_opt_pass pass_rtl_hoist =
|
|||
{
|
||||
RTL_PASS,
|
||||
"hoist", /* name */
|
||||
gate_rtl_hoist, /* gate */
|
||||
execute_rtl_hoist, /* execute */
|
||||
gate_rtl_hoist, /* gate */
|
||||
execute_rtl_hoist, /* execute */
|
||||
NULL, /* sub */
|
||||
NULL, /* next */
|
||||
0, /* static_pass_number */
|
||||
|
|
|
@ -256,7 +256,7 @@ main (int argc, char **argv)
|
|||
printf (" define_insn_reservation will be changed after\n");
|
||||
printf (" last call of dfa_start. */\n");
|
||||
printf ("extern void dfa_clean_insn_cache (void);\n\n");
|
||||
printf ("extern void dfa_clear_single_insn_cache (rtx);\n\n");
|
||||
printf ("extern void dfa_clear_single_insn_cache (rtx);\n\n");
|
||||
printf ("/* Initiate and finish work with DFA. They should be\n");
|
||||
printf (" called as the first and the last interface\n");
|
||||
printf (" functions. */\n");
|
||||
|
|
|
@ -1941,22 +1941,22 @@ evaluate_eq_attr (rtx exp, rtx value, int insn_code, int insn_index)
|
|||
else
|
||||
newexp = false_rtx;
|
||||
break;
|
||||
|
||||
|
||||
case SYMBOL_REF:
|
||||
{
|
||||
char *p;
|
||||
char string[256];
|
||||
|
||||
|
||||
gcc_assert (GET_CODE (exp) == EQ_ATTR);
|
||||
gcc_assert (strlen (XSTR (exp, 0)) + strlen (XSTR (exp, 1)) + 2
|
||||
<= 256);
|
||||
|
||||
|
||||
strcpy (string, XSTR (exp, 0));
|
||||
strcat (string, "_");
|
||||
strcat (string, XSTR (exp, 1));
|
||||
for (p = string; *p; p++)
|
||||
*p = TOUPPER (*p);
|
||||
|
||||
|
||||
newexp = attr_rtx (EQ, value,
|
||||
attr_rtx (SYMBOL_REF,
|
||||
DEF_ATTR_STRING (string)));
|
||||
|
@ -1967,12 +1967,12 @@ evaluate_eq_attr (rtx exp, rtx value, int insn_code, int insn_index)
|
|||
/* We construct an IOR of all the cases for which the
|
||||
requested attribute value is present. Since we start with
|
||||
FALSE, if it is not present, FALSE will be returned.
|
||||
|
||||
|
||||
Each case is the AND of the NOT's of the previous conditions with the
|
||||
current condition; in the default case the current condition is TRUE.
|
||||
|
||||
|
||||
For each possible COND value, call ourselves recursively.
|
||||
|
||||
|
||||
The extra TRUE and FALSE expressions will be eliminated by another
|
||||
call to the simplification routine. */
|
||||
|
||||
|
@ -2108,7 +2108,7 @@ simplify_and_tree (rtx exp, rtx *pterm, int insn_code, int insn_index)
|
|||
|
||||
if (attr_alt_subset_p (exp, *pterm))
|
||||
*pterm = true_rtx;
|
||||
|
||||
|
||||
return exp;
|
||||
}
|
||||
|
||||
|
@ -4307,7 +4307,7 @@ gen_insn_reserv (rtx def)
|
|||
decl->insn_num = n_insn_reservs;
|
||||
decl->bypassed = false;
|
||||
decl->next = 0;
|
||||
|
||||
|
||||
*last_insn_reserv_p = decl;
|
||||
last_insn_reserv_p = &decl->next;
|
||||
n_insn_reservs++;
|
||||
|
@ -4392,7 +4392,7 @@ make_automaton_attrs (void)
|
|||
|
||||
code_exp = rtx_alloc (COND);
|
||||
lats_exp = rtx_alloc (COND);
|
||||
|
||||
|
||||
XVEC (code_exp, 0) = rtvec_alloc (n_insn_reservs * 2);
|
||||
XVEC (lats_exp, 0) = rtvec_alloc (n_insn_reservs * 2);
|
||||
|
||||
|
@ -4405,7 +4405,7 @@ make_automaton_attrs (void)
|
|||
{
|
||||
XVECEXP (code_exp, 0, i) = decl->condexp;
|
||||
XVECEXP (lats_exp, 0, i) = decl->condexp;
|
||||
|
||||
|
||||
XVECEXP (code_exp, 0, i+1) = make_numeric_value (decl->insn_num);
|
||||
XVECEXP (lats_exp, 0, i+1) = make_numeric_value (decl->default_latency);
|
||||
}
|
||||
|
|
|
@ -2382,7 +2382,7 @@ insert_bypass (struct bypass_decl *bypass)
|
|||
struct bypass_decl *curr, *last;
|
||||
struct insn_reserv_decl *out_insn_reserv = bypass->out_insn_reserv;
|
||||
struct insn_reserv_decl *in_insn_reserv = bypass->in_insn_reserv;
|
||||
|
||||
|
||||
for (curr = out_insn_reserv->bypass_list, last = NULL;
|
||||
curr != NULL;
|
||||
last = curr, curr = curr->next)
|
||||
|
@ -2420,7 +2420,7 @@ insert_bypass (struct bypass_decl *bypass)
|
|||
last = curr;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (last == NULL)
|
||||
{
|
||||
|
@ -2936,7 +2936,7 @@ process_regexp_cycles (regexp_t regexp, int max_start_cycle,
|
|||
{
|
||||
int max_cycle = 0;
|
||||
int min_cycle = 0;
|
||||
|
||||
|
||||
for (i = 0; i < REGEXP_ALLOF (regexp)->regexps_num; i++)
|
||||
{
|
||||
process_regexp_cycles (REGEXP_ALLOF (regexp)->regexps [i],
|
||||
|
@ -2956,7 +2956,7 @@ process_regexp_cycles (regexp_t regexp, int max_start_cycle,
|
|||
{
|
||||
int max_cycle = 0;
|
||||
int min_cycle = 0;
|
||||
|
||||
|
||||
for (i = 0; i < REGEXP_ONEOF (regexp)->regexps_num; i++)
|
||||
{
|
||||
process_regexp_cycles (REGEXP_ONEOF (regexp)->regexps [i],
|
||||
|
@ -4779,7 +4779,7 @@ transform_3 (regexp_t regexp)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (allof_length == 1)
|
||||
REGEXP_SEQUENCE (result)->regexps [i] = allof_op;
|
||||
else
|
||||
|
@ -4963,7 +4963,7 @@ store_alt_unit_usage (regexp_t regexp, regexp_t unit, int cycle,
|
|||
length = (cycle + 1) * REGEXP_ONEOF (regexp)->regexps_num;
|
||||
while (VEC_length (unit_usage_t, cycle_alt_unit_usages) < length)
|
||||
VEC_safe_push (unit_usage_t, heap, cycle_alt_unit_usages, 0);
|
||||
|
||||
|
||||
index = cycle * REGEXP_ONEOF (regexp)->regexps_num + alt_num;
|
||||
prev = NULL;
|
||||
for (curr = VEC_index (unit_usage_t, cycle_alt_unit_usages, index);
|
||||
|
@ -5078,14 +5078,14 @@ check_regexp_units_distribution (const char *insn_reserv_name,
|
|||
gcc_assert (unit->mode == rm_nothing);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case rm_unit:
|
||||
store_alt_unit_usage (regexp, allof, j, i);
|
||||
break;
|
||||
|
||||
|
||||
case rm_nothing:
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
@ -5101,10 +5101,10 @@ check_regexp_units_distribution (const char *insn_reserv_name,
|
|||
case rm_unit:
|
||||
store_alt_unit_usage (regexp, unit, 0, i);
|
||||
break;
|
||||
|
||||
|
||||
case rm_nothing:
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
@ -5271,7 +5271,7 @@ process_seq_for_forming_states (regexp_t regexp, automaton_t automaton,
|
|||
set_state_reserv (state_being_formed, curr_cycle,
|
||||
REGEXP_UNIT (regexp)->unit_decl->unit_num);
|
||||
return curr_cycle;
|
||||
|
||||
|
||||
case rm_sequence:
|
||||
for (i = 0; i < REGEXP_SEQUENCE (regexp)->regexps_num; i++)
|
||||
curr_cycle
|
||||
|
@ -5283,7 +5283,7 @@ process_seq_for_forming_states (regexp_t regexp, automaton_t automaton,
|
|||
{
|
||||
int finish_cycle = 0;
|
||||
int cycle;
|
||||
|
||||
|
||||
for (i = 0; i < REGEXP_ALLOF (regexp)->regexps_num; i++)
|
||||
{
|
||||
cycle = process_seq_for_forming_states (REGEXP_ALLOF (regexp)
|
||||
|
@ -5819,7 +5819,7 @@ cache_presence (state_t state)
|
|||
unsigned int sz;
|
||||
sz = (description->query_units_num + sizeof (int) * CHAR_BIT - 1)
|
||||
/ (sizeof (int) * CHAR_BIT);
|
||||
|
||||
|
||||
state->presence_signature = XCREATENODEVEC (unsigned int, sz);
|
||||
for (i = 0; i < description->units_num; i++)
|
||||
if (units_array [i]->query_p)
|
||||
|
@ -5965,7 +5965,7 @@ partition_equiv_class (state_t first_state, int odd_iteration_flag,
|
|||
curr_state = next_state)
|
||||
{
|
||||
next_state = curr_state->next_equiv_class_state;
|
||||
if (state_is_differed (curr_state, first_state,
|
||||
if (state_is_differed (curr_state, first_state,
|
||||
odd_iteration_flag))
|
||||
{
|
||||
/* Remove curr state from the class equivalence. */
|
||||
|
@ -6705,11 +6705,11 @@ form_regexp (regexp_t regexp)
|
|||
const char *name = (regexp->mode == rm_unit
|
||||
? REGEXP_UNIT (regexp)->name
|
||||
: REGEXP_RESERV (regexp)->name);
|
||||
|
||||
|
||||
obstack_grow (&irp, name, strlen (name));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case rm_sequence:
|
||||
for (i = 0; i < REGEXP_SEQUENCE (regexp)->regexps_num; i++)
|
||||
{
|
||||
|
@ -6735,7 +6735,7 @@ form_regexp (regexp_t regexp)
|
|||
}
|
||||
obstack_1grow (&irp, ')');
|
||||
break;
|
||||
|
||||
|
||||
case rm_oneof:
|
||||
for (i = 0; i < REGEXP_ONEOF (regexp)->regexps_num; i++)
|
||||
{
|
||||
|
@ -6748,11 +6748,11 @@ form_regexp (regexp_t regexp)
|
|||
obstack_1grow (&irp, ')');
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case rm_repeat:
|
||||
{
|
||||
char digits [30];
|
||||
|
||||
|
||||
if (REGEXP_REPEAT (regexp)->regexp->mode == rm_sequence
|
||||
|| REGEXP_REPEAT (regexp)->regexp->mode == rm_allof
|
||||
|| REGEXP_REPEAT (regexp)->regexp->mode == rm_oneof)
|
||||
|
@ -7654,7 +7654,7 @@ output_dead_lock_vect (automaton_t automaton)
|
|||
output_states_vect = 0;
|
||||
pass_states (automaton, add_states_vect_el);
|
||||
|
||||
VEC_safe_grow (vect_el_t, heap, dead_lock_vect,
|
||||
VEC_safe_grow (vect_el_t, heap, dead_lock_vect,
|
||||
VEC_length (state_t, output_states_vect));
|
||||
for (i = 0; i < VEC_length (state_t, output_states_vect); i++)
|
||||
{
|
||||
|
@ -7709,7 +7709,7 @@ output_reserved_units_table (automaton_t automaton)
|
|||
* state_byte_size);
|
||||
|
||||
reserved_units_table = VEC_alloc (vect_el_t, heap, reserved_units_size);
|
||||
|
||||
|
||||
for (i = 0; i < reserved_units_size; i++)
|
||||
VEC_quick_push (vect_el_t, reserved_units_table, 0);
|
||||
for (n = 0; n < VEC_length (state_t, output_states_vect); n++)
|
||||
|
@ -8218,7 +8218,7 @@ output_min_insn_conflict_delay_func (void)
|
|||
fprintf (output_file, "}\n\n");
|
||||
}
|
||||
|
||||
/* Output the array holding default latency values. These are used in
|
||||
/* Output the array holding default latency values. These are used in
|
||||
insn_latency and maximal_insn_latency function implementations. */
|
||||
static void
|
||||
output_default_latencies (void)
|
||||
|
@ -8442,7 +8442,7 @@ output_print_reservation_func (void)
|
|||
{
|
||||
gcc_assert (j == DECL_INSN_RESERV (decl)->insn_num);
|
||||
j++;
|
||||
|
||||
|
||||
fprintf (output_file, "\n \"%s\",",
|
||||
regexp_representation (DECL_INSN_RESERV (decl)->regexp));
|
||||
finish_regexp_representation ();
|
||||
|
|
|
@ -34,21 +34,21 @@ dosum (const char *file)
|
|||
FILE *f;
|
||||
unsigned char result[16];
|
||||
int i;
|
||||
|
||||
|
||||
f = fopen (file, "rb");
|
||||
if (!f)
|
||||
{
|
||||
fprintf (stderr, "opening %s: %s\n", file, xstrerror (errno));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
||||
/* Some executable formats have timestamps in the first 16 bytes, yuck. */
|
||||
if (fseek (f, 16, SEEK_SET) != 0)
|
||||
{
|
||||
fprintf (stderr, "seeking in %s: %s\n", file, xstrerror (errno));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
||||
if (md5_stream (f, result) != 0
|
||||
|| fclose (f) != 0)
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ static void gen_peephole (rtx);
|
|||
static void gen_peephole2 (rtx);
|
||||
|
||||
/* RECOG_P will be nonzero if this pattern was seen in a context where it will
|
||||
be used to recognize, rather than just generate an insn.
|
||||
be used to recognize, rather than just generate an insn.
|
||||
|
||||
NON_PC_SET_SRC will be nonzero if this pattern was seen in a SET_SRC
|
||||
of a SET whose destination is not (pc). */
|
||||
|
@ -287,13 +287,13 @@ main (int argc, char **argv)
|
|||
desc = read_md_rtx (&line_no, &insn_code_number);
|
||||
if (desc == NULL)
|
||||
break;
|
||||
|
||||
switch (GET_CODE (desc))
|
||||
|
||||
switch (GET_CODE (desc))
|
||||
{
|
||||
case DEFINE_INSN:
|
||||
gen_insn (desc);
|
||||
break;
|
||||
|
||||
|
||||
case DEFINE_EXPAND:
|
||||
gen_expand (desc);
|
||||
break;
|
||||
|
|
|
@ -195,7 +195,7 @@ gen_insn (int line_no, rtx insn)
|
|||
int len;
|
||||
int truth = maybe_eval_c_test (XSTR (insn, 2));
|
||||
|
||||
lt = strchr (name, '<');
|
||||
lt = strchr (name, '<');
|
||||
if (lt && strchr (lt + 1, '>'))
|
||||
{
|
||||
message_with_line (line_no, "unresolved iterator");
|
||||
|
@ -203,7 +203,7 @@ gen_insn (int line_no, rtx insn)
|
|||
return;
|
||||
}
|
||||
|
||||
gt = strchr (name, '>');
|
||||
gt = strchr (name, '>');
|
||||
if (lt || gt)
|
||||
{
|
||||
message_with_line (line_no,
|
||||
|
|
|
@ -695,7 +695,7 @@ type (options_p *optsp, bool nested)
|
|||
case UNION:
|
||||
{
|
||||
options_p opts = 0;
|
||||
/* GTY annotations follow attribute syntax
|
||||
/* GTY annotations follow attribute syntax
|
||||
GTY_BEFORE_ID is for union/struct declarations
|
||||
GTY_AFTER_ID is for variable declarations. */
|
||||
enum {
|
||||
|
@ -729,22 +729,22 @@ type (options_p *optsp, bool nested)
|
|||
is_gty = GTY_AFTER_ID;
|
||||
opts = gtymarker_opt ();
|
||||
}
|
||||
|
||||
if (is_gty)
|
||||
|
||||
if (is_gty)
|
||||
{
|
||||
if (token () == '{')
|
||||
{
|
||||
pair_p fields;
|
||||
|
||||
if (is_gty == GTY_AFTER_ID)
|
||||
if (is_gty == GTY_AFTER_ID)
|
||||
parse_error ("GTY must be specified before identifier");
|
||||
|
||||
|
||||
advance ();
|
||||
fields = struct_field_seq ();
|
||||
require ('}');
|
||||
return new_structure (s, is_union, &lexer_line, fields, opts);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (token () == '{')
|
||||
consume_balanced ('{', '}');
|
||||
if (opts)
|
||||
|
|
|
@ -463,7 +463,7 @@ read_input_list (const char *listname)
|
|||
things there are. (We do not bother resizing the arrays down.) */
|
||||
num_lang_dirs = langno;
|
||||
/* Add the plugin files if provided. */
|
||||
if (plugin_files)
|
||||
if (plugin_files)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < nb_plugin_files; i++)
|
||||
|
@ -976,7 +976,7 @@ write_rtx_next (void)
|
|||
{
|
||||
outf_p f = get_output_file_with_visibility (NULL);
|
||||
int i;
|
||||
if (!f)
|
||||
if (!f)
|
||||
return;
|
||||
|
||||
oprintf (f, "\n/* Used to implement the RTX_NEXT macro. */\n");
|
||||
|
@ -1393,7 +1393,7 @@ set_gc_used_type (type_p t, enum gc_used_enum level, type_p param[NUM_PARAM])
|
|||
&length, &skip, &nested_ptr);
|
||||
|
||||
if (nested_ptr && f->type->kind == TYPE_POINTER)
|
||||
set_gc_used_type (nested_ptr, GC_POINTED_TO,
|
||||
set_gc_used_type (nested_ptr, GC_POINTED_TO,
|
||||
pass_param ? param : NULL);
|
||||
else if (length && f->type->kind == TYPE_POINTER)
|
||||
set_gc_used_type (f->type->u.p, GC_USED, NULL);
|
||||
|
@ -1503,7 +1503,7 @@ create_file (const char *name, const char *oname)
|
|||
return f;
|
||||
}
|
||||
|
||||
/* Print, like fprintf, to O.
|
||||
/* Print, like fprintf, to O.
|
||||
N.B. You might think this could be implemented more efficiently
|
||||
with vsnprintf(). Unfortunately, there are C libraries that
|
||||
provide that function but without the C99 semantics for its return
|
||||
|
@ -1517,7 +1517,7 @@ oprintf (outf_p o, const char *format, ...)
|
|||
|
||||
/* In plugin mode, the O could be a NULL pointer, so avoid crashing
|
||||
in that case. */
|
||||
if (!o)
|
||||
if (!o)
|
||||
return;
|
||||
|
||||
va_start (ap, format);
|
||||
|
@ -1564,7 +1564,7 @@ open_base_files (void)
|
|||
{
|
||||
/* The order of files here matters very much. */
|
||||
static const char *const ifiles [] = {
|
||||
"config.h", "system.h", "coretypes.h", "tm.h", "varray.h",
|
||||
"config.h", "system.h", "coretypes.h", "tm.h", "varray.h",
|
||||
"hashtab.h", "splay-tree.h", "obstack.h", "bitmap.h", "input.h",
|
||||
"tree.h", "rtl.h", "function.h", "insn-config.h", "expr.h",
|
||||
"hard-reg-set.h", "basic-block.h", "cselib.h", "insn-addr.h",
|
||||
|
@ -1593,7 +1593,7 @@ static const char *
|
|||
get_file_realbasename (const char *f)
|
||||
{
|
||||
const char * lastslash = strrchr (f, '/');
|
||||
|
||||
|
||||
return (lastslash != NULL) ? lastslash + 1 : f;
|
||||
}
|
||||
|
||||
|
@ -1635,7 +1635,7 @@ get_prefix_langdir_index (const char *f)
|
|||
{
|
||||
const char * langdir = lang_dir_names [lang_index];
|
||||
size_t langdir_len = strlen (langdir);
|
||||
|
||||
|
||||
if (f_len > langdir_len
|
||||
&& IS_DIR_SEPARATOR (f[langdir_len])
|
||||
&& memcmp (f, langdir, langdir_len) == 0)
|
||||
|
@ -1676,7 +1676,7 @@ get_file_gtfilename (const char *f)
|
|||
|
||||
const char *basename = get_file_realbasename (f);
|
||||
const char *langdir = get_file_langdir (f);
|
||||
|
||||
|
||||
char * result =
|
||||
(langdir ? xasprintf ("gt-%s-%s", langdir, basename)
|
||||
: xasprintf ("gt-%s", basename));
|
||||
|
@ -1735,7 +1735,7 @@ get_output_file_with_visibility (const char *input_file)
|
|||
|| (len > 2 && memcmp (basename+len-2, ".y", 2) == 0)
|
||||
|| (len > 3 && memcmp (basename+len-3, ".in", 3) == 0))
|
||||
{
|
||||
output_name = get_file_gtfilename (input_file);
|
||||
output_name = get_file_gtfilename (input_file);
|
||||
for_name = basename;
|
||||
}
|
||||
/* Some headers get used by more than one front-end; hence, it
|
||||
|
@ -1761,7 +1761,7 @@ get_output_file_with_visibility (const char *input_file)
|
|||
else if (strncmp (basename, "objc", 4) == 0 && IS_DIR_SEPARATOR (basename[4])
|
||||
&& strcmp (basename + 5, "objc-act.h") == 0)
|
||||
output_name = "gt-objc-objc-act.h", for_name = "objc/objc-act.c";
|
||||
else
|
||||
else
|
||||
{
|
||||
int lang_index = get_prefix_langdir_index (basename);
|
||||
|
||||
|
@ -2172,9 +2172,9 @@ walk_type (type_p t, struct walk_type_data *d)
|
|||
d->indent += 2;
|
||||
d->val = xasprintf ("x%d", d->counter++);
|
||||
oprintf (d->of, "%*s%s %s * %s%s =\n", d->indent, "",
|
||||
(nested_ptr_d->type->kind == TYPE_UNION
|
||||
? "union" : "struct"),
|
||||
nested_ptr_d->type->u.s.tag,
|
||||
(nested_ptr_d->type->kind == TYPE_UNION
|
||||
? "union" : "struct"),
|
||||
nested_ptr_d->type->u.s.tag,
|
||||
d->fn_wants_lvalue ? "" : "const ",
|
||||
d->val);
|
||||
oprintf (d->of, "%*s", d->indent + 2, "");
|
||||
|
@ -2262,7 +2262,7 @@ walk_type (type_p t, struct walk_type_data *d)
|
|||
else
|
||||
oprintf (d->of, "%s", t->u.a.len);
|
||||
oprintf (d->of, ");\n");
|
||||
|
||||
|
||||
oprintf (d->of, "%*sfor (i%d = 0; i%d != l%d; i%d++) {\n",
|
||||
d->indent, "",
|
||||
loopcounter, loopcounter, loopcounter, loopcounter);
|
||||
|
@ -2790,8 +2790,8 @@ write_types (outf_p output_header, type_p structures, type_p param_structs,
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* At last we emit the functions code. */
|
||||
|
||||
/* At last we emit the functions code. */
|
||||
oprintf (output_header, "\n/* functions code */\n");
|
||||
for (s = structures; s; s = s->next)
|
||||
if (s->gc_used == GC_POINTED_TO
|
||||
|
@ -2807,7 +2807,7 @@ write_types (outf_p output_header, type_p structures, type_p param_structs,
|
|||
break;
|
||||
if (opt)
|
||||
continue;
|
||||
|
||||
|
||||
if (s->kind == TYPE_LANG_STRUCT)
|
||||
{
|
||||
type_p ss;
|
||||
|
@ -2934,7 +2934,7 @@ write_local (outf_p output_header, type_p structures, type_p param_structs)
|
|||
{
|
||||
type_p s;
|
||||
|
||||
if (!output_header)
|
||||
if (!output_header)
|
||||
return;
|
||||
oprintf (output_header, "\n/* Local pointer-walking routines. */\n");
|
||||
for (s = structures; s; s = s->next)
|
||||
|
@ -3021,7 +3021,7 @@ write_enum_defn (type_p structures, type_p param_structs)
|
|||
{
|
||||
type_p s;
|
||||
|
||||
if (!header_file)
|
||||
if (!header_file)
|
||||
return;
|
||||
oprintf (header_file, "\n/* Enumeration of types known. */\n");
|
||||
oprintf (header_file, "enum gt_types_enum {\n");
|
||||
|
@ -3073,7 +3073,7 @@ static void
|
|||
put_mangled_filename (outf_p f, const char *fn)
|
||||
{
|
||||
const char *name = get_output_file_name (fn);
|
||||
if (!f || !name)
|
||||
if (!f || !name)
|
||||
return;
|
||||
for (; *name != 0; name++)
|
||||
if (ISALNUM (*name))
|
||||
|
@ -3719,11 +3719,11 @@ main (int argc, char **argv)
|
|||
strcpy (plugin_files[i], name);
|
||||
}
|
||||
}
|
||||
else if (argc == 3)
|
||||
else if (argc == 3)
|
||||
{
|
||||
srcdir = argv[1];
|
||||
inputlist = argv[2];
|
||||
}
|
||||
}
|
||||
else
|
||||
fatal ("usage: gengtype [-P pluginout.h] srcdir input-list "
|
||||
"[file1 file2 ... fileN]");
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue