This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Context dependent expression simplification
- From: Paulo Matos <pmatos at broadcom dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 14 Jan 2014 13:40:36 +0000
- Subject: Context dependent expression simplification
- Authentication-results: sourceware.org; auth=none
Hello,
Before I start to write code to reinvent the wheel, I would like to know if there's something already out there to do context dependent expression simplification.
What I need is to simplify an expression at a given point in a BB.
For example:
bb2:
r1 <- 2
if r2 != 0 goto bb3 else bb4
bb3:
r3 <- r2 << 1
goto bb4
bb4:
...
...
if ... goto bb4 else bb5
Is there any way already implemented to find the value of (and (plus r1 r3) (const_int 1)) at the end of bb4 and simplify it to (const_int 0)?
Cheers,
Paulo Matos