summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-lower-generics.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-10-29 10:21:07 -0700
committerGitHub <noreply@github.com>2020-10-29 10:21:07 -0700
commit060071604bc715951ddf940a51ced1da48b3dd10 (patch)
tree19daa4c23bdc5098e8bf5c1e28d5dbe1a389eca3 /source/slang/slang-ir-lower-generics.cpp
parent494e09af2cebafa34db49dc1f60afd43aebed619 (diff)
Generate `switch` based dynamic dispatch logic. (#1591)
Co-authored-by: Tim Foley <tim.foley.is@gmail.com>
Diffstat (limited to 'source/slang/slang-ir-lower-generics.cpp')
-rw-r--r--source/slang/slang-ir-lower-generics.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/slang/slang-ir-lower-generics.cpp b/source/slang/slang-ir-lower-generics.cpp
index 4b86cff51..11bb400b0 100644
--- a/source/slang/slang-ir-lower-generics.cpp
+++ b/source/slang/slang-ir-lower-generics.cpp
@@ -59,13 +59,9 @@ namespace Slang
if (sink->getErrorCount() != 0)
return;
- // On non-CPU targets, generate `if` based dispatch functions.
- if (sharedContext.targetReq->getTarget() != CodeGenTarget::CPPSource)
- {
- specializeDispatchFunctions(&sharedContext);
- if (sink->getErrorCount() != 0)
- return;
- }
+ specializeDispatchFunctions(&sharedContext);
+ if (sink->getErrorCount() != 0)
+ return;
// We might have generated new temporary variables during lowering.
// An SSA pass can clean up unnecessary load/stores.