SeisSol / PSpaMM

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Free up statically allocated vector registers for alpha/beta values #20

Closed montrie closed 3 months ago

montrie commented 3 months ago

This PR adds explicit broadcasting of the alpha and beta values where necessary to make the first two statically defined vector registers available to store matrix elements when possible. This affects the generators for the hsw, arm, and arm_sve architectures . For the knl generator, we can use implicit broadcasting in the mul and fmla instructions while skipping the broadcast instruction completely.

In order to keep the naming convention of the general registers that are used consistent, I added a partial mapping of r(n) to rax, rbx, etc. registers to hsw/operands.py and knl/operands.py. I ended up only defining r(3) = rbx and r(4) = rcx as a quick mapping, because mapping e.g. rdi to another input value for r(n) should not be allowed since rdi is used to store a memory address in the hsw and knl generator.