Re: Subobtimal code for 'complex float' type
Posted:
Wed Jan 09, 2013 10:01 pm
by ysapir
@tnt,
This suboptimal issue was already identified and is in the to-do list.
Re: Subobtimal code for 'complex float' type
Posted:
Thu Jan 10, 2013 12:12 am
by tnt
Ok, good to know.
In the mean time I tried working around it using inline asm for the load / store, but unfortunately, trying to pass complex argument to inline asm just triggers a segfault / internal compiler error ...
Re: Subobtimal code for 'complex float' type
Posted:
Thu Jan 10, 2013 11:09 am
by jeremybennett
I discussed this at some length with Joern Rennecke (who is responsible for the Epiphany compiler). I'll let him reply with a detailed explanation - there is too much risk of me getting the details wrong. However in summary, the underlying problem is with upstream GCC, which effectively insists on treating complex numbers as a pair of floats, 4 byte aligned.
This is something we want to fix, but it is a major piece of work, which will take some time. Although we would incorporate it first in GCC here, we would also want it included in upstream GCC as well (it will help other architectures, such as SH), which would have to wait until GCC 4.9 in 2014.
Joern has some suggestions for a workaround in the short term, which I'll let him explain.
HTH,
Jeremy