Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
96b5eac9
Commit
96b5eac9
authored
Mar 26, 2018
by
Andres Freund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct some typos in the new JIT code.
Author: Thomas Munro
parent
32af96b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
src/backend/jit/llvm/llvmjit.c
src/backend/jit/llvm/llvmjit.c
+6
-6
src/backend/jit/llvm/llvmjit_error.cpp
src/backend/jit/llvm/llvmjit_error.cpp
+3
-3
src/backend/jit/llvm/llvmjit_expr.c
src/backend/jit/llvm/llvmjit_expr.c
+2
-2
src/backend/jit/llvm/llvmjit_types.c
src/backend/jit/llvm/llvmjit_types.c
+1
-1
No files found.
src/backend/jit/llvm/llvmjit.c
View file @
96b5eac9
...
@@ -247,7 +247,7 @@ llvm_get_function(LLVMJitContext *context, const char *funcname)
...
@@ -247,7 +247,7 @@ llvm_get_function(LLVMJitContext *context, const char *funcname)
/*
/*
* If there is a pending / not emitted module, compile and emit now.
* If there is a pending / not emitted module, compile and emit now.
* Otherwise we migh not find the [correct] function.
* Otherwise we migh
t
not find the [correct] function.
*/
*/
if
(
!
context
->
compiled
)
if
(
!
context
->
compiled
)
{
{
...
@@ -266,7 +266,7 @@ llvm_get_function(LLVMJitContext *context, const char *funcname)
...
@@ -266,7 +266,7 @@ llvm_get_function(LLVMJitContext *context, const char *funcname)
addr
=
0
;
addr
=
0
;
if
(
LLVMOrcGetSymbolAddressIn
(
handle
->
stack
,
&
addr
,
handle
->
orc_handle
,
funcname
))
if
(
LLVMOrcGetSymbolAddressIn
(
handle
->
stack
,
&
addr
,
handle
->
orc_handle
,
funcname
))
elog
(
ERROR
,
"failed to lookup symbol
\"
%s
\"
"
,
funcname
);
elog
(
ERROR
,
"failed to look
up symbol
\"
%s
\"
"
,
funcname
);
if
(
addr
)
if
(
addr
)
return
(
void
*
)
(
uintptr_t
)
addr
;
return
(
void
*
)
(
uintptr_t
)
addr
;
}
}
...
@@ -280,11 +280,11 @@ llvm_get_function(LLVMJitContext *context, const char *funcname)
...
@@ -280,11 +280,11 @@ llvm_get_function(LLVMJitContext *context, const char *funcname)
return
(
void
*
)
(
uintptr_t
)
addr
;
return
(
void
*
)
(
uintptr_t
)
addr
;
#else
#else
if
(
LLVMOrcGetSymbolAddress
(
llvm_opt0_orc
,
&
addr
,
funcname
))
if
(
LLVMOrcGetSymbolAddress
(
llvm_opt0_orc
,
&
addr
,
funcname
))
elog
(
ERROR
,
"failed to lookup symbol
\"
%s
\"
"
,
funcname
);
elog
(
ERROR
,
"failed to look
up symbol
\"
%s
\"
"
,
funcname
);
if
(
addr
)
if
(
addr
)
return
(
void
*
)
(
uintptr_t
)
addr
;
return
(
void
*
)
(
uintptr_t
)
addr
;
if
(
LLVMOrcGetSymbolAddress
(
llvm_opt3_orc
,
&
addr
,
funcname
))
if
(
LLVMOrcGetSymbolAddress
(
llvm_opt3_orc
,
&
addr
,
funcname
))
elog
(
ERROR
,
"failed to lookup symbol
\"
%s
\"
"
,
funcname
);
elog
(
ERROR
,
"failed to look
up symbol
\"
%s
\"
"
,
funcname
);
if
(
addr
)
if
(
addr
)
return
(
void
*
)
(
uintptr_t
)
addr
;
return
(
void
*
)
(
uintptr_t
)
addr
;
#endif
/* LLVM_VERSION_MAJOR */
#endif
/* LLVM_VERSION_MAJOR */
...
@@ -540,7 +540,7 @@ llvm_compile_module(LLVMJitContext *context)
...
@@ -540,7 +540,7 @@ llvm_compile_module(LLVMJitContext *context)
if
(
LLVMOrcAddEagerlyCompiledIR
(
compile_orc
,
&
orc_handle
,
smod
,
if
(
LLVMOrcAddEagerlyCompiledIR
(
compile_orc
,
&
orc_handle
,
smod
,
llvm_resolve_symbol
,
NULL
))
llvm_resolve_symbol
,
NULL
))
{
{
elog
(
ERROR
,
"failed to
jit
module"
);
elog
(
ERROR
,
"failed to
JIT
module"
);
}
}
LLVMOrcDisposeSharedModuleRef
(
smod
);
LLVMOrcDisposeSharedModuleRef
(
smod
);
}
}
...
@@ -847,7 +847,7 @@ llvm_resolve_symbol(const char *symname, void *ctx)
...
@@ -847,7 +847,7 @@ llvm_resolve_symbol(const char *symname, void *ctx)
char
*
modname
;
char
*
modname
;
/*
/*
*
OSX
prefixes all object level symbols with an underscore. But neither
*
macOS
prefixes all object level symbols with an underscore. But neither
* dlsym() nor PG's inliner expect that. So undo.
* dlsym() nor PG's inliner expect that. So undo.
*/
*/
#if defined(__darwin__)
#if defined(__darwin__)
...
...
src/backend/jit/llvm/llvmjit_error.cpp
View file @
96b5eac9
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* LLVM error related handling that requires interfacing with C++
* LLVM error related handling that requires interfacing with C++
*
*
* Unfortunately neither (re)setting the C++ new handler, nor the LLVM OOM
* Unfortunately neither (re)setting the C++ new handler, nor the LLVM OOM
* handler are exposed to C. Therefore this file wraps the necesary code.
* handler are exposed to C. Therefore this file wraps the neces
s
ary code.
*
*
* Copyright (c) 2016-2018, PostgreSQL Global Development Group
* Copyright (c) 2016-2018, PostgreSQL Global Development Group
*
*
...
@@ -39,12 +39,12 @@ static void fatal_llvm_error_handler(void *user_data, const std::string& reason,
...
@@ -39,12 +39,12 @@ static void fatal_llvm_error_handler(void *user_data, const std::string& reason,
*
*
* This is necessary for LLVM as LLVM's error handling for such cases
* This is necessary for LLVM as LLVM's error handling for such cases
* (exit()ing, throwing std::bad_alloc() if compiled with exceptions, abort())
* (exit()ing, throwing std::bad_alloc() if compiled with exceptions, abort())
* isn't compatible with postgres error handling. Thus in section where LLVM
* isn't compatible with postgres error handling. Thus in section
s
where LLVM
* code, not LLVM generated functions!, is executing, standard new, LLVM OOM
* code, not LLVM generated functions!, is executing, standard new, LLVM OOM
* and LLVM fatal errors (some OOM errors masquerade as those) are redirected
* and LLVM fatal errors (some OOM errors masquerade as those) are redirected
* to our own error handlers.
* to our own error handlers.
*
*
* These error handlers FATAL, because there's no reliable way from within
* These error handlers
use
FATAL, because there's no reliable way from within
* LLVM to throw an error that's guaranteed not to corrupt LLVM's state.
* LLVM to throw an error that's guaranteed not to corrupt LLVM's state.
*
*
* To avoid disturbing extensions using C++ and/or LLVM, these handlers are
* To avoid disturbing extensions using C++ and/or LLVM, these handlers are
...
...
src/backend/jit/llvm/llvmjit_expr.c
View file @
96b5eac9
...
@@ -1984,7 +1984,7 @@ llvm_compile_expr(ExprState *state)
...
@@ -1984,7 +1984,7 @@ llvm_compile_expr(ExprState *state)
isnull
;
isnull
;
/*
/*
* At this point aggref->aggno is not yet set (it's setup
* At this point aggref->aggno is not yet set (it's set
up
* in ExecInitAgg() after initializing the expression). So
* in ExecInitAgg() after initializing the expression). So
* load it from memory each time round.
* load it from memory each time round.
*/
*/
...
@@ -2020,7 +2020,7 @@ llvm_compile_expr(ExprState *state)
...
@@ -2020,7 +2020,7 @@ llvm_compile_expr(ExprState *state)
/*
/*
* At this point aggref->wfuncno is not yet set (it's
* At this point aggref->wfuncno is not yet set (it's
* setup in ExecInitWindowAgg() after initializing the
* set
up in ExecInitWindowAgg() after initializing the
* expression). So load it from memory each time round.
* expression). So load it from memory each time round.
*/
*/
v_wfuncnop
=
l_ptr_const
(
&
wfunc
->
wfuncno
,
v_wfuncnop
=
l_ptr_const
(
&
wfunc
->
wfuncno
,
...
...
src/backend/jit/llvm/llvmjit_types.c
View file @
96b5eac9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* low chance of definitions getting out of sync, this file lists types and
* low chance of definitions getting out of sync, this file lists types and
* functions that directly need to be accessed from LLVM.
* functions that directly need to be accessed from LLVM.
*
*
* When L
lVM is first used in a backend, a bitcode version of this file,
will
* When L
LVM is first used in a backend, a bitcode version of this file
will
* be loaded. The needed types and signatures will be stored into Struct*,
* be loaded. The needed types and signatures will be stored into Struct*,
* Type*, Func* variables.
* Type*, Func* variables.
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment