summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com>2023-08-03 14:03:51 -0400
committerGitHub <noreply@github.com>2023-08-03 11:03:51 -0700
commitaadd816a6f38c52e2577c807c023a3b775a21ba6 (patch)
tree06d00611174128e165eb0b12e6e7b6dfc4a4be87 /source
parent0dcae1c64c821920a22022a5930121b5f84019f3 (diff)
Disable code motion for expensive insts (call & div) (#3042)
* Disable code motion for expensive insts (call & div) The current redundancy removal pass does not consider control-flow within loops and as a result can sometimes move dynamic dispatch code outside their switch blocks, if they are nested in a single-iter-loop. * Update liveness.slang.expected
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ir-redundancy-removal.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/source/slang/slang-ir-redundancy-removal.cpp b/source/slang/slang-ir-redundancy-removal.cpp
index e0bb0b224..5f476188e 100644
--- a/source/slang/slang-ir-redundancy-removal.cpp
+++ b/source/slang/slang-ir-redundancy-removal.cpp
@@ -19,7 +19,6 @@ struct RedundancyRemovalContext
case kIROp_Add:
case kIROp_Sub:
case kIROp_Mul:
- case kIROp_Div:
case kIROp_FRem:
case kIROp_IRem:
case kIROp_Lsh:
@@ -78,8 +77,6 @@ struct RedundancyRemovalContext
case kIROp_ExtractExistentialValue:
case kIROp_ExtractExistentialWitnessTable:
return true;
- case kIROp_Call:
- return isPureFunctionalCall(as<IRCall>(inst));
case kIROp_Load:
// Load is generally not movable, an exception is loading a global constant buffer.
if (auto load = as<IRLoad>(inst))