From 935685f42025a58cb84e34714075f98878496a22 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Mon, 4 May 2020 10:17:24 +0100 Subject: [PATCH] [SCCP] Re-use pushToWorkList in pushToWorkListMsg (NFC). There's no need to duplicate the logic to push to the different work-lists. --- llvm/lib/Transforms/Scalar/SCCP.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index e5fd6167f47e..e6477e3d259b 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -361,9 +361,7 @@ private: // prints a debug message with the updated value. void pushToWorkListMsg(ValueLatticeElement &IV, Value *V) { LLVM_DEBUG(dbgs() << "updated " << IV << ": " << *V << '\n'); - if (IV.isOverdefined()) - return OverdefinedInstWorkList.push_back(V); - InstWorkList.push_back(V); + pushToWorkList(IV, V); } // markConstant - Make a value be marked as "constant". If the value