It would be good if sdcc, while compiling a function, would keep information on the used registers. Example: A file contains g() and f(), with g() calling no other functions, and f() containing a call to g(). g() comes first and is compiled first. Some register r is not used in g(). Then when calling g() from f() we would know that we do not need to save r.
In the future it might be possible to extend this somehow to library functions, so we would be able to have this information even though the library functions are in different files.
Log in to post a comment.