diff options
Diffstat (limited to 'source/slang/ir-link.h')
| -rw-r--r-- | source/slang/ir-link.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/source/slang/ir-link.h b/source/slang/ir-link.h index 18940f825..4fcdb4618 100644 --- a/source/slang/ir-link.h +++ b/source/slang/ir-link.h @@ -5,29 +5,22 @@ namespace Slang { - // Interface to IR specialization for use when cloning target-specific - // IR as part of compiling an entry point. + struct LinkedIR + { + RefPtr<IRModule> module; + IRFunc* entryPoint; + }; - // `IRSpecializationState` is used as an opaque type to wrap up all - // the data needed to perform IR specialization, without exposing - // implementation details. - struct IRSpecializationState; - IRSpecializationState* createIRSpecializationState( - EntryPointRequest* entryPointRequest, - ProgramLayout* programLayout, - CodeGenTarget target, - TargetRequest* targetReq); - void destroyIRSpecializationState(IRSpecializationState* state); - IRModule* getIRModule(IRSpecializationState* state); - - struct ExtensionUsageTracker; // 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. - IRFunc* specializeIRForEntryPoint( - IRSpecializationState* state, - EntryPointRequest* entryPointRequest); + // + LinkedIR linkIR( + EntryPointRequest* entryPointRequest, + ProgramLayout* programLayout, + CodeGenTarget target, + TargetRequest* targetReq); } |
