http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45522
Andrew Pinski changed:
What|Removed |Added
Keywords||missed-optimization
Status|UN
--- Comment #11 from hubicka at gcc dot gnu dot org 2010-09-04 18:00
---
Created an attachment (id=21700)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21700&action=view)
proposed fix for sccvn
Well, this is patch I am currently testing. At least small part is shared in
between t
--- Comment #10 from rguenther at suse dot de 2010-09-04 14:11 ---
Subject: Re: VRP misses oppurtunity for statement
folding.
On Sat, 4 Sep 2010, hubicka at gcc dot gnu dot org wrote:
> --- Comment #9 from hubicka at gcc dot gnu dot org 2010-09-04 13:51
> ---
> Hi,
> thanks
--- Comment #9 from hubicka at gcc dot gnu dot org 2010-09-04 13:51 ---
Hi,
thanks. In meantime I made tree-ssa-pre to fold statements it produces and it
gets me to bootstrapland with sanity check in expr.c except for Ada (with the
patches I sent so far)
So it seems that I need to basi
--- Comment #8 from rguenther at suse dot de 2010-09-04 08:29 ---
Subject: Re: VRP misses oppurtunity for statement
folding.
On Fri, 3 Sep 2010, hubicka at gcc dot gnu dot org wrote:
> --- Comment #7 from hubicka at gcc dot gnu dot org 2010-09-03 20:28
> ---
> In #5 the exp
--- Comment #7 from hubicka at gcc dot gnu dot org 2010-09-03 20:28 ---
In #5 the expression is created by PRE via create_expression_by_pieces that
uses normal fold that is not able of constant variable folding. The statement
does not get folded later and survives. I guess one can fold
--- Comment #6 from hubicka at gcc dot gnu dot org 2010-09-03 20:12 ---
In testcase from comment #4 the problem is that value in DECL_INITIAL is not in
the form acceptable for gimple_min_invariant. Have patch.
In testcase from comment #5 we never try to fold it.
--
http://gcc.gnu.o
--- Comment #5 from hubicka at gcc dot gnu dot org 2010-09-03 20:09 ---
And here we fail to fold messages[1] created by PRE
enum
{
ERROR_OK, ERROR_UNKNOWN,
ERROR_NUM
};
enum
{ __LC_CTYPE = 0, __LC_NUMERIC = 1, __LC_TIME = 2, __LC_COLLATE =
3, __LC_MONETARY = 4, __LC_MESSAGES = 5
--- Comment #4 from hubicka at gcc dot gnu dot org 2010-09-03 20:04 ---
A related testcase where we fail to fold fundamentals[0]
typedef union tree_node *tree;
enum tree_code
{
OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, POINTER_TYPE, FIXED_POINT_TYPE,
};
struct tree_base
{
unsigned pu
--- Comment #3 from hubicka at gcc dot gnu dot org 2010-09-03 16:34 ---
Created an attachment (id=21685)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21685&action=view)
patch for better folding
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45522
--- Comment #2 from hubicka at gcc dot gnu dot org 2010-09-03 16:33 ---
OK, the problem seems to be that fold_stmt seems to make no serious attempt to
fold constant references. There is some code in maybe_fold_reference that
seems to partly duplicate fold_const_aggregate_ref however. W
--- Comment #1 from hubicka at gcc dot gnu dot org 2010-09-03 15:59 ---
Created an attachment (id=21684)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21684&action=view)
testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45522
12 matches
Mail list logo