This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, libfortran] Fix PR 80687l build failure on nvptx


On Tue, May 9, 2017 at 8:35 PM, Thomas Koenig <tkoenig@netcologne.de> wrote:
> Hello world,
>
> the attached patch hopefully fixes the build failure on nvptx introduced
> by my recent matmul library patch.  It uses malloc/free if VLAs do not
> work.
>
> Thomas S., does this fix the problem?
>
> Tested on x86_64 to make sure that the matmul tests still pass;
> full regression test still in progress.
>
> OK for trunk if the nvptx problem is fixed and regression-tests pass?

I'd prefer to get rid of VLA's altogether. Which is why I added
-Werror=vla in https://gcc.gnu.org/ml/fortran/2014-11/msg00052.html .
In that message I also helpfully point out that avoiding VLA's can
help limited targets like nvptx that lack VLA's.. :)

VLA's don't come for free. Functions using VLA's require an extra
register for the frame pointer, and AFAIK can't be inlined. Also,
calculating variable offsets might not be possible at compile time as
the offset from the stack/frame pointer might not be known statically.


-- 
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]