[llvm-branch-commits] [GlobalISel] Combiner: Observer-based DCE and retrying of combines (PR #102163)
Tobias Stadler via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Aug 15 03:21:06 PDT 2024
================
@@ -45,61 +45,190 @@ cl::OptionCategory GICombinerOptionCategory(
);
} // end namespace llvm
-/// This class acts as the glue the joins the CombinerHelper to the overall
+/// This class acts as the glue that joins the CombinerHelper to the overall
/// Combine algorithm. The CombinerHelper is intended to report the
/// modifications it makes to the MIR to the GISelChangeObserver and the
-/// observer subclass will act on these events. In this case, instruction
-/// erasure will cancel any future visits to the erased instruction and
-/// instruction creation will schedule that instruction for a future visit.
-/// Other Combiner implementations may require more complex behaviour from
-/// their GISelChangeObserver subclass.
+/// observer subclass will act on these events.
class Combiner::WorkListMaintainer : public GISelChangeObserver {
- using WorkListTy = GISelWorkList<512>;
- WorkListTy &WorkList;
+protected:
+#ifndef NDEBUG
----------------
tobias-stadler wrote:
Good point, but I don't think it's needed in this case, because you can't get the complete type of WorkListMaintainer outside of Combiner.cpp. Combiner.h only contains the declaration. Thoughts?
https://github.com/llvm/llvm-project/pull/102163
More information about the llvm-branch-commits
mailing list