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-emit-cpp.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-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 0b01bdf4e..ec797bcf4 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -1089,7 +1089,7 @@ void CPPSourceEmitter::_emitType(IRType* type, DeclaratorInfo* declarator) void CPPSourceEmitter::emitIntrinsicCallExprImpl( IRCall* inst, - IRTargetIntrinsicDecoration* targetIntrinsic, + UnownedStringSlice intrinsicDefinition, EmitOpInfo const& inOuterPrec) { // TODO: Much of this logic duplicates code that is already @@ -1104,7 +1104,7 @@ void CPPSourceEmitter::emitIntrinsicCallExprImpl( Index argCount = Index(inst->getArgCount()); auto args = inst->getArgs(); - auto name = targetIntrinsic->getDefinition(); + auto name = intrinsicDefinition; // We will special-case some names here, that // represent callable declarations that aren't @@ -1154,7 +1154,7 @@ void CPPSourceEmitter::emitIntrinsicCallExprImpl( } // Use default impl (which will do intrinsic special macro expansion as necessary) - return Super::emitIntrinsicCallExprImpl(inst, targetIntrinsic, inOuterPrec); + return Super::emitIntrinsicCallExprImpl(inst, intrinsicDefinition, inOuterPrec); } void CPPSourceEmitter::emitLoopControlDecorationImpl(IRLoopControlDecoration* decl) |
