diff options
| author | Yong He <yonghe@outlook.com> | 2024-05-29 11:14:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-29 11:14:22 -0700 |
| commit | 83f176ba8a3bae5533470aed6a90663653f894b8 (patch) | |
| tree | 3e39a674cb4662c946598526f633302f139e14ab /source/slang/slang-ir-dce.cpp | |
| parent | c1e34c5a29d99d8a70b4e78313bfd3d539d9206e (diff) | |
Add options to speedup compilation. (#4240)
* Add options to speedup compilation.
* Fix.
* Plumb options to DCE pass.
* Revert debug change.
* Fix regressions.
* More optimizations.
* more cleanup and fixes.
* remove comment.
* Fixes.
* Another fix.
* Fix errors.
* Fix errors.
* Add comments.
Diffstat (limited to 'source/slang/slang-ir-dce.cpp')
| -rw-r--r-- | source/slang/slang-ir-dce.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/slang-ir-dce.cpp b/source/slang/slang-ir-dce.cpp index ec4c749fa..4eefeabd5 100644 --- a/source/slang/slang-ir-dce.cpp +++ b/source/slang/slang-ir-dce.cpp @@ -307,7 +307,11 @@ bool shouldInstBeLiveIfParentIsLive(IRInst* inst, IRDeadCodeEliminationOptions o // First, if `inst` is an instruction that might have some effects // when it is executed, then we should keep it around. // - if (inst->mightHaveSideEffects(SideEffectAnalysisOptions::UseDominanceTree)) + SideEffectAnalysisOptions sideEffectOptions = options.useFastAnalysis + ? SideEffectAnalysisOptions::None + : SideEffectAnalysisOptions::UseDominanceTree; + + if (inst->mightHaveSideEffects(sideEffectOptions)) { return true; } |
