diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-28 21:24:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-28 21:24:49 -0700 |
| commit | c787c4b82ba76f87069911f203eb192060b5264f (patch) | |
| tree | 2aa98326ce8d4c9f2011d79ee9f6d34db14716e7 /source/slang/slang-ir-link.cpp | |
| parent | af363c02bf0fa2502c14f454965adff87170ff15 (diff) | |
Add `target_switch` and `intrinsic_asm` statement. (#3154)
* Add `target_switch` and `__intrinsic_asm` statement.
* Cleanup.
* WaveGetActiveMask, WaveGetActiveMask, WaveCountBits.
* WaveIsFirstLane.
* More wave intrinsics.
* wave intrinsics.
* merge fix.
* Fix.
* Fix.
* Update test.
* update test.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-link.cpp')
| -rw-r--r-- | source/slang/slang-ir-link.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-ir-link.cpp b/source/slang/slang-ir-link.cpp index 66fda8a86..e37aa322e 100644 --- a/source/slang/slang-ir-link.cpp +++ b/source/slang/slang-ir-link.cpp @@ -7,6 +7,7 @@ #include "slang-mangle.h" #include "slang-ir-string-hash.h" #include "slang-ir-autodiff.h" +#include "slang-ir-specialize-target-switch.h" #include "slang-module-library.h" #include "../core/slang-performance-profiler.h" @@ -1629,6 +1630,8 @@ LinkedIR linkIR( } } + // Specialize target_switch branches to use the best branch for the target. + specializeTargetSwitch(targetReq, state->irModule); // TODO: *technically* we should consider the case where // we have global variables with initializers, since |
