2009-07-31 04:43:11 +02:00
|
|
|
/* Conversion of SESE regions to Polyhedra.
|
2017-01-01 13:07:43 +01:00
|
|
|
Copyright (C) 2009-2017 Free Software Foundation, Inc.
|
2009-07-31 04:43:11 +02:00
|
|
|
Contributed by Sebastian Pop <sebastian.pop@amd.com>.
|
|
|
|
|
|
|
|
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/>. */
|
|
|
|
|
2015-11-23 15:23:59 +01:00
|
|
|
#define USES_ISL
|
|
|
|
|
2009-07-31 04:43:11 +02:00
|
|
|
#include "config.h"
|
2012-07-02 13:43:46 +02:00
|
|
|
|
2014-08-18 17:42:11 +02:00
|
|
|
#ifdef HAVE_isl
|
2012-07-02 13:43:46 +02:00
|
|
|
|
2009-07-31 04:43:11 +02:00
|
|
|
#include "system.h"
|
|
|
|
#include "coretypes.h"
|
2015-07-08 02:53:03 +02:00
|
|
|
#include "backend.h"
|
2015-07-10 14:13:06 +02:00
|
|
|
#include "cfghooks.h"
|
genattrtab.c (write_header): Include hash-set.h...
2015-01-09 Michael Collison <michael.collison@linaro.org>
* genattrtab.c (write_header): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-attrtab.c.
* genautomata.c (main) : Include hash-set.h, macInclude hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-automata.c.
* genemit.c (main): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-emit.c.
* gengtype.c (open_base_files): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
gtype-desc.c.
* genopinit.c (main): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-opinit.c.
* genoutput.c (output_prologue): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-output.c.
* genpeep.c (main): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-peep.c.
* genpreds.c (write_insn_preds_c): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-preds.c.
* optc-save-gen-awk: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
options-save.c.
* opth-gen.awk: Change include guard from GCC_C_COMMON_H to GCC_C_COMMON_C
when generating options.h.
* ada/gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* ada/gcc-interface/decl.c: ditto.
* ada/gcc-interface/misc.c: ditto.
* ada/gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* ada/gcc-interface/trans.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
fold-const.h, wide-int.h, inchash.h due to
flattening of tree.h.
* ada/gcc-interface/utils.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* ada/gcc-interface/utils2.c: ditto.
* alias.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* asan.c: ditto.
* attribs.c: ditto.
* auto-inc-dec.c: ditto.
* auto-profile.c: ditto
* bb-reorder.c: ditto.
* bt-load.c: Include symtab.h due to flattening of tree.h.
* builtins.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c/c-array-notation.c: ditto.
* c/c-aux-info.c: ditto.
* c/c-convert.c: ditto.
* c/c-decl.c: ditto.
* c/c-errors.c: ditto.
* c/c-lang.c: dittoxs.
* c/c-objc-common.c: ditto.
* c/c-parser.c: ditto.
* c/c-typeck.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, inchash.h, real.h and
fixed-value.h due to flattening of tree.h.
* calls.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* ccmp.c: ditto.
* c-family/array-notation-common.c: ditto.
* c-family/c-ada-spec.c: ditto.
* c-family/c-cilkplus.c: ditto.
* c-family/c-common.c: Include input.h due to flattening of tree.h.
Define macro GCC_C_COMMON_C.
* c-family/c-common.h: Flatten tree.h header files into c-common.h.
Remove include of tree-core.h.
* c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-family/c-dump.c: ditto.
* c-family/c-format.c: Flatten tree.h header files into c-common.h.
* c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-family/c-dump.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-family/c-format.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, inchash.h and real.h due to
flattening of tree.h.
* c-family/c-gimplify.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-family/cilk.c: ditto.
* c-family/c-lex.c: ditto.
* c-family/c-omp.c: ditto.
* c-family/c-opts.c: ditto.
* c-family/c-pch.c: ditto.
* c-family/c-ppoutput.c: ditto.
* c-family/c-pragma.c: ditto.
* c-family/c-pretty-print.c: ditto.
* c-family/c-semantics.c: ditto.
* c-family/c-ubsan.c: ditto.
* c-family/stub-objc.c: ditto.
* cfgbuild.c: ditto.
* cfg.c: ditto.
* cfgcleanup.c: ditto.
* cfgexpand.c: ditto.
* cfghooks.c: ditto.
* cfgloop.c: Include symtab.h, fold-const.h, and
inchash.h due to flattening of tree.h.
* cfgloopmanip.c: ditto.
* cfgrtl.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* cgraphbuild.c: ditto.
* cgraph.c: ditto.
* cgraphclones.c: ditto.
* cgraphunit.c: ditto.
* cilk-common.c: ditto.
* combine.c: ditto.
* combine-stack-adj.c: Include symbol.h due to flattening of tree.h.
* config/aarch64/aarch64-builtins.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/aarch64/aarch64.c: ditto.
* config/alpha/alpha.c: ditto.
* config/arc/arc.c: ditto.
* config/arm/aarch-common.c: ditto.
* config/arm/arm-builtins.c: ditto.
* config/arm/arm.c: ditto.
* config/arm/arm-c.c: ditto.
* config/avr/avr.c: ditto.
* config/avr/avr-c.c: ditto.
* config/avr/avr-log.c: ditto.
* config/bfin/bfin.c: ditto.
* config/c6x/c6x.c: ditto.
* config/cr16/cr16.c: ditto.
* config/cris/cris.c: ditto.
* config/darwin.c: ditto.
* config/darwin-c.c: ditto.
* config/default-c.c: ditto.
* config/epiphany/epiphany.c: ditto.
* config/fr30/fr30.c: ditto.
* config/frv/frv.c: ditto.
* config/glibc-c.c: ditto.
* config/h8300/h8300.c: ditto.
* config/i386/i386.c: ditto.
* config/i386/i386-c.c: ditto.
* config/i386/msformat.c: ditto.
* config/i386/winnt.c: ditto.
* config/i386/winnt-cxx.c: ditto.
* config/i386/winnt-stubs.c: ditto.
* config/ia64/ia64.c: ditto.
* config/ia64/ia64-c.c: ditto.
* config/iq2000/iq2000.c: ditto.
* config/lm32/lm32.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/m32c/m32c.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/m32c/m32c-pragma.c: ditto.
* config/m32c/m32cr.c: ditto.
* config/m68/m68k.c: ditto.
* config/mcore/mcore.c: ditto.
* config/mep/mep.c: ditto.
* config/mep/mep-pragma.c: ditto.
* config/microblaze/microblaze.c: ditto.
* config/microblaze/microblaze-c.c: ditto.
* config/mips/mips.c: ditto.
* config/mmix/mmix.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/mn10300/mn10300.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/moxie/moxie.c: ditto.
* config/msp430/msp430.c: ditto.
* config/msp430/msp430-c.c: ditto.
* config/nds32/nds32.c: ditto.
* config/nds32/nds32-cost.c: ditto.
* config/nds32/nds32-fp-as-gp.c: ditto.
* config/nds32/nds32-intrinsic.c: ditto.
* config/nds32/nds32-isr.c: ditto.
* config/nds32/nds32-md-auxillary.c: ditto.
* config/nds32/nds32-memory-manipulationx.c: ditto.
* config/nds32/nds32-pipelines-auxillary.c: ditto.
* config/nds32/nds32-predicates.c: ditto.
* config/nios2/nios2.c: ditto.
* config/nvptx/nvptx.c: ditto.
* config/pa/pa.c: ditto.
* config/pdp11/pdp11x.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/rl78/rl78.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/rl78/rl78-cx.c: ditto.
* config/rs6000/rs6000.c: ditto.
* config/rs6000/rs6000-c.c: ditto.
* config/rx/rx.c: ditto.
* config/s390/s390.c: ditto.
* config/sh/sh.c: ditto.
* config/sh/sc.c: ditto.
* config/sh/sh-mem.cc: ditto.
* config/sh/sh_treg_combine.cc: Include symtab.h, inchash.h and tree.h
due to flattening of tree.h.
Remove include of tree-core.h.
* config/sol2.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/sol2-c.c: ditto.
* config/sol2-cxx.c: ditto.
* config/sol2-stubs.c: ditto.
* config/sparc/sparc.c: ditto.
* config/sparc/sparc-cx.c: ditto.
* config/spu/spu.c: ditto.
* config/spu/spu-c.c: ditto
* config/storym16/stormy16.c: ditto.
* config/tilegx/tilegx.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/tilepro/gen-mul-tables.cc: Include symtab.h in generated file.
* config/tilegx/tilegx-c.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/tilepro/tilepro.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/tilepro/tilepro-c.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/v850/v850.c: ditto.
* config/v850/v850-c.c: ditto.
* config/vax/vax.c: ditto.
* config/vms/vms.c: ditto.
* config/vms/vms-c.c: ditto.
* config/vxworks.c: ditto.
* config/winnt-c.c: ditto.
* config/xtensa/xtensa.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* coverage.c: ditto.
* cp/call.c: ditto.
* cp/class.c: ditto.
* cp/constexpr.c: ditto.
* cp/cp-array-notation.c: ditto.
* cp/cp-gimplify.c: ditto.
* cp/cp-lang.c: ditto.
* cp/cp-objcp-common.c: ditto.
* cp/cvt.c: ditto.
* cp/decl2.c: ditto.
* cp/decl.c: ditto.
* cp/dump.c: ditto.
* cp/error.c: ditto.
* cp/except.c: ditto.
* cp/expr.c: ditto.
* cp/friend.c: ditto.
* cp/init.c: ditto.
* cp/lambda.c: ditto.
* cp/lex.c: ditto.
* cp/mangle.c: ditto.
* cp/name-lookup.c: ditto.
* cp/optimize.c: ditto.
* cp/parser.c: ditto.
* cp/pt.c: ditto.
* cp/ptree.c: ditto.
* cp/repo.c: ditto.
* cp/rtti.c: ditto.
* cp/search.c: ditto.
* cp/semantics.c: ditto.
* cp/tree.c: ditto.
* cp/typeck2.c: ditto.
* cp/typeck.c: ditto.
* cppbuiltin.c: ditto.
* cprop.c: ditto.
* cse.c: Add include of symtab.h due to flattening of tree.h.
* cselib.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* data-streamer.c: ditto.
* data-streamer-in.c: ditto.
* data-streamer-out.c: ditto.
* dbxout.c: ditto.
* dce.c: ditto.
* ddg.c: Add include of symtab.h due to flattening of tree.h.
* debug.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* dfp.c: ditto.
* df-scan.c: ditto.
* dojump.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
* double-int.c: ditto.
* dse.c: ditto.
* dumpfile.c: ditto.
* dwarf2asm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
* dwarf2cfi.c: ditto.
* dwarf2out.c: ditto.
* emit-rtl.c: ditto.
* except.c: ditto.
* explow.c: ditto.
* expmed.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* expr.c: ditto.
* final.c: ditto.
* fixed-value.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and fixed-value.h due to flattening of tree.h.
* fold-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
Relocate inline function convert_to_ptrofftype_loc from tree.h.
Relocate inline function fold_build_pointer_plus_loc from tree.h.
Relocate inline function fold_build_pointer_plus_hwi_loc from tree.h.
* fold-const.h: Relocate macro convert_to_ptrofftype from tree.h.
Relocate macro fold_build_pointer_plus to relocate from tree.h.h.
Relocate macro fold_build_pointer_plus_hwi from tree.h.
Add prototype for convert_to_ptrofftype_loc relocated from tree.h.
Add prototype for fold_build_pointer_plus_loc relocated from tree.h.
Add prototype for fold_build_pointer_plus_hwi_loc relocated from tree.h.
* fortran/convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/decl.c: ditto.
* fortran/f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/iresolve.c: ditto.
* fortran/match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/options.c: ditto.
* fortran/target-memory.c: Include hash-set.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-const.c: ditto.
* fortran/trans-decl.c: ditto.
* fortran/trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
* fortran/trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-openmp.c: ditto.
* fortran/trans-stmt.c: ditto.
* fortran/trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
* function.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gcc-plugin.h: Include statistics.h, double-int.h, real.h, fixed-value.h,
alias.h, flags.h, and symtab.h due to flattening of tree.h
* gcse.c: ditto.
* generic-match-head.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ggc-page.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gimple-builder.c: ditto.
* gimple.c: ditto.
* gimple-expr.c: ditto.
* gimple-fold.c: ditto.
* gimple-iterator.c: ditto.
* gimple-low.c: ditto.
* gimple-match-head.c: ditto.
* gimple-pretty-print.c: ditto.
* generic-ssa-isolate-paths.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gimple-ssa-strength-reduction.c: ditto.
* gimple-streamer-in.c: ditto.
* gimple-streamer-out.c: ditto.
* gimple-walk.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gimplify-me.c: ditto.
* go/go-gcc.cc: ditto.
* go/go-lang.c: ditto.
* go/gdump.c: ditto.
* graphite-blocking.c: ditto.
* graphite.c: ditto.
* graphite-dependencies.c: ditto.
* graphite-interchange.c: ditto.
* graphite-isl-ast-to-gimple.c: ditto.
* graphite-optimize-isl.c: ditto.
* graphite-poly.c: ditto.
* graphite-scop-detection.c: ditto.
* graphite-sese-to-poly.c: ditto.
* hw-doloop.c: Include symtab.h due to flattening of tree.h.
* ifcvt.c: ditto.
* init-regs.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* internal-fc.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h,options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa.c: ditto.
* ipa-chkp.c: ditto.
* ipa-comdats.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-cp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h,options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-devirt.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-icf.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h,options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-icf-gimple.c: ditto.
* ipa-inline-analysis.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-inline.c: ditto.
* ipa-inline-transform.c: ditto.
* ipa-polymorhpic-call.c: ditto.
* ipa-profile.c: ditto.
* ipa-prop.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-pure-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-reference.c: ditto.
* ipa-split.c: ditto.
* ipa-utils.c: ditto.
* ipa-visbility.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ira.c: ditto.
* ira-color.c: Include hash-set.h due to flattening of tree.h.
* ira-costs.c: ditto.
* ira-emit.c: ditto.
* java/boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/builtins.c: ditto.
* java/class.c: ditto.
* java/constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/decl.c: ditto.
* java/except.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h,inchash.h and real.h due to flattening of tree.h.
* java/gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/jcf-dump.c: ditto.
* java/jcf-io.c: ditto.
* java/jcf-parse.c: ditto.
* java/jvgenmain.c: ditto.
* java/lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/mangle_name.c: ditto.
* java/resource.c: ditto.
* java/typeck.c: ditto.
* java/verify-glue.c: ditto.
* java/verify-impl.c: ditto.
* jump.c: Include symtab.h due to flattening of tree.h.
* langhooks.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* loop-doloop.c: Include symtab.h due to flattening of tree.h.
* loop-init.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* loop-invariant.c: Include symtab.h due to flattening of tree.h.
* loop-iv.c: ditto.
* loop-unroll.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lower-subreg.c: ditto.
* lra-assigns.c: Include symtab.h due to flattening of tree.h.
* lra.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* lra-coalesce.c: Include symtab.h due to flattening of tree.h.
* lra-constraints.c: ditto.
* lra-eliminations.c: ditto.
* lra-livesc: ditto.
* lra-remat.c: ditto.
* lra-spills.c: ditto.
* lto/lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto/lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto/lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto/lto-partition.c: ditto.
* lto/lto-symtab.c: ditto.
* lto-cgraph.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto-compress.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto-opts.c: ditto.
* lto-section-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto-section-out.c: ditto.
* lto-streamer.c: ditto.
* lto-streamer-in.c: ditto.
* lto-streamer-out.c: ditto.
* modulo-sched.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* objc/objc-act.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* objc/objc-encoding.c: ditto.
* objc/objc-gnu-runtime-abi-01.c: ditto.
* objc/objc-lang.c: ditto.
* objc/objc-map.c: ditto.
* objc/objc-next-runtime-abi-01.c: ditto.
* objc/objc-next-runtime-abi-02.c: ditto.
* objc/objc-runtime-shared-support.c: ditto.
* objcp/objcp-decl.c: ditto.
* objcp/objcp-lang.c: ditto.
* omega.c: ditto.
* omega-low.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* optabs.c: ditto.
* opts-global.c: ditto.
* passes.c: ditto.
* plugin.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* postreload.c: Include symtab.h due to flattening of tree.h.
* postreload-gcse.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* predict.c: ditto.
* print-rtl.c: ditto.
* print-tree.c: ditto.
* profile.c: Include symtab.h, fold-const.h
and inchash.h due to flattening of tree.h.
* real.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* realmpfr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* recog.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* ree.c: ditto.
* reginfo.c: ditto.
* reg-stack.c: ditto.
* reload1.c: Include symtab.h, fold-const.h, wide-int.h
and inchash.h due to flattening of tree.h.
* reload.c: Include symtab.h due to flattening of tree.h.
* reorg.c: ditto.
* rtlanal.c: Include symtab.h, fold-const.h, wide-int.h
and inchash.h due to flattening of tree.h.
* rtl-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* rtlhooks.c: Include symtab.h due to flattening of tree.h.
* sanopt.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* sched-deps.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* sched-vis.c: ditto.
* sdbout.c: ditto.
* sel-sched.c: Include symtab.h, fold-const.h, wide-int.h
and inchash.h due to flattening of tree.h.
* sel-sched-ir.c: ditto.
* sese.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* shrink-wrap.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* simplify-rtx.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* stack-ptr-mod.c: ditto.
* stmt.c: ditto.
* store-motion.c: ditto.
* store-layout.c: ditto.
* stringpool.c: ditto.
* symtab.c: ditto.
* target-globals.c: ditto.
* targhooks.c: ditto.
* toplev.c: ditto.
* tracer.c: ditto.
* trans-mem.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-affine.c: ditto.
* tree-browser.c: ditto.
* tree.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-call-cdce.c: Include symtab.h, alias.h, double-int.h,
fold-const.h, wide-int.h, inchash.h and real.h due to
flattening of tree.h.
* tree-cfg.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-cfgcleanup.c: ditto.
* tree-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-chkp-opt.c: ditto.
* tree-chrec.c: ditto.
* tree-chkp-opt.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and
real.h due to flattening of tree.h.
* tree-core.h: Flatten header file by removing all #include statements.
* tree-data-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-dfa.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and
real.h due to flattening of tree.h.
* tree-diagnostic.c: ditto.
* tree-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and
fixed-value.h due to flattening of tree.h.
* tree-dfa.c: ditto.
* tree-eh.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and
real.h due to flattening of tree.h.
* tree-emutls.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree.h: Flatten header files by removing all includes except tree-core.h.
Remove inline function convert_to_ptrofftype_loc to relocate to fold-const.c.
Remove macro convert_to_ptrofftype to relocate to fold-const.h.
Remove inline function fold_build_pointer_plus_loc to relocate to fold-const.c.
Remove macro fold_build_pointer_plus to relocate to fold-const.h.
Remove inline function fold_build_pointer_plus_hwi_loc to relocate to fold-const.c.
Remove macro fold_build_pointer_plus_hwi to relocate to fold-const.h.
* tree-if-conv.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and
fixed-value.h due to flattening of tree.h.
* tree-inline.c: ditto.
* tree-into-ssa.c: ditto.
* tree-iterator.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-loop-distribution.c: ditto.
* tree-nested.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-nrv.c: ditto.
* tree-object-size.c: ditto.
* tree-outof-ssa.c: ditto.
* tree-parloops.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-phinodes.c: ditto.
* tree-predcom.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-pretty-print.c: ditto.
* tree-profile.c: double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h and inchash.h due to flattening of tree.h.
* tree-scalar-evolution.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-sra.c: Include vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-ssa-alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-ssa.c: ditto.
* tree-ssa-ccp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h
and real.h due to flattening of tree.h.
* tree-ssa-coalesce.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-ssa-copy.c: ditto.
* tree-ssa-copyrename.c: ditto.
* tree-ssa-dce.c: ditto.
* tree-ssa-dom.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h
and real.h due to flattening of tree.h.
* tree-ssa-dse.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-ssa-forwprop.c: ditto.
* tree-ssa-ifcombine.c: ditto.
* tree-ssa-live.c: ditto.
* tree-ssa-loop.c: ditto.
* tree-ssa-loop-ch.c: ditto.
* tree-ssa-loop-im.c: ditto.
* tree-ssa-loop-ivcanon.c: ditto.
* tree-ssa-loop-ivopts.c: ditto.
* tree-ssa-loop-manip.c: ditto.
* tree-ssa-loop-niter.c: ditto.
* tree-ssa-loop-prefetch.c: ditto.
* tree-ssa-loop-unswitch.c: ditto.
* tree-ssa-loop-math-opts.c: ditto.
* tree-ssanames.c: ditto.
* tree-ssa-operands.c: ditto.
* tree-ssa-phiopt.c: ditto.
* tree-ssa-phiprop.c: ditto.
* tree-ssa-pre.c: ditto.
* tree-ssa-propagate.c: ditto.
* tree-ssa-reassoc.c: ditto.
* tree-ssa-sccvn.c: ditto.
* tree-ssa-sink.c: ditto.
* tree-ssa-strlen.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-structalias.c: double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-tail-merge.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-ter.c: ditto.
* tree-ssa-threadedge.c: ditto.
* tree-ssa-threadupdate.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-uncprop.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-uninit.c: ditto.
* tree-stdarg.c: Include vec.h, double-int.h, input.h, alias.h,
symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening
of tree.h.
* tree-streamer.c: Include vec.h, double-int.h, input.h, alias.h,
symtab.h, options.h, fold-const.h, wide-int.h and
inchash.h due to flattening of tree.h.
* tree-streamer-in.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, inchash.h, real.h and fixed-value.h due to flattening
of tree.h.
* tree-streamer-out.c: dittoo.
* tree-switch-conversion.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-tailcall.c: ditto.
* tree-vect-data-refs.c: ditto.
* tree-vect-generic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h,
alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-vect-loop.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-vect-loop-manip.c: ditto.
* tree-vectorizer.c: ditto.
* tree-vect-patterns.c: ditto.
* tree-vect-slp.c: ditto.
* tree-vect-stmts.c: ditto.
* tree-vrp.c: ditto.
* tsan.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* ubsan.c: ditto.
* value-prof.c.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* varasm.c: ditto.
* varpool.c: ditto.
* var-tracking.c: ditto.
* vmsdbgout.c: ditto.
* vtable-verify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* wide-int.cc: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* xcoffout.c: ditto.
* libcc1/plugin.cc: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
From-SVN: r219402
2015-01-09 21:18:42 +01:00
|
|
|
#include "tree.h"
|
2015-07-08 02:53:03 +02:00
|
|
|
#include "gimple.h"
|
|
|
|
#include "ssa.h"
|
fix pr46851 and pr60340: remove unmaintained omega dependence test
Regstrapped on amd64-linux.
2015-07-18 Sebastian Pop <s.pop@samsung.com>
PR middle-end/46851
PR middle-end/60340
* Makefile.in: Removed omega.o.
* common.opt: Remove flag fcheck-data-deps.
* doc/invoke.texi: Remove documentation for fcheck-data-deps and
its associated params: omega-max-vars, omega-max-geqs,
omega-max-eqs, omega-max-wild-cards, omega-hash-table-size,
omega-max-keys, omega-eliminate-redundant-constraints.
* doc/loop.texi: Remove all the section on Omega.
* graphite-blocking.c: Include missing params.h: it used to be
included through tree-data-ref.h and omega.h.
* graphite-isl-ast-to-gimple.c: Same.
* graphite-optimize-isl.c: Same.
* graphite-sese-to-poly.c: Same.
* graphite.c: Same.
* omega.c: Remove.
* omega.h: Remove.
* params.def: Removed PARAM_OMEGA_MAX_VARS, PARAM_OMEGA_MAX_GEQS,
PARAM_OMEGA_MAX_EQS, PARAM_OMEGA_MAX_WILD_CARDS,
PARAM_OMEGA_HASH_TABLE_SIZE, PARAM_OMEGA_MAX_KEYS, and
PARAM_OMEGA_ELIMINATE_REDUNDANT_CONSTRAINTS.
* passes.def: Remove pass_check_data_deps.
* tree-data-ref.c (dump_affine_function): Declare DEBUG_FUNCTION.
(dump_conflict_function): Same.
(dump_subscript): Same.
(print_direction_vector): Same.
(print_dir_vectors): Same.
(print_lambda_vector): Same.
(print_dist_vectors): Same.
(dump_data_dependence_relation): Same.
(dump_data_dependence_relations): Same.
(dump_dist_dir_vectors): Same.
(dump_ddrs): Same.
(init_omega_eq_with_af): Removed.
(omega_extract_distance_vectors): Removed.
(omega_setup_subscript): Removed.
(init_omega_for_ddr_1): Removed.
(init_omega_for_ddr): Removed.
(ddr_consistent_p): Removed.
(compute_affine_dependence): Do not use omega to check data
dependences.
(compute_data_dependences_for_bb): Removed.
(analyze_all_data_dependences): Removed.
(tree_check_data_deps): Removed.
* tree-data-ref.h: Do not include omega.h.
(compute_data_dependences_for_bb): Removed.
(tree_check_data_deps): Removed.
* tree-ssa-loop.c (pass_check_data_deps): Removed.
(make_pass_check_data_deps): Removed.
* tree-ssa-phiopt.c: Include params.h.
* tree-vect-data-refs.c: Same.
* tree-vect-slp.c: Same.
testsuite/
* gcc.dg/tree-ssa/pr42327.c: Removed.
* g++.dg/other/pr35011.C: Removed.
From-SVN: r225979
2015-07-18 03:11:05 +02:00
|
|
|
#include "params.h"
|
genattrtab.c (write_header): Include hash-set.h...
2015-01-09 Michael Collison <michael.collison@linaro.org>
* genattrtab.c (write_header): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-attrtab.c.
* genautomata.c (main) : Include hash-set.h, macInclude hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-automata.c.
* genemit.c (main): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-emit.c.
* gengtype.c (open_base_files): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
gtype-desc.c.
* genopinit.c (main): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-opinit.c.
* genoutput.c (output_prologue): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-output.c.
* genpeep.c (main): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-peep.c.
* genpreds.c (write_insn_preds_c): Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
insn-preds.c.
* optc-save-gen-awk: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h when generating
options-save.c.
* opth-gen.awk: Change include guard from GCC_C_COMMON_H to GCC_C_COMMON_C
when generating options.h.
* ada/gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* ada/gcc-interface/decl.c: ditto.
* ada/gcc-interface/misc.c: ditto.
* ada/gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* ada/gcc-interface/trans.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
fold-const.h, wide-int.h, inchash.h due to
flattening of tree.h.
* ada/gcc-interface/utils.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* ada/gcc-interface/utils2.c: ditto.
* alias.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* asan.c: ditto.
* attribs.c: ditto.
* auto-inc-dec.c: ditto.
* auto-profile.c: ditto
* bb-reorder.c: ditto.
* bt-load.c: Include symtab.h due to flattening of tree.h.
* builtins.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c/c-array-notation.c: ditto.
* c/c-aux-info.c: ditto.
* c/c-convert.c: ditto.
* c/c-decl.c: ditto.
* c/c-errors.c: ditto.
* c/c-lang.c: dittoxs.
* c/c-objc-common.c: ditto.
* c/c-parser.c: ditto.
* c/c-typeck.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, inchash.h, real.h and
fixed-value.h due to flattening of tree.h.
* calls.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* ccmp.c: ditto.
* c-family/array-notation-common.c: ditto.
* c-family/c-ada-spec.c: ditto.
* c-family/c-cilkplus.c: ditto.
* c-family/c-common.c: Include input.h due to flattening of tree.h.
Define macro GCC_C_COMMON_C.
* c-family/c-common.h: Flatten tree.h header files into c-common.h.
Remove include of tree-core.h.
* c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-family/c-dump.c: ditto.
* c-family/c-format.c: Flatten tree.h header files into c-common.h.
* c-family/c-cppbuiltin.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-family/c-dump.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-family/c-format.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, inchash.h and real.h due to
flattening of tree.h.
* c-family/c-gimplify.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-family/cilk.c: ditto.
* c-family/c-lex.c: ditto.
* c-family/c-omp.c: ditto.
* c-family/c-opts.c: ditto.
* c-family/c-pch.c: ditto.
* c-family/c-ppoutput.c: ditto.
* c-family/c-pragma.c: ditto.
* c-family/c-pretty-print.c: ditto.
* c-family/c-semantics.c: ditto.
* c-family/c-ubsan.c: ditto.
* c-family/stub-objc.c: ditto.
* cfgbuild.c: ditto.
* cfg.c: ditto.
* cfgcleanup.c: ditto.
* cfgexpand.c: ditto.
* cfghooks.c: ditto.
* cfgloop.c: Include symtab.h, fold-const.h, and
inchash.h due to flattening of tree.h.
* cfgloopmanip.c: ditto.
* cfgrtl.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* cgraphbuild.c: ditto.
* cgraph.c: ditto.
* cgraphclones.c: ditto.
* cgraphunit.c: ditto.
* cilk-common.c: ditto.
* combine.c: ditto.
* combine-stack-adj.c: Include symbol.h due to flattening of tree.h.
* config/aarch64/aarch64-builtins.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/aarch64/aarch64.c: ditto.
* config/alpha/alpha.c: ditto.
* config/arc/arc.c: ditto.
* config/arm/aarch-common.c: ditto.
* config/arm/arm-builtins.c: ditto.
* config/arm/arm.c: ditto.
* config/arm/arm-c.c: ditto.
* config/avr/avr.c: ditto.
* config/avr/avr-c.c: ditto.
* config/avr/avr-log.c: ditto.
* config/bfin/bfin.c: ditto.
* config/c6x/c6x.c: ditto.
* config/cr16/cr16.c: ditto.
* config/cris/cris.c: ditto.
* config/darwin.c: ditto.
* config/darwin-c.c: ditto.
* config/default-c.c: ditto.
* config/epiphany/epiphany.c: ditto.
* config/fr30/fr30.c: ditto.
* config/frv/frv.c: ditto.
* config/glibc-c.c: ditto.
* config/h8300/h8300.c: ditto.
* config/i386/i386.c: ditto.
* config/i386/i386-c.c: ditto.
* config/i386/msformat.c: ditto.
* config/i386/winnt.c: ditto.
* config/i386/winnt-cxx.c: ditto.
* config/i386/winnt-stubs.c: ditto.
* config/ia64/ia64.c: ditto.
* config/ia64/ia64-c.c: ditto.
* config/iq2000/iq2000.c: ditto.
* config/lm32/lm32.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/m32c/m32c.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/m32c/m32c-pragma.c: ditto.
* config/m32c/m32cr.c: ditto.
* config/m68/m68k.c: ditto.
* config/mcore/mcore.c: ditto.
* config/mep/mep.c: ditto.
* config/mep/mep-pragma.c: ditto.
* config/microblaze/microblaze.c: ditto.
* config/microblaze/microblaze-c.c: ditto.
* config/mips/mips.c: ditto.
* config/mmix/mmix.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/mn10300/mn10300.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/moxie/moxie.c: ditto.
* config/msp430/msp430.c: ditto.
* config/msp430/msp430-c.c: ditto.
* config/nds32/nds32.c: ditto.
* config/nds32/nds32-cost.c: ditto.
* config/nds32/nds32-fp-as-gp.c: ditto.
* config/nds32/nds32-intrinsic.c: ditto.
* config/nds32/nds32-isr.c: ditto.
* config/nds32/nds32-md-auxillary.c: ditto.
* config/nds32/nds32-memory-manipulationx.c: ditto.
* config/nds32/nds32-pipelines-auxillary.c: ditto.
* config/nds32/nds32-predicates.c: ditto.
* config/nios2/nios2.c: ditto.
* config/nvptx/nvptx.c: ditto.
* config/pa/pa.c: ditto.
* config/pdp11/pdp11x.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/rl78/rl78.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/rl78/rl78-cx.c: ditto.
* config/rs6000/rs6000.c: ditto.
* config/rs6000/rs6000-c.c: ditto.
* config/rx/rx.c: ditto.
* config/s390/s390.c: ditto.
* config/sh/sh.c: ditto.
* config/sh/sc.c: ditto.
* config/sh/sh-mem.cc: ditto.
* config/sh/sh_treg_combine.cc: Include symtab.h, inchash.h and tree.h
due to flattening of tree.h.
Remove include of tree-core.h.
* config/sol2.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/sol2-c.c: ditto.
* config/sol2-cxx.c: ditto.
* config/sol2-stubs.c: ditto.
* config/sparc/sparc.c: ditto.
* config/sparc/sparc-cx.c: ditto.
* config/spu/spu.c: ditto.
* config/spu/spu-c.c: ditto
* config/storym16/stormy16.c: ditto.
* config/tilegx/tilegx.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/tilepro/gen-mul-tables.cc: Include symtab.h in generated file.
* config/tilegx/tilegx-c.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/tilepro/tilepro.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* config/tilepro/tilepro-c.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* config/v850/v850.c: ditto.
* config/v850/v850-c.c: ditto.
* config/vax/vax.c: ditto.
* config/vms/vms.c: ditto.
* config/vms/vms-c.c: ditto.
* config/vxworks.c: ditto.
* config/winnt-c.c: ditto.
* config/xtensa/xtensa.c: Include symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* coverage.c: ditto.
* cp/call.c: ditto.
* cp/class.c: ditto.
* cp/constexpr.c: ditto.
* cp/cp-array-notation.c: ditto.
* cp/cp-gimplify.c: ditto.
* cp/cp-lang.c: ditto.
* cp/cp-objcp-common.c: ditto.
* cp/cvt.c: ditto.
* cp/decl2.c: ditto.
* cp/decl.c: ditto.
* cp/dump.c: ditto.
* cp/error.c: ditto.
* cp/except.c: ditto.
* cp/expr.c: ditto.
* cp/friend.c: ditto.
* cp/init.c: ditto.
* cp/lambda.c: ditto.
* cp/lex.c: ditto.
* cp/mangle.c: ditto.
* cp/name-lookup.c: ditto.
* cp/optimize.c: ditto.
* cp/parser.c: ditto.
* cp/pt.c: ditto.
* cp/ptree.c: ditto.
* cp/repo.c: ditto.
* cp/rtti.c: ditto.
* cp/search.c: ditto.
* cp/semantics.c: ditto.
* cp/tree.c: ditto.
* cp/typeck2.c: ditto.
* cp/typeck.c: ditto.
* cppbuiltin.c: ditto.
* cprop.c: ditto.
* cse.c: Add include of symtab.h due to flattening of tree.h.
* cselib.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* data-streamer.c: ditto.
* data-streamer-in.c: ditto.
* data-streamer-out.c: ditto.
* dbxout.c: ditto.
* dce.c: ditto.
* ddg.c: Add include of symtab.h due to flattening of tree.h.
* debug.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* dfp.c: ditto.
* df-scan.c: ditto.
* dojump.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
* double-int.c: ditto.
* dse.c: ditto.
* dumpfile.c: ditto.
* dwarf2asm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
* dwarf2cfi.c: ditto.
* dwarf2out.c: ditto.
* emit-rtl.c: ditto.
* except.c: ditto.
* explow.c: ditto.
* expmed.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* expr.c: ditto.
* final.c: ditto.
* fixed-value.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and fixed-value.h due to flattening of tree.h.
* fold-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
Relocate inline function convert_to_ptrofftype_loc from tree.h.
Relocate inline function fold_build_pointer_plus_loc from tree.h.
Relocate inline function fold_build_pointer_plus_hwi_loc from tree.h.
* fold-const.h: Relocate macro convert_to_ptrofftype from tree.h.
Relocate macro fold_build_pointer_plus to relocate from tree.h.h.
Relocate macro fold_build_pointer_plus_hwi from tree.h.
Add prototype for convert_to_ptrofftype_loc relocated from tree.h.
Add prototype for fold_build_pointer_plus_loc relocated from tree.h.
Add prototype for fold_build_pointer_plus_hwi_loc relocated from tree.h.
* fortran/convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/decl.c: ditto.
* fortran/f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/iresolve.c: ditto.
* fortran/match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/options.c: ditto.
* fortran/target-memory.c: Include hash-set.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-const.c: ditto.
* fortran/trans-decl.c: ditto.
* fortran/trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
* fortran/trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* fortran/trans-openmp.c: ditto.
* fortran/trans-stmt.c: ditto.
* fortran/trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
* function.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gcc-plugin.h: Include statistics.h, double-int.h, real.h, fixed-value.h,
alias.h, flags.h, and symtab.h due to flattening of tree.h
* gcse.c: ditto.
* generic-match-head.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ggc-page.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gimple-builder.c: ditto.
* gimple.c: ditto.
* gimple-expr.c: ditto.
* gimple-fold.c: ditto.
* gimple-iterator.c: ditto.
* gimple-low.c: ditto.
* gimple-match-head.c: ditto.
* gimple-pretty-print.c: ditto.
* generic-ssa-isolate-paths.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gimple-ssa-strength-reduction.c: ditto.
* gimple-streamer-in.c: ditto.
* gimple-streamer-out.c: ditto.
* gimple-walk.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* gimplify-me.c: ditto.
* go/go-gcc.cc: ditto.
* go/go-lang.c: ditto.
* go/gdump.c: ditto.
* graphite-blocking.c: ditto.
* graphite.c: ditto.
* graphite-dependencies.c: ditto.
* graphite-interchange.c: ditto.
* graphite-isl-ast-to-gimple.c: ditto.
* graphite-optimize-isl.c: ditto.
* graphite-poly.c: ditto.
* graphite-scop-detection.c: ditto.
* graphite-sese-to-poly.c: ditto.
* hw-doloop.c: Include symtab.h due to flattening of tree.h.
* ifcvt.c: ditto.
* init-regs.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* internal-fc.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h,options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa.c: ditto.
* ipa-chkp.c: ditto.
* ipa-comdats.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-cp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h,options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-devirt.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-icf.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h,options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-icf-gimple.c: ditto.
* ipa-inline-analysis.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-inline.c: ditto.
* ipa-inline-transform.c: ditto.
* ipa-polymorhpic-call.c: ditto.
* ipa-profile.c: ditto.
* ipa-prop.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-pure-const.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ipa-reference.c: ditto.
* ipa-split.c: ditto.
* ipa-utils.c: ditto.
* ipa-visbility.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* ira.c: ditto.
* ira-color.c: Include hash-set.h due to flattening of tree.h.
* ira-costs.c: ditto.
* ira-emit.c: ditto.
* java/boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/builtins.c: ditto.
* java/class.c: ditto.
* java/constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/decl.c: ditto.
* java/except.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h,inchash.h and real.h due to flattening of tree.h.
* java/gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/jcf-dump.c: ditto.
* java/jcf-io.c: ditto.
* java/jcf-parse.c: ditto.
* java/jvgenmain.c: ditto.
* java/lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* java/mangle_name.c: ditto.
* java/resource.c: ditto.
* java/typeck.c: ditto.
* java/verify-glue.c: ditto.
* java/verify-impl.c: ditto.
* jump.c: Include symtab.h due to flattening of tree.h.
* langhooks.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* loop-doloop.c: Include symtab.h due to flattening of tree.h.
* loop-init.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* loop-invariant.c: Include symtab.h due to flattening of tree.h.
* loop-iv.c: ditto.
* loop-unroll.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lower-subreg.c: ditto.
* lra-assigns.c: Include symtab.h due to flattening of tree.h.
* lra.c: Include symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* lra-coalesce.c: Include symtab.h due to flattening of tree.h.
* lra-constraints.c: ditto.
* lra-eliminations.c: ditto.
* lra-livesc: ditto.
* lra-remat.c: ditto.
* lra-spills.c: ditto.
* lto/lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto/lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto/lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto/lto-partition.c: ditto.
* lto/lto-symtab.c: ditto.
* lto-cgraph.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto-compress.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto-opts.c: ditto.
* lto-section-in.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto-section-out.c: ditto.
* lto-streamer.c: ditto.
* lto-streamer-in.c: ditto.
* lto-streamer-out.c: ditto.
* modulo-sched.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* objc/objc-act.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* objc/objc-encoding.c: ditto.
* objc/objc-gnu-runtime-abi-01.c: ditto.
* objc/objc-lang.c: ditto.
* objc/objc-map.c: ditto.
* objc/objc-next-runtime-abi-01.c: ditto.
* objc/objc-next-runtime-abi-02.c: ditto.
* objc/objc-runtime-shared-support.c: ditto.
* objcp/objcp-decl.c: ditto.
* objcp/objcp-lang.c: ditto.
* omega.c: ditto.
* omega-low.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* optabs.c: ditto.
* opts-global.c: ditto.
* passes.c: ditto.
* plugin.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* postreload.c: Include symtab.h due to flattening of tree.h.
* postreload-gcse.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* predict.c: ditto.
* print-rtl.c: ditto.
* print-tree.c: ditto.
* profile.c: Include symtab.h, fold-const.h
and inchash.h due to flattening of tree.h.
* real.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* realmpfr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* recog.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* ree.c: ditto.
* reginfo.c: ditto.
* reg-stack.c: ditto.
* reload1.c: Include symtab.h, fold-const.h, wide-int.h
and inchash.h due to flattening of tree.h.
* reload.c: Include symtab.h due to flattening of tree.h.
* reorg.c: ditto.
* rtlanal.c: Include symtab.h, fold-const.h, wide-int.h
and inchash.h due to flattening of tree.h.
* rtl-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* rtlhooks.c: Include symtab.h due to flattening of tree.h.
* sanopt.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* sched-deps.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* sched-vis.c: ditto.
* sdbout.c: ditto.
* sel-sched.c: Include symtab.h, fold-const.h, wide-int.h
and inchash.h due to flattening of tree.h.
* sel-sched-ir.c: ditto.
* sese.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* shrink-wrap.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* simplify-rtx.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* stack-ptr-mod.c: ditto.
* stmt.c: ditto.
* store-motion.c: ditto.
* store-layout.c: ditto.
* stringpool.c: ditto.
* symtab.c: ditto.
* target-globals.c: ditto.
* targhooks.c: ditto.
* toplev.c: ditto.
* tracer.c: ditto.
* trans-mem.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-affine.c: ditto.
* tree-browser.c: ditto.
* tree.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-call-cdce.c: Include symtab.h, alias.h, double-int.h,
fold-const.h, wide-int.h, inchash.h and real.h due to
flattening of tree.h.
* tree-cfg.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-cfgcleanup.c: ditto.
* tree-chkp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-chkp-opt.c: ditto.
* tree-chrec.c: ditto.
* tree-chkp-opt.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and
real.h due to flattening of tree.h.
* tree-core.h: Flatten header file by removing all #include statements.
* tree-data-ref.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-dfa.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and
real.h due to flattening of tree.h.
* tree-diagnostic.c: ditto.
* tree-dump.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and
fixed-value.h due to flattening of tree.h.
* tree-dfa.c: ditto.
* tree-eh.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h and
real.h due to flattening of tree.h.
* tree-emutls.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree.h: Flatten header files by removing all includes except tree-core.h.
Remove inline function convert_to_ptrofftype_loc to relocate to fold-const.c.
Remove macro convert_to_ptrofftype to relocate to fold-const.h.
Remove inline function fold_build_pointer_plus_loc to relocate to fold-const.c.
Remove macro fold_build_pointer_plus to relocate to fold-const.h.
Remove inline function fold_build_pointer_plus_hwi_loc to relocate to fold-const.c.
Remove macro fold_build_pointer_plus_hwi to relocate to fold-const.h.
* tree-if-conv.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h, real.h and
fixed-value.h due to flattening of tree.h.
* tree-inline.c: ditto.
* tree-into-ssa.c: ditto.
* tree-iterator.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-loop-distribution.c: ditto.
* tree-nested.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-nrv.c: ditto.
* tree-object-size.c: ditto.
* tree-outof-ssa.c: ditto.
* tree-parloops.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-phinodes.c: ditto.
* tree-predcom.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-pretty-print.c: ditto.
* tree-profile.c: double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h and inchash.h due to flattening of tree.h.
* tree-scalar-evolution.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-sra.c: Include vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, and
inchash.h due to flattening of tree.h.
* tree-ssa-alias.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-ssa.c: ditto.
* tree-ssa-ccp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h
and real.h due to flattening of tree.h.
* tree-ssa-coalesce.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-ssa-copy.c: ditto.
* tree-ssa-copyrename.c: ditto.
* tree-ssa-dce.c: ditto.
* tree-ssa-dom.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h, inchash.h
and real.h due to flattening of tree.h.
* tree-ssa-dse.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-ssa-forwprop.c: ditto.
* tree-ssa-ifcombine.c: ditto.
* tree-ssa-live.c: ditto.
* tree-ssa-loop.c: ditto.
* tree-ssa-loop-ch.c: ditto.
* tree-ssa-loop-im.c: ditto.
* tree-ssa-loop-ivcanon.c: ditto.
* tree-ssa-loop-ivopts.c: ditto.
* tree-ssa-loop-manip.c: ditto.
* tree-ssa-loop-niter.c: ditto.
* tree-ssa-loop-prefetch.c: ditto.
* tree-ssa-loop-unswitch.c: ditto.
* tree-ssa-loop-math-opts.c: ditto.
* tree-ssanames.c: ditto.
* tree-ssa-operands.c: ditto.
* tree-ssa-phiopt.c: ditto.
* tree-ssa-phiprop.c: ditto.
* tree-ssa-pre.c: ditto.
* tree-ssa-propagate.c: ditto.
* tree-ssa-reassoc.c: ditto.
* tree-ssa-sccvn.c: ditto.
* tree-ssa-sink.c: ditto.
* tree-ssa-strlen.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-structalias.c: double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-tail-merge.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-ter.c: ditto.
* tree-ssa-threadedge.c: ditto.
* tree-ssa-threadupdate.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-uncprop.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, fold-const.h,
wide-int.h and inchash.h due to flattening of tree.h.
* tree-ssa-uninit.c: ditto.
* tree-stdarg.c: Include vec.h, double-int.h, input.h, alias.h,
symtab.h, fold-const.h, wide-int.h and inchash.h due to flattening
of tree.h.
* tree-streamer.c: Include vec.h, double-int.h, input.h, alias.h,
symtab.h, options.h, fold-const.h, wide-int.h and
inchash.h due to flattening of tree.h.
* tree-streamer-in.c: Include hash-set.h, machmode.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, inchash.h, real.h and fixed-value.h due to flattening
of tree.h.
* tree-streamer-out.c: dittoo.
* tree-switch-conversion.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-tailcall.c: ditto.
* tree-vect-data-refs.c: ditto.
* tree-vect-generic.c: Include hash-set.h, machmode.h, vec.h, double-int.h, input.h,
alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-vect-loop.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* tree-vect-loop-manip.c: ditto.
* tree-vectorizer.c: ditto.
* tree-vect-patterns.c: ditto.
* tree-vect-slp.c: ditto.
* tree-vect-stmts.c: ditto.
* tree-vrp.c: ditto.
* tsan.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* ubsan.c: ditto.
* value-prof.c.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* varasm.c: ditto.
* varpool.c: ditto.
* var-tracking.c: ditto.
* vmsdbgout.c: ditto.
* vtable-verify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* wide-int.cc: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
* xcoffout.c: ditto.
* libcc1/plugin.cc: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
From-SVN: r219402
2015-01-09 21:18:42 +01:00
|
|
|
#include "fold-const.h"
|
gimple-walk.h: New File.
* gimple-walk.h: New File. Relocate prototypes from gimple.h.
(struct walk_stmt_info): Relocate here from gimple.h.
* gimple-iterator.h: New File. Relocate prototypes from gimple.h.
(struct gimple_stmt_iterator_d): Relocate here from gimple.h.
(gsi_start_1, gsi_none, gsi_start_bb, gsi_last_1, gsi_last_bb,
gsi_end_p, gsi_one_before_end_p, gsi_next, gsi_prev, gsi_stmt,
gsi_after_labels, gsi_next_nondebug, gsi_prev_nondebug,
gsi_start_nondebug_bb, gsi_start_nondebug_after_labels_bb,
gsi_last_nondebug_bb, gsi_bb, gsi_seq): Relocate here from gimple.h.
* gimple.h (struct gimple_stmt_iterator_d): Move to gimple-iterator.h.
(gsi_start_1, gsi_none, gsi_start_bb, gsi_last_1, gsi_last_bb,
gsi_end_p, gsi_one_before_end_p, gsi_next, gsi_prev, gsi_stmt,
gsi_after_labels, gsi_next_nondebug, gsi_prev_nondebug,
gsi_start_nondebug_bb, gsi_start_nondebug_after_labels_bb,
gsi_last_nondebug_bb, gsi_bb, gsi_seq): Move to gimple-iterator.h.
(struct walk_stmt_info): Move to gimple-walk.h.
(gimple_seq_set_location): Move to gimple.c
* gimple-walk.c: New File.
(walk_gimple_seq_mod, walk_gimple_seq, walk_gimple_asm, walk_gimple_op,
walk_gimple_stmt, get_base_loadstore, walk_stmt_load_store_addr_ops,
walk_stmt_load_store_ops): Relocate here from gimple.c.
* gimple-iterator.c: Include gimple-iterator.h.
* gimple.c (walk_gimple_seq_mod, walk_gimple_seq, walk_gimple_asm,
walk_gimple_op, walk_gimple_stmt, get_base_loadstore,
walk_stmt_load_store_addr_ops, walk_stmt_load_store_ops): Move to
gimple-walk.c.
(gimple_seq_set_location): Relocate from gimple.h.
* tree-phinodes.h (set_phi_nodes): Move to tree-phinodes.c.
* tree-phinodes.c (set_phi_nodes): Relocate from tree-phinodes.h.
* gengtype.c (open_base_files): Add gimple-iterator.h to include list.
* Makefile.in (OBJS): Add gimple-walk.o
* asan.c: Update Include list as required for gimple-iterator.h and
gimple-walk.h.
* cfgexpand.c: Likewise.
* cfgloop.c: Likewise.
* cfgloopmanip.c: Likewise.
* cgraph.c: Likewise.
* cgraphbuild.c: Likewise.
* cgraphunit.c: Likewise.
* gimple-fold.c: Likewise.
* gimple-low.c: Likewise.
* gimple-pretty-print.c: Likewise.
* gimple-ssa-isolate-paths.c: Likewise.
* gimple-ssa-strength-reduction.c: Likewise.
* gimple-streamer-in.c: Likewise.
* gimple-streamer-out.c: Likewise.
* gimplify.c: Likewise.
* graphite-blocking.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-optimize-isl.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* ipa-inline-analysis.c: Likewise.
* ipa-profile.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-split.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* omp-low.c: Likewise.
* predict.c: Likewise.
* profile.c: Likewise.
* sese.c: Likewise.
* tracer.c: Likewise.
* trans-mem.c: Likewise.
* tree-call-cdce.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-complex.c: Likewise.
* tree-data-ref.c: Likewise.
* tree-dfa.c: Likewise.
* tree-eh.c: Likewise.
* tree-emutls.c: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-nested.c: Likewise.
* tree-nrv.c: Likewise.
* tree-object-size.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-predcom.c: Likewise.
* tree-profile.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-sra.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-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.c: Likewise.
* tree-ssa-math-opts.c: 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-sink.c: Likewise.
* tree-ssa-strlen.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-tail-merge.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa-uninit.c: Likewise.
* tree-ssa.c: Likewise.
* tree-stdarg.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-vrp.c: Likewise.
* tree.c: Likewise.
* tsan.c: Likewise.
* value-prof.c: Likewise.
* vtable-verify.c: Likewise.
* config/aarch64/aarch64-builtins.c: Include gimple-iterator.h.
* config/rs6000/rs6000.c: Include gimple-iterator.h and gimple-walk.h.
* testsuite/g++.dg/plugin/selfassign.c: Include gimple-iterator.h.
* testsuite/gcc.dg/plugin/selfassign.c: Likewise.
From-SVN: r204763
2013-11-14 00:54:17 +01:00
|
|
|
#include "gimple-iterator.h"
|
gimplify-be.h: New file.
* gimplify-be.h: New file. Add prototypes.
* gimplify.h: Don't include gimple.h.
(struct gimplify_hasher, struct gimplify_ctx, is_gimple_sizepos,
gimplify_hasher::hash, gimplify_hasher::equal): Relocate from gimple.h.
* gimple.h (struct gimplify_hasher, gimplify_hasher::hash,
gimplify_hasher::equal, struct gimplify_ctx, is_gimple_sizepos): Move
to gimplify.h.
(enum gsi_iterator_update): Move to gimple-iterator.h.
* gimple-iterator.h (enum gsi_iterator_update): Relocate from gimple.h.
* gimplify-be.c: New File.
(force_gimple_operand_1, force_gimple_operand,
force_gimple_operand_gsi_1, force_gimple_operand_gsi): Relocate from
gimplify.c.
* gimplify.c (force_gimple_operand_1, force_gimple_operand,
force_gimple_operand_gsi_1, force_gimple_operand_gsi): Move to
gimplify-be.c.
* Makefile.in (OBJS): Add gimplify-be.o
* asan.c: Include only gimplify.h, gimplify-be.h, and/or gimple.h as
required.
* cfgloopmanip.c: Likewise.
* cgraphunit.c: Likewise.
* cilk-common.c: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* gimple-expr.c: Likewise.
* gimple-fold.c: Likewise.
* gimple-ssa-strength-reduction.c: Likewise.
* gimple.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-split.c: Likewise.
* ipa.c: Likewise.
* langhooks.c: Likewise.
* omp-low.c: Likewise.
* sese.c: Likewise.
* stor-layout.c: Likewise.
* targhooks.c: Likewise.
* trans-mem.c: Likewise.
* tree-affine.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-complex.c: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-nested.c: Likewise.
* tree-parloops.c: Likewise.
* tree-predcom.c: Likewise.
* tree-profile.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* tree-ssa-loop-im.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-math-opts.c: 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-strlen.c: Likewise.
* tree-ssa.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-stmts.c: Likewise.
* tree.c: Likewise.
* tsan.c: Likewise.
* value-prof.c: Likewise.
* config/aarch64/aarch64.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/darwin.c: Likewise.
* config/i386/i386.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/mep/mep.c: Likewise.
* config/mips/mips.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/s390/s390.c: Likewise.
* config/sh/sh.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/spu/spu.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/tilegx/tilegx.c: Likewise.
* config/tilepro/tilepro.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* c/c-typeck.c: Include only gimplify.h and gimple.h as needed.
* c-family/c-common.c: Likewise.
* c-family/c-gimplify.c: Likewise.
* c-family/cilk.c: Likewise.
* cp/class.c: Include only gimplify.h and gimple.h as needed.
* cp/cp-gimplify.c: Likewise.
* cp/error.c: Likewise.
* cp/init.c: Likewise.
* cp/optimize.c: Likewise.
* cp/pt.c: Likewise.
* cp/semantics.c: Likewise.
* cp/tree.c: Likewise.
* cp/vtable-class-hierarchy.c: Likewise.
* fortran/trans-expr.c: Include only gimplify.h and gimple.h as needed.
* fortran/trans-openmp.c: Likewise.
* go/go-lang.c: Include only gimplify.h and gimple.h as needed.
* java/java-gimplify.c: Include only gimplify.h and gimple.h as needed.
* objc/objc-act.c: Include only gimplify.h and gimple.h as needed.
From-SVN: r204812
2013-11-14 20:39:38 +01:00
|
|
|
#include "gimplify.h"
|
|
|
|
#include "gimplify-me.h"
|
2013-10-23 14:16:58 +02:00
|
|
|
#include "tree-cfg.h"
|
2013-10-23 20:55:46 +02:00
|
|
|
#include "tree-ssa-loop-manip.h"
|
|
|
|
#include "tree-ssa-loop-niter.h"
|
2013-10-23 14:16:58 +02:00
|
|
|
#include "tree-ssa-loop.h"
|
|
|
|
#include "tree-into-ssa.h"
|
2012-07-16 14:01:34 +02:00
|
|
|
#include "tree-pass.h"
|
2009-07-31 04:43:11 +02:00
|
|
|
#include "cfgloop.h"
|
|
|
|
#include "tree-data-ref.h"
|
|
|
|
#include "tree-scalar-evolution.h"
|
|
|
|
#include "domwalk.h"
|
2015-07-13 17:41:54 +02:00
|
|
|
#include "tree-ssa-propagate.h"
|
2015-11-23 15:23:59 +01:00
|
|
|
|
|
|
|
#include <isl/constraint.h>
|
|
|
|
#include <isl/set.h>
|
|
|
|
#include <isl/map.h>
|
|
|
|
#include <isl/union_map.h>
|
|
|
|
#include <isl/constraint.h>
|
|
|
|
#include <isl/aff.h>
|
|
|
|
#include <isl/val.h>
|
|
|
|
|
2015-11-24 18:57:45 +01:00
|
|
|
#include "graphite.h"
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
/* Assigns to RES the value of the INTEGER_CST T. */
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
tree_int_to_gmp (tree t, mpz_t res)
|
|
|
|
{
|
2014-05-06 18:25:05 +02:00
|
|
|
wi::to_mpz (t, res, TYPE_SIGN (TREE_TYPE (t)));
|
2012-07-02 13:43:46 +02:00
|
|
|
}
|
|
|
|
|
2015-12-17 19:50:05 +01:00
|
|
|
/* Return an isl identifier for the polyhedral basic block PBB. */
|
2012-07-02 13:43:46 +02:00
|
|
|
|
|
|
|
static isl_id *
|
|
|
|
isl_id_for_pbb (scop_p s, poly_bb_p pbb)
|
|
|
|
{
|
2017-01-09 00:42:09 +01:00
|
|
|
char name[14];
|
2012-07-02 13:43:46 +02:00
|
|
|
snprintf (name, sizeof (name), "S_%d", pbb_index (pbb));
|
2015-10-06 17:56:03 +02:00
|
|
|
return isl_id_alloc (s->isl_context, name, pbb);
|
2012-07-02 13:43:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static isl_pw_aff *extract_affine (scop_p, tree, __isl_take isl_space *space);
|
|
|
|
|
|
|
|
/* Extract an affine expression from the chain of recurrence E. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_pw_aff *
|
|
|
|
extract_affine_chrec (scop_p s, tree e, __isl_take isl_space *space)
|
|
|
|
{
|
|
|
|
isl_pw_aff *lhs = extract_affine (s, CHREC_LEFT (e), isl_space_copy (space));
|
|
|
|
isl_pw_aff *rhs = extract_affine (s, CHREC_RIGHT (e), isl_space_copy (space));
|
|
|
|
isl_local_space *ls = isl_local_space_from_space (space);
|
2015-10-21 20:53:17 +02:00
|
|
|
unsigned pos = sese_loop_depth (s->scop_info->region, get_chrec_loop (e)) - 1;
|
2012-07-02 13:43:46 +02:00
|
|
|
isl_aff *loop = isl_aff_set_coefficient_si
|
|
|
|
(isl_aff_zero_on_domain (ls), isl_dim_in, pos, 1);
|
|
|
|
isl_pw_aff *l = isl_pw_aff_from_aff (loop);
|
|
|
|
|
|
|
|
/* Before multiplying, make sure that the result is affine. */
|
|
|
|
gcc_assert (isl_pw_aff_is_cst (rhs)
|
|
|
|
|| isl_pw_aff_is_cst (l));
|
|
|
|
|
|
|
|
return isl_pw_aff_add (lhs, isl_pw_aff_mul (rhs, l));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Extract an affine expression from the mult_expr E. */
|
|
|
|
|
|
|
|
static isl_pw_aff *
|
|
|
|
extract_affine_mul (scop_p s, tree e, __isl_take isl_space *space)
|
|
|
|
{
|
|
|
|
isl_pw_aff *lhs = extract_affine (s, TREE_OPERAND (e, 0),
|
|
|
|
isl_space_copy (space));
|
|
|
|
isl_pw_aff *rhs = extract_affine (s, TREE_OPERAND (e, 1), space);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
if (!isl_pw_aff_is_cst (lhs)
|
|
|
|
&& !isl_pw_aff_is_cst (rhs))
|
|
|
|
{
|
|
|
|
isl_pw_aff_free (lhs);
|
|
|
|
isl_pw_aff_free (rhs);
|
|
|
|
return NULL;
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
return isl_pw_aff_mul (lhs, rhs);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2015-12-17 19:50:05 +01:00
|
|
|
/* Return an isl identifier from the name of the ssa_name E. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_id *
|
|
|
|
isl_id_for_ssa_name (scop_p s, tree e)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2017-01-09 00:42:09 +01:00
|
|
|
char name1[14];
|
2015-11-30 21:29:15 +01:00
|
|
|
snprintf (name1, sizeof (name1), "P_%d", SSA_NAME_VERSION (e));
|
|
|
|
return isl_id_alloc (s->isl_context, name1, e);
|
2012-07-02 13:43:46 +02:00
|
|
|
}
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2015-12-17 19:50:05 +01:00
|
|
|
/* Return an isl identifier for the data reference DR. Data references and
|
2015-11-12 01:37:47 +01:00
|
|
|
scalar references get the same isl_id. They need to be comparable and are
|
|
|
|
distinguished through the first dimension, which contains the alias set or
|
|
|
|
SSA_NAME_VERSION number. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_id *
|
2015-11-12 01:37:47 +01:00
|
|
|
isl_id_for_dr (scop_p s)
|
2012-07-02 13:43:46 +02:00
|
|
|
{
|
2015-10-06 17:56:03 +02:00
|
|
|
return isl_id_alloc (s->isl_context, "", 0);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
/* Extract an affine expression from the ssa_name E. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_pw_aff *
|
|
|
|
extract_affine_name (scop_p s, tree e, __isl_take isl_space *space)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2015-10-06 17:56:03 +02:00
|
|
|
isl_id *id = isl_id_for_ssa_name (s, e);
|
|
|
|
int dimension = isl_space_find_dim_by_id (space, isl_dim_param, id);
|
alloc-pool.c, [...]: Add missing whitespace before "(".
gcc/
* alloc-pool.c, asan.c, auto-inc-dec.c, basic-block.h, bb-reorder.c,
bitmap.c, bitmap.h, bt-load.c, builtins.c, calls.c, cfgcleanup.c,
cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cfgrtl.c, cgraph.c,
cgraph.h, cgraphbuild.c, cgraphclones.c, cgraphunit.c, collect2.c,
combine-stack-adj.c, combine.c, compare-elim.c, context.c, context.h,
cprop.c, cse.c, cselib.c, dbxout.c, dce.c, defaults.h, df-core.c,
df-problems.c, df-scan.c, df.h, diagnostic.c, double-int.c, dse.c,
dumpfile.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c,
errors.c, except.c, expmed.c, expr.c, file-find.c, final.c,
fixed-value.c, fold-const.c, function.c, fwprop.c, gcc-ar.c, gcc.c,
gcov-io.c, gcov-io.h, gcov.c, gcse.c, genattr-common.c, genattr.c,
genattrtab.c, genautomata.c, genconfig.c, genemit.c, genextract.c,
genflags.c, gengenrtl.c, gengtype-state.c, gengtype.c, genmodes.c,
genopinit.c, genoutput.c, genpeep.c, genpreds.c, genrecog.c,
gensupport.c, ggc-common.c, ggc-page.c, gimple-fold.c, gimple-low.c,
gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple.c,
gimple.h, godump.c, graphite-clast-to-gimple.c,
graphite-optimize-isl.c, graphite-poly.h, graphite-sese-to-poly.c,
graphite.c, haifa-sched.c, hash-table.c, hash-table.h, hwint.c,
hwint.h, ifcvt.c, incpath.c, init-regs.c, input.h, intl.c, intl.h,
ipa-cp.c, ipa-devirt.c, ipa-inline-analysis.c, ipa-inline.c,
ipa-profile.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c,
ipa-utils.c, ipa.c, ira-build.c, ira.c, jump.c, loop-doloop.c,
loop-init.c, loop-invariant.c, loop-iv.c, lower-subreg.c, lto-cgraph.c,
lto-streamer-in.c, lto-streamer-out.c, lto-wrapper.c, mcf.c,
mode-switching.c, modulo-sched.c, omp-low.c, optabs.c, opts.c,
pass_manager.h, passes.c, plugin.c, postreload-gcse.c, postreload.c,
predict.c, prefix.c, pretty-print.c, print-rtl.c, print-tree.c,
profile.c, read-md.c, real.c, real.h, recog.c, ree.c, reg-stack.c,
regcprop.c, reginfo.c, regmove.c, regrename.c, regs.h, regstat.c,
reload1.c, reorg.c, rtl.c, rtl.h, rtlanal.c, sbitmap.c, sched-rgn.c,
sdbout.c, sel-sched-ir.c, sel-sched.c, sparseset.c, stack-ptr-mod.c,
statistics.c, stmt.c, stor-layout.c, store-motion.c, streamer-hooks.h,
system.h, target-hooks-macros.h, targhooks.c, targhooks.h, toplev.c,
tracer.c, trans-mem.c, tree-browser.c, tree-call-cdce.c, tree-cfg.c,
tree-cfgcleanup.c, tree-complex.c, tree-data-ref.c, tree-data-ref.h,
tree-eh.c, tree-emutls.c, tree-flow.h, tree-if-conv.c, tree-into-ssa.c,
tree-iterator.c, tree-loop-distribution.c, tree-mudflap.c,
tree-nested.c, tree-nomudflap.c, tree-nrv.c, tree-object-size.c,
tree-optimize.c, tree-pass.h, tree-pretty-print.c, tree-profile.c,
tree-scalar-evolution.c, tree-sra.c, tree-ssa-ccp.c,
tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,
tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c,
tree-ssa-ifcombine.c, tree-ssa-live.c, tree-ssa-loop-ch.c,
tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-prefetch.c,
tree-ssa-loop.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c,
tree-ssa-reassoc.c, tree-ssa-sink.c, tree-ssa-strlen.c,
tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c,
tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-ssa.c, tree-ssanames.c,
tree-stdarg.c, tree-switch-conversion.c, tree-tailcall.c,
tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c,
tree-vect-stmts.c, tree-vectorizer.c, tree-vectorizer.h, tree-vrp.c,
tree.c, tree.h, tsan.c, tsystem.h, value-prof.c, var-tracking.c,
varasm.c, vec.h, vmsdbgout.c, vtable-verify.c, web.c: Add missing
whitespace before "(".
From-SVN: r203004
2013-09-28 10:42:34 +02:00
|
|
|
isl_id_free (id);
|
2015-10-06 17:56:03 +02:00
|
|
|
isl_set *dom = isl_set_universe (isl_space_copy (space));
|
|
|
|
isl_aff *aff = isl_aff_zero_on_domain (isl_local_space_from_space (space));
|
2012-07-02 13:43:46 +02:00
|
|
|
aff = isl_aff_add_coefficient_si (aff, isl_dim_param, dimension, 1);
|
|
|
|
return isl_pw_aff_alloc (dom, aff);
|
|
|
|
}
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2017-02-16 08:53:53 +01:00
|
|
|
/* Convert WI to a isl_val with CTX. */
|
|
|
|
|
|
|
|
static __isl_give isl_val *
|
|
|
|
isl_val_int_from_wi (isl_ctx *ctx, const widest_int &wi)
|
|
|
|
{
|
|
|
|
if (wi::neg_p (wi, SIGNED))
|
|
|
|
{
|
|
|
|
widest_int mwi = -wi;
|
|
|
|
return isl_val_neg (isl_val_int_from_chunks (ctx, mwi.get_len (),
|
|
|
|
sizeof (HOST_WIDE_INT),
|
|
|
|
mwi.get_val ()));
|
|
|
|
}
|
|
|
|
return isl_val_int_from_chunks (ctx, wi.get_len (), sizeof (HOST_WIDE_INT),
|
|
|
|
wi.get_val ());
|
|
|
|
}
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
/* Extract an affine expression from the gmp constant G. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_pw_aff *
|
2017-02-16 08:53:53 +01:00
|
|
|
extract_affine_wi (const widest_int &g, __isl_take isl_space *space)
|
2012-07-02 13:43:46 +02:00
|
|
|
{
|
|
|
|
isl_local_space *ls = isl_local_space_from_space (isl_space_copy (space));
|
|
|
|
isl_aff *aff = isl_aff_zero_on_domain (ls);
|
|
|
|
isl_set *dom = isl_set_universe (space);
|
2015-10-06 17:56:03 +02:00
|
|
|
isl_ctx *ct = isl_aff_get_ctx (aff);
|
2017-02-16 08:53:53 +01:00
|
|
|
isl_val *v = isl_val_int_from_wi (ct, g);
|
2014-08-11 17:05:48 +02:00
|
|
|
aff = isl_aff_add_constant_val (aff, v);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
return isl_pw_aff_alloc (dom, aff);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
/* Extract an affine expression from the integer_cst E. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_pw_aff *
|
|
|
|
extract_affine_int (tree e, __isl_take isl_space *space)
|
|
|
|
{
|
2017-02-16 08:53:53 +01:00
|
|
|
isl_pw_aff *res = extract_affine_wi (wi::to_widest (e), space);
|
2012-07-02 13:43:46 +02:00
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Compute pwaff mod 2^width. */
|
|
|
|
|
|
|
|
static isl_pw_aff *
|
|
|
|
wrap (isl_pw_aff *pwaff, unsigned width)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2014-08-11 17:05:48 +02:00
|
|
|
isl_val *mod;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2015-07-17 18:34:21 +02:00
|
|
|
mod = isl_val_int_from_ui (isl_pw_aff_get_ctx (pwaff), width);
|
2014-08-11 17:05:48 +02:00
|
|
|
mod = isl_val_2exp (mod);
|
|
|
|
pwaff = isl_pw_aff_mod_val (pwaff, mod);
|
2012-07-02 13:43:46 +02:00
|
|
|
|
|
|
|
return pwaff;
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* When parameter NAME is in REGION, returns its index in SESE_PARAMS.
|
|
|
|
Otherwise returns -1. */
|
|
|
|
|
|
|
|
static inline int
|
2015-10-07 17:40:17 +02:00
|
|
|
parameter_index_in_region_1 (tree name, sese_info_p region)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
tree p;
|
|
|
|
|
|
|
|
gcc_assert (TREE_CODE (name) == SSA_NAME);
|
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
FOR_EACH_VEC_ELT (region->params, i, p)
|
2009-07-31 04:43:11 +02:00
|
|
|
if (p == name)
|
|
|
|
return i;
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
/* Extract an affine expression from the tree E in the scop S. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_pw_aff *
|
|
|
|
extract_affine (scop_p s, tree e, __isl_take isl_space *space)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2012-07-02 13:43:46 +02:00
|
|
|
isl_pw_aff *lhs, *rhs, *res;
|
|
|
|
|
|
|
|
if (e == chrec_dont_know) {
|
|
|
|
isl_space_free (space);
|
|
|
|
return NULL;
|
|
|
|
}
|
2009-07-31 04:43:11 +02:00
|
|
|
|
|
|
|
switch (TREE_CODE (e))
|
|
|
|
{
|
|
|
|
case POLYNOMIAL_CHREC:
|
2012-07-02 13:43:46 +02:00
|
|
|
res = extract_affine_chrec (s, e, space);
|
2009-07-31 04:43:11 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case MULT_EXPR:
|
2012-07-02 13:43:46 +02:00
|
|
|
res = extract_affine_mul (s, e, space);
|
2009-07-31 04:43:11 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PLUS_EXPR:
|
|
|
|
case POINTER_PLUS_EXPR:
|
2012-07-02 13:43:46 +02:00
|
|
|
lhs = extract_affine (s, TREE_OPERAND (e, 0), isl_space_copy (space));
|
|
|
|
rhs = extract_affine (s, TREE_OPERAND (e, 1), space);
|
|
|
|
res = isl_pw_aff_add (lhs, rhs);
|
2009-07-31 04:43:11 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case MINUS_EXPR:
|
2012-07-02 13:43:46 +02:00
|
|
|
lhs = extract_affine (s, TREE_OPERAND (e, 0), isl_space_copy (space));
|
|
|
|
rhs = extract_affine (s, TREE_OPERAND (e, 1), space);
|
|
|
|
res = isl_pw_aff_sub (lhs, rhs);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
|
|
|
case NEGATE_EXPR:
|
2012-07-02 13:43:46 +02:00
|
|
|
case BIT_NOT_EXPR:
|
|
|
|
lhs = extract_affine (s, TREE_OPERAND (e, 0), isl_space_copy (space));
|
|
|
|
rhs = extract_affine (s, integer_minus_one_node, space);
|
|
|
|
res = isl_pw_aff_mul (lhs, rhs);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
case SSA_NAME:
|
2015-10-21 20:53:17 +02:00
|
|
|
gcc_assert (-1 != parameter_index_in_region_1 (e, s->scop_info)
|
2017-01-31 15:44:37 +01:00
|
|
|
|| defined_in_sese_p (e, s->scop_info->region));
|
2012-07-02 13:43:46 +02:00
|
|
|
res = extract_affine_name (s, e, space);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
case INTEGER_CST:
|
|
|
|
res = extract_affine_int (e, space);
|
|
|
|
/* No need to wrap a single integer. */
|
|
|
|
return res;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
CASE_CONVERT:
|
|
|
|
case NON_LVALUE_EXPR:
|
|
|
|
res = extract_affine (s, TREE_OPERAND (e, 0), space);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
default:
|
|
|
|
gcc_unreachable ();
|
|
|
|
break;
|
|
|
|
}
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2015-10-06 17:56:03 +02:00
|
|
|
tree type = TREE_TYPE (e);
|
2012-07-02 13:43:46 +02:00
|
|
|
if (TYPE_UNSIGNED (type))
|
|
|
|
res = wrap (res, TYPE_PRECISION (type));
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
return res;
|
|
|
|
}
|
2009-07-31 04:43:11 +02:00
|
|
|
|
|
|
|
/* Returns a linear expression for tree T evaluated in PBB. */
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_pw_aff *
|
2017-01-31 15:44:37 +01:00
|
|
|
create_pw_aff_from_tree (poly_bb_p pbb, loop_p loop, tree t)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2012-07-02 13:43:46 +02:00
|
|
|
scop_p scop = PBB_SCOP (pbb);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2017-01-31 15:44:37 +01:00
|
|
|
t = scalar_evolution_in_region (scop->scop_info->region, loop, t);
|
2015-11-23 20:28:13 +01:00
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
gcc_assert (!chrec_contains_undetermined (t));
|
2009-07-31 04:43:11 +02:00
|
|
|
gcc_assert (!automatically_generated_chrec_p (t));
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
return extract_affine (scop, t, isl_set_get_space (pbb->domain));
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
/* Add conditional statement STMT to pbb. CODE is used as the comparison
|
|
|
|
operator. This allows us to invert the condition or to handle
|
|
|
|
inequalities. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
static void
|
2014-11-19 18:00:54 +01:00
|
|
|
add_condition_to_pbb (poly_bb_p pbb, gcond *stmt, enum tree_code code)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2017-01-31 15:44:37 +01:00
|
|
|
loop_p loop = gimple_bb (stmt)->loop_father;
|
|
|
|
isl_pw_aff *lhs = create_pw_aff_from_tree (pbb, loop, gimple_cond_lhs (stmt));
|
|
|
|
isl_pw_aff *rhs = create_pw_aff_from_tree (pbb, loop, gimple_cond_rhs (stmt));
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2015-11-23 20:28:13 +01:00
|
|
|
isl_set *cond;
|
2012-07-02 13:43:46 +02:00
|
|
|
switch (code)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2012-07-02 13:43:46 +02:00
|
|
|
case LT_EXPR:
|
|
|
|
cond = isl_pw_aff_lt_set (lhs, rhs);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
case GT_EXPR:
|
|
|
|
cond = isl_pw_aff_gt_set (lhs, rhs);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
case LE_EXPR:
|
|
|
|
cond = isl_pw_aff_le_set (lhs, rhs);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
case GE_EXPR:
|
|
|
|
cond = isl_pw_aff_ge_set (lhs, rhs);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
case EQ_EXPR:
|
|
|
|
cond = isl_pw_aff_eq_set (lhs, rhs);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
case NE_EXPR:
|
|
|
|
cond = isl_pw_aff_ne_set (lhs, rhs);
|
|
|
|
break;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
default:
|
2016-01-26 01:19:20 +01:00
|
|
|
gcc_unreachable ();
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
2012-07-02 13:43:46 +02:00
|
|
|
|
|
|
|
cond = isl_set_coalesce (cond);
|
|
|
|
cond = isl_set_set_tuple_id (cond, isl_set_get_tuple_id (pbb->domain));
|
2016-01-21 03:12:26 +01:00
|
|
|
pbb->domain = isl_set_coalesce (isl_set_intersect (pbb->domain, cond));
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Add conditions to the domain of PBB. */
|
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
static void
|
2009-07-31 04:43:11 +02:00
|
|
|
add_conditions_to_domain (poly_bb_p pbb)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
2015-09-20 02:52:59 +02:00
|
|
|
gimple *stmt;
|
2015-10-02 00:04:14 +02:00
|
|
|
gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
This patch rewrites the old VEC macro-based interface into a new one
based on the template class 'vec'. The user-visible changes are
described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.
I have tested the patch pretty extensively:
- Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
- Bootstraps with --enable-checking=release
- Bootstraps with --enable-checking=gc,gcac
- Basic builds on all targets (using contrib/config-list.mk).
We no longer access the vectors via VEC_* macros. The pattern is
"VEC_operation (T, A, V, args)" becomes "V.operation (args)".
The only thing I could not do is create proper ctors and dtors for the
vec class. Since these vectors are stored in unions, we
have to keep them as PODs (C++03 does not allow non-PODs in unions).
This means that creation and destruction must be explicit. There is a
new method vec<type, allocation, layout>::create() and another vec<type,
allocation, layout>::destroy() to allocate the internal vector.
For vectors that must be pointers, there is a family of free functions
that implement the operations that need to tolerate NULL vectors.
These functions all start with the prefix 'vec_safe_'. See the wiki
page for details.
The gengtype change removes the special handling for VEC() that used
to exist in gengtype. Additionally, it allows gengtype to recognize
templates of more than one argument and introduces the concept of an
undefined type (useful for template arguments that may or may not be
types).
When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
happens inside a type marked with GTY((user)). Otherwise, it will
emit an error.
Finally, gengtype rejects root types marked GTY((user)) that are not
first class pointers.
2012-11-16 Diego Novillo <dnovillo@google.com>
VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* vec.c (register_overhead): Convert it into
member function of vec_prefix.
(release_overhead): Likewise.
(calculate_allocation): Likewise.
(vec_heap_free): Remove.
(vec_gc_o_reserve_1): Remove.
(vec_heap_o_reserve_1): Remove.
(vec_stack_o_reserve_1): Remove.
(vec_stack_o_reserve_exact): Remove.
(register_stack_vec): New.
(stack_vec_register_index): New.
(unregister_stack_vec): New.
(vec_assert_fail): Remove.
* vec.h: Conditionally include ggc.h. Document conditional
hackery.
Update top-level documentation.
(ALONE_VEC_CHECK_INFO): Remove.
(VEC_CHECK_INFO): Remove.
(ALONE_VEC_CHECK_DECL): Remove.
(VEC_CHECK_DECL): Remove.
(ALONE_VEC_CHECK_PASS): Remove.
(VEC_CHECK_PASS): Remove.
(VEC_ASSERT): Remove.
(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
va_stack.
Mark fields alloc_ and num_ as protected.
(struct vec_t): Remove. Remove all function members.
(struct vl_embed): Declare.
(struct vl_ptr): Declare.
(free): Remove.
(reserve_exact): Remove.
(reserve): Remove.
(safe_splice): Remove.
(safe_push): Remove.
(safe_grow): Remove.
(safe_grow_cleared): Remove.
(safe_insert): Remove.
(DEF_VEC_I): Remove.
(DEF_VEC_ALLOC_I): Remove.
(DEF_VEC_P): Remove.
(DEF_VEC_ALLOC_P): Remove.
(DEF_VEC_O): Remove.
(DEF_VEC_ALLOC_O): Remove.
(DEF_VEC_ALLOC_P_STACK): Remove.
(DEF_VEC_ALLOC_O_STACK): Remove.
(DEF_VEC_ALLOC_I_STACK): Remove.
(DEF_VEC_A): Remove.
(DEF_VEC_ALLOC_A): Remove.
(vec_stack_p_reserve_exact_1): Remove.
(vec_stack_o_reserve): Remove.
(vec_stack_o_reserve_exact): Remove.
(VEC_length): Remove.
(VEC_empty): Remove.
(VEC_address): Remove.
(vec_address): Remove.
(VEC_last): Remove.
(VEC_index): Remove.
(VEC_iterate): Remove.
(VEC_embedded_size): Remove.
(VEC_embedded_init): Remove.
(VEC_free): Remove.
(VEC_copy): Remove.
(VEC_space): Remove.
(VEC_reserve): Remove.
(VEC_reserve_exact): Remove.
(VEC_splice): Remove.
(VEC_safe_splice): Remove.
(VEC_quick_push): Remove.
(VEC_safe_push): Remove.
(VEC_pop): Remove.
(VEC_truncate): Remove.
(VEC_safe_grow): Remove.
(VEC_replace): Remove.
(VEC_quick_insert): Remove.
(VEC_safe_insert): Remove.
(VEC_ordered_remove): Remove.
(VEC_unordered_remove): Remove.
(VEC_block_remove): Remove.
(VEC_lower_bound): Remove.
(VEC_alloc): Remove.
(VEC_qsort): Remove.
(va_heap): Declare.
(va_heap::default_layout): New typedef to vl_ptr.
(va_heap::reserve): New.
(va_heap::release): New.
(va_gc): Declare.
(va_gc::default_layout): New typedef to vl_embed.
(va_gc::reserve): New.
(va_gc::release): New.
(va_gc_atomic): Declare. Inherit from va_gc.
(va_stack): Declare.
(va_stack::default_layout): New typedef to vl_ptr.
(va_stack::alloc): New.
(va_stack::reserve): New.
(va_stack::release): New.
(register_stack_vec): Declare.
(stack_vec_register_index): Declare.
(unregister_stack_vec): Declare.
(vec<T, A = va_heap, L = typename A::default_layout>): Declare
empty vec template.
(vec<T, A, vl_embed>): Partial specialization for embedded
layout.
(vec<T, A, vl_embed>::allocated): New.
(vec<T, A, vl_embed>::length): New.
(vec<T, A, vl_embed>::is_empty): New.
(vec<T, A, vl_embed>::address): New.
(vec<T, A, vl_embed>::operator[]): New.
(vec<T, A, vl_embed>::last New.
(vec<T, A, vl_embed>::space): New.
(vec<T, A, vl_embed>::iterate): New.
(vec<T, A, vl_embed>::iterate): New.
(vec<T, A, vl_embed>::copy): New.
(vec<T, A, vl_embed>::splice): New.
(vec<T, A, vl_embed>::quick_push New.
(vec<T, A, vl_embed>::pop New.
(vec<T, A, vl_embed>::truncate): New.
(vec<T, A, vl_embed>::quick_insert): New.
(vec<T, A, vl_embed>::ordered_remove): New.
(vec<T, A, vl_embed>::unordered_remove): New.
(vec<T, A, vl_embed>::block_remove): New.
(vec<T, A, vl_embed>::qsort): New.
(vec<T, A, vl_embed>::lower_bound): New.
(vec<T, A, vl_embed>::embedded_size): New.
(vec<T, A, vl_embed>::embedded_init): New.
(vec<T, A, vl_embed>::quick_grow): New.
(vec<T, A, vl_embed>::quick_grow_cleared): New.
(vec_safe_space): New.
(vec_safe_length): New.
(vec_safe_address): New.
(vec_safe_is_empty): New.
(vec_safe_reserve): New.
(vec_safe_reserve_exact): New.
(vec_alloc): New.
(vec_free): New.
(vec_safe_grow): New.
(vec_safe_grow_cleared): New.
(vec_safe_iterate): New.
(vec_safe_push): New.
(vec_safe_insert): New.
(vec_safe_truncate): New.
(vec_safe_copy): New.
(vec_safe_splice): New.
(vec<T, A, vl_ptr>): New partial specialization for the space
efficient layout.
(vec<T, A, vl_ptr>::exists): New.
(vec<T, A, vl_ptr>::is_empty): New.
(vec<T, A, vl_ptr>::length): New.
(vec<T, A, vl_ptr>::address): New.
(vec<T, A, vl_ptr>::operator[]): New.
(vec<T, A, vl_ptr>::operator!=): New.
(vec<T, A, vl_ptr>::operator==): New.
(vec<T, A, vl_ptr>::last): New.
(vec<T, A, vl_ptr>::space): New.
(vec<T, A, vl_ptr>::iterate): New.
(vec<T, A, vl_ptr>::copy): New.
(vec<T, A, vl_ptr>::reserve): New.
(vec<T, A, vl_ptr>::reserve_exact): New.
(vec<T, A, vl_ptr>::splice): New.
(vec<T, A, vl_ptr>::safe_splice): New.
(vec<T, A, vl_ptr>::quick_push): New.
(vec<T, A, vl_ptr>::safe_push): New.
(vec<T, A, vl_ptr>::pop): New.
(vec<T, A, vl_ptr>::truncate): New.
(vec<T, A, vl_ptr>::safe_grow): New.
(vec<T, A, vl_ptr>::safe_grow_cleared): New.
(vec<T, A, vl_ptr>::quick_grow): New.
(vec<T, A, vl_ptr>::quick_grow_cleared): New.
(vec<T, A, vl_ptr>::quick_insert): New.
(vec<T, A, vl_ptr>::safe_insert): New.
(vec<T, A, vl_ptr>::ordered_remove): New.
(vec<T, A, vl_ptr>::unordered_remove): New.
(vec<T, A, vl_ptr>::block_remove): New.
(vec<T, A, vl_ptr>::qsort): New.
(vec<T, A, vl_ptr>::lower_bound): New.
(vec_stack_alloc): Define.
(FOR_EACH_VEC_SAFE_ELT): Define.
* vecir.h: Remove. Update all users.
* vecprim.h: Remove. Update all users.
Move uchar to coretypes.h.
* Makefile.in (VEC_H): Add $(GGC_H).
Remove vecir.h and vecprim.h dependencies everywhere.
2012-11-16 Diego Novillo <dnovillo@google.com>
* gengtype-lex.l (VEC): Remove.
Add characters in the set [\!\>\.-].
* gengtype-parse.c (token_names): Remove "VEC".
(require_template_declaration): Remove handling of VEC_TOKEN.
(type): Likewise.
Call create_user_defined_type when parsing GTY((user)).
* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
(write_state_undefined_type): New.
(write_state_type): Call write_state_undefined_type for
TYPE_UNDEFINED.
(read_state_type): Call read_state_undefined_type for
TYPE_UNDEFINED.
* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
(create_user_defined_type): Make extern.
(type_for_name): Factor out of resolve_typedef.
(create_undefined_type): New
(resolve_typedef): Call it when we cannot find a previous
typedef and the type is not a template.
(find_structure): Accept TYPE_UNDEFINED.
(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
default to false.
Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
ALLOWED_UNDEFINED_TYPES is set.
Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
(filter_type_name): Accept templates with more than one
argument.
(output_mangled_typename): Handle TYPE_UNDEFINED
(walk_type): Likewise.
(write_types_process_field): Likewise.
(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
should not be a user-defined type.
(write_types_local_user_process_field): Handle TYPE_ARRAY,
TYPE_NONE and TYPE_UNDEFINED.
(write_types_local_process_field): Likewise.
(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
(write_root): Reject user-defined types that are not pointers.
Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
and TYPE_PARAM_STRUCT.
(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
TYPE_ARRAY.
(dump_typekind): Handle TYPE_UNDEFINED.
* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
(create_user_defined_type): Declare.
(enum gty_token): Remove VEC_TOKEN.
2012-11-16 Diego Novillo <dnovillo@google.com>
Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* coretypes.h (uchar): Define.
* alias.c: Use new vec API in vec.h.
* asan.c: Likewise.
* attribs.c: Likewise.
* basic-block.h: Likewise.
* bb-reorder.c: Likewise.
* builtins.c: Likewise.
* calls.c: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgcleanup.c: Likewise.
* cfgexpand.c: Likewise.
* cfghooks.c: Likewise.
* cfghooks.h: Likewise.
* cfgloop.c: Likewise.
* cfgloop.h: Likewise.
* cfgloopanal.c: Likewise.
* cfgloopmanip.c: Likewise.
* cfgrtl.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* cgraphclones.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* compare-elim.c: Likewise.
* coverage.c: Likewise.
* cprop.c: Likewise.
* data-streamer.h: Likewise.
* dbxout.c: Likewise.
* dce.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* dominance.c: Likewise.
* domwalk.c: Likewise.
* domwalk.h: Likewise.
* dse.c: Likewise.
* dwarf2cfi.c: Likewise.
* dwarf2out.c: Likewise.
* dwarf2out.h: Likewise.
* emit-rtl.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* expr.c: Likewise.
* expr.h: Likewise.
* final.c: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* function.h: Likewise.
* fwprop.c: Likewise.
* gcc.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* genattrtab.c: Likewise.
* genautomata.c: Likewise.
* genextract.c: Likewise.
* genopinit.c: Likewise
* ggc-common.c: Likewise.
* ggc.h: Likewise.
* gimple-low.c: Likewise.
* gimple-ssa-strength-reduction.c: Likewise.
* gimple-streamer-in.c: Likewise.
* gimple.c: Likewise.
* gimple.h: Likewise.
* gimplify.c: Likewise.
* graph.c: Likewise.
* graphds.c: Likewise.
* graphds.h: Likewise.
* graphite-blocking.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-optimize-isl.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-poly.h: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-scop-detection.h: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* godump.c: Likewise.
* haifa-sched.c: Likewise.
* hw-doloop.c: Likewise.
* hw-doloop.h: Likewise.
* ifcvt.c: Likewise.
* insn-addr.h: Likewise.
* ipa-cp.c: Likewise.
* ipa-inline-analysis.c: Likewise.
* ipa-inline-transform.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-inline.h: Likewise.
* ipa-prop.c: Likewise.
* ipa-prop.h: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-ref-inline.h: Likewise.
* ipa-ref.c: Likewise.
* ipa-ref.h: Likewise.
* ipa-reference.c: Likewise.
* ipa-split.c: Likewise.
* ipa-utils.c: Likewise.
* ipa-utils.h: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-emit.c: Likewise.
* ira-int.h: Likewise.
* ira.c: Likewise.
* loop-invariant.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lra-lives.c: Likewise.
* lra.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.h: Likewise.
* lto-symtab.c: Likewise.
* mcf.c: Likewise.
* modulo-sched.c: Likewise.
* omp-low.c: Likewise.
* opts-common.c: Likewise.
* opts-global.c: Likewise.
* opts.c: Likewise.
* opts.h: Likewise.
* passes.c: Likewise.
* predict.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* profile.h: Likewise.
* read-rtl.c: Likewise.
* ree.c: Likewise.
* reg-stack.c: Likewise.
* regrename.c: Likewise.
* regrename.h: Likewise.
* reload.c: Likewise.
* reload.h: Likewise.
* reload1.c: Likewise.
* rtl.h: Likewise.
* sched-deps.c: Likewise.
* sched-int.h: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched-ir.h: Likewise.
* sel-sched.c: Likewise.
* sese.c: Likewise.
* sese.h: Likewise.
* statistics.h: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* tlink.c: Likewise.
* toplev.c: Likewise.
* trans-mem.c: Likewise.
* tree-browser.c: 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-diagnostic.c: Likewise.
* tree-dump.c: Likewise.
* tree-eh.c: Likewise.
* tree-emutls.c: Likewise.
* tree-flow.h: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree-into-ssa.c: Likewise.
* tree-iterator.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-optimize.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-phinodes.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-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-math-opts.c: Likewise.
* tree-ssa-operands.c: 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-sccvn.h: Likewise.
* tree-ssa-strlen.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-tail-merge.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa-uninit.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-streamer-in.c: Likewise.
* tree-streamer-out.c: Likewise.
* tree-streamer.c: Likewise.
* tree-streamer.h: Likewise.
* tree-switch-conversion.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.h: Likewise.
* value-prof.c: Likewise.
* value-prof.h: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* varpool.c: Likewise.
* vmsdbgout.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/c6x/c6x.c: Likewise.
* config/darwin.c: Likewise.
* config/i386/i386.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/mep/mep.c: Likewise.
* config/mips/mips.c: Likewise.
* config/pa/pa.c: Likewise.
* config/rs6000/rs6000-c.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rx/rx.c: Likewise.
* config/spu/spu-c.c: Likewise.
* config/vms/vms.c: Likewise.
* config/vxworks.c: Likewise.
* config/epiphany/resolve-sw-modes.c: Likewise.
From-SVN: r193595
2012-11-18 03:54:30 +01:00
|
|
|
if (GBB_CONDITIONS (gbb).is_empty ())
|
2016-01-26 01:19:20 +01:00
|
|
|
return;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
This patch rewrites the old VEC macro-based interface into a new one
based on the template class 'vec'. The user-visible changes are
described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.
I have tested the patch pretty extensively:
- Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
- Bootstraps with --enable-checking=release
- Bootstraps with --enable-checking=gc,gcac
- Basic builds on all targets (using contrib/config-list.mk).
We no longer access the vectors via VEC_* macros. The pattern is
"VEC_operation (T, A, V, args)" becomes "V.operation (args)".
The only thing I could not do is create proper ctors and dtors for the
vec class. Since these vectors are stored in unions, we
have to keep them as PODs (C++03 does not allow non-PODs in unions).
This means that creation and destruction must be explicit. There is a
new method vec<type, allocation, layout>::create() and another vec<type,
allocation, layout>::destroy() to allocate the internal vector.
For vectors that must be pointers, there is a family of free functions
that implement the operations that need to tolerate NULL vectors.
These functions all start with the prefix 'vec_safe_'. See the wiki
page for details.
The gengtype change removes the special handling for VEC() that used
to exist in gengtype. Additionally, it allows gengtype to recognize
templates of more than one argument and introduces the concept of an
undefined type (useful for template arguments that may or may not be
types).
When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
happens inside a type marked with GTY((user)). Otherwise, it will
emit an error.
Finally, gengtype rejects root types marked GTY((user)) that are not
first class pointers.
2012-11-16 Diego Novillo <dnovillo@google.com>
VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* vec.c (register_overhead): Convert it into
member function of vec_prefix.
(release_overhead): Likewise.
(calculate_allocation): Likewise.
(vec_heap_free): Remove.
(vec_gc_o_reserve_1): Remove.
(vec_heap_o_reserve_1): Remove.
(vec_stack_o_reserve_1): Remove.
(vec_stack_o_reserve_exact): Remove.
(register_stack_vec): New.
(stack_vec_register_index): New.
(unregister_stack_vec): New.
(vec_assert_fail): Remove.
* vec.h: Conditionally include ggc.h. Document conditional
hackery.
Update top-level documentation.
(ALONE_VEC_CHECK_INFO): Remove.
(VEC_CHECK_INFO): Remove.
(ALONE_VEC_CHECK_DECL): Remove.
(VEC_CHECK_DECL): Remove.
(ALONE_VEC_CHECK_PASS): Remove.
(VEC_CHECK_PASS): Remove.
(VEC_ASSERT): Remove.
(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
va_stack.
Mark fields alloc_ and num_ as protected.
(struct vec_t): Remove. Remove all function members.
(struct vl_embed): Declare.
(struct vl_ptr): Declare.
(free): Remove.
(reserve_exact): Remove.
(reserve): Remove.
(safe_splice): Remove.
(safe_push): Remove.
(safe_grow): Remove.
(safe_grow_cleared): Remove.
(safe_insert): Remove.
(DEF_VEC_I): Remove.
(DEF_VEC_ALLOC_I): Remove.
(DEF_VEC_P): Remove.
(DEF_VEC_ALLOC_P): Remove.
(DEF_VEC_O): Remove.
(DEF_VEC_ALLOC_O): Remove.
(DEF_VEC_ALLOC_P_STACK): Remove.
(DEF_VEC_ALLOC_O_STACK): Remove.
(DEF_VEC_ALLOC_I_STACK): Remove.
(DEF_VEC_A): Remove.
(DEF_VEC_ALLOC_A): Remove.
(vec_stack_p_reserve_exact_1): Remove.
(vec_stack_o_reserve): Remove.
(vec_stack_o_reserve_exact): Remove.
(VEC_length): Remove.
(VEC_empty): Remove.
(VEC_address): Remove.
(vec_address): Remove.
(VEC_last): Remove.
(VEC_index): Remove.
(VEC_iterate): Remove.
(VEC_embedded_size): Remove.
(VEC_embedded_init): Remove.
(VEC_free): Remove.
(VEC_copy): Remove.
(VEC_space): Remove.
(VEC_reserve): Remove.
(VEC_reserve_exact): Remove.
(VEC_splice): Remove.
(VEC_safe_splice): Remove.
(VEC_quick_push): Remove.
(VEC_safe_push): Remove.
(VEC_pop): Remove.
(VEC_truncate): Remove.
(VEC_safe_grow): Remove.
(VEC_replace): Remove.
(VEC_quick_insert): Remove.
(VEC_safe_insert): Remove.
(VEC_ordered_remove): Remove.
(VEC_unordered_remove): Remove.
(VEC_block_remove): Remove.
(VEC_lower_bound): Remove.
(VEC_alloc): Remove.
(VEC_qsort): Remove.
(va_heap): Declare.
(va_heap::default_layout): New typedef to vl_ptr.
(va_heap::reserve): New.
(va_heap::release): New.
(va_gc): Declare.
(va_gc::default_layout): New typedef to vl_embed.
(va_gc::reserve): New.
(va_gc::release): New.
(va_gc_atomic): Declare. Inherit from va_gc.
(va_stack): Declare.
(va_stack::default_layout): New typedef to vl_ptr.
(va_stack::alloc): New.
(va_stack::reserve): New.
(va_stack::release): New.
(register_stack_vec): Declare.
(stack_vec_register_index): Declare.
(unregister_stack_vec): Declare.
(vec<T, A = va_heap, L = typename A::default_layout>): Declare
empty vec template.
(vec<T, A, vl_embed>): Partial specialization for embedded
layout.
(vec<T, A, vl_embed>::allocated): New.
(vec<T, A, vl_embed>::length): New.
(vec<T, A, vl_embed>::is_empty): New.
(vec<T, A, vl_embed>::address): New.
(vec<T, A, vl_embed>::operator[]): New.
(vec<T, A, vl_embed>::last New.
(vec<T, A, vl_embed>::space): New.
(vec<T, A, vl_embed>::iterate): New.
(vec<T, A, vl_embed>::iterate): New.
(vec<T, A, vl_embed>::copy): New.
(vec<T, A, vl_embed>::splice): New.
(vec<T, A, vl_embed>::quick_push New.
(vec<T, A, vl_embed>::pop New.
(vec<T, A, vl_embed>::truncate): New.
(vec<T, A, vl_embed>::quick_insert): New.
(vec<T, A, vl_embed>::ordered_remove): New.
(vec<T, A, vl_embed>::unordered_remove): New.
(vec<T, A, vl_embed>::block_remove): New.
(vec<T, A, vl_embed>::qsort): New.
(vec<T, A, vl_embed>::lower_bound): New.
(vec<T, A, vl_embed>::embedded_size): New.
(vec<T, A, vl_embed>::embedded_init): New.
(vec<T, A, vl_embed>::quick_grow): New.
(vec<T, A, vl_embed>::quick_grow_cleared): New.
(vec_safe_space): New.
(vec_safe_length): New.
(vec_safe_address): New.
(vec_safe_is_empty): New.
(vec_safe_reserve): New.
(vec_safe_reserve_exact): New.
(vec_alloc): New.
(vec_free): New.
(vec_safe_grow): New.
(vec_safe_grow_cleared): New.
(vec_safe_iterate): New.
(vec_safe_push): New.
(vec_safe_insert): New.
(vec_safe_truncate): New.
(vec_safe_copy): New.
(vec_safe_splice): New.
(vec<T, A, vl_ptr>): New partial specialization for the space
efficient layout.
(vec<T, A, vl_ptr>::exists): New.
(vec<T, A, vl_ptr>::is_empty): New.
(vec<T, A, vl_ptr>::length): New.
(vec<T, A, vl_ptr>::address): New.
(vec<T, A, vl_ptr>::operator[]): New.
(vec<T, A, vl_ptr>::operator!=): New.
(vec<T, A, vl_ptr>::operator==): New.
(vec<T, A, vl_ptr>::last): New.
(vec<T, A, vl_ptr>::space): New.
(vec<T, A, vl_ptr>::iterate): New.
(vec<T, A, vl_ptr>::copy): New.
(vec<T, A, vl_ptr>::reserve): New.
(vec<T, A, vl_ptr>::reserve_exact): New.
(vec<T, A, vl_ptr>::splice): New.
(vec<T, A, vl_ptr>::safe_splice): New.
(vec<T, A, vl_ptr>::quick_push): New.
(vec<T, A, vl_ptr>::safe_push): New.
(vec<T, A, vl_ptr>::pop): New.
(vec<T, A, vl_ptr>::truncate): New.
(vec<T, A, vl_ptr>::safe_grow): New.
(vec<T, A, vl_ptr>::safe_grow_cleared): New.
(vec<T, A, vl_ptr>::quick_grow): New.
(vec<T, A, vl_ptr>::quick_grow_cleared): New.
(vec<T, A, vl_ptr>::quick_insert): New.
(vec<T, A, vl_ptr>::safe_insert): New.
(vec<T, A, vl_ptr>::ordered_remove): New.
(vec<T, A, vl_ptr>::unordered_remove): New.
(vec<T, A, vl_ptr>::block_remove): New.
(vec<T, A, vl_ptr>::qsort): New.
(vec<T, A, vl_ptr>::lower_bound): New.
(vec_stack_alloc): Define.
(FOR_EACH_VEC_SAFE_ELT): Define.
* vecir.h: Remove. Update all users.
* vecprim.h: Remove. Update all users.
Move uchar to coretypes.h.
* Makefile.in (VEC_H): Add $(GGC_H).
Remove vecir.h and vecprim.h dependencies everywhere.
2012-11-16 Diego Novillo <dnovillo@google.com>
* gengtype-lex.l (VEC): Remove.
Add characters in the set [\!\>\.-].
* gengtype-parse.c (token_names): Remove "VEC".
(require_template_declaration): Remove handling of VEC_TOKEN.
(type): Likewise.
Call create_user_defined_type when parsing GTY((user)).
* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
(write_state_undefined_type): New.
(write_state_type): Call write_state_undefined_type for
TYPE_UNDEFINED.
(read_state_type): Call read_state_undefined_type for
TYPE_UNDEFINED.
* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
(create_user_defined_type): Make extern.
(type_for_name): Factor out of resolve_typedef.
(create_undefined_type): New
(resolve_typedef): Call it when we cannot find a previous
typedef and the type is not a template.
(find_structure): Accept TYPE_UNDEFINED.
(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
default to false.
Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
ALLOWED_UNDEFINED_TYPES is set.
Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
(filter_type_name): Accept templates with more than one
argument.
(output_mangled_typename): Handle TYPE_UNDEFINED
(walk_type): Likewise.
(write_types_process_field): Likewise.
(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
should not be a user-defined type.
(write_types_local_user_process_field): Handle TYPE_ARRAY,
TYPE_NONE and TYPE_UNDEFINED.
(write_types_local_process_field): Likewise.
(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
(write_root): Reject user-defined types that are not pointers.
Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
and TYPE_PARAM_STRUCT.
(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
TYPE_ARRAY.
(dump_typekind): Handle TYPE_UNDEFINED.
* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
(create_user_defined_type): Declare.
(enum gty_token): Remove VEC_TOKEN.
2012-11-16 Diego Novillo <dnovillo@google.com>
Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* coretypes.h (uchar): Define.
* alias.c: Use new vec API in vec.h.
* asan.c: Likewise.
* attribs.c: Likewise.
* basic-block.h: Likewise.
* bb-reorder.c: Likewise.
* builtins.c: Likewise.
* calls.c: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgcleanup.c: Likewise.
* cfgexpand.c: Likewise.
* cfghooks.c: Likewise.
* cfghooks.h: Likewise.
* cfgloop.c: Likewise.
* cfgloop.h: Likewise.
* cfgloopanal.c: Likewise.
* cfgloopmanip.c: Likewise.
* cfgrtl.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* cgraphclones.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* compare-elim.c: Likewise.
* coverage.c: Likewise.
* cprop.c: Likewise.
* data-streamer.h: Likewise.
* dbxout.c: Likewise.
* dce.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* dominance.c: Likewise.
* domwalk.c: Likewise.
* domwalk.h: Likewise.
* dse.c: Likewise.
* dwarf2cfi.c: Likewise.
* dwarf2out.c: Likewise.
* dwarf2out.h: Likewise.
* emit-rtl.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* expr.c: Likewise.
* expr.h: Likewise.
* final.c: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* function.h: Likewise.
* fwprop.c: Likewise.
* gcc.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* genattrtab.c: Likewise.
* genautomata.c: Likewise.
* genextract.c: Likewise.
* genopinit.c: Likewise
* ggc-common.c: Likewise.
* ggc.h: Likewise.
* gimple-low.c: Likewise.
* gimple-ssa-strength-reduction.c: Likewise.
* gimple-streamer-in.c: Likewise.
* gimple.c: Likewise.
* gimple.h: Likewise.
* gimplify.c: Likewise.
* graph.c: Likewise.
* graphds.c: Likewise.
* graphds.h: Likewise.
* graphite-blocking.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-optimize-isl.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-poly.h: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-scop-detection.h: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* godump.c: Likewise.
* haifa-sched.c: Likewise.
* hw-doloop.c: Likewise.
* hw-doloop.h: Likewise.
* ifcvt.c: Likewise.
* insn-addr.h: Likewise.
* ipa-cp.c: Likewise.
* ipa-inline-analysis.c: Likewise.
* ipa-inline-transform.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-inline.h: Likewise.
* ipa-prop.c: Likewise.
* ipa-prop.h: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-ref-inline.h: Likewise.
* ipa-ref.c: Likewise.
* ipa-ref.h: Likewise.
* ipa-reference.c: Likewise.
* ipa-split.c: Likewise.
* ipa-utils.c: Likewise.
* ipa-utils.h: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-emit.c: Likewise.
* ira-int.h: Likewise.
* ira.c: Likewise.
* loop-invariant.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lra-lives.c: Likewise.
* lra.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.h: Likewise.
* lto-symtab.c: Likewise.
* mcf.c: Likewise.
* modulo-sched.c: Likewise.
* omp-low.c: Likewise.
* opts-common.c: Likewise.
* opts-global.c: Likewise.
* opts.c: Likewise.
* opts.h: Likewise.
* passes.c: Likewise.
* predict.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* profile.h: Likewise.
* read-rtl.c: Likewise.
* ree.c: Likewise.
* reg-stack.c: Likewise.
* regrename.c: Likewise.
* regrename.h: Likewise.
* reload.c: Likewise.
* reload.h: Likewise.
* reload1.c: Likewise.
* rtl.h: Likewise.
* sched-deps.c: Likewise.
* sched-int.h: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched-ir.h: Likewise.
* sel-sched.c: Likewise.
* sese.c: Likewise.
* sese.h: Likewise.
* statistics.h: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* tlink.c: Likewise.
* toplev.c: Likewise.
* trans-mem.c: Likewise.
* tree-browser.c: 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-diagnostic.c: Likewise.
* tree-dump.c: Likewise.
* tree-eh.c: Likewise.
* tree-emutls.c: Likewise.
* tree-flow.h: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree-into-ssa.c: Likewise.
* tree-iterator.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-optimize.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-phinodes.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-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-math-opts.c: Likewise.
* tree-ssa-operands.c: 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-sccvn.h: Likewise.
* tree-ssa-strlen.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-tail-merge.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa-uninit.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-streamer-in.c: Likewise.
* tree-streamer-out.c: Likewise.
* tree-streamer.c: Likewise.
* tree-streamer.h: Likewise.
* tree-switch-conversion.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.h: Likewise.
* value-prof.c: Likewise.
* value-prof.h: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* varpool.c: Likewise.
* vmsdbgout.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/c6x/c6x.c: Likewise.
* config/darwin.c: Likewise.
* config/i386/i386.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/mep/mep.c: Likewise.
* config/mips/mips.c: Likewise.
* config/pa/pa.c: Likewise.
* config/rs6000/rs6000-c.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rx/rx.c: Likewise.
* config/spu/spu-c.c: Likewise.
* config/vms/vms.c: Likewise.
* config/vxworks.c: Likewise.
* config/epiphany/resolve-sw-modes.c: Likewise.
From-SVN: r193595
2012-11-18 03:54:30 +01:00
|
|
|
FOR_EACH_VEC_ELT (GBB_CONDITIONS (gbb), i, stmt)
|
2009-07-31 04:43:11 +02:00
|
|
|
switch (gimple_code (stmt))
|
|
|
|
{
|
|
|
|
case GIMPLE_COND:
|
|
|
|
{
|
2015-07-15 23:36:49 +02:00
|
|
|
/* Don't constrain on anything else than INTEGER_TYPE. */
|
|
|
|
if (TREE_CODE (TREE_TYPE (gimple_cond_lhs (stmt))) != INTEGER_TYPE)
|
|
|
|
break;
|
|
|
|
|
2014-11-19 18:00:54 +01:00
|
|
|
gcond *cond_stmt = as_a <gcond *> (stmt);
|
|
|
|
enum tree_code code = gimple_cond_code (cond_stmt);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
|
|
|
/* The conditions for ELSE-branches are inverted. */
|
This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
This patch rewrites the old VEC macro-based interface into a new one
based on the template class 'vec'. The user-visible changes are
described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.
I have tested the patch pretty extensively:
- Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
- Bootstraps with --enable-checking=release
- Bootstraps with --enable-checking=gc,gcac
- Basic builds on all targets (using contrib/config-list.mk).
We no longer access the vectors via VEC_* macros. The pattern is
"VEC_operation (T, A, V, args)" becomes "V.operation (args)".
The only thing I could not do is create proper ctors and dtors for the
vec class. Since these vectors are stored in unions, we
have to keep them as PODs (C++03 does not allow non-PODs in unions).
This means that creation and destruction must be explicit. There is a
new method vec<type, allocation, layout>::create() and another vec<type,
allocation, layout>::destroy() to allocate the internal vector.
For vectors that must be pointers, there is a family of free functions
that implement the operations that need to tolerate NULL vectors.
These functions all start with the prefix 'vec_safe_'. See the wiki
page for details.
The gengtype change removes the special handling for VEC() that used
to exist in gengtype. Additionally, it allows gengtype to recognize
templates of more than one argument and introduces the concept of an
undefined type (useful for template arguments that may or may not be
types).
When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
happens inside a type marked with GTY((user)). Otherwise, it will
emit an error.
Finally, gengtype rejects root types marked GTY((user)) that are not
first class pointers.
2012-11-16 Diego Novillo <dnovillo@google.com>
VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* vec.c (register_overhead): Convert it into
member function of vec_prefix.
(release_overhead): Likewise.
(calculate_allocation): Likewise.
(vec_heap_free): Remove.
(vec_gc_o_reserve_1): Remove.
(vec_heap_o_reserve_1): Remove.
(vec_stack_o_reserve_1): Remove.
(vec_stack_o_reserve_exact): Remove.
(register_stack_vec): New.
(stack_vec_register_index): New.
(unregister_stack_vec): New.
(vec_assert_fail): Remove.
* vec.h: Conditionally include ggc.h. Document conditional
hackery.
Update top-level documentation.
(ALONE_VEC_CHECK_INFO): Remove.
(VEC_CHECK_INFO): Remove.
(ALONE_VEC_CHECK_DECL): Remove.
(VEC_CHECK_DECL): Remove.
(ALONE_VEC_CHECK_PASS): Remove.
(VEC_CHECK_PASS): Remove.
(VEC_ASSERT): Remove.
(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
va_stack.
Mark fields alloc_ and num_ as protected.
(struct vec_t): Remove. Remove all function members.
(struct vl_embed): Declare.
(struct vl_ptr): Declare.
(free): Remove.
(reserve_exact): Remove.
(reserve): Remove.
(safe_splice): Remove.
(safe_push): Remove.
(safe_grow): Remove.
(safe_grow_cleared): Remove.
(safe_insert): Remove.
(DEF_VEC_I): Remove.
(DEF_VEC_ALLOC_I): Remove.
(DEF_VEC_P): Remove.
(DEF_VEC_ALLOC_P): Remove.
(DEF_VEC_O): Remove.
(DEF_VEC_ALLOC_O): Remove.
(DEF_VEC_ALLOC_P_STACK): Remove.
(DEF_VEC_ALLOC_O_STACK): Remove.
(DEF_VEC_ALLOC_I_STACK): Remove.
(DEF_VEC_A): Remove.
(DEF_VEC_ALLOC_A): Remove.
(vec_stack_p_reserve_exact_1): Remove.
(vec_stack_o_reserve): Remove.
(vec_stack_o_reserve_exact): Remove.
(VEC_length): Remove.
(VEC_empty): Remove.
(VEC_address): Remove.
(vec_address): Remove.
(VEC_last): Remove.
(VEC_index): Remove.
(VEC_iterate): Remove.
(VEC_embedded_size): Remove.
(VEC_embedded_init): Remove.
(VEC_free): Remove.
(VEC_copy): Remove.
(VEC_space): Remove.
(VEC_reserve): Remove.
(VEC_reserve_exact): Remove.
(VEC_splice): Remove.
(VEC_safe_splice): Remove.
(VEC_quick_push): Remove.
(VEC_safe_push): Remove.
(VEC_pop): Remove.
(VEC_truncate): Remove.
(VEC_safe_grow): Remove.
(VEC_replace): Remove.
(VEC_quick_insert): Remove.
(VEC_safe_insert): Remove.
(VEC_ordered_remove): Remove.
(VEC_unordered_remove): Remove.
(VEC_block_remove): Remove.
(VEC_lower_bound): Remove.
(VEC_alloc): Remove.
(VEC_qsort): Remove.
(va_heap): Declare.
(va_heap::default_layout): New typedef to vl_ptr.
(va_heap::reserve): New.
(va_heap::release): New.
(va_gc): Declare.
(va_gc::default_layout): New typedef to vl_embed.
(va_gc::reserve): New.
(va_gc::release): New.
(va_gc_atomic): Declare. Inherit from va_gc.
(va_stack): Declare.
(va_stack::default_layout): New typedef to vl_ptr.
(va_stack::alloc): New.
(va_stack::reserve): New.
(va_stack::release): New.
(register_stack_vec): Declare.
(stack_vec_register_index): Declare.
(unregister_stack_vec): Declare.
(vec<T, A = va_heap, L = typename A::default_layout>): Declare
empty vec template.
(vec<T, A, vl_embed>): Partial specialization for embedded
layout.
(vec<T, A, vl_embed>::allocated): New.
(vec<T, A, vl_embed>::length): New.
(vec<T, A, vl_embed>::is_empty): New.
(vec<T, A, vl_embed>::address): New.
(vec<T, A, vl_embed>::operator[]): New.
(vec<T, A, vl_embed>::last New.
(vec<T, A, vl_embed>::space): New.
(vec<T, A, vl_embed>::iterate): New.
(vec<T, A, vl_embed>::iterate): New.
(vec<T, A, vl_embed>::copy): New.
(vec<T, A, vl_embed>::splice): New.
(vec<T, A, vl_embed>::quick_push New.
(vec<T, A, vl_embed>::pop New.
(vec<T, A, vl_embed>::truncate): New.
(vec<T, A, vl_embed>::quick_insert): New.
(vec<T, A, vl_embed>::ordered_remove): New.
(vec<T, A, vl_embed>::unordered_remove): New.
(vec<T, A, vl_embed>::block_remove): New.
(vec<T, A, vl_embed>::qsort): New.
(vec<T, A, vl_embed>::lower_bound): New.
(vec<T, A, vl_embed>::embedded_size): New.
(vec<T, A, vl_embed>::embedded_init): New.
(vec<T, A, vl_embed>::quick_grow): New.
(vec<T, A, vl_embed>::quick_grow_cleared): New.
(vec_safe_space): New.
(vec_safe_length): New.
(vec_safe_address): New.
(vec_safe_is_empty): New.
(vec_safe_reserve): New.
(vec_safe_reserve_exact): New.
(vec_alloc): New.
(vec_free): New.
(vec_safe_grow): New.
(vec_safe_grow_cleared): New.
(vec_safe_iterate): New.
(vec_safe_push): New.
(vec_safe_insert): New.
(vec_safe_truncate): New.
(vec_safe_copy): New.
(vec_safe_splice): New.
(vec<T, A, vl_ptr>): New partial specialization for the space
efficient layout.
(vec<T, A, vl_ptr>::exists): New.
(vec<T, A, vl_ptr>::is_empty): New.
(vec<T, A, vl_ptr>::length): New.
(vec<T, A, vl_ptr>::address): New.
(vec<T, A, vl_ptr>::operator[]): New.
(vec<T, A, vl_ptr>::operator!=): New.
(vec<T, A, vl_ptr>::operator==): New.
(vec<T, A, vl_ptr>::last): New.
(vec<T, A, vl_ptr>::space): New.
(vec<T, A, vl_ptr>::iterate): New.
(vec<T, A, vl_ptr>::copy): New.
(vec<T, A, vl_ptr>::reserve): New.
(vec<T, A, vl_ptr>::reserve_exact): New.
(vec<T, A, vl_ptr>::splice): New.
(vec<T, A, vl_ptr>::safe_splice): New.
(vec<T, A, vl_ptr>::quick_push): New.
(vec<T, A, vl_ptr>::safe_push): New.
(vec<T, A, vl_ptr>::pop): New.
(vec<T, A, vl_ptr>::truncate): New.
(vec<T, A, vl_ptr>::safe_grow): New.
(vec<T, A, vl_ptr>::safe_grow_cleared): New.
(vec<T, A, vl_ptr>::quick_grow): New.
(vec<T, A, vl_ptr>::quick_grow_cleared): New.
(vec<T, A, vl_ptr>::quick_insert): New.
(vec<T, A, vl_ptr>::safe_insert): New.
(vec<T, A, vl_ptr>::ordered_remove): New.
(vec<T, A, vl_ptr>::unordered_remove): New.
(vec<T, A, vl_ptr>::block_remove): New.
(vec<T, A, vl_ptr>::qsort): New.
(vec<T, A, vl_ptr>::lower_bound): New.
(vec_stack_alloc): Define.
(FOR_EACH_VEC_SAFE_ELT): Define.
* vecir.h: Remove. Update all users.
* vecprim.h: Remove. Update all users.
Move uchar to coretypes.h.
* Makefile.in (VEC_H): Add $(GGC_H).
Remove vecir.h and vecprim.h dependencies everywhere.
2012-11-16 Diego Novillo <dnovillo@google.com>
* gengtype-lex.l (VEC): Remove.
Add characters in the set [\!\>\.-].
* gengtype-parse.c (token_names): Remove "VEC".
(require_template_declaration): Remove handling of VEC_TOKEN.
(type): Likewise.
Call create_user_defined_type when parsing GTY((user)).
* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
(write_state_undefined_type): New.
(write_state_type): Call write_state_undefined_type for
TYPE_UNDEFINED.
(read_state_type): Call read_state_undefined_type for
TYPE_UNDEFINED.
* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
(create_user_defined_type): Make extern.
(type_for_name): Factor out of resolve_typedef.
(create_undefined_type): New
(resolve_typedef): Call it when we cannot find a previous
typedef and the type is not a template.
(find_structure): Accept TYPE_UNDEFINED.
(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
default to false.
Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
ALLOWED_UNDEFINED_TYPES is set.
Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
(filter_type_name): Accept templates with more than one
argument.
(output_mangled_typename): Handle TYPE_UNDEFINED
(walk_type): Likewise.
(write_types_process_field): Likewise.
(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
should not be a user-defined type.
(write_types_local_user_process_field): Handle TYPE_ARRAY,
TYPE_NONE and TYPE_UNDEFINED.
(write_types_local_process_field): Likewise.
(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
(write_root): Reject user-defined types that are not pointers.
Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
and TYPE_PARAM_STRUCT.
(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
TYPE_ARRAY.
(dump_typekind): Handle TYPE_UNDEFINED.
* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
(create_user_defined_type): Declare.
(enum gty_token): Remove VEC_TOKEN.
2012-11-16 Diego Novillo <dnovillo@google.com>
Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* coretypes.h (uchar): Define.
* alias.c: Use new vec API in vec.h.
* asan.c: Likewise.
* attribs.c: Likewise.
* basic-block.h: Likewise.
* bb-reorder.c: Likewise.
* builtins.c: Likewise.
* calls.c: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgcleanup.c: Likewise.
* cfgexpand.c: Likewise.
* cfghooks.c: Likewise.
* cfghooks.h: Likewise.
* cfgloop.c: Likewise.
* cfgloop.h: Likewise.
* cfgloopanal.c: Likewise.
* cfgloopmanip.c: Likewise.
* cfgrtl.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* cgraphclones.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* compare-elim.c: Likewise.
* coverage.c: Likewise.
* cprop.c: Likewise.
* data-streamer.h: Likewise.
* dbxout.c: Likewise.
* dce.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* dominance.c: Likewise.
* domwalk.c: Likewise.
* domwalk.h: Likewise.
* dse.c: Likewise.
* dwarf2cfi.c: Likewise.
* dwarf2out.c: Likewise.
* dwarf2out.h: Likewise.
* emit-rtl.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* expr.c: Likewise.
* expr.h: Likewise.
* final.c: Likewise.
* fold-const.c: Likewise.
* function.c: Likewise.
* function.h: Likewise.
* fwprop.c: Likewise.
* gcc.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* genattrtab.c: Likewise.
* genautomata.c: Likewise.
* genextract.c: Likewise.
* genopinit.c: Likewise
* ggc-common.c: Likewise.
* ggc.h: Likewise.
* gimple-low.c: Likewise.
* gimple-ssa-strength-reduction.c: Likewise.
* gimple-streamer-in.c: Likewise.
* gimple.c: Likewise.
* gimple.h: Likewise.
* gimplify.c: Likewise.
* graph.c: Likewise.
* graphds.c: Likewise.
* graphds.h: Likewise.
* graphite-blocking.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-optimize-isl.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-poly.h: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-scop-detection.h: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* godump.c: Likewise.
* haifa-sched.c: Likewise.
* hw-doloop.c: Likewise.
* hw-doloop.h: Likewise.
* ifcvt.c: Likewise.
* insn-addr.h: Likewise.
* ipa-cp.c: Likewise.
* ipa-inline-analysis.c: Likewise.
* ipa-inline-transform.c: Likewise.
* ipa-inline.c: Likewise.
* ipa-inline.h: Likewise.
* ipa-prop.c: Likewise.
* ipa-prop.h: Likewise.
* ipa-pure-const.c: Likewise.
* ipa-ref-inline.h: Likewise.
* ipa-ref.c: Likewise.
* ipa-ref.h: Likewise.
* ipa-reference.c: Likewise.
* ipa-split.c: Likewise.
* ipa-utils.c: Likewise.
* ipa-utils.h: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-emit.c: Likewise.
* ira-int.h: Likewise.
* ira.c: Likewise.
* loop-invariant.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lra-lives.c: Likewise.
* lra.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.h: Likewise.
* lto-symtab.c: Likewise.
* mcf.c: Likewise.
* modulo-sched.c: Likewise.
* omp-low.c: Likewise.
* opts-common.c: Likewise.
* opts-global.c: Likewise.
* opts.c: Likewise.
* opts.h: Likewise.
* passes.c: Likewise.
* predict.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* profile.h: Likewise.
* read-rtl.c: Likewise.
* ree.c: Likewise.
* reg-stack.c: Likewise.
* regrename.c: Likewise.
* regrename.h: Likewise.
* reload.c: Likewise.
* reload.h: Likewise.
* reload1.c: Likewise.
* rtl.h: Likewise.
* sched-deps.c: Likewise.
* sched-int.h: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched-ir.h: Likewise.
* sel-sched.c: Likewise.
* sese.c: Likewise.
* sese.h: Likewise.
* statistics.h: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* tlink.c: Likewise.
* toplev.c: Likewise.
* trans-mem.c: Likewise.
* tree-browser.c: 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-diagnostic.c: Likewise.
* tree-dump.c: Likewise.
* tree-eh.c: Likewise.
* tree-emutls.c: Likewise.
* tree-flow.h: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree-into-ssa.c: Likewise.
* tree-iterator.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-optimize.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-phinodes.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-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-math-opts.c: Likewise.
* tree-ssa-operands.c: 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-sccvn.h: Likewise.
* tree-ssa-strlen.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-tail-merge.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa-uninit.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-streamer-in.c: Likewise.
* tree-streamer-out.c: Likewise.
* tree-streamer.c: Likewise.
* tree-streamer.h: Likewise.
* tree-switch-conversion.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.h: Likewise.
* value-prof.c: Likewise.
* value-prof.h: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* varpool.c: Likewise.
* vmsdbgout.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/c6x/c6x.c: Likewise.
* config/darwin.c: Likewise.
* config/i386/i386.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/mep/mep.c: Likewise.
* config/mips/mips.c: Likewise.
* config/pa/pa.c: Likewise.
* config/rs6000/rs6000-c.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rx/rx.c: Likewise.
* config/spu/spu-c.c: Likewise.
* config/vms/vms.c: Likewise.
* config/vxworks.c: Likewise.
* config/epiphany/resolve-sw-modes.c: Likewise.
From-SVN: r193595
2012-11-18 03:54:30 +01:00
|
|
|
if (!GBB_CONDITION_CASES (gbb)[i])
|
2009-07-31 04:43:11 +02:00
|
|
|
code = invert_tree_comparison (code, false);
|
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
add_condition_to_pbb (pbb, cond_stmt, code);
|
2009-07-31 04:43:11 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
gcc_unreachable ();
|
|
|
|
break;
|
|
|
|
}
|
2010-12-01 18:25:10 +01:00
|
|
|
}
|
|
|
|
|
2009-07-31 04:43:11 +02:00
|
|
|
/* Add constraints on the possible values of parameter P from the type
|
|
|
|
of P. */
|
|
|
|
|
|
|
|
static void
|
2012-07-02 13:43:46 +02:00
|
|
|
add_param_constraints (scop_p scop, graphite_dim_t p)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2015-11-12 01:37:47 +01:00
|
|
|
tree parameter = scop->scop_info->params[p];
|
2009-07-31 04:43:11 +02:00
|
|
|
tree type = TREE_TYPE (parameter);
|
2010-03-08 18:49:57 +01:00
|
|
|
tree lb = NULL_TREE;
|
|
|
|
tree ub = NULL_TREE;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2010-03-08 18:50:09 +01:00
|
|
|
if (POINTER_TYPE_P (type) || !TYPE_MIN_VALUE (type))
|
|
|
|
lb = lower_bound_in_type (type, type);
|
|
|
|
else
|
|
|
|
lb = TYPE_MIN_VALUE (type);
|
|
|
|
|
|
|
|
if (POINTER_TYPE_P (type) || !TYPE_MAX_VALUE (type))
|
|
|
|
ub = upper_bound_in_type (type, type);
|
|
|
|
else
|
|
|
|
ub = TYPE_MAX_VALUE (type);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
|
|
|
if (lb)
|
|
|
|
{
|
2015-10-06 17:56:03 +02:00
|
|
|
isl_space *space = isl_set_get_space (scop->param_context);
|
2012-07-02 13:43:46 +02:00
|
|
|
isl_constraint *c;
|
2014-08-11 17:05:48 +02:00
|
|
|
isl_val *v;
|
2012-07-02 13:43:46 +02:00
|
|
|
|
|
|
|
c = isl_inequality_alloc (isl_local_space_from_space (space));
|
2017-02-16 08:53:53 +01:00
|
|
|
v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (lb));
|
2014-08-11 17:05:48 +02:00
|
|
|
v = isl_val_neg (v);
|
|
|
|
c = isl_constraint_set_constant_val (c, v);
|
2012-07-02 13:43:46 +02:00
|
|
|
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, 1);
|
|
|
|
|
2016-01-21 03:12:26 +01:00
|
|
|
scop->param_context = isl_set_coalesce
|
|
|
|
(isl_set_add_constraint (scop->param_context, c));
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (ub)
|
|
|
|
{
|
2015-10-06 17:56:03 +02:00
|
|
|
isl_space *space = isl_set_get_space (scop->param_context);
|
2012-07-02 13:43:46 +02:00
|
|
|
isl_constraint *c;
|
2014-08-11 17:05:48 +02:00
|
|
|
isl_val *v;
|
2012-07-02 13:43:46 +02:00
|
|
|
|
|
|
|
c = isl_inequality_alloc (isl_local_space_from_space (space));
|
|
|
|
|
2017-02-16 08:53:53 +01:00
|
|
|
v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (ub));
|
2014-08-11 17:05:48 +02:00
|
|
|
c = isl_constraint_set_constant_val (c, v);
|
2012-07-02 13:43:46 +02:00
|
|
|
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, -1);
|
|
|
|
|
2016-01-21 03:12:26 +01:00
|
|
|
scop->param_context = isl_set_coalesce
|
|
|
|
(isl_set_add_constraint (scop->param_context, c));
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Add a constrain to the ACCESSES polyhedron for the alias set of
|
|
|
|
data reference DR. ACCESSP_NB_DIMS is the dimension of the
|
|
|
|
ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration
|
|
|
|
domain. */
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_map *
|
2015-10-06 22:50:35 +02:00
|
|
|
pdr_add_alias_set (isl_map *acc, dr_info &dri)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2015-10-06 22:50:29 +02:00
|
|
|
isl_constraint *c = isl_equality_alloc
|
2012-07-02 13:43:46 +02:00
|
|
|
(isl_local_space_from_space (isl_map_get_space (acc)));
|
2015-11-12 01:37:47 +01:00
|
|
|
/* Positive numbers for all alias sets. */
|
2015-10-06 22:50:35 +02:00
|
|
|
c = isl_constraint_set_constant_si (c, -dri.alias_set);
|
2012-07-02 13:43:46 +02:00
|
|
|
c = isl_constraint_set_coefficient_si (c, isl_dim_out, 0, 1);
|
|
|
|
|
|
|
|
return isl_map_add_constraint (acc, c);
|
|
|
|
}
|
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
/* Add a constrain to the ACCESSES polyhedron for the alias set of
|
|
|
|
data reference DR. ACCESSP_NB_DIMS is the dimension of the
|
|
|
|
ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration
|
|
|
|
domain. */
|
|
|
|
|
|
|
|
static isl_map *
|
|
|
|
add_scalar_version_numbers (isl_map *acc, tree var)
|
|
|
|
{
|
|
|
|
isl_constraint *c = isl_equality_alloc
|
|
|
|
(isl_local_space_from_space (isl_map_get_space (acc)));
|
|
|
|
int max_arrays = PARAM_VALUE (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP);
|
|
|
|
/* Each scalar variables has a unique alias set number starting from
|
|
|
|
max_arrays. */
|
|
|
|
c = isl_constraint_set_constant_si (c, -max_arrays - SSA_NAME_VERSION (var));
|
|
|
|
c = isl_constraint_set_coefficient_si (c, isl_dim_out, 0, 1);
|
|
|
|
|
|
|
|
return isl_map_add_constraint (acc, c);
|
|
|
|
}
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
/* Assign the affine expression INDEX to the output dimension POS of
|
|
|
|
MAP and return the result. */
|
|
|
|
|
|
|
|
static isl_map *
|
|
|
|
set_index (isl_map *map, int pos, isl_pw_aff *index)
|
|
|
|
{
|
|
|
|
isl_map *index_map;
|
|
|
|
int len = isl_map_dim (map, isl_dim_out);
|
|
|
|
isl_id *id;
|
|
|
|
|
|
|
|
index_map = isl_map_from_pw_aff (index);
|
|
|
|
index_map = isl_map_insert_dims (index_map, isl_dim_out, 0, pos);
|
|
|
|
index_map = isl_map_add_dims (index_map, isl_dim_out, len - pos - 1);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
id = isl_map_get_tuple_id (map, isl_dim_out);
|
|
|
|
index_map = isl_map_set_tuple_id (index_map, isl_dim_out, id);
|
|
|
|
id = isl_map_get_tuple_id (map, isl_dim_in);
|
|
|
|
index_map = isl_map_set_tuple_id (index_map, isl_dim_in, id);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
return isl_map_intersect (map, index_map);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Add to ACCESSES polyhedron equalities defining the access functions
|
|
|
|
to the memory. ACCESSP_NB_DIMS is the dimension of the ACCESSES
|
|
|
|
polyhedron, DOM_NB_DIMS is the dimension of the iteration domain.
|
|
|
|
PBB is the poly_bb_p that contains the data reference DR. */
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_map *
|
2015-10-06 22:50:35 +02:00
|
|
|
pdr_add_memory_accesses (isl_map *acc, dr_info &dri)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2015-10-06 22:50:35 +02:00
|
|
|
data_reference_p dr = dri.dr;
|
|
|
|
poly_bb_p pbb = dri.pbb;
|
2009-07-31 04:43:11 +02:00
|
|
|
int i, nb_subscripts = DR_NUM_DIMENSIONS (dr);
|
|
|
|
scop_p scop = PBB_SCOP (pbb);
|
|
|
|
|
|
|
|
for (i = 0; i < nb_subscripts; i++)
|
|
|
|
{
|
2012-07-02 13:43:46 +02:00
|
|
|
isl_pw_aff *aff;
|
2015-12-09 19:35:47 +01:00
|
|
|
tree afn = DR_ACCESS_FN (dr, i);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
aff = extract_affine (scop, afn,
|
|
|
|
isl_space_domain (isl_map_get_space (acc)));
|
2016-04-09 17:28:24 +02:00
|
|
|
acc = set_index (acc, nb_subscripts - i , aff);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2016-01-21 03:12:26 +01:00
|
|
|
return isl_map_coalesce (acc);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2015-12-02 18:11:52 +01:00
|
|
|
/* Return true when the LOW and HIGH bounds of an array reference REF are valid
|
|
|
|
to extract constraints on accessed elements of the array. Returning false is
|
|
|
|
the conservative answer. */
|
|
|
|
|
|
|
|
static bool
|
|
|
|
bounds_are_valid (tree ref, tree low, tree high)
|
|
|
|
{
|
|
|
|
if (!high)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if (!tree_fits_shwi_p (low)
|
|
|
|
|| !tree_fits_shwi_p (high))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
/* 1-element arrays at end of structures may extend over
|
|
|
|
their declared size. */
|
|
|
|
if (array_at_struct_end_p (ref)
|
|
|
|
&& operand_equal_p (low, high, 0))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
/* Fortran has some arrays where high bound is -1 and low is 0. */
|
|
|
|
if (integer_onep (fold_build2 (LT_EXPR, boolean_type_node, high, low)))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2009-07-31 04:43:11 +02:00
|
|
|
/* Add constrains representing the size of the accessed data to the
|
2009-08-12 16:26:42 +02:00
|
|
|
ACCESSES polyhedron. ACCESSP_NB_DIMS is the dimension of the
|
|
|
|
ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration
|
2009-07-31 04:43:11 +02:00
|
|
|
domain. */
|
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
static isl_set *
|
2015-07-17 18:34:21 +02:00
|
|
|
pdr_add_data_dimensions (isl_set *subscript_sizes, scop_p scop,
|
|
|
|
data_reference_p dr)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
|
|
|
tree ref = DR_REF (dr);
|
|
|
|
|
2015-07-17 18:34:21 +02:00
|
|
|
int nb_subscripts = DR_NUM_DIMENSIONS (dr);
|
|
|
|
for (int i = nb_subscripts - 1; i >= 0; i--, ref = TREE_OPERAND (ref, 0))
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2009-09-17 15:33:37 +02:00
|
|
|
if (TREE_CODE (ref) != ARRAY_REF)
|
2015-07-17 18:34:21 +02:00
|
|
|
return subscript_sizes;
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2015-07-17 18:34:21 +02:00
|
|
|
tree low = array_ref_low_bound (ref);
|
|
|
|
tree high = array_ref_up_bound (ref);
|
2009-09-17 15:33:37 +02:00
|
|
|
|
2015-12-02 18:11:52 +01:00
|
|
|
if (!bounds_are_valid (ref, low, high))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
isl_space *space = isl_set_get_space (subscript_sizes);
|
|
|
|
isl_pw_aff *lb = extract_affine_int (low, isl_space_copy (space));
|
|
|
|
isl_pw_aff *ub = extract_affine_int (high, isl_space_copy (space));
|
|
|
|
|
|
|
|
/* high >= 0 */
|
|
|
|
isl_set *valid = isl_pw_aff_nonneg_set (isl_pw_aff_copy (ub));
|
|
|
|
valid = isl_set_project_out (valid, isl_dim_set, 0,
|
|
|
|
isl_set_dim (valid, isl_dim_set));
|
2016-01-21 03:12:26 +01:00
|
|
|
scop->param_context = isl_set_coalesce
|
|
|
|
(isl_set_intersect (scop->param_context, valid));
|
2015-12-02 18:11:52 +01:00
|
|
|
|
|
|
|
isl_aff *aff
|
|
|
|
= isl_aff_zero_on_domain (isl_local_space_from_space (space));
|
|
|
|
aff = isl_aff_add_coefficient_si (aff, isl_dim_in, i + 1, 1);
|
|
|
|
isl_set *univ
|
|
|
|
= isl_set_universe (isl_space_domain (isl_aff_get_space (aff)));
|
|
|
|
isl_pw_aff *index = isl_pw_aff_alloc (univ, aff);
|
|
|
|
|
|
|
|
isl_id *id = isl_set_get_tuple_id (subscript_sizes);
|
|
|
|
lb = isl_pw_aff_set_tuple_id (lb, isl_dim_in, isl_id_copy (id));
|
|
|
|
ub = isl_pw_aff_set_tuple_id (ub, isl_dim_in, id);
|
|
|
|
|
|
|
|
/* low <= sub_i <= high */
|
|
|
|
isl_set *lbs = isl_pw_aff_ge_set (isl_pw_aff_copy (index), lb);
|
|
|
|
isl_set *ubs = isl_pw_aff_le_set (index, ub);
|
|
|
|
subscript_sizes = isl_set_intersect (subscript_sizes, lbs);
|
|
|
|
subscript_sizes = isl_set_intersect (subscript_sizes, ubs);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
2012-07-02 13:43:46 +02:00
|
|
|
|
2016-01-21 03:12:26 +01:00
|
|
|
return isl_set_coalesce (subscript_sizes);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
/* Build data accesses for DRI. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
|
|
|
static void
|
2015-10-06 22:50:35 +02:00
|
|
|
build_poly_dr (dr_info &dri)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2012-07-02 13:43:46 +02:00
|
|
|
isl_map *acc;
|
2015-07-17 18:34:21 +02:00
|
|
|
isl_set *subscript_sizes;
|
2015-10-06 22:50:35 +02:00
|
|
|
poly_bb_p pbb = dri.pbb;
|
|
|
|
data_reference_p dr = dri.dr;
|
2012-07-02 13:43:46 +02:00
|
|
|
scop_p scop = PBB_SCOP (pbb);
|
2015-11-12 01:37:47 +01:00
|
|
|
isl_id *id = isl_id_for_dr (scop);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
{
|
|
|
|
isl_space *dc = isl_set_get_space (pbb->domain);
|
|
|
|
int nb_out = 1 + DR_NUM_DIMENSIONS (dr);
|
|
|
|
isl_space *space = isl_space_add_dims (isl_space_from_domain (dc),
|
|
|
|
isl_dim_out, nb_out);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
acc = isl_map_universe (space);
|
2015-11-12 01:37:47 +01:00
|
|
|
acc = isl_map_set_tuple_id (acc, isl_dim_out, isl_id_copy (id));
|
2012-07-02 13:43:46 +02:00
|
|
|
}
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2015-10-06 22:50:35 +02:00
|
|
|
acc = pdr_add_alias_set (acc, dri);
|
|
|
|
acc = pdr_add_memory_accesses (acc, dri);
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2012-07-02 13:43:46 +02:00
|
|
|
{
|
|
|
|
int nb = 1 + DR_NUM_DIMENSIONS (dr);
|
2015-10-06 17:56:03 +02:00
|
|
|
isl_space *space = isl_space_set_alloc (scop->isl_context, 0, nb);
|
2012-07-02 13:43:46 +02:00
|
|
|
|
|
|
|
space = isl_space_set_tuple_id (space, isl_dim_set, id);
|
2015-07-17 18:34:21 +02:00
|
|
|
subscript_sizes = isl_set_nat_universe (space);
|
|
|
|
subscript_sizes = isl_set_fix_si (subscript_sizes, isl_dim_set, 0,
|
2015-10-06 22:50:35 +02:00
|
|
|
dri.alias_set);
|
2015-07-17 18:34:21 +02:00
|
|
|
subscript_sizes = pdr_add_data_dimensions (subscript_sizes, scop, dr);
|
2012-07-02 13:43:46 +02:00
|
|
|
}
|
2009-07-31 04:43:11 +02:00
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
new_poly_dr (pbb, DR_STMT (dr), DR_IS_READ (dr) ? PDR_READ : PDR_WRITE,
|
|
|
|
acc, subscript_sizes);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2010-12-01 18:25:30 +01:00
|
|
|
static void
|
2015-11-12 01:37:47 +01:00
|
|
|
build_poly_sr_1 (poly_bb_p pbb, gimple *stmt, tree var, enum poly_dr_type kind,
|
|
|
|
isl_map *acc, isl_set *subscript_sizes)
|
2010-12-01 18:25:30 +01:00
|
|
|
{
|
2015-11-12 01:37:47 +01:00
|
|
|
int max_arrays = PARAM_VALUE (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP);
|
|
|
|
/* Each scalar variables has a unique alias set number starting from
|
|
|
|
max_arrays. */
|
|
|
|
subscript_sizes = isl_set_fix_si (subscript_sizes, isl_dim_set, 0,
|
|
|
|
max_arrays + SSA_NAME_VERSION (var));
|
|
|
|
|
|
|
|
new_poly_dr (pbb, stmt, kind, add_scalar_version_numbers (acc, var),
|
|
|
|
subscript_sizes);
|
2010-12-01 18:25:30 +01:00
|
|
|
}
|
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
/* Record all cross basic block scalar variables in PBB. */
|
2009-07-31 04:43:11 +02:00
|
|
|
|
|
|
|
static void
|
2015-11-12 01:37:47 +01:00
|
|
|
build_poly_sr (poly_bb_p pbb)
|
2009-07-31 04:43:11 +02:00
|
|
|
{
|
2015-11-12 01:37:47 +01:00
|
|
|
scop_p scop = PBB_SCOP (pbb);
|
2015-10-02 00:04:14 +02:00
|
|
|
gimple_poly_bb_p gbb = PBB_BLACK_BOX (pbb);
|
2015-12-16 18:33:00 +01:00
|
|
|
vec<scalar_use> &reads = gbb->read_scalar_refs;
|
|
|
|
vec<tree> &writes = gbb->write_scalar_refs;
|
2010-08-11 22:29:43 +02:00
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
isl_space *dc = isl_set_get_space (pbb->domain);
|
|
|
|
int nb_out = 1;
|
|
|
|
isl_space *space = isl_space_add_dims (isl_space_from_domain (dc),
|
|
|
|
isl_dim_out, nb_out);
|
|
|
|
isl_id *id = isl_id_for_dr (scop);
|
|
|
|
space = isl_space_set_tuple_id (space, isl_dim_set, isl_id_copy (id));
|
|
|
|
isl_map *acc = isl_map_universe (isl_space_copy (space));
|
|
|
|
acc = isl_map_set_tuple_id (acc, isl_dim_out, id);
|
|
|
|
isl_set *subscript_sizes = isl_set_nat_universe (space);
|
2010-08-11 22:25:34 +02:00
|
|
|
|
2015-10-21 20:53:26 +02:00
|
|
|
int i;
|
2015-11-12 01:37:47 +01:00
|
|
|
tree var;
|
|
|
|
FOR_EACH_VEC_ELT (writes, i, var)
|
|
|
|
build_poly_sr_1 (pbb, SSA_NAME_DEF_STMT (var), var, PDR_WRITE,
|
|
|
|
isl_map_copy (acc), isl_set_copy (subscript_sizes));
|
2010-08-11 22:30:09 +02:00
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
scalar_use *use;
|
|
|
|
FOR_EACH_VEC_ELT (reads, i, use)
|
|
|
|
build_poly_sr_1 (pbb, use->first, use->second, PDR_READ, isl_map_copy (acc),
|
|
|
|
isl_set_copy (subscript_sizes));
|
2015-09-28 19:29:59 +02:00
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
isl_map_free (acc);
|
|
|
|
isl_set_free (subscript_sizes);
|
2009-11-25 05:53:33 +01:00
|
|
|
}
|
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
/* Build data references in SCOP. */
|
2010-08-11 22:25:02 +02:00
|
|
|
|
2010-12-01 18:25:10 +01:00
|
|
|
static void
|
2015-11-12 01:37:47 +01:00
|
|
|
build_scop_drs (scop_p scop)
|
2010-08-11 22:25:02 +02:00
|
|
|
{
|
2015-10-21 20:53:26 +02:00
|
|
|
int i;
|
2015-11-12 01:37:47 +01:00
|
|
|
dr_info *dri;
|
|
|
|
FOR_EACH_VEC_ELT (scop->drs, i, dri)
|
|
|
|
build_poly_dr (*dri);
|
2009-11-25 05:53:33 +01:00
|
|
|
|
2015-11-12 01:37:47 +01:00
|
|
|
poly_bb_p pbb;
|
|
|
|
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
|
|
|
|
build_poly_sr (pbb);
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
/* Add to the iteration DOMAIN one extra dimension for LOOP->num. */
|
|
|
|
|
|
|
|
static isl_set *
|
|
|
|
add_iter_domain_dimension (__isl_take isl_set *domain, loop_p loop, scop_p scop)
|
|
|
|
{
|
|
|
|
int loop_index = isl_set_dim (domain, isl_dim_set);
|
|
|
|
domain = isl_set_add_dims (domain, isl_dim_set, 1);
|
|
|
|
char name[50];
|
|
|
|
snprintf (name, sizeof(name), "i%d", loop->num);
|
|
|
|
isl_id *label = isl_id_alloc (scop->isl_context, name, NULL);
|
|
|
|
return isl_set_set_dim_id (domain, isl_dim_set, loop_index, label);
|
|
|
|
}
|
|
|
|
|
2016-01-21 03:13:33 +01:00
|
|
|
/* Add constraints to DOMAIN for each loop from LOOP up to CONTEXT. */
|
|
|
|
|
|
|
|
static isl_set *
|
|
|
|
add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
|
|
|
|
loop_p context)
|
|
|
|
{
|
|
|
|
if (loop == context)
|
|
|
|
return domain;
|
|
|
|
const sese_l ®ion = scop->scop_info->region;
|
|
|
|
if (!loop_in_sese_p (loop, region))
|
|
|
|
return domain;
|
|
|
|
|
|
|
|
/* Recursion all the way up to the context loop. */
|
|
|
|
domain = add_loop_constraints (scop, domain, loop_outer (loop), context);
|
|
|
|
|
|
|
|
/* Then, build constraints over the loop in post-order: outer to inner. */
|
|
|
|
|
|
|
|
int loop_index = isl_set_dim (domain, isl_dim_set);
|
|
|
|
if (dump_file)
|
|
|
|
fprintf (dump_file, "[sese-to-poly] adding one extra dimension to the "
|
|
|
|
"domain for loop_%d.\n", loop->num);
|
2016-01-26 01:19:20 +01:00
|
|
|
domain = add_iter_domain_dimension (domain, loop, scop);
|
2016-01-21 03:13:33 +01:00
|
|
|
isl_space *space = isl_set_get_space (domain);
|
|
|
|
|
|
|
|
/* 0 <= loop_i */
|
|
|
|
isl_local_space *ls = isl_local_space_from_space (isl_space_copy (space));
|
|
|
|
isl_constraint *c = isl_inequality_alloc (ls);
|
|
|
|
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, 1);
|
|
|
|
if (dump_file)
|
|
|
|
{
|
|
|
|
fprintf (dump_file, "[sese-to-poly] adding constraint to the domain: ");
|
|
|
|
print_isl_constraint (dump_file, c);
|
|
|
|
}
|
|
|
|
domain = isl_set_add_constraint (domain, c);
|
|
|
|
|
|
|
|
tree nb_iters = number_of_latch_executions (loop);
|
|
|
|
if (TREE_CODE (nb_iters) == INTEGER_CST)
|
|
|
|
{
|
|
|
|
/* loop_i <= cst_nb_iters */
|
|
|
|
isl_local_space *ls = isl_local_space_from_space (space);
|
|
|
|
isl_constraint *c = isl_inequality_alloc (ls);
|
|
|
|
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
|
2017-02-16 08:53:53 +01:00
|
|
|
isl_val *v
|
|
|
|
= isl_val_int_from_wi (scop->isl_context, wi::to_widest (nb_iters));
|
2016-01-21 03:13:33 +01:00
|
|
|
c = isl_constraint_set_constant_val (c, v);
|
|
|
|
return isl_set_add_constraint (domain, c);
|
|
|
|
}
|
|
|
|
/* loop_i <= expr_nb_iters */
|
|
|
|
gcc_assert (!chrec_contains_undetermined (nb_iters));
|
|
|
|
nb_iters = scalar_evolution_in_region (region, loop, nb_iters);
|
|
|
|
gcc_assert (!chrec_contains_undetermined (nb_iters));
|
|
|
|
|
|
|
|
isl_pw_aff *aff_nb_iters = extract_affine (scop, nb_iters,
|
|
|
|
isl_space_copy (space));
|
|
|
|
isl_set *valid = isl_pw_aff_nonneg_set (isl_pw_aff_copy (aff_nb_iters));
|
|
|
|
valid = isl_set_project_out (valid, isl_dim_set, 0,
|
|
|
|
isl_set_dim (valid, isl_dim_set));
|
|
|
|
|
|
|
|
if (valid)
|
|
|
|
scop->param_context = isl_set_intersect (scop->param_context, valid);
|
|
|
|
|
|
|
|
ls = isl_local_space_from_space (isl_space_copy (space));
|
|
|
|
isl_aff *loop_i = isl_aff_set_coefficient_si (isl_aff_zero_on_domain (ls),
|
|
|
|
isl_dim_in, loop_index, 1);
|
|
|
|
isl_set *le = isl_pw_aff_le_set (isl_pw_aff_from_aff (loop_i),
|
|
|
|
isl_pw_aff_copy (aff_nb_iters));
|
|
|
|
if (dump_file)
|
|
|
|
{
|
|
|
|
fprintf (dump_file, "[sese-to-poly] adding constraint to the domain: ");
|
|
|
|
print_isl_set (dump_file, le);
|
|
|
|
}
|
|
|
|
domain = isl_set_intersect (domain, le);
|
|
|
|
|
|
|
|
widest_int nit;
|
|
|
|
if (!max_stmt_executions (loop, &nit))
|
|
|
|
{
|
|
|
|
isl_pw_aff_free (aff_nb_iters);
|
|
|
|
isl_space_free (space);
|
|
|
|
return domain;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* NIT is an upper bound to NB_ITERS: "NIT >= NB_ITERS", although we
|
|
|
|
do not know whether the loop executes at least once. */
|
2017-02-16 08:53:53 +01:00
|
|
|
--nit;
|
2016-01-21 03:13:33 +01:00
|
|
|
|
2017-02-16 08:53:53 +01:00
|
|
|
isl_pw_aff *approx = extract_affine_wi (nit, isl_space_copy (space));
|
2016-01-21 03:13:33 +01:00
|
|
|
isl_set *x = isl_pw_aff_ge_set (approx, aff_nb_iters);
|
|
|
|
x = isl_set_project_out (x, isl_dim_set, 0,
|
|
|
|
isl_set_dim (x, isl_dim_set));
|
|
|
|
scop->param_context = isl_set_intersect (scop->param_context, x);
|
|
|
|
|
|
|
|
ls = isl_local_space_from_space (space);
|
|
|
|
c = isl_inequality_alloc (ls);
|
|
|
|
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
|
2017-02-16 08:53:53 +01:00
|
|
|
isl_val *v = isl_val_int_from_wi (scop->isl_context, nit);
|
2016-01-21 03:13:33 +01:00
|
|
|
c = isl_constraint_set_constant_val (c, v);
|
|
|
|
|
|
|
|
if (dump_file)
|
|
|
|
{
|
|
|
|
fprintf (dump_file, "[sese-to-poly] adding constraint to the domain: ");
|
|
|
|
print_isl_constraint (dump_file, c);
|
|
|
|
}
|
|
|
|
|
|
|
|
return isl_set_add_constraint (domain, c);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Builds the original iteration domains for each pbb in the SCOP. */
|
|
|
|
|
|
|
|
static int
|
2016-01-26 01:19:20 +01:00
|
|
|
build_iteration_domains (scop_p scop, __isl_keep isl_set *context,
|
|
|
|
int index, loop_p context_loop)
|
2016-01-21 03:13:33 +01:00
|
|
|
{
|
|
|
|
loop_p current = pbb_loop (scop->pbbs[index]);
|
|
|
|
isl_set *domain = isl_set_copy (context);
|
|
|
|
domain = add_loop_constraints (scop, domain, current, context_loop);
|
|
|
|
const sese_l ®ion = scop->scop_info->region;
|
|
|
|
|
|
|
|
int i;
|
|
|
|
poly_bb_p pbb;
|
|
|
|
FOR_EACH_VEC_ELT_FROM (scop->pbbs, i, pbb, index)
|
|
|
|
{
|
|
|
|
loop_p loop = pbb_loop (pbb);
|
|
|
|
if (current == loop)
|
|
|
|
{
|
2016-01-26 01:19:20 +01:00
|
|
|
pbb->iterators = isl_set_copy (domain);
|
2016-01-21 03:13:33 +01:00
|
|
|
pbb->domain = isl_set_copy (domain);
|
|
|
|
pbb->domain = isl_set_set_tuple_id (pbb->domain,
|
|
|
|
isl_id_for_pbb (scop, pbb));
|
2016-01-26 01:19:20 +01:00
|
|
|
add_conditions_to_domain (pbb);
|
|
|
|
|
2016-01-21 03:13:33 +01:00
|
|
|
if (dump_file)
|
|
|
|
{
|
|
|
|
fprintf (dump_file, "[sese-to-poly] set pbb_%d->domain: ",
|
|
|
|
pbb_index (pbb));
|
|
|
|
print_isl_set (dump_file, domain);
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
while (loop_in_sese_p (loop, region)
|
|
|
|
&& current != loop)
|
|
|
|
loop = loop_outer (loop);
|
|
|
|
|
|
|
|
if (current != loop)
|
|
|
|
{
|
|
|
|
/* A statement in a different loop nest than CURRENT loop. */
|
|
|
|
isl_set_free (domain);
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* A statement nested in the CURRENT loop. */
|
|
|
|
i = build_iteration_domains (scop, domain, i, current);
|
|
|
|
i--;
|
|
|
|
}
|
|
|
|
|
|
|
|
isl_set_free (domain);
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Assign dimension for each parameter in SCOP and add constraints for the
|
|
|
|
parameters. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
build_scop_context (scop_p scop)
|
|
|
|
{
|
|
|
|
sese_info_p region = scop->scop_info;
|
|
|
|
unsigned nbp = sese_nb_params (region);
|
|
|
|
isl_space *space = isl_space_set_alloc (scop->isl_context, nbp, 0);
|
|
|
|
|
|
|
|
unsigned i;
|
|
|
|
tree e;
|
|
|
|
FOR_EACH_VEC_ELT (region->params, i, e)
|
|
|
|
space = isl_space_set_dim_id (space, isl_dim_param, i,
|
|
|
|
isl_id_for_ssa_name (scop, e));
|
|
|
|
|
|
|
|
scop->param_context = isl_set_universe (space);
|
|
|
|
|
|
|
|
graphite_dim_t p;
|
|
|
|
for (p = 0; p < nbp; p++)
|
|
|
|
add_param_constraints (scop, p);
|
|
|
|
}
|
|
|
|
|
2016-01-26 01:19:20 +01:00
|
|
|
/* Return true when loop A is nested in loop B. */
|
|
|
|
|
|
|
|
static bool
|
|
|
|
nested_in (loop_p a, loop_p b)
|
|
|
|
{
|
|
|
|
return b == find_common_loop (a, b);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the loop at a specific SCOP->pbbs[*INDEX]. */
|
|
|
|
static loop_p
|
|
|
|
loop_at (scop_p scop, int *index)
|
|
|
|
{
|
|
|
|
return pbb_loop (scop->pbbs[*index]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the index of any pbb belonging to loop or a subloop of A. */
|
|
|
|
|
|
|
|
static int
|
|
|
|
index_outermost_in_loop (loop_p a, scop_p scop)
|
|
|
|
{
|
|
|
|
int i, outermost = -1;
|
|
|
|
int last_depth = -1;
|
|
|
|
poly_bb_p pbb;
|
|
|
|
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
|
|
|
|
if (nested_in (pbb_loop (pbb), a)
|
|
|
|
&& (last_depth == -1
|
|
|
|
|| last_depth > (int) loop_depth (pbb_loop (pbb))))
|
|
|
|
{
|
|
|
|
outermost = i;
|
|
|
|
last_depth = loop_depth (pbb_loop (pbb));
|
|
|
|
}
|
|
|
|
return outermost;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return the index of any pbb belonging to loop or a subloop of A. */
|
|
|
|
|
|
|
|
static int
|
|
|
|
index_pbb_in_loop (loop_p a, scop_p scop)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
poly_bb_p pbb;
|
|
|
|
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
|
|
|
|
if (pbb_loop (pbb) == a)
|
|
|
|
return i;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static poly_bb_p
|
|
|
|
outermost_pbb_in (loop_p loop, scop_p scop)
|
|
|
|
{
|
|
|
|
int x = index_pbb_in_loop (loop, scop);
|
|
|
|
if (x == -1)
|
|
|
|
x = index_outermost_in_loop (loop, scop);
|
|
|
|
return scop->pbbs[x];
|
|
|
|
}
|
|
|
|
|
|
|
|
static isl_schedule *
|
|
|
|
add_in_sequence (__isl_take isl_schedule *a, __isl_take isl_schedule *b)
|
|
|
|
{
|
|
|
|
gcc_assert (a || b);
|
|
|
|
|
|
|
|
if (!a)
|
|
|
|
return b;
|
|
|
|
|
|
|
|
if (!b)
|
|
|
|
return a;
|
|
|
|
|
|
|
|
return isl_schedule_sequence (a, b);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct map_to_dimension_data {
|
|
|
|
int n;
|
|
|
|
isl_union_pw_multi_aff *res;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Create a function that maps the elements of SET to its N-th dimension and add
|
|
|
|
it to USER->res. */
|
|
|
|
|
|
|
|
static isl_stat
|
|
|
|
add_outer_projection (__isl_take isl_set *set, void *user)
|
|
|
|
{
|
|
|
|
struct map_to_dimension_data *data = (struct map_to_dimension_data *) user;
|
|
|
|
int dim = isl_set_dim (set, isl_dim_set);
|
|
|
|
isl_space *space = isl_set_get_space (set);
|
|
|
|
|
|
|
|
gcc_assert (dim >= data->n);
|
|
|
|
isl_pw_multi_aff *pma
|
|
|
|
= isl_pw_multi_aff_project_out_map (space, isl_dim_set, data->n,
|
|
|
|
dim - data->n);
|
|
|
|
data->res = isl_union_pw_multi_aff_add_pw_multi_aff (data->res, pma);
|
|
|
|
|
|
|
|
isl_set_free (set);
|
|
|
|
return isl_stat_ok;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return SET in which all inner dimensions above N are removed. */
|
|
|
|
|
|
|
|
static isl_multi_union_pw_aff *
|
|
|
|
outer_projection_mupa (__isl_take isl_union_set *set, int n)
|
|
|
|
{
|
|
|
|
gcc_assert (n >= 0);
|
|
|
|
gcc_assert (set);
|
|
|
|
gcc_assert (!isl_union_set_is_empty (set));
|
|
|
|
|
|
|
|
isl_space *space = isl_union_set_get_space (set);
|
|
|
|
isl_union_pw_multi_aff *pwaff = isl_union_pw_multi_aff_empty (space);
|
|
|
|
|
|
|
|
struct map_to_dimension_data data = {n, pwaff};
|
|
|
|
|
|
|
|
if (isl_union_set_foreach_set (set, &add_outer_projection, &data) < 0)
|
|
|
|
data.res = isl_union_pw_multi_aff_free (data.res);
|
|
|
|
|
|
|
|
isl_union_set_free (set);
|
|
|
|
return isl_multi_union_pw_aff_from_union_pw_multi_aff (data.res);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Embed SCHEDULE in the constraints of the LOOP domain. */
|
|
|
|
|
|
|
|
static isl_schedule *
|
|
|
|
add_loop_schedule (__isl_take isl_schedule *schedule, loop_p loop,
|
|
|
|
scop_p scop)
|
|
|
|
{
|
|
|
|
poly_bb_p pbb = outermost_pbb_in (loop, scop);
|
|
|
|
isl_set *iterators = pbb->iterators;
|
|
|
|
|
|
|
|
int empty = isl_set_is_empty (iterators);
|
|
|
|
if (empty < 0 || empty)
|
|
|
|
return empty < 0 ? isl_schedule_free (schedule) : schedule;
|
|
|
|
|
|
|
|
isl_space *space = isl_set_get_space (iterators);
|
|
|
|
int loop_index = isl_space_dim (space, isl_dim_set) - 1;
|
|
|
|
|
|
|
|
loop_p ploop = pbb_loop (pbb);
|
|
|
|
while (loop != ploop)
|
|
|
|
{
|
|
|
|
--loop_index;
|
|
|
|
ploop = loop_outer (ploop);
|
|
|
|
}
|
|
|
|
|
|
|
|
isl_local_space *ls = isl_local_space_from_space (space);
|
|
|
|
isl_aff *aff = isl_aff_var_on_domain (ls, isl_dim_set, loop_index);
|
|
|
|
isl_multi_aff *prefix = isl_multi_aff_from_aff (aff);
|
|
|
|
char name[50];
|
|
|
|
snprintf (name, sizeof(name), "L_%d", loop->num);
|
|
|
|
isl_id *label = isl_id_alloc (isl_schedule_get_ctx (schedule),
|
|
|
|
name, NULL);
|
|
|
|
prefix = isl_multi_aff_set_tuple_id (prefix, isl_dim_out, label);
|
|
|
|
|
|
|
|
int n = isl_multi_aff_dim (prefix, isl_dim_in);
|
|
|
|
isl_union_set *domain = isl_schedule_get_domain (schedule);
|
|
|
|
isl_multi_union_pw_aff *mupa = outer_projection_mupa (domain, n);
|
|
|
|
mupa = isl_multi_union_pw_aff_apply_multi_aff (mupa, prefix);
|
|
|
|
return isl_schedule_insert_partial_schedule (schedule, mupa);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Build schedule for the pbb at INDEX. */
|
|
|
|
|
|
|
|
static isl_schedule *
|
|
|
|
build_schedule_pbb (scop_p scop, int *index)
|
|
|
|
{
|
|
|
|
poly_bb_p pbb = scop->pbbs[*index];
|
|
|
|
++*index;
|
|
|
|
isl_set *domain = isl_set_copy (pbb->domain);
|
|
|
|
isl_union_set *ud = isl_union_set_from_set (domain);
|
|
|
|
return isl_schedule_from_domain (ud);
|
|
|
|
}
|
|
|
|
|
|
|
|
static isl_schedule *build_schedule_loop_nest (scop_p, int *, loop_p);
|
|
|
|
|
|
|
|
/* Build the schedule of the loop containing the SCOP pbb at INDEX. */
|
|
|
|
|
|
|
|
static isl_schedule *
|
|
|
|
build_schedule_loop (scop_p scop, int *index)
|
|
|
|
{
|
|
|
|
int max = scop->pbbs.length ();
|
|
|
|
gcc_assert (*index < max);
|
|
|
|
loop_p loop = loop_at (scop, index);
|
|
|
|
|
|
|
|
isl_schedule *s = NULL;
|
|
|
|
while (nested_in (loop_at (scop, index), loop))
|
|
|
|
{
|
|
|
|
if (loop == loop_at (scop, index))
|
|
|
|
s = add_in_sequence (s, build_schedule_pbb (scop, index));
|
|
|
|
else
|
|
|
|
s = add_in_sequence (s, build_schedule_loop_nest (scop, index, loop));
|
|
|
|
|
|
|
|
if (*index == max)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return add_loop_schedule (s, loop, scop);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* S is the schedule of the loop LOOP. Embed the schedule S in all outer loops.
|
|
|
|
When CONTEXT_LOOP is null, embed the schedule in all loops contained in the
|
|
|
|
SCOP surrounding LOOP. When CONTEXT_LOOP is non null, only embed S in the
|
|
|
|
maximal loop nest contained within CONTEXT_LOOP. */
|
|
|
|
|
|
|
|
static isl_schedule *
|
|
|
|
embed_in_surrounding_loops (__isl_take isl_schedule *s, scop_p scop,
|
|
|
|
loop_p loop, int *index, loop_p context_loop)
|
|
|
|
{
|
|
|
|
loop_p outer = loop_outer (loop);
|
|
|
|
sese_l region = scop->scop_info->region;
|
|
|
|
if (context_loop == outer
|
|
|
|
|| !loop_in_sese_p (outer, region))
|
|
|
|
return s;
|
|
|
|
|
|
|
|
int max = scop->pbbs.length ();
|
|
|
|
if (*index == max
|
|
|
|
|| (context_loop && !nested_in (loop_at (scop, index), context_loop))
|
|
|
|
|| (!context_loop
|
|
|
|
&& !loop_in_sese_p (find_common_loop (outer, loop_at (scop, index)),
|
|
|
|
region)))
|
|
|
|
return embed_in_surrounding_loops (add_loop_schedule (s, outer, scop),
|
|
|
|
scop, outer, index, context_loop);
|
|
|
|
|
|
|
|
bool a_pbb;
|
|
|
|
while ((a_pbb = (outer == loop_at (scop, index)))
|
|
|
|
|| nested_in (loop_at (scop, index), outer))
|
|
|
|
{
|
|
|
|
if (a_pbb)
|
|
|
|
s = add_in_sequence (s, build_schedule_pbb (scop, index));
|
|
|
|
else
|
|
|
|
s = add_in_sequence (s, build_schedule_loop (scop, index));
|
|
|
|
|
|
|
|
if (*index == max)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* We reached the end of the OUTER loop: embed S in OUTER. */
|
|
|
|
return embed_in_surrounding_loops (add_loop_schedule (s, outer, scop), scop,
|
|
|
|
outer, index, context_loop);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Build schedule for the full loop nest containing the pbb at INDEX. When
|
|
|
|
CONTEXT_LOOP is null, build the schedule of all loops contained in the SCOP
|
|
|
|
surrounding the pbb. When CONTEXT_LOOP is non null, only build the maximal loop
|
|
|
|
nest contained within CONTEXT_LOOP. */
|
|
|
|
|
|
|
|
static isl_schedule *
|
|
|
|
build_schedule_loop_nest (scop_p scop, int *index, loop_p context_loop)
|
|
|
|
{
|
|
|
|
gcc_assert (*index != (int) scop->pbbs.length ());
|
|
|
|
|
|
|
|
loop_p loop = loop_at (scop, index);
|
|
|
|
isl_schedule *s = build_schedule_loop (scop, index);
|
|
|
|
return embed_in_surrounding_loops (s, scop, loop, index, context_loop);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Build the schedule of the SCOP. */
|
|
|
|
|
|
|
|
static bool
|
|
|
|
build_original_schedule (scop_p scop)
|
|
|
|
{
|
|
|
|
int i = 0;
|
|
|
|
int n = scop->pbbs.length ();
|
|
|
|
while (i < n)
|
|
|
|
{
|
|
|
|
poly_bb_p pbb = scop->pbbs[i];
|
|
|
|
isl_schedule *s = NULL;
|
|
|
|
if (!loop_in_sese_p (pbb_loop (pbb), scop->scop_info->region))
|
|
|
|
s = build_schedule_pbb (scop, &i);
|
|
|
|
else
|
|
|
|
s = build_schedule_loop_nest (scop, &i, NULL);
|
|
|
|
|
|
|
|
scop->original_schedule = add_in_sequence (scop->original_schedule, s);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dump_file)
|
|
|
|
{
|
|
|
|
fprintf (dump_file, "[sese-to-poly] original schedule:\n");
|
|
|
|
print_isl_schedule (dump_file, scop->original_schedule);
|
|
|
|
}
|
|
|
|
if (!scop->original_schedule)
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2009-07-31 04:43:11 +02:00
|
|
|
/* Builds the polyhedral representation for a SESE region. */
|
|
|
|
|
2015-11-23 20:28:13 +01:00
|
|
|
bool
|
2009-07-31 04:43:11 +02:00
|
|
|
build_poly_scop (scop_p scop)
|
|
|
|
{
|
|
|
|
build_scop_context (scop);
|
2015-11-23 20:28:13 +01:00
|
|
|
|
2016-01-21 03:13:33 +01:00
|
|
|
unsigned i = 0;
|
|
|
|
unsigned n = scop->pbbs.length ();
|
|
|
|
while (i < n)
|
|
|
|
i = build_iteration_domains (scop, scop->param_context, i, NULL);
|
|
|
|
|
2010-12-01 18:25:10 +01:00
|
|
|
build_scop_drs (scop);
|
2016-01-26 01:19:20 +01:00
|
|
|
build_original_schedule (scop);
|
2015-11-23 20:28:13 +01:00
|
|
|
return true;
|
2009-07-31 04:43:11 +02:00
|
|
|
}
|
2015-07-13 17:41:54 +02:00
|
|
|
#endif /* HAVE_isl */
|