Don't codegen deform code for virtual tuples in expr eval for scan fetch

Поиск
Список
Период
Сортировка
От Soumyadeep Chakraborty
Тема Don't codegen deform code for virtual tuples in expr eval for scan fetch
Дата
Msg-id CAE-ML+_66cVe1N_VBRXHwhqdPx+nJ2g=5fOpVZX_uO_M5Xb0GA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Don't codegen deform code for virtual tuples in expr eval forscan fetch  (Soumyadeep Chakraborty <soumyadeep2007@gmail.com>)
Re: Don't codegen deform code for virtual tuples in expr eval forscan fetch  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hello Hackers,

This is to address a TODO I found in the JIT expression evaluation
code (opcode =
EEOP_INNER_FETCHSOME/EEOP_OUTER_FETCHSOME/EEOP_SCAN_FETCHSOME):

* TODO: skip nvalid check if slot is fixed and known to
* be a virtual slot.

Not only should we skip the nvalid check if the tuple is virtual, the
whole basic block should be a no-op. There is no deforming to be done,
JIT (slot_compile_deform) or otherwise (slot_getsomeattrs) for virtual
tuples.

Attached is a patch 0001 that achieves exactly that by:

1. Performing the check at the very beginning of the case.
2. Emitting an unconditional branch to the next opblock if we have a
virtual tuple. We end up with a block with just the single
unconditional branch instruction in this case. This block is optimized
away when we run llvm_optimize_module().

Also enclosed is another patch 0002 that adds on some minor
refactoring of conditionals around whether to JIT deform or not.

---
Soumyadeep Chakraborty
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Khandekar
Дата:
Сообщение: Re: logical decoding : exceeded maxAllocatedDescs for .spill files
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Efficient output for integer types