#289 Optimize out unnecessary genPointerGet/Set

open
nobody
None
7
2010-09-23
2010-05-18
No

sdcc often generates unnecessary genPointerGet / genPointerSet.

A compileable example is attached.

For
void f(void)
{
x++;
}
we get a single, efficient genPlus.
However for
void g(void)
{
y.x++;
}
We get genPointerGet followed by genPlus followed by genPointerSet, even though generating exactly the same code as above would do (and be much more efficient).

Philipp

Discussion

  • Philipp Klaus Krause

     
  • Philipp Klaus Krause

    Increasing priority, since this is part of sdcc's greatest weakness: The handling of struct and union.

    Philipp

     
  • Philipp Klaus Krause

    • priority: 5 --> 7
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks