Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
savannahostrowski committed Oct 29, 2024
1 parent 5f3ec52 commit 46cee93
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Include/internal/pycore_jit.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extern "C" {

#ifdef _Py_JIT

typedef _Py_CODEUNIT *(*jit_func_native)(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer, PyThreadState *tstate);
typedef _Py_CODEUNIT *(*jit_func)(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer, PyThreadState *tstate);

int _PyJIT_Compile(_PyExecutorObject *executor, const _PyUOpInstruction *trace, size_t length);
void _PyJIT_Free(_PyExecutorObject *executor);
Expand Down
2 changes: 1 addition & 1 deletion Python/ceval_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ _PyFrame_SetStackPointer(frame, stack_pointer)
#define GOTO_TIER_TWO(EXECUTOR) \
do { \
OPT_STAT_INC(traces_executed); \
jit_func_native jitted = (EXECUTOR)->jit_code; \
jit_func jitted = (EXECUTOR)->jit_code; \
next_instr = jitted(frame, stack_pointer, tstate); \
Py_DECREF(tstate->previous_executor); \
tstate->previous_executor = NULL; \
Expand Down
3 changes: 1 addition & 2 deletions Tools/jit/_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ async def _compile(
f"{c}",
*self.args,
]
args_o = args + ["-o", f"{o}", f"{c}"]
await _llvm.run("clang", args_o, echo=self.verbose)
await _llvm.run("clang", args, echo=self.verbose)
return await self._parse(o)

async def _build_stencils(self) -> dict[str, _stencils.StencilGroup]:
Expand Down
2 changes: 1 addition & 1 deletion Tools/jit/jit.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// To use preserve_none in JIT builds, we need to declare a separate function
// pointer with __attribute__((preserve_none)), since this attribute may not be
// supported by the compiler used to build the rest of the interpreter.
typedef _Py_CODEUNIT *(*jit_func_preserve_none)(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer, PyThreadState *tstate) __attribute__((preserve_none));
typedef jit_func __attribute__((preserve_none)) jit_func_preserve_none;

0 comments on commit 46cee93

Please sign in to comment.