diff options
| author | Yong He <yonghe@outlook.com> | 2021-02-12 12:20:17 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-12 12:20:17 -0800 |
| commit | a2401a6ae6c50aeb6ffc196144569bb5253cdf95 (patch) | |
| tree | b69f68b0d5f81ab2d782bfa3ad125637c8f39d96 /source/slang/slang-emit.cpp | |
| parent | 369279e91dde1b056d8d0e3bb83e7ba3f96321af (diff) | |
Support `bit_cast` between complex types. (#1702)
* Support `bit_cast` between complex types.
* Fix vs project file
* Fix clang build error
* fix
* fix
* Fix
* FIx
* Fix
* Fix
* Fix
* Fix
* Fix linux compile error
Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-emit.cpp')
| -rw-r--r-- | source/slang/slang-emit.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 20e8c0beb..c9de26217 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -18,6 +18,7 @@ #include "slang-ir-link.h" #include "slang-ir-lower-generics.h" #include "slang-ir-lower-tuple-types.h" +#include "slang-ir-lower-bit-cast.h" #include "slang-ir-restructure.h" #include "slang-ir-restructure-scoping.h" #include "slang-ir-specialize.h" @@ -682,6 +683,12 @@ Result linkAndOptimizeIR( #endif validateIRModuleIfEnabled(compileRequest, irModule); + // Lower all bit_cast operations on complex types into leaf-level + // bit_cast on basic types. + lowerBitCast(targetRequest, irModule); + eliminateDeadCode(irModule); + validateIRModuleIfEnabled(compileRequest, irModule); + return SLANG_OK; } |
