summaryrefslogtreecommitdiff
path: root/src/passes/LoopInvariantCodeMotion.cpp
diff options
context:
space:
mode:
authorjuj <jujjyl@gmail.com>2022-04-05 23:01:03 +0300
committerGitHub <noreply@github.com>2022-04-05 13:01:03 -0700
commitcbc7e0455dcef0a7df6e4ab345626b8e69534f7f (patch)
tree99bccfd29c3e8cf1d31d56b1934b566f92b54f74 /src/passes/LoopInvariantCodeMotion.cpp
parent291698fe1b5512d72186dfc2400bca85dcb507b1 (diff)
downloadbinaryen-cbc7e0455dcef0a7df6e4ab345626b8e69534f7f.tar.gz
binaryen-cbc7e0455dcef0a7df6e4ab345626b8e69534f7f.tar.bz2
binaryen-cbc7e0455dcef0a7df6e4ab345626b8e69534f7f.zip
Avoid a code pattern of vec.resize() followed by std::fill() as suboptimal. Instead do a clear()+resize() (#4580)
Diffstat (limited to 'src/passes/LoopInvariantCodeMotion.cpp')
-rw-r--r--src/passes/LoopInvariantCodeMotion.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/passes/LoopInvariantCodeMotion.cpp b/src/passes/LoopInvariantCodeMotion.cpp
index 7fbd3ef55..c70c8e5fe 100644
--- a/src/passes/LoopInvariantCodeMotion.cpp
+++ b/src/passes/LoopInvariantCodeMotion.cpp
@@ -75,7 +75,6 @@ struct LoopInvariantCodeMotion
// FIXME: also the loop tail issue from above.
auto numLocals = getFunction()->getNumLocals();
std::vector<Index> numSetsForIndex(numLocals);
- std::fill(numSetsForIndex.begin(), numSetsForIndex.end(), 0);
LoopSets loopSets;
{
FindAll<LocalSet> finder(loop);