diff options
author | Alon Zakai <azakai@google.com> | 2019-05-01 14:48:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-01 14:48:41 -0700 |
commit | 2bd3758a22131cfd6925b3fd995657b211095c90 (patch) | |
tree | 2a38a48ab68c00ed1b55e885f86014bbdda92ff2 /src/passes/SpillPointers.cpp | |
parent | 73709b4da08d285c2237c8c23a54ba53274c0c7f (diff) | |
download | binaryen-2bd3758a22131cfd6925b3fd995657b211095c90.tar.gz binaryen-2bd3758a22131cfd6925b3fd995657b211095c90.tar.bz2 binaryen-2bd3758a22131cfd6925b3fd995657b211095c90.zip |
clang-tidy braces changes (#2075)
Applies the changes in #2065, and temprarily disables the hook since it's too slow to run on a change this large. We should re-enable it in a later commit.
Diffstat (limited to 'src/passes/SpillPointers.cpp')
-rw-r--r-- | src/passes/SpillPointers.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/passes/SpillPointers.cpp b/src/passes/SpillPointers.cpp index 75fa72652..6c194eb60 100644 --- a/src/passes/SpillPointers.cpp +++ b/src/passes/SpillPointers.cpp @@ -50,8 +50,9 @@ struct SpillPointers // note calls in basic blocks template<typename T> void visitSpillable(T* curr) { // if in unreachable code, ignore - if (!currBasicBlock) + if (!currBasicBlock) { return; + } auto* pointer = getCurrentPointer(); currBasicBlock->contents.actions.emplace_back(pointer); // starts out as correct, may change later @@ -85,8 +86,9 @@ struct SpillPointers bool spilled = false; Index spillLocal = -1; for (auto& curr : basicBlocks) { - if (liveBlocks.count(curr.get()) == 0) + if (liveBlocks.count(curr.get()) == 0) { continue; // ignore dead blocks + } auto& liveness = curr->contents; auto& actions = liveness.actions; Index lastCall = -1; @@ -96,8 +98,9 @@ struct SpillPointers lastCall = i; } } - if (lastCall == Index(-1)) + if (lastCall == Index(-1)) { continue; // nothing to see here + } // scan through the block, spilling around the calls // TODO: we can filter on pointerMap everywhere LocalSet live = liveness.end; @@ -149,8 +152,9 @@ struct SpillPointers Function* func, Module* module) { auto* call = *origin; - if (call->type == unreachable) + if (call->type == unreachable) { return; // the call is never reached anyhow, ignore + } Builder builder(*module); auto* block = builder.makeBlock(); // move the operands into locals, as we must spill after they are executed |