[llvm] [AArch64][BOLT] Ensure tentative code layout for cold BBs runs. (PR #96609)

Rafael Auler via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 17:50:45 PDT 2024


================
@@ -382,6 +385,11 @@ uint64_t LongJmpPass::tentativeLayoutRelocMode(
     DotAddress += Func->estimateConstantIslandSize();
     ++CurrentIndex;
   }
+  if (!ColdLayoutDone) {
----------------
rafaelauler wrote:

Instead of the if() on line 360 gating whether to skip the non-emitted function, if the goal is really to ensure that the layout for the cold part of split functions is done, why not complete the cold layout here on line 388:

```
  if (!ColdLayoutDone) {
    DotAddress =
          tentativeLayoutRelocColdPart(BC, SortedFunctions, DotAddress);
    if (opts::HotFunctionsAtEnd)
        DotAddress = alignTo(DotAddress, opts::AlignText);
  }
```

https://github.com/llvm/llvm-project/pull/96609


More information about the llvm-commits mailing list