aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/CodeGen/LiveVariables.cpp')
-rw-r--r--backend/lib/CodeGen/LiveVariables.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/backend/lib/CodeGen/LiveVariables.cpp b/backend/lib/CodeGen/LiveVariables.cpp
index 5efdbd4..4f65f72 100644
--- a/backend/lib/CodeGen/LiveVariables.cpp
+++ b/backend/lib/CodeGen/LiveVariables.cpp
@@ -33,10 +33,6 @@
namespace rcc {
namespace {
-[[nodiscard]] LaneMask subtractLanes(LaneMask Left, LaneMask Right) noexcept {
- return LaneMask::fromRaw(Left.rawValue() & ~Right.rawValue());
-}
-
template <typename KeyT>
void addLanes(std::unordered_map<KeyT, LaneMask> &Values, KeyT Key, LaneMask Lanes) {
if (Lanes.empty())
@@ -46,7 +42,7 @@ void addLanes(std::unordered_map<KeyT, LaneMask> &Values, KeyT Key, LaneMask Lan
Values.emplace(Key, Lanes);
return;
}
- Position->second = Position->second | Lanes;
+ Position->second |= Lanes;
}
template <typename KeyT>
@@ -54,7 +50,7 @@ void removeLanes(std::unordered_map<KeyT, LaneMask> &Values, KeyT Key, LaneMask
const auto Position = Values.find(Key);
if (Position == Values.end() || Lanes.empty())
return;
- Position->second = subtractLanes(Position->second, Lanes);
+ Position->second &= ~Lanes;
if (Position->second.empty())
Values.erase(Position);
}