Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-116291: Tier 2 - True function inlining redux #116290

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0114bb7
Add frame support functions
Fidget-Spinner Feb 20, 2024
d210b5d
Abstract interp analysis done
Fidget-Spinner Feb 20, 2024
f165138
Add frame inlining heuristics
Fidget-Spinner Feb 20, 2024
7551b65
inlining decision pass
Fidget-Spinner Feb 21, 2024
683927d
add inline markers
Fidget-Spinner Feb 21, 2024
4100b61
more analysis work
Fidget-Spinner Feb 21, 2024
11262ea
propagate non inlineable
Fidget-Spinner Feb 21, 2024
e4a68e3
Merge remote-tracking branch 'upstream/main' into tier2_inliner
Fidget-Spinner Feb 21, 2024
7856988
rewrite loads/store, remove replicates for load and store
Fidget-Spinner Feb 21, 2024
7b69a62
frame reconstruction
Fidget-Spinner Feb 21, 2024
e1ee2ad
fix a bunch of bugs in the abstract interp
Fidget-Spinner Feb 21, 2024
7a12a7b
Simplify
Fidget-Spinner Mar 3, 2024
1791803
Merge remote-tracking branch 'upstream/main' into tier2_inliner_redux
Fidget-Spinner Mar 3, 2024
9734d90
Fix main merge problems
Fidget-Spinner Mar 3, 2024
f0274cb
fix methods
Fidget-Spinner Mar 3, 2024
2eff546
cleanup more
Fidget-Spinner Mar 3, 2024
1322578
make tests pass
Fidget-Spinner Mar 3, 2024
16efbe0
📜🤖 Added by blurb_it.
blurb-it[bot] Mar 3, 2024
2e65b86
remove false check
Fidget-Spinner Mar 3, 2024
f74c315
Merge branch 'tier2_inliner_redux' of github.com:Fidget-Spinner/cpyth…
Fidget-Spinner Mar 3, 2024
df20f69
Merge remote-tracking branch 'upstream/main' into tier2_inliner_redux
Fidget-Spinner Mar 3, 2024
24b127f
fix failing tests
Fidget-Spinner Mar 4, 2024
b04215f
Merge remote-tracking branch 'upstream/main' into tier2_inliner_redux
Fidget-Spinner Mar 4, 2024
e84eeed
Implement _GROW_TIER2_FRAME without adding tier2_extra_size
gvanrossum Mar 5, 2024
dad9100
Merge commit '23db9c62272' into kenjin_tier2_inliner_redux
gvanrossum Mar 6, 2024
c7ad988
Replace _PUSH_FRAME_INLINEABLE body with assert(0) since it can never…
gvanrossum Mar 6, 2024
2f9539b
Don't ever decrement datastack_top!
gvanrossum Mar 6, 2024
29217e0
Remove commented-out comment and assert
gvanrossum Mar 6, 2024
73a0cd2
Merge remote-tracking branch 'upstream/main' into tier2_inliner_redux
Fidget-Spinner Mar 6, 2024
8820429
Add extern decl for real_localsplus_idx().
gvanrossum Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Include/internal/pycore_optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ struct _Py_UOpsAbstractFrame {
_Py_UopsSymbol **stack_pointer;
_Py_UopsSymbol **stack;
_Py_UopsSymbol **locals;

// Reflects the real localsplus that will be used in the VM.
// This may differ from locals if the frame is inlined.
// For an inlined frame, the inlinee shares the same localsplus
// as the inliner.
_Py_UopsSymbol **real_localsplus;
bool is_inlineable;
};

typedef struct _Py_UOpsAbstractFrame _Py_UOpsAbstractFrame;
Expand Down Expand Up @@ -109,6 +116,7 @@ extern _Py_UOpsAbstractFrame *_Py_uop_frame_new(
_Py_UopsSymbol **localsplus_start,
int n_locals_already_filled,
int curr_stackentries);
extern _Py_UOpsAbstractFrame *_Py_uop_prev_frame(_Py_UOpsContext *ctx);
extern int _Py_uop_frame_pop(_Py_UOpsContext *ctx);

PyAPI_FUNC(PyObject *) _Py_uop_symbols_test(PyObject *self, PyObject *ignored);
Expand Down
190 changes: 97 additions & 93 deletions Include/internal/pycore_uop_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading