[clang] [compiler-rt] [llvm] [PGO][AMDGPU] Add offload profiling with uniformity-aware optimization (PR #177665)

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 26 20:04:27 PST 2026


================
@@ -240,12 +251,49 @@ void SpillPlacement::run(MachineFunction &mf, EdgeBundles *Bundles,
   TodoList.clear();
   TodoList.setUniverse(bundles->getNumBundles());
 
+  // Check if we should flatten frequencies for AMDGPU to avoid PGO-related
----------------
yxsamliu wrote:

Agreed. Refactored this so the uniformity gating logic is no longer implemented inline in SpillPlacement.

- PGO-use now annotates instrumented IR blocks with `offload-block-uniformity` metadata.
- Added a target-agnostic `OffloadBlockUniformityAnalysis` that propagates that info into MachineFunction.
- SpillPlacement now only queries the analysis (no attribute parsing / modulo mapping).

Updated in the latest PR head.

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


More information about the llvm-commits mailing list