#ifdef out assorted unused GEQO code.
Tom Lane <tgl@sss.pgh.pa.us>
#ifdef out assorted unused GEQO code. I'd always assumed that backend/optimizer/geqo/'s remarkably poor showing on code coverage metrics was because we weren't exercising it much in the regression tests. But it turns out that a good chunk of the problem is that there's a bunch of code that is physically unreachable (because the calls to it are #ifdef'd out in geqo_main.c) but is being built anyway. Making the called code have #if guards similar to the calling code saves a couple of kilobytes of executable size and should make the coverage numbers more reflective of reality. It's arguable that we should just delete all the unused recombination mechanisms altogether, but I didn't feel a need to go that far today.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/geqo/geqo_cx.c | modified | +3 −0 |
| src/backend/optimizer/geqo/geqo_erx.c | modified | +3 −0 |
| src/backend/optimizer/geqo/geqo_main.c | modified | +2 −2 |
| src/backend/optimizer/geqo/geqo_mutation.c | modified | +4 −0 |
| src/backend/optimizer/geqo/geqo_ox1.c | modified | +3 −0 |
| src/backend/optimizer/geqo/geqo_ox2.c | modified | +3 −0 |
| src/backend/optimizer/geqo/geqo_pmx.c | modified | +3 −0 |
| src/backend/optimizer/geqo/geqo_px.c | modified | +3 −0 |
| src/backend/optimizer/geqo/geqo_recombination.c | modified | +5 −0 |
| src/include/optimizer/geqo.h | modified | +1 −1 |