This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14729] New: [tree-ssa] missed semi high abstraction penalty due to casts
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Mar 2004 03:29:13 -0000
- Subject: [Bug optimization/14729] New: [tree-ssa] missed semi high abstraction penalty due to casts
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Derived from <http://gcc.gnu.org/ml/gcc/2004-03/msg01314.html>.
struct OOf {
float value;
OOf() {value = 0.0;}
};
inline OOf operator+(OOf op1, OOf op2)
{
OOf f;
f.value = op1.value + op2.value;
return f;
}
inline OOf operator*(OOf op1, OOf op2)
{
OOf f;
f.value = op1.value * op2.value;
return f;
}
inline OOf operator-(OOf op1, OOf op2)
{
OOf f;
f.value = op1.value - op2.value;
return f;
}
OOf test_func(
OOf a,
OOf b,
OOf c
)
{
OOf d, e;
OOf result;
d = a * b + b * c;
e = a * c - b * d;
result = d * e;
return result;
}
I also have a patch to fix this one too.
--
Summary: [tree-ssa] missed semi high abstraction penalty due to
casts
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: pinskia at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14729