#1461 Peephole optimizer can't handle nested parenthesis

closed-fixed
5
2013-05-25
2008-05-19
No

The peephole optimizer can't handle nested parenthesis in function conditions. Example:

replace {
do %1
} by {
} if OperandsNotSame(%1 '(x)')

which should remove lines like
do this
do that
do (whatever)
but not
do (x)
won't work.

This bug has to be fixed so bug #1924707 can be fixed. The fix to #1924707 need '(de)' and '(bc)' as arguments to functions in the peephole optimizer.

The problem is in callFuncByName in SDCCpeeph.c: It assumes the arguments of a function are between the line's first ( and the first ) after that. We should allow nested () in between.

Philipp

Discussion

  • Philipp Klaus Krause

    Logged In: YES
    user_id=564030
    Originator: YES

    Fixed in #5163.

     
  • Philipp Klaus Krause

    • status: open --> closed
     
  • Maarten Brock

    Maarten Brock - 2008-05-19
    • milestone: --> fixed
    • status: closed --> closed-fixed
     
  • Maarten Brock

    Maarten Brock - 2008-05-19

    Logged In: YES
    user_id=888171
    Originator: NO

    Please remember to also set the Group and Resolution when closing a bug report.

     

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

Sign up for the SourceForge newsletter:





No, thanks