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?
XC Optimization Question and Assembler "Tricks" Question
-
- Respected Member
- Posts: 283
- Joined: Fri Mar 19, 2010 4:49 am
-
- Respected Member
- Posts: 318
- Joined: Tue Dec 15, 2009 12:46 am
Are you able to post an example of some code that isn't optimised?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?
-
- Respected Member
- Posts: 275
- Joined: Fri Mar 12, 2010 6:03 pm
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").