Remove obsolete check for TTSOpsVirtual from slot_compile_deform

Started by Xing Guoabout 3 years ago1 messageshackers

Thread notes

1 note#refactor
hackorum-bot#refactor
hackorum-bot
1 day ago

@global #refactor

#refactor
Jump to latest
#1Xing Guo
higuoxing@gmail.com

Hi hackers,

While exploring the JIT support for tuple deforming process, I noticed that
one check for TTSOpsVirtual in slot_compile_deform is obsolete. Since
virtual tuples never need deforming and there's an assertion in
llvm_compile_expr[1]https://github.com/postgres/postgres/blob/0c60e8ba80e03491b028204a19a9dca6d216df91/src/backend/jit/llvm/llvmjit_expr.c#L322. I simply replace it with an assertion in
slot_compile_deform. Patch is attached.

[1]: https://github.com/postgres/postgres/blob/0c60e8ba80e03491b028204a19a9dca6d216df91/src/backend/jit/llvm/llvmjit_expr.c#L322
https://github.com/postgres/postgres/blob/0c60e8ba80e03491b028204a19a9dca6d216df91/src/backend/jit/llvm/llvmjit_expr.c#L322

Best Regards,
Xing

Attachments:

t48666_1
v1-0001-Remove-obsolete-check-for-TTSOpsVirtual-from-slot.patchtext/x-patch; charset=US-ASCII; name=v1-0001-Remove-obsolete-check-for-TTSOpsVirtual-from-slot.patchDownload+2-4