Running in RAM problem in LPCXpersso 4

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Running in RAM problem in LPCXpersso 4

512 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by micrio on Mon Aug 08 18:17:58 MST 2011
I upgraded to the latest version of LPCXpersso 4.0.6_152. After some hassle
with the import process I got everything working OK.

However the small routine that is running in RAM is slower than with the older version of LPCExpresso 3.6.3_317. Also the new rev produces a veneer block where the old version does not. The source code is identical in both cases. The code is running in RAM in both cases as expected. The code executes correctly in both cases. The problem is the slow down with the new rev of the environment. The added veneer is curious but not important in this case.

The difference is in the assembly code generated. The older code is much more efficient than the new code. I have tried -O2 and -O3 in both revs to no effect.
It seems that the compiler has gone backward.

Any thoughts? I can supply the code if necessary.

Pete.
0 项奖励
回复
1 回复

505 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Aug 09 01:53:01 MST 2011
At a general level, compilers are highly sophisticated beasts, and you are always going to see changes in code generated when you move from one version to a major new version. When taken over a large enough code sample, the aim is that such changes should generally be beneficial.

But there are always going to be some cases, particularly with small samples of code where things may look "worse". That is the nature of the multitude of optimisation algorithms compilers implement, and the interactions between them.

At a more specific level, if you want someone to comment on your source and generated code, then you really are going to have to post a buildable example.

Regards,
CodeRedSupport
0 项奖励
回复