From: Maksim Panchenko Date: Thu, 16 Jun 2022 01:25:58 +0000 (-0700) Subject: [BOLT][NFCI] Remove redundant code X-Git-Tag: upstream/15.0.7~4554 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=401a425d205acbc36cd5d4d25a0a3c08b426f0c8;p=platform%2Fupstream%2Fllvm.git [BOLT][NFCI] Remove redundant code createBasicBlock() will create a label for addBasicBlock(). Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D127928 --- 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());