summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit.cpp')
-rw-r--r--source/slang/slang-emit.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp
index 88b616996..8a04e5cc8 100644
--- a/source/slang/slang-emit.cpp
+++ b/source/slang/slang-emit.cpp
@@ -12,6 +12,7 @@
#include "slang-ir-dce.h"
#include "slang-ir-diff-call.h"
#include "slang-ir-autodiff.h"
+#include "slang-ir-defunctionalization.h"
#include "slang-ir-dll-export.h"
#include "slang-ir-dll-import.h"
#include "slang-ir-eliminate-phis.h"
@@ -616,6 +617,13 @@ Result linkAndOptimizeIR(
break;
}
+ // Few of our targets support higher order functions, and
+ // we don't have the backend code to emit higher order functions for those
+ // which do.
+ // Specialize away these parameters
+ // TODO: We should implement a proper defunctionalization pass
+ specializeHigherOrderParameters(codeGenContext, irModule);
+
// For all targets, we translate load/store operations
// of aggregate types from/to byte-address buffers into
// stores of individual scalar or vector values.