Page 1 of 1
Improvement suggestions for Epiphany compiler

Posted:
Sun Feb 22, 2015 5:51 pm
by mikebell
Re: Improvement suggestions for Epiphany compiler

Posted:
Sun Feb 22, 2015 7:17 pm
by aolofsson
mikebell,
I tend to agree with all three of your suggestions! If you want to go ahead and submit compiler issue request (one each) that would help out a lot!
https://github.com/adapteva/epiphany-sdk/issues(if you don't have time, then I will grab the text out of this post and submit issues...)
Andreas
Re: Improvement suggestions for Epiphany compiler

Posted:
Sat Mar 14, 2015 5:33 pm
by mikebell
I've raised issues for 2 and 3 (and given a proposed patch that works-for-me™ for issue 2).
It turns out raising that number of registers is harder than I expected, and is really a core gcc issue, not an epiphany specific one. So I haven't raised an issue for that right now.
Mike
Re: Improvement suggestions for Epiphany compiler

Posted:
Sat Mar 14, 2015 7:48 pm
by mikebell
On further investigation I found it didn't seem too hard to get up to 60 registers in use in an asm block (which is really only a bit more than 30 because of the double counting for read/write regs).
I've raised an issue with a link to a commit that appears to work for me. Again, more testing by someone with more experience would be nice!
Mike
I have a suggestion to improve the compiler as well.

Posted:
Wed Apr 15, 2015 4:57 pm
by Gravis
Reduce the amount of instructions used for stack manipulation!
Upon analysis of disassembled object code I found that between 10% and 20% of instructions are just managing the stack when calling/leaving a function. There are multiple ways to do this, from changing register use rules to having dedicated functions to manage the stack.
Re: Improvement suggestions for Epiphany compiler

Posted:
Thu Apr 16, 2015 9:31 am
by Gravis
I'm not sure how to command GCC to do this but if you could mark functions or specific variables to use low index registers so that the 16-bit instructions could be used instead of 32-bit ones, that could save a lot of space.
better yet, having a gcc flag to aggressively try and save space by using 16-bit instructions as much as possible would be good.