[llvm] [CodeGen] Add OffloadBlockUniformityAnalysis for offload PGO (PR #178417)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 03:51:56 PDT 2026


================
@@ -0,0 +1,79 @@
+//===- BlockUniformityProfile.h - Block uniformity from PGO -*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Provide per-(Machine)basic-block uniformity information from PGO profiles.
+//
+// The source of truth is IR metadata attached during PGO use:
+//   - Metadata name: "block.uniformity.profile"
+//   - Payload: i1 (true = uniform, false = divergent)
----------------
arsenm wrote:

This shouldn't really need the payload, can go off presence/absence 

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


More information about the llvm-commits mailing list