diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-09-20 20:54:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-20 17:54:10 -0700 |
| commit | 29c318bfe5c66350a67467e3b6ef08120f00fb7e (patch) | |
| tree | 77e57e12a9f2e99797b4612e2ff1f64fb483c9c8 /source/slang/slang-ir-inline.cpp | |
| parent | 5b23870eb0d3c0f1545304f67d15cffc16830107 (diff) | |
Move force inlining step to before `processAutodiffCalls` (and run in loop) (#3217)
* Move auto-diff force inlining step to before `processAutodiffCalls`
* Fix `replaceUsesWith` to handle existing inst defined after current use.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-inline.cpp')
| -rw-r--r-- | source/slang/slang-ir-inline.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-ir-inline.cpp b/source/slang/slang-ir-inline.cpp index 06b63db52..1d308c507 100644 --- a/source/slang/slang-ir-inline.cpp +++ b/source/slang/slang-ir-inline.cpp @@ -872,6 +872,12 @@ bool performPreAutoDiffForceInlining(IRGlobalValueWithCode* func) return pass.considerAllCallSitesRec(func); } +bool performPreAutoDiffForceInlining(IRModule* module) +{ + PreAutoDiffForceInliningPass pass(module); + return pass.considerAllCallSitesRec(module->getModuleInst()); +} + // Defined in slang-ir-specialize-resource.cpp bool isResourceType(IRType* type); bool isIllegalGLSLParameterType(IRType* type); |
