!1941 新增codegen ir文件插件点

Merge pull request !1941 from pengjiong/array
This commit is contained in:
opengauss-bot
2022-07-26 07:17:53 +00:00
committed by Gitee
2 changed files with 11 additions and 1 deletions

View File

@ -351,7 +351,16 @@ void GsCodeGen::loadIRFile()
if (NULL != exec_path && strcmp(exec_path, "\0") != 0) { if (NULL != exec_path && strcmp(exec_path, "\0") != 0) {
char* exec_path_r = realpath(exec_path, NULL); char* exec_path_r = realpath(exec_path, NULL);
if (exec_path_r) { if (exec_path_r) {
appendStringInfo(filename, "%s/share/llvmir/GaussDB_expr.ir", exec_path_r); char *llvmIrFilePath = "share/llvmir/GaussDB_expr.ir";
#ifndef ENABLE_MULTIPLE_NODES
if (u_sess->attr.attr_sql.whale || u_sess->attr.attr_sql.dolphin) {
int id = GetCustomParserId();
if (id >= 0 && g_instance.llvmIrFilePath[id] != NULL) {
llvmIrFilePath = g_instance.llvmIrFilePath[id];
}
}
#endif
appendStringInfo(filename, "%s/%s", exec_path_r, llvmIrFilePath);
check_backend_env(exec_path); check_backend_env(exec_path);
free(exec_path_r); free(exec_path_r);
} else { } else {

View File

@ -1231,6 +1231,7 @@ typedef struct knl_instance_context {
#ifndef ENABLE_MULTIPLE_NODES #ifndef ENABLE_MULTIPLE_NODES
void *raw_parser_hook[DB_CMPT_MAX]; void *raw_parser_hook[DB_CMPT_MAX];
void *plsql_parser_hook[DB_CMPT_MAX]; void *plsql_parser_hook[DB_CMPT_MAX];
char *llvmIrFilePath[DB_CMPT_MAX];
#endif #endif
pg_atomic_uint32 extensionNum; pg_atomic_uint32 extensionNum;
knl_g_audit_context audit_cxt; knl_g_audit_context audit_cxt;