diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/LocalCSE.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/passes/LocalCSE.cpp b/src/passes/LocalCSE.cpp index 2b9b26f0e..9e92093e1 100644 --- a/src/passes/LocalCSE.cpp +++ b/src/passes/LocalCSE.cpp @@ -232,6 +232,11 @@ struct Scanner // information, leaving the things we need later. } + // It is ok to look at adjacent blocks together, as if a later part of a block + // is not reached that is fine - changes we make there would not be reached in + // that case. + bool connectAdjacentBlocks = true; + void visitExpression(Expression* curr) { // Compute the hash, using the pre-computed hashes of the children, which // are saved. This allows us to hash everything in linear time. @@ -465,6 +470,9 @@ struct Checker assert(self->activeOriginals.empty()); } + // See the same code above. + bool connectAdjacentBlocks = true; + void visitFunction(Function* curr) { // At the end of the function there can be no active originals. assert(activeOriginals.empty()); @@ -516,6 +524,9 @@ struct Applier // Clear the state between blocks. self->originalLocalMap.clear(); } + + // See the same code above. + bool connectAdjacentBlocks = true; }; } // anonymous namespace |