[PATCH] D122098: [BOLT] LongJmp: Check for shouldEmit

Vladislav Khmelevsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 12:34:22 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4c14519ecbba: [BOLT] LongJmp: Check for shouldEmit (authored by yota9).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122098/new/

https://reviews.llvm.org/D122098

Files:
  bolt/lib/Core/BinaryContext.cpp
  bolt/lib/Passes/LongJmp.cpp


Index: bolt/lib/Passes/LongJmp.cpp
===================================================================
--- bolt/lib/Passes/LongJmp.cpp
+++ bolt/lib/Passes/LongJmp.cpp
@@ -345,6 +345,11 @@
   CurrentIndex = 0;
   bool ColdLayoutDone = false;
   for (BinaryFunction *Func : SortedFunctions) {
+    if (!BC.shouldEmit(*Func)) {
+      HotAddresses[Func] = Func->getAddress();
+      continue;
+    }
+
     if (!ColdLayoutDone && CurrentIndex >= LastHotIndex) {
       DotAddress =
           tentativeLayoutRelocColdPart(BC, SortedFunctions, DotAddress);
Index: bolt/lib/Core/BinaryContext.cpp
===================================================================
--- bolt/lib/Core/BinaryContext.cpp
+++ bolt/lib/Core/BinaryContext.cpp
@@ -1534,6 +1534,9 @@
 }
 
 bool BinaryContext::shouldEmit(const BinaryFunction &Function) const {
+  if (Function.isPseudo())
+    return false;
+
   if (opts::processAllFunctions())
     return true;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122098.419540.patch
Type: text/x-patch
Size: 936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220331/b12e6871/attachment.bin>


More information about the llvm-commits mailing list