Coverage Report

Created: 2018-06-05 05:44

/home/travis/build/MoarVM/MoarVM/src/jit/compile.h
Line
Count
Source
1
2
struct MVMJitCode {
3
    void     (*func_ptr)(MVMThreadContext *tc, MVMCompUnit *cu, void * label);
4
    size_t     size;
5
    MVMuint8  *bytecode;
6
7
    MVMStaticFrame *sf;
8
9
    MVMuint16 *local_types;
10
    MVMint32   num_locals;
11
12
    /* The basic idea here is that /all/ label names are indexes into the single
13
     * labels array. This isn't particularly efficient at runtime (because we
14
     * need a second dereference to figure the labels out), but very simple for
15
     * me now, and super-easy to optimise at a later date */
16
    MVMint32   num_labels;
17
    void     **labels;
18
19
    MVMint32       num_deopts;
20
    MVMint32       num_inlines;
21
    MVMint32       num_handlers;
22
    MVMJitDeopt    *deopts;
23
    MVMJitInline  *inlines;
24
    MVMJitHandler *handlers;
25
26
    MVMint32       spill_size;
27
    MVMint32       seq_nr;
28
};
29
30
MVMJitCode* MVM_jit_compile_graph(MVMThreadContext *tc, MVMJitGraph *graph);
31
32
void MVM_jit_destroy_code(MVMThreadContext *tc, MVMJitCode *code);
33
void MVM_jit_enter_code(MVMThreadContext *tc, MVMCompUnit *cu,
34
                        MVMJitCode * code);
35
36
/* Peseudotile compile functions */
37
void MVM_jit_compile_label(MVMThreadContext *tc, MVMJitCompiler *compiler,
38
                           MVMJitTile *tile, MVMJitExprTree *tree);
39
void MVM_jit_compile_branch(MVMThreadContext *tc, MVMJitCompiler *compiler,
40
                            MVMJitTile *tile, MVMJitExprTree *tree);
41
void MVM_jit_compile_conditional_branch(MVMThreadContext *tc, MVMJitCompiler *compiler,
42
                                        MVMJitTile *tile, MVMJitExprTree *tree);
43
void MVM_jit_compile_store(MVMThreadContext *tc, MVMJitCompiler *compiler,
44
                           MVMJitTile *tile, MVMJitExprTree *tree);
45
void MVM_jit_compile_load(MVMThreadContext *tc, MVMJitCompiler *compiler,
46
                          MVMJitTile *tile, MVMJitExprTree *tree);
47
void MVM_jit_compile_move(MVMThreadContext *tc, MVMJitCompiler *compiler,
48
                          MVMJitTile *tile, MVMJitExprTree *tree);
49
void MVM_jit_compile_memory_copy(MVMThreadContext *tc, MVMJitCompiler *compiler,
50
                                 MVMJitTile *tile, MVMJitExprTree *tree);
51
void MVM_jit_compile_guard(MVMThreadContext *tc, MVMJitCompiler *compiler,
52
                           MVMJitTile *tile, MVMJitExprTree *tree);
53
54
/* Function for getting effective (JIT/specialized/original) bytecode. */
55
13.2M
MVM_STATIC_INLINE MVMuint8 * MVM_frame_effective_bytecode(MVMFrame *f) {
56
13.2M
    MVMSpeshCandidate *spesh_cand = f->spesh_cand;
57
13.2M
    if (spesh_cand)
58
4.89M
        return spesh_cand->jitcode ? spesh_cand->jitcode->bytecode : spesh_cand->bytecode;
59
8.35M
    return f->static_info->body.bytecode;
60
13.2M
}
Unexecuted instantiation: candidate.c:MVM_frame_effective_bytecode
Unexecuted instantiation: 6model.c:MVM_frame_effective_bytecode
Unexecuted instantiation: bootstrap.c:MVM_frame_effective_bytecode
Unexecuted instantiation: sc.c:MVM_frame_effective_bytecode
Unexecuted instantiation: serialization.c:MVM_frame_effective_bytecode
Unexecuted instantiation: compiler.c:MVM_frame_effective_bytecode
Unexecuted instantiation: driver.c:MVM_frame_effective_bytecode
Unexecuted instantiation: dump.c:MVM_frame_effective_bytecode
Unexecuted instantiation: graph.c:MVM_frame_effective_bytecode
Unexecuted instantiation: codegen.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMStaticFrameSpesh.c:MVM_frame_effective_bytecode
Unexecuted instantiation: manipulate.c:MVM_frame_effective_bytecode
Unexecuted instantiation: facts.c:MVM_frame_effective_bytecode
Unexecuted instantiation: optimize.c:MVM_frame_effective_bytecode
Unexecuted instantiation: dead_bb_elimination.c:MVM_frame_effective_bytecode
Unexecuted instantiation: deopt.c:MVM_frame_effective_bytecode
Unexecuted instantiation: log.c:MVM_frame_effective_bytecode
Unexecuted instantiation: threshold.c:MVM_frame_effective_bytecode
Unexecuted instantiation: inline.c:MVM_frame_effective_bytecode
Unexecuted instantiation: osr.c:MVM_frame_effective_bytecode
Unexecuted instantiation: Semaphore.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMContinuation.c:MVM_frame_effective_bytecode
Unexecuted instantiation: NativeCall.c:MVM_frame_effective_bytecode
Unexecuted instantiation: CPointer.c:MVM_frame_effective_bytecode
Unexecuted instantiation: CStr.c:MVM_frame_effective_bytecode
Unexecuted instantiation: CArray.c:MVM_frame_effective_bytecode
Unexecuted instantiation: CStruct.c:MVM_frame_effective_bytecode
Unexecuted instantiation: CUnion.c:MVM_frame_effective_bytecode
Unexecuted instantiation: ReentrantMutex.c:MVM_frame_effective_bytecode
Unexecuted instantiation: ConditionVariable.c:MVM_frame_effective_bytecode
Unexecuted instantiation: lookup.c:MVM_frame_effective_bytecode
Unexecuted instantiation: ConcBlockingQueue.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMAsyncTask.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMNull.c:MVM_frame_effective_bytecode
Unexecuted instantiation: CPPStruct.c:MVM_frame_effective_bytecode
Unexecuted instantiation: NativeRef.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MultiDimArray.c:MVM_frame_effective_bytecode
Unexecuted instantiation: Decoder.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMSpeshLog.c:MVM_frame_effective_bytecode
Unexecuted instantiation: moar.c:MVM_frame_effective_bytecode
Unexecuted instantiation: instrument.c:MVM_frame_effective_bytecode
Unexecuted instantiation: profile.c:MVM_frame_effective_bytecode
Unexecuted instantiation: heapsnapshot.c:MVM_frame_effective_bytecode
Unexecuted instantiation: telemeh.c:MVM_frame_effective_bytecode
Unexecuted instantiation: crossthreadwrite.c:MVM_frame_effective_bytecode
Unexecuted instantiation: line_coverage.c:MVM_frame_effective_bytecode
Unexecuted instantiation: sys.c:MVM_frame_effective_bytecode
Unexecuted instantiation: random.c:MVM_frame_effective_bytecode
Unexecuted instantiation: memmem32.c:MVM_frame_effective_bytecode
Unexecuted instantiation: bigintops.c:MVM_frame_effective_bytecode
Unexecuted instantiation: mmap.c:MVM_frame_effective_bytecode
Unexecuted instantiation: time.c:MVM_frame_effective_bytecode
Unexecuted instantiation: label.c:MVM_frame_effective_bytecode
Unexecuted instantiation: compile.c:MVM_frame_effective_bytecode
Unexecuted instantiation: expr.c:MVM_frame_effective_bytecode
Unexecuted instantiation: tile.c:MVM_frame_effective_bytecode
Unexecuted instantiation: linear_scan.c:MVM_frame_effective_bytecode
Unexecuted instantiation: emit.c:MVM_frame_effective_bytecode
Unexecuted instantiation: arch.c:MVM_frame_effective_bytecode
Unexecuted instantiation: utf8_c8.c:MVM_frame_effective_bytecode
Unexecuted instantiation: iterator.c:MVM_frame_effective_bytecode
Unexecuted instantiation: worker.c:MVM_frame_effective_bytecode
Unexecuted instantiation: stats.c:MVM_frame_effective_bytecode
Unexecuted instantiation: plan.c:MVM_frame_effective_bytecode
Unexecuted instantiation: arg_guard.c:MVM_frame_effective_bytecode
Unexecuted instantiation: decode_stream.c:MVM_frame_effective_bytecode
Unexecuted instantiation: ascii.c:MVM_frame_effective_bytecode
Unexecuted instantiation: parse_num.c:MVM_frame_effective_bytecode
Unexecuted instantiation: utf8.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMMultiCache.c:MVM_frame_effective_bytecode
Unexecuted instantiation: nfg.c:MVM_frame_effective_bytecode
Unexecuted instantiation: unicode.c:MVM_frame_effective_bytecode
Unexecuted instantiation: normalize.c:MVM_frame_effective_bytecode
Unexecuted instantiation: latin1.c:MVM_frame_effective_bytecode
Unexecuted instantiation: utf16.c:MVM_frame_effective_bytecode
Unexecuted instantiation: windows1252.c:MVM_frame_effective_bytecode
Unexecuted instantiation: shiftjis.c:MVM_frame_effective_bytecode
Unexecuted instantiation: shiftjis_codeindex.c:MVM_frame_effective_bytecode
Unexecuted instantiation: worklist.c:MVM_frame_effective_bytecode
Unexecuted instantiation: nativecall_dyncall.c:MVM_frame_effective_bytecode
continuation.c:MVM_frame_effective_bytecode
Line
Count
Source
55
41
MVM_STATIC_INLINE MVMuint8 * MVM_frame_effective_bytecode(MVMFrame *f) {
56
41
    MVMSpeshCandidate *spesh_cand = f->spesh_cand;
57
41
    if (spesh_cand)
58
0
        return spesh_cand->jitcode ? spesh_cand->jitcode->bytecode : spesh_cand->bytecode;
59
41
    return f->static_info->body.bytecode;
60
41
}
Unexecuted instantiation: intcache.c:MVM_frame_effective_bytecode
Unexecuted instantiation: fixedsizealloc.c:MVM_frame_effective_bytecode
Unexecuted instantiation: regionalloc.c:MVM_frame_effective_bytecode
Unexecuted instantiation: debugserver.c:MVM_frame_effective_bytecode
Unexecuted instantiation: config.c:MVM_frame_effective_bytecode
Unexecuted instantiation: orchestrate.c:MVM_frame_effective_bytecode
Unexecuted instantiation: allocation.c:MVM_frame_effective_bytecode
Unexecuted instantiation: nativecall.c:MVM_frame_effective_bytecode
Unexecuted instantiation: roots.c:MVM_frame_effective_bytecode
Unexecuted instantiation: collect.c:MVM_frame_effective_bytecode
Unexecuted instantiation: gen2.c:MVM_frame_effective_bytecode
Unexecuted instantiation: wb.c:MVM_frame_effective_bytecode
Unexecuted instantiation: objectid.c:MVM_frame_effective_bytecode
Unexecuted instantiation: finalize.c:MVM_frame_effective_bytecode
Unexecuted instantiation: debug.c:MVM_frame_effective_bytecode
Unexecuted instantiation: io.c:MVM_frame_effective_bytecode
Unexecuted instantiation: eventloop.c:MVM_frame_effective_bytecode
Unexecuted instantiation: bytecodedump.c:MVM_frame_effective_bytecode
Unexecuted instantiation: args.c:MVM_frame_effective_bytecode
exceptions.c:MVM_frame_effective_bytecode
Line
Count
Source
55
3.25k
MVM_STATIC_INLINE MVMuint8 * MVM_frame_effective_bytecode(MVMFrame *f) {
56
3.25k
    MVMSpeshCandidate *spesh_cand = f->spesh_cand;
57
3.25k
    if (spesh_cand)
58
1.26k
        return spesh_cand->jitcode ? spesh_cand->jitcode->bytecode : spesh_cand->bytecode;
59
1.99k
    return f->static_info->body.bytecode;
60
3.25k
}
Unexecuted instantiation: interp.c:MVM_frame_effective_bytecode
Unexecuted instantiation: threadcontext.c:MVM_frame_effective_bytecode
Unexecuted instantiation: compunit.c:MVM_frame_effective_bytecode
Unexecuted instantiation: bytecode.c:MVM_frame_effective_bytecode
frame.c:MVM_frame_effective_bytecode
Line
Count
Source
55
13.2M
MVM_STATIC_INLINE MVMuint8 * MVM_frame_effective_bytecode(MVMFrame *f) {
56
13.2M
    MVMSpeshCandidate *spesh_cand = f->spesh_cand;
57
13.2M
    if (spesh_cand)
58
4.89M
        return spesh_cand->jitcode ? spesh_cand->jitcode->bytecode : spesh_cand->bytecode;
59
8.35M
    return f->static_info->body.bytecode;
60
13.2M
}
Unexecuted instantiation: callstack.c:MVM_frame_effective_bytecode
Unexecuted instantiation: validation.c:MVM_frame_effective_bytecode
Unexecuted instantiation: syncfile.c:MVM_frame_effective_bytecode
Unexecuted instantiation: threads.c:MVM_frame_effective_bytecode
Unexecuted instantiation: ops.c:MVM_frame_effective_bytecode
Unexecuted instantiation: hll.c:MVM_frame_effective_bytecode
Unexecuted instantiation: loadbytecode.c:MVM_frame_effective_bytecode
Unexecuted instantiation: num.c:MVM_frame_effective_bytecode
Unexecuted instantiation: coerce.c:MVM_frame_effective_bytecode
Unexecuted instantiation: dll.c:MVM_frame_effective_bytecode
Unexecuted instantiation: ext.c:MVM_frame_effective_bytecode
Unexecuted instantiation: HashAttrStore.c:MVM_frame_effective_bytecode
Unexecuted instantiation: P6str.c:MVM_frame_effective_bytecode
Unexecuted instantiation: P6opaque.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMCode.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMOSHandle.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMCompUnit.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMStaticFrame.c:MVM_frame_effective_bytecode
Unexecuted instantiation: P6int.c:MVM_frame_effective_bytecode
Unexecuted instantiation: P6num.c:MVM_frame_effective_bytecode
Unexecuted instantiation: Uninstantiable.c:MVM_frame_effective_bytecode
Unexecuted instantiation: KnowHOWAttributeREPR.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMThread.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMIter.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMContext.c:MVM_frame_effective_bytecode
Unexecuted instantiation: SCRef.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMCallCapture.c:MVM_frame_effective_bytecode
Unexecuted instantiation: P6bigint.c:MVM_frame_effective_bytecode
Unexecuted instantiation: NFA.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMException.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMDLLSym.c:MVM_frame_effective_bytecode
Unexecuted instantiation: reprs.c:MVM_frame_effective_bytecode
Unexecuted instantiation: syncsocket.c:MVM_frame_effective_bytecode
Unexecuted instantiation: fileops.c:MVM_frame_effective_bytecode
Unexecuted instantiation: dirops.c:MVM_frame_effective_bytecode
Unexecuted instantiation: procops.c:MVM_frame_effective_bytecode
Unexecuted instantiation: timers.c:MVM_frame_effective_bytecode
Unexecuted instantiation: filewatchers.c:MVM_frame_effective_bytecode
Unexecuted instantiation: signals.c:MVM_frame_effective_bytecode
Unexecuted instantiation: asyncsocket.c:MVM_frame_effective_bytecode
Unexecuted instantiation: asyncsocketudp.c:MVM_frame_effective_bytecode
Unexecuted instantiation: callsite.c:MVM_frame_effective_bytecode
Unexecuted instantiation: reprconv.c:MVM_frame_effective_bytecode
Unexecuted instantiation: containers.c:MVM_frame_effective_bytecode
Unexecuted instantiation: parametric.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMString.c:MVM_frame_effective_bytecode
Unexecuted instantiation: VMArray.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMHash.c:MVM_frame_effective_bytecode
Unexecuted instantiation: MVMCFunction.c:MVM_frame_effective_bytecode
Unexecuted instantiation: KnowHOWREPR.c:MVM_frame_effective_bytecode
61