summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-12-15 14:36:06 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2016-12-15 14:36:06 +0000
commit91b5cf8412a9fffdca96619f02f485c8c48bf852 (patch)
tree45cc792752ed1bae1559f8501bc5e485eda07fed /llvm/lib/CodeGen/MachineScheduler.cpp
parent2f7f0e7a480d760999f1973d8db76aee590cf83e (diff)
downloadbcm5719-llvm-91b5cf8412a9fffdca96619f02f485c8c48bf852.tar.gz
bcm5719-llvm-91b5cf8412a9fffdca96619f02f485c8c48bf852.zip
Extract LaneBitmask into a separate type
Specifically avoid implicit conversions from/to integral types to avoid potential errors when changing the underlying type. For example, a typical initialization of a "full" mask was "LaneMask = ~0u", which would result in a value of 0x00000000FFFFFFFF if the type was extended to uint64_t. Differential Revision: https://reviews.llvm.org/D27454 llvm-svn: 289820
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index 7787ba89adb..7d7241a67da 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -894,7 +894,7 @@ void ScheduleDAGMILive::collectVRegUses(SUnit &SU) {
break;
}
if (UI == VRegUses.end())
- VRegUses.insert(VReg2SUnit(Reg, 0, &SU));
+ VRegUses.insert(VReg2SUnit(Reg, LaneBitmask::getNone(), &SU));
}
}
@@ -1040,7 +1040,7 @@ void ScheduleDAGMILive::updatePressureDiffs(
// this fact anymore => decrement pressure.
// If the register has just become dead then other uses make it come
// back to life => increment pressure.
- bool Decrement = P.LaneMask != 0;
+ bool Decrement = !P.LaneMask.none();
for (const VReg2SUnit &V2SU
: make_range(VRegUses.find(Reg), VRegUses.end())) {
@@ -1059,7 +1059,7 @@ void ScheduleDAGMILive::updatePressureDiffs(
);
}
} else {
- assert(P.LaneMask != 0);
+ assert(!P.LaneMask.none());
DEBUG(dbgs() << " LiveReg: " << PrintVRegOrUnit(Reg, TRI) << "\n");
// This may be called before CurrentBottom has been initialized. However,
// BotRPTracker must have a valid position. We want the value live into the
OpenPOWER on IntegriCloud