Marginal improvement for generated code in execExprInterp.c.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Sep 2017 15:32:05 +0000 (11:32 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Sep 2017 15:32:05 +0000 (11:32 -0400)
commit136ab7c5a5f54fecea7c28c8550c19123245acf0
tree55c2b75a77723792f260f007be33b6e5ed8824ee
parent5373bc2a0867048bb78f93aede54ac1309b5e227
Marginal improvement for generated code in execExprInterp.c.

Avoid the coding pattern "*op->resvalue = f();", as some compilers think
that requires them to evaluate "op->resvalue" before the function call.
Unless there are lots of free registers, this can lead to a useless
register spill and reload across the call.

I changed all the cases like this in ExecInterpExpr(), but didn't bother
in the out-of-line opcode eval subroutines, since those are presumably
not as performance-critical.

Discussion: https://postgr.es/m/2508.1506630094@sss.pgh.pa.us
src/backend/executor/execExprInterp.c