What are the restrictions on the 8051 compiler that comes with PSoC Creator?
The free compiler has restrictions on the optimization level. Check out the below KB article that talks about the limitations of the free compiler.
I recommend this article. Very clean explication in mode of the compilation.