From 2bd3758a22131cfd6925b3fd995657b211095c90 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 1 May 2019 14:48:41 -0700 Subject: 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. --- src/passes/CodePushing.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/passes/CodePushing.cpp') diff --git a/src/passes/CodePushing.cpp b/src/passes/CodePushing.cpp index 342cb5182..88e363541 100644 --- a/src/passes/CodePushing.cpp +++ b/src/passes/CodePushing.cpp @@ -50,8 +50,9 @@ struct LocalAnalyzer : public PostWalker { std::fill(sfa.begin() + func->getNumParams(), sfa.end(), true); walk(func->body); for (Index i = 0; i < num; i++) { - if (numSets[i] == 0) + if (numSets[i] == 0) { sfa[i] = false; + } } } @@ -117,8 +118,9 @@ public: private: SetLocal* isPushable(Expression* curr) { auto* set = curr->dynCast(); - if (!set) + if (!set) { return nullptr; + } auto index = set->index; // to be pushable, this must be SFA and the right # of gets, // but also have no side effects, as it may not execute if pushed. @@ -137,8 +139,9 @@ private: if (auto* drop = curr->dynCast()) { curr = drop->value; } - if (curr->is()) + if (curr->is()) { return true; + } if (auto* br = curr->dynCast()) { return !!br->condition; } @@ -249,8 +252,9 @@ struct CodePushing : public WalkerPass> { // Pushing code only makes sense if we are size 3 or above: we need // one element to push, an element to push it past, and an element to use // what we pushed. - if (curr->list.size() < 3) + if (curr->list.size() < 3) { return; + } // At this point in the postorder traversal we have gone through all our // children. Therefore any variable whose gets seen so far is equal to the // total gets must have no further users after this block. And therefore -- cgit v1.2.3