I ran into a known bug that makes SDCC completely unusable for me, so I thought to provide details just in case they could help to fix it eventually. It is in latest release version and snapshot builds.
The code was ~400 lines long when it started to compile ~10 seconds. At ~550 lines it compiles a minute. With --oldralloc it compiles fast, but one of functions does not work properly (it works when compiled without the option).
Code contains a long while(1) block with a break by a condition (main.c:531). If I remove the condition, compile time reduces greatly. If I move it to the while(..), the problem is back again.
sdcc -mz80 --code-loc 0x0006 --data-loc 0 --no-std-crt0 -I..\evosdk ..\evosdk\crt0.rel ..\evosdk\evo.rel --opt-code-speed --fomit-frame-pointer main.c -o %temp%\out.ihx
I provide all the files involved into the compile, hopefully I didn't miss something.
As a side note, in the past I sucessfully used 2.9.0 for a larger (2300 lines) and more complex project, perharps the problem was introduced later. I also attempted to compile current project with 3.0.0, it compiled fast, but didn't started at all, haven't investigated why.