[all-commits] [llvm/llvm-project] 740ee0: PPCBranchCoalescing: Fix invalid branch weights (#...

Matthias Braun via All-commits all-commits at lists.llvm.org
Mon Sep 25 10:41:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 740ee00a4c1d841204f57c88c04fa62e38bd1322
      https://github.com/llvm/llvm-project/commit/740ee00a4c1d841204f57c88c04fa62e38bd1322
  Author: Matthias Braun <matze at braunis.de>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCBranchCoalescing.cpp
    A llvm/test/CodeGen/PowerPC/branch_coalescing.mir

  Log Message:
  -----------
  PPCBranchCoalescing: Fix invalid branch weights (#67211)

Re-normalize branch-weights after removing a block successor to avoid
branch-weights not adding up to 100%. This changes MIR for the
`test/CodeGen/PowerPC/branch_coalesce.ll` test like this:

```diff
-  successors: %bb.6(0x40000000); %bb.6(50.00%)
+  successors: %bb.6(0x80000000); %bb.6(100.00%)
```

This doesn't affect codegen on its own but fixing this helps with
fluctuations I have with some of my upcoming changes.




More information about the All-commits mailing list