diff options
| author | Yong He <yonghe@outlook.com> | 2022-11-10 14:19:20 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-10 14:19:20 -0800 |
| commit | 0b05fe33c82ee301c134f5b9a87a596aa47121c8 (patch) | |
| tree | 61869daaf5cad2609efcdf239f31c203d64f39b1 /source/slang/slang-ir.cpp | |
| parent | 10834e69b1e483be4116d85b00d4bc0b861da822 (diff) | |
Fix inlining pass. (#2506)
* Fix inlining pass.
* Add more check against corner cases.
* Revise comments.
* Fixes.
* Fix premake script.
* Fixes.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index f9686ac5b..9d538a774 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -159,8 +159,9 @@ namespace Slang v->firstUse = this; } - +#ifdef SLANG_ENABLE_FULL_IR_VALIDATION debugValidate(); +#endif } void IRUse::set(IRInst* uv) @@ -172,13 +173,15 @@ namespace Slang { // This `IRUse` is part of the linked list // of uses for `usedValue`. - +#ifdef SLANG_ENABLE_FULL_IR_VALIDATION debugValidate(); +#endif if (usedValue) { +#ifdef SLANG_ENABLE_FULL_IR_VALIDATION auto uv = usedValue; - +#endif *prevLink = nextUse; if(nextUse) { @@ -190,8 +193,11 @@ namespace Slang nextUse = nullptr; prevLink = nullptr; +#ifdef SLANG_ENABLE_FULL_IR_VALIDATION if(uv->firstUse) uv->firstUse->debugValidate(); +#endif + } } |
