[all-commits] [llvm/llvm-project] f061b1: Statically analyze likely and unlikely blocks base...

AdityaK via All-commits all-commits at lists.llvm.org
Tue Sep 12 11:29:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f061b131757bf710e21683f122a46c6cb83198c1
      https://github.com/llvm/llvm-project/commit/f061b131757bf710e21683f122a46c6cb83198c1
  Author: AdityaK <1894981+hiraditya at users.noreply.github.com>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/HotColdSplitting.h
    M llvm/lib/Transforms/IPO/HotColdSplitting.cpp
    A llvm/test/Transforms/HotColdSplit/split-static-profile.ll

  Log Message:
  -----------
  Statically analyze likely and unlikely blocks based on metadata

The builtin_expect(), and C++20's likely, unlikely attributes assign branch_weights to annotated branches.

This patch adds the the ability to query branch !prof metadata and improve static analysis based on that.

Fixes: https://github.com/llvm/llvm-project/issues/64998

Reviewers: tejohnson, efriedma

Differential Revision: https://reviews.llvm.org/D159336




More information about the All-commits mailing list