2013-09-18 Richard Biener <rguenther@suse.de>
commit32e3182697b2d889cb9621d6a63724dc4f6c2b96
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Sep 2013 12:31:45 +0000 (18 12:31 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Sep 2013 12:31:45 +0000 (18 12:31 +0000)
tree59f32ef2e3ced559a50a2fd3d65803a14184d085
parent457d02a91d0b9f07f89248a9e5ae0a5c22b3af47
2013-09-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/58417
* tree-chrec.c (chrec_fold_plus_1): Assert that we do not
have chrecs with symbols defined in the loop as operands.
(chrec_fold_multiply): Likewise.
* tree-scalar-evolution.c (interpret_rhs_expr): Instantiate
parameters before folding binary operations.
(struct instantiate_cache_entry_hasher): Remove.
(struct instantiate_cache_type): Use a pointer-map.
(instantiate_cache_type::instantiate_cache_type): New function.
(instantiate_cache_type::get): Likewise.
(instantiate_cache_type::set): Likewise.
(instantiate_cache_type::~instantiate_cache_type): Adjust.
(get_instantiated_value_entry): Likewise.
(global_cache): New global.
(instantiate_scev_r, instantiate_scev_poly, instantiate_scev_binary,
instantiate_array_ref, instantiate_scev_convert, instantiate_scev_3,
instantiate_scev_2, instantiate_scev_1): Do not pass along cache.
(instantiate_scev_name): Adjust.
(instantiate_scev): Construct global instead of local cache.
(resolve_mixers): Likewise.

* gcc.dg/torture/pr58417.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202700 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr58417.c [new file with mode: 0644]
gcc/tree-chrec.c
gcc/tree-scalar-evolution.c