From 216dfba0af66210a46ef0df18beb73d975fdf727 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 19 Dec 2022 11:47:19 -0800 Subject: Separate primal computations from unzipped function into an explicit function. (#2569) Co-authored-by: Yong He --- source/slang/slang-ir.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index b4528a452..33130cfb3 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -3301,6 +3301,11 @@ namespace Slang return inst; } + IRInst* IRBuilder::emitDefaultConstructRaw(IRType* type) + { + return emitIntrinsicInst(type, kIROp_DefaultConstruct, 0, nullptr); + } + IRInst* IRBuilder::emitDefaultConstruct(IRType* type, bool fallback) { IRType* actualType = type; @@ -3809,6 +3814,11 @@ namespace Slang return inst; } + IRInst* IRBuilder::addPrimalValueStructKeyDecoration(IRInst* target, IRStructKey* key) + { + return addDecoration(target, kIROp_PrimalValueStructKeyDecoration, key); + } + RefPtr IRModule::create(Session* session) { RefPtr module = new IRModule(session); -- cgit v1.2.3