[llvm] [AMDGPU][Scheduler] Prepare remat stage for rematerializer integration (NFC) (PR #189489)

Lucas Ramirez via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 06:05:19 PDT 2026


================
@@ -624,21 +624,20 @@ class PreRARematStage : public GCNSchedStage {
                                 GCNScheduleDAGMILive &DAG) const;
 
     /// Updates the rematerialization's score w.r.t. the current \p RPTargets.
-    /// \p RegionFreq indicates the frequency of each region
-    void update(const BitVector &TargetRegions, ArrayRef<GCNRPTarget> RPTargets,
+    /// \p RegionFreq indicates the frequency of each region. Returns whether
+    /// the new score is null.
+    bool update(const BitVector &TargetRegions, ArrayRef<GCNRPTarget> RPTargets,
----------------
lucas-rami wrote:

I see the lack of clarity indeed. I made `update` return void and added explicit calls to `hasNullScore` where needed in the candidate evaluation logic.

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


More information about the llvm-commits mailing list