Force LDC/LLVM to split a struct local (into registers)?
Vladimir Panteleev
thecybershadow.lists at gmail.com
Thu Sep 19 21:40:11 UTC 2019
Hi,
This change increases the function's execution time by 50%:
https://github.com/CyberShadow/chunker/commit/inline-hash
To reproduce, get the code and run:
ldmd2 -Isrc -i -g -version=benchmarkChunker -O -inline -release
-run src/chunker/package -N=100 Chunker
It looks like LLVM is keeping the fields on the stack, and isn't
realizing that splitting the struct to move some fields into
registers will result in faster code.
Is there something in the code preventing it from doing so? Or,
is there a way to force it to split the struct?
More information about the digitalmars-d-ldc
mailing list