diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2024-08-27 21:13:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-27 18:13:00 -0700 |
| commit | 6bb32aa976494466bd6303f8ae6e348b297edb44 (patch) | |
| tree | 54765fd5168e1d6590f403c6df04b30404ee6346 /source/slang/slang-emit.cpp | |
| parent | a9882c648c58e6f2821df11c7ee6ac77d9f09473 (diff) | |
Adds a warning for using `[PreferRecompute]` on methods that may contain side effects (#4707)
* Adds a warning for using prefer-recompute on methods that contain side effects
* Rename `SideEffects` -> `SideEffectBehavior`
---------
Co-authored-by: Yong He <yonghe@outlook.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 e91209108..103cd15ab 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -637,6 +637,13 @@ Result linkAndOptimizeIR( default: break; } + + if (requiredLoweringPassSet.autodiff) + { + // Generate warnings for potentially incorrect or badly-performing autodiff patterns. + checkAutodiffPatterns(targetProgram, irModule, sink); + } + // Next, we need to ensure that the code we emit for // the target doesn't contain any operations that would // be illegal on the target platform. For example, |
