C code refactoring or optimizing ?

"Dennis Yurichev" <Dennis.Yurichev@gmail.com>
29 Mar 2007 00:58:56 -0400

          From comp.compilers

Related articles
C code refactoring or optimizing ? Dennis.Yurichev@gmail.com (Dennis Yurichev) (2007-03-29)
Re: C code refactoring or optimizing ? idbaxter@semdesigns.com (Ira Baxter) (2007-03-29)
Re: C code refactoring or optimizing ? mm.beck@gmx.net (Michael Beck) (2007-03-30)
Re: C code refactoring or optimizing ? jeffrey.kenton@comcast.net (Jeff Kenton) (2007-04-01)
| List of all articles for this month |
From: "Dennis Yurichev" <Dennis.Yurichev@gmail.com>
Newsgroups: comp.compilers
Date: 29 Mar 2007 00:58:56 -0400
Organization: Compilers Central
Keywords: C, optimize
Posted-Date: 29 Mar 2007 00:58:56 EDT

Hi.
How can I find some ready tool or how can I find a proper way to
develop a tool which will convert such code:


if (a>b+2+2)
{
    f1();
    f2(a*3*2);
} else
{
    f1();
    f3(a);
}


To something like that:


f1();
if (a>b+4)
    f2(a*6)
else
    f3(a);


In another words, this is what is done by modern compiler at
optimization phase, right? (that's why I post here) But I need to have
C-source at the input and C-source at the output. Could please anyone
point me to any ideas or ready works.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.