提交 1186001e 编写于 作者: N Nikos Armenatzoglou 提交者: Karthikeyan Jambu Rajaraman

Revert "Create naive code-generated version of ExecQual"

This reverts commit aae0ad3d.
上级 6f928a65
......@@ -166,7 +166,6 @@ set(GPCODEGEN_SRC
codegen_manager.cc
codegen_wrapper.cc
exec_variable_list_codegen.cc
exec_qual_codegen.cc
)
# Integrate with GPDB build system.
......
......@@ -13,14 +13,12 @@
#include "codegen/codegen_wrapper.h"
#include "codegen/codegen_manager.h"
#include "codegen/exec_variable_list_codegen.h"
#include "codegen/exec_qual_codegen.h"
#include "codegen/utils/gp_codegen_utils.h"
using gpcodegen::CodegenManager;
using gpcodegen::BaseCodegen;
using gpcodegen::ExecVariableListCodegen;
using gpcodegen::ExecQualCodegen;
// Current code generator manager that oversees all code generators
static void* ActiveCodeGeneratorManager = nullptr;
......@@ -118,13 +116,3 @@ void* ExecVariableListCodegenEnroll(
regular_func_ptr, ptr_to_chosen_func_ptr, proj_info, slot);
return generator;
}
void* ExecQualCodegenEnroll(
ExecQualFn regular_func_ptr,
ExecQualFn* ptr_to_chosen_func_ptr,
PlanState *planstate) {
ExecQualCodegen* generator = CodegenEnroll<ExecQualCodegen>(
regular_func_ptr, ptr_to_chosen_func_ptr, planstate);
return generator;
}
......@@ -729,9 +729,6 @@ ExecInitNode(Plan *node, EState *estate, int eflags)
if (result != NULL)
{
enroll_ExecQual_codegen(ExecQual,
&result->ExecQual_gen_info.ExecQual_fn, result);
SAVE_EXECUTOR_MEMORY_ACCOUNT(result, curMemoryAccount);
result->CodegenManager = CodegenManager;
CodeGeneratorManagerGenerateCode(CodegenManager);
......
......@@ -156,7 +156,7 @@ ExecScan(ScanState *node,
* when the qual is nil ... saves only a few cycles, but they add up
* ...
*/
if (!qual || call_ExecQual(node->ps, qual, econtext, false))
if (!qual || ExecQual(qual, econtext, false))
{
/*
* Found a satisfactory scan tuple.
......
......@@ -26,12 +26,8 @@ typedef int64 Datum;
*/
struct TupleTableSlot;
struct ProjectionInfo;
struct List;
struct ExprContext;
struct PlanState;
typedef void (*ExecVariableListFn) (struct ProjectionInfo *projInfo, Datum *values, bool *isnull);
typedef bool (*ExecQualFn) (struct List *qual, struct ExprContext *econtext, bool resultForNull);
#ifndef USE_CODEGEN
......@@ -48,12 +44,9 @@ typedef bool (*ExecQualFn) (struct List *qual, struct ExprContext *econtext, boo
#define END_CODE_GENERATOR_MANAGER()
#define init_codegen()
#define call_ExecVariableList(projInfo, values, isnull) ExecVariableList(projInfo, values, isnull)
#define enroll_ExecVariableList_codegen(regular_func, ptr_to_chosen_func, proj_info, slot)
#define call_ExecQual(planstate, qual, econtext, resultForNull) ExecQual(qual, econtext, resultForNull)
#define enroll_ExecQual_codegen(regular_func, ptr_to_chosen_func, planstate)
#else
/*
......@@ -83,7 +76,7 @@ extern "C" {
* Forward extern declaration of code generated functions if code gen is enabled
*/
extern void ExecVariableList(struct ProjectionInfo *projInfo, Datum *values, bool *isnull);
extern bool ExecQual(struct List *qual, struct ExprContext *econtext, bool resultForNull);
/*
* Do one-time global initialization of LLVM library. Returns 1
......@@ -144,14 +137,6 @@ ExecVariableListCodegenEnroll(ExecVariableListFn regular_func_ptr,
struct ProjectionInfo* proj_info,
struct TupleTableSlot* slot);
/*
* returns the pointer to the ExecQual generator
*/
void*
ExecQualCodegenEnroll(ExecQualFn regular_func_ptr,
ExecQualFn* ptr_to_regular_func_ptr,
struct PlanState *planstate);
#ifdef __cplusplus
} // extern "C"
#endif
......@@ -201,14 +186,6 @@ ExecQualCodegenEnroll(ExecQualFn regular_func_ptr,
*/
#define call_ExecVariableList(projInfo, values, isnull) \
projInfo->ExecVariableList_gen_info.ExecVariableList_fn(projInfo, values, isnull)
/*
* Call ExecQual using function pointer ExecQual_fn.
* Function pointer may point to regular version or generated function
*/
#define call_ExecQual(ps, qual, econtext, resultForNull) \
ps.ExecQual_gen_info.ExecQual_fn(qual, econtext, resultForNull)
/*
* Enrollment macros
* The enrollment process also ensures that the generated function pointer
......@@ -219,11 +196,6 @@ ExecQualCodegenEnroll(ExecQualFn regular_func_ptr,
regular_func, ptr_to_regular_func_ptr, proj_info, slot); \
Assert(proj_info->ExecVariableList_gen_info.ExecVariableList_fn == regular_func); \
#define enroll_ExecQual_codegen(regular_func, ptr_to_regular_func_ptr, planstate) \
planstate->ExecQual_gen_info.code_generator = ExecQualCodegenEnroll( \
regular_func, ptr_to_regular_func_ptr, planstate); \
Assert(planstate->ExecQual_gen_info.ExecQual_fn == regular_func); \
#endif //USE_CODEGEN
#endif // CODEGEN_WRAPPER_H_
......@@ -1340,14 +1340,6 @@ typedef struct DomainConstraintState
* ----------------------------------------------------------------
*/
typedef struct ExecQualCodegenInfo
{
/* Pointer to store ExecQualCodegen from Codegen */
void* code_generator;
/* Function pointer that points to either regular or generated slot_deform_tuple */
ExecQualFn ExecQual_fn;
} ExecQualCodegenInfo;
/* ----------------
* PlanState node
*
......@@ -1420,10 +1412,6 @@ typedef struct PlanState
*/
int gpmon_plan_tick;
gpmon_packet_t gpmon_pkt;
#ifdef USE_CODEGEN
ExecQualCodegenInfo ExecQual_gen_info;
#endif
} PlanState;
typedef struct Gpmon_NameUnit_MaxVal
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册