From 5fd19fbe147eaff6e65e7dc3b63b324d80f19a05 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Thu, 27 Aug 2026 16:05:37 +0800 Subject: [CodeGen] Remove machine action replay --- backend/include/rcc/IR/PassInstrumentation.h | 42 ---------------------------- 1 file changed, 42 deletions(-) (limited to 'backend/include') diff --git a/backend/include/rcc/IR/PassInstrumentation.h b/backend/include/rcc/IR/PassInstrumentation.h index 082ec81..f90df37 100644 --- a/backend/include/rcc/IR/PassInstrumentation.h +++ b/backend/include/rcc/IR/PassInstrumentation.h @@ -180,48 +180,6 @@ private: template friend struct PassManagerCallbacks; }; -class MachineActionReplay final { -public: - template - explicit MachineActionReplay(AnalysisManagerT &Analyses) - : Request([&Analyses](std::string_view Rule, const MachineFunction &Function, - MachineInstrStableID Instruction, std::uint64_t Cost) { - return Analyses.requestAction(Rule, Function, Instruction, Cost); - }) {} - - template - MachineActionReplay( - AnalysisManagerT &Analyses, - const std::unordered_map &SourceToClone) - : MachineActionReplay(Analyses) { - for (const auto &[Source, Clone] : SourceToClone) - RecordingInstructionIDs.try_emplace(Clone, Source); - } - - [[nodiscard]] Expected request(std::string_view Rule, const MachineFunction &Function, - MachineInstrStableID Instruction = {}, - std::uint64_t Cost = 1); - void beginReplay() noexcept; - [[nodiscard]] Expected finishReplay() const; - -private: - struct Decision final { - std::string Rule; - MachineFunctionStableID Function; - MachineInstrStableID Instruction; - std::uint64_t Cost = 0; - bool Accepted = false; - }; - - std::function(std::string_view, const MachineFunction &, MachineInstrStableID, - std::uint64_t)> - Request; - std::unordered_map RecordingInstructionIDs; - std::vector Decisions; - std::size_t NextDecision = 0; - bool IsReplaying = false; -}; - } // namespace rcc #endif // RCC_IR_PASSINSTRUMENTATION_H -- cgit v1.2.3