XC Optimization Question and Assembler "Tricks" Question

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
bearcat
Respected Member
Posts: 283
Joined: Fri Mar 19, 2010 4:49 am

XC Optimization Question and Assembler "Tricks" Question

Post by bearcat »

Can the XC compiler do any register contents reuse for later instructions?

The little code I have looked at (-O3 optimization) does not appear to reuse existing register contents across XC instructions. So if I want to optimize for this I need to use inline Assembler?

Just checking I have not missed something before I spend the time to do this for my filters to save a few instructions.

Is there a list somewhere of assembler "tricks" to save cycles or memory?
I found one so far in sample code that you can use LSUB to zero two registers in one instruction (although I will have to experiment with this to figure out the syntax). Any others?


richard
Respected Member
Posts: 318
Joined: Tue Dec 15, 2009 12:46 am

Post by richard »

bearcat wrote:Can the XC compiler do any register contents reuse for later instructions?

The little code I have looked at (-O3 optimization) does not appear to reuse existing register contents across XC instructions. So if I want to optimize for this I need to use inline Assembler?
Are you able to post an example of some code that isn't optimised?
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

As Richard says, we welcome optimisation requests or optimisation bug reports. Please submit them via support tracking at www.xmos.com/support (click "Support Tickets").
Post Reply