summaryrefslogtreecommitdiff
path: root/source/slang/ir-link.h
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2019-02-05 16:47:37 -0800
committerGitHub <noreply@github.com>2019-02-05 16:47:37 -0800
commit13d7e34d8be4316c59bd3d00a1e5526215db6fa4 (patch)
tree1a774f323300e72ca2ae66db2d883491f0790d39 /source/slang/ir-link.h
parent43950e2b2f2b1109fe25e67fc678272af6dfb7ef (diff)
parent60cc9f24c4bec54561bea873ee943aa3d0973dc2 (diff)
Merge branch 'master' into fix-nested-type-conformances
Diffstat (limited to 'source/slang/ir-link.h')
-rw-r--r--source/slang/ir-link.h29
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);
}