From a47055fe6af27de9d1ce505938e0cebbca5532ff Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Wed, 26 Aug 2026 23:43:44 +0800 Subject: [CodeGen] Remove transactional register allocation --- backend/lib/CodeGen/RegAllocInternal.h | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'backend/lib/CodeGen/RegAllocInternal.h') diff --git a/backend/lib/CodeGen/RegAllocInternal.h b/backend/lib/CodeGen/RegAllocInternal.h index 3da6387..8d7af5a 100644 --- a/backend/lib/CodeGen/RegAllocInternal.h +++ b/backend/lib/CodeGen/RegAllocInternal.h @@ -9,11 +9,9 @@ #include "rcc/CodeGen/LiveIntervals.h" #include "rcc/CodeGen/MachineBasicBlock.h" #include "rcc/CodeGen/MachineFunction.h" -#include "rcc/CodeGen/MachineFunctionCloner.h" #include "rcc/CodeGen/MachineInstr.h" #include "rcc/CodeGen/MachineOperand.h" #include "rcc/CodeGen/MachineRegisterInfo.h" -#include "rcc/CodeGen/MachineVerifier.h" #include "rcc/CodeGen/RegAllocCommon.h" #include "rcc/CodeGen/TargetDescription.h" #include "rcc/CodeGen/TargetRegisterAllocationInfo.h" @@ -23,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -222,26 +219,6 @@ reserveFunctionRegisters(MachineFunction &Function, std::span verifyAllocationTrial(MachineFunction &Function, - const TargetDescription &Target, - const MachinePassContract &Contract) { - auto Transition = - Function.properties().applyTransition(Contract.Requires, Contract.Sets, Contract.Clears); - if (!Transition) - return std::unexpected(Transition.error()); - return MachineVerifier::verify(Function, Target, - MachineVerifierOptions{.Mode = MachineVerifierMode::Generic, - .Stage = Contract.VerificationStage, - .VerifyProperties = true}); -} - -[[nodiscard]] inline Expected -cloneForAllocation(const MachineFunction &Function, const TargetDescription &Target) { - return cloneMachineFunction( - Function, Target, - MachineFunctionCloneOptions{.NewStableID = Function.stableID(), .NewName = std::nullopt}); -} - [[nodiscard]] bool intervalsOverlapOnPhysicalRegisters(const LiveInterval &Left, PhysicalRegister LeftReg, const LiveInterval &Right, PhysicalRegister RightReg, -- cgit v1.2.3