[PATCH] D127928: [BOLT][NFCI] Remove redundant code

Maksim Panchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 18:29:54 PDT 2022


maksfb created this revision.
maksfb added reviewers: yota9, Amir, ayermolo, rafauler, zr33, nhuhuan.
Herald added a project: All.
maksfb requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

createBasicBlock() will create a label for addBasicBlock().


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127928

Files:
  bolt/include/bolt/Core/BinaryFunction.h


Index: bolt/include/bolt/Core/BinaryFunction.h
===================================================================
--- bolt/include/bolt/Core/BinaryFunction.h
+++ bolt/include/bolt/Core/BinaryFunction.h
@@ -1569,10 +1569,6 @@
     assert((CurrentState == State::CFG || !getBasicBlockAtOffset(Offset)) &&
            "basic block already exists in pre-CFG state");
 
-    if (!Label) {
-      std::unique_lock<std::shared_timed_mutex> Lock(BC.CtxMutex);
-      Label = BC.Ctx->createNamedTempSymbol("BB");
-    }
     std::unique_ptr<BinaryBasicBlock> BBPtr =
         createBasicBlock(Offset, Label, DeriveAlignment);
     BasicBlocks.emplace_back(BBPtr.release());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127928.437419.patch
Type: text/x-patch
Size: 666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220616/2f2bfd63/attachment.bin>


More information about the llvm-commits mailing list