http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51506
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-12-12
CC| |jamborm at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Ever Confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-12
10:02:22 UTC ---
We currently do not easily see that they are constant:
D.1599.a = 6;
D.1599.b = 1;
D.1603_1 = compute_dint (D.1599, 1);
but we could in theory improve our IL by not forcing the aggregate argument
to a temporary during gimplification of
rv = compute_dint (<<< Unknown tree: compound_literal_expr
struct dint D.1599 = {.a=6, .b=1}; >>>, 1) + rv;
but simply allow !is_gimple_reg_type CONSTRUCTORs that are TREE_CONSTANT,
thus have
D.1603_1 = compute_dint ({.a=6, .b=1}, 1);
in the IL. That would still require ipa-cp to handle aggregates though.
The above would also mean that
D.1599 = {.a=6, .b=1};
would be valid GIMPLE (I see no good reason to disallow this either).