[llvm] c6426e2 - [SafeStack,NFC] Remove unneded branch

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 14 23:15:13 PDT 2020


Author: Vitaly Buka
Date: 2020-06-14T23:05:43-07:00
New Revision: c6426e2657d77a926f3ed476693505af7b538a72

URL: https://github.com/llvm/llvm-project/commit/c6426e2657d77a926f3ed476693505af7b538a72
DIFF: https://github.com/llvm/llvm-project/commit/c6426e2657d77a926f3ed476693505af7b538a72.diff

LOG: [SafeStack,NFC] Remove unneded branch

Added: 
    

Modified: 
    llvm/lib/CodeGen/SafeStackColoring.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SafeStackColoring.cpp b/llvm/lib/CodeGen/SafeStackColoring.cpp
index 9abfbd075793..7009b7cf68b0 100644
--- a/llvm/lib/CodeGen/SafeStackColoring.cpp
+++ b/llvm/lib/CodeGen/SafeStackColoring.cpp
@@ -116,12 +116,10 @@ void StackColoring::collectMarkers() {
       InstructionNumbering[I] = InstNo++;
 
       if (M.IsStart) {
-        if (BlockInfo.End.test(M.AllocaNo))
-          BlockInfo.End.reset(M.AllocaNo);
+        BlockInfo.End.reset(M.AllocaNo);
         BlockInfo.Begin.set(M.AllocaNo);
       } else {
-        if (BlockInfo.Begin.test(M.AllocaNo))
-          BlockInfo.Begin.reset(M.AllocaNo);
+        BlockInfo.Begin.reset(M.AllocaNo);
         BlockInfo.End.set(M.AllocaNo);
       }
     };


        


More information about the llvm-commits mailing list