summaryrefslogtreecommitdiff
path: root/source/slang/ir-link.h
blob: 4fcdb461886ef22464524b09f4366ac63543cf69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// ir-link.h
#pragma once

#include "compiler.h"

namespace Slang
{
    struct LinkedIR
    {
        RefPtr<IRModule>    module;
        IRFunc*             entryPoint;
    };


    // Clone the IR values reachable from the given entry point
    // into the IR module associated with the specialization state.
    // When multiple definitions of a symbol are found, the one
    // that is best specialized for the given `targetReq` will be
    // used.
    //
    LinkedIR linkIR(
        EntryPointRequest*  entryPointRequest,
        ProgramLayout*      programLayout,
        CodeGenTarget       target,
        TargetRequest*      targetReq);
}