/home/travis/build/MoarVM/MoarVM/src/spesh/optimize.h
Line | Count | Source |
1 | | /* Maximum args a call can take for us to consider it for optimization. */ |
2 | 96.6k | #define MAX_ARGS_FOR_OPT 4 |
3 | | |
4 | | /* Information we've gathered about the current call we're optimizing, and the |
5 | | * arguments it will take. */ |
6 | | struct MVMSpeshCallInfo { |
7 | | MVMCallsite *cs; |
8 | | MVMint8 arg_is_const[MAX_ARGS_FOR_OPT]; |
9 | | MVMSpeshFacts *arg_facts[MAX_ARGS_FOR_OPT]; |
10 | | MVMSpeshIns *prepargs_ins; |
11 | | MVMSpeshBB *prepargs_bb; |
12 | | MVMSpeshIns *arg_ins[MAX_ARGS_FOR_OPT]; |
13 | | }; |
14 | | |
15 | | void MVM_spesh_optimize(MVMThreadContext *tc, MVMSpeshGraph *g); |
16 | | MVM_PUBLIC MVMint16 MVM_spesh_add_spesh_slot(MVMThreadContext *tc, MVMSpeshGraph *g, MVMCollectable *c); |
17 | | MVM_PUBLIC MVMSpeshFacts * MVM_spesh_get_and_use_facts(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshOperand o); |
18 | | MVM_PUBLIC MVMSpeshFacts * MVM_spesh_get_facts(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshOperand o); |
19 | | MVM_PUBLIC void MVM_spesh_use_facts(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshFacts *f); |
20 | | MVM_PUBLIC MVMString * MVM_spesh_get_string(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshOperand o); |