From 401a425d205acbc36cd5d4d25a0a3c08b426f0c8 Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Wed, 15 Jun 2022 18:25:58 -0700 Subject: [PATCH] [BOLT][NFCI] Remove redundant code createBasicBlock() will create a label for addBasicBlock(). Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D127928 --- bolt/include/bolt/Core/BinaryFunction.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bolt/include/bolt/Core/BinaryFunction.h b/bolt/include/bolt/Core/BinaryFunction.h index 58df5b9..d735509 100644 --- a/bolt/include/bolt/Core/BinaryFunction.h +++ b/bolt/include/bolt/Core/BinaryFunction.h @@ -1569,10 +1569,6 @@ public: assert((CurrentState == State::CFG || !getBasicBlockAtOffset(Offset)) && "basic block already exists in pre-CFG state"); - if (!Label) { - std::unique_lock Lock(BC.CtxMutex); - Label = BC.Ctx->createNamedTempSymbol("BB"); - } std::unique_ptr BBPtr = createBasicBlock(Offset, Label, DeriveAlignment); BasicBlocks.emplace_back(BBPtr.release()); -- 2.7.4