summaryrefslogtreecommitdiffstats
path: root/source/slang/ir.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-09-11 14:46:20 -0700
committerGitHub <noreply@github.com>2017-09-11 14:46:20 -0700
commite2de1eaec725e979f98ad6f518b93b4d9ce55a36 (patch)
tree29167b8abb5001cd3c2803807ec5c8eb3bc2329f /source/slang/ir.cpp
parent80fb7b05b851e645d821331fdbbcea1add686c9a (diff)
parent2055d540c5dd420448a6924d784d5aed0efcd93d (diff)
Merge pull request #179 from tfoleyNV/ir-lowering-work
Support IR-based codegen for a few more examples.
Diffstat (limited to 'source/slang/ir.cpp')
-rw-r--r--source/slang/ir.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp
index eadcd34d0..9e39579f6 100644
--- a/source/slang/ir.cpp
+++ b/source/slang/ir.cpp
@@ -883,6 +883,22 @@ namespace Slang
return inst;
}
+ IRInst* IRBuilder::emitStore(
+ IRValue* dstPtr,
+ IRValue* srcVal)
+ {
+ auto type = getVoidType();
+ auto inst = createInst<IRStore>(
+ this,
+ kIROp_Store,
+ type,
+ dstPtr,
+ srcVal);
+
+ addInst(inst);
+ return inst;
+ }
+
IRInst* IRBuilder::emitFieldExtract(
IRType* type,
IRValue* base,