Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
typo
  • Loading branch information
kripken committed May 13, 2024
commit 3eea78d44d6024313afd592b8059a040f52df505
10 changes: 5 additions & 5 deletions src/passes/LocalCSE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ struct Scanner
// checking effects here we could perhaps add backtracking, but that sounds
// more complex.)
//
// We can ignore traps here because if a trap occurs the optimization
// We use |hasNonTrapSideEffects| because if a trap occurs the optimization
// remains valid: both this and the copy of it would trap, which means the
// first traps and the second isn't reached anyhow.
//
Expand Down Expand Up @@ -447,10 +447,6 @@ struct Checker
requestInfos.erase(original);
}

// Note that we've already checked above that this has no side effects
// or generativity: if we got here, then it is good to go from the
// perspective of this expression itself (but may be invalidated by
// other code in between, see above).
activeOriginals.erase(original);
}
}
Expand All @@ -476,6 +472,10 @@ struct Checker
// none of them.)
effects.trap = false;

// Note that we've already checked above that this has no side effects or
// generativity: if we got here, then it is good to go from the
// perspective of this expression itself (but may be invalidated by other
// code in between, see above).
activeOriginals.emplace(
curr, ActiveOriginalInfo{info.requests, std::move(effects)});
} else if (info.original) {
Expand Down