From 1ee4c07f1450bb2acf2cfbd99441fa9672a56c3b Mon Sep 17 00:00:00 2001 From: MerryMage Date: Fri, 24 Feb 2017 20:01:41 +0000 Subject: [PATCH] reg_alloc: Reimplement ScratchHostLocReg --- src/backend_x64/reg_alloc.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/backend_x64/reg_alloc.cpp b/src/backend_x64/reg_alloc.cpp index 987c9593..590c1575 100644 --- a/src/backend_x64/reg_alloc.cpp +++ b/src/backend_x64/reg_alloc.cpp @@ -201,18 +201,9 @@ HostLoc RegAlloc::UseScratchHostLocReg(IR::Inst* use_inst, HostLocList desired_l } HostLoc RegAlloc::ScratchHostLocReg(HostLocList desired_locations) { - DEBUG_ASSERT(std::all_of(desired_locations.begin(), desired_locations.end(), HostLocIsRegister)); - HostLoc location = SelectARegister(desired_locations); - - if (IsRegisterOccupied(location)) { - SpillRegister(location); - } - - // Update state + MoveOutOfTheWay(location); LocInfo(location).Lock(); - - DEBUG_ASSERT(LocInfo(location).IsScratch()); return location; }