reg_alloc: Use std::exchange
This commit is contained in:
parent
e0c12ec2ad
commit
4ce9c65cfb
@ -6,6 +6,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <utility>
|
||||
|
||||
#include <xbyak.h>
|
||||
|
||||
@ -487,8 +488,7 @@ void RegAlloc::Move(HostLoc to, HostLoc from) {
|
||||
|
||||
EmitMove(to, from);
|
||||
|
||||
LocInfo(to) = LocInfo(from);
|
||||
LocInfo(from) = {};
|
||||
LocInfo(to) = std::exchange(LocInfo(from), {});
|
||||
}
|
||||
|
||||
void RegAlloc::CopyToScratch(HostLoc to, HostLoc from) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user