diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-12-15 14:36:06 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-12-15 14:36:06 +0000 |
commit | 91b5cf8412a9fffdca96619f02f485c8c48bf852 (patch) | |
tree | 45cc792752ed1bae1559f8501bc5e485eda07fed /llvm/lib/CodeGen/MachinePipeliner.cpp | |
parent | 2f7f0e7a480d760999f1973d8db76aee590cf83e (diff) | |
download | bcm5719-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/MachinePipeliner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachinePipeliner.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp index 23d7c6094a9..c908681df2e 100644 --- a/llvm/lib/CodeGen/MachinePipeliner.cpp +++ b/llvm/lib/CodeGen/MachinePipeliner.cpp @@ -1742,11 +1742,13 @@ static void computeLiveOuts(MachineFunction &MF, RegPressureTracker &RPTracker, unsigned Reg = MO.getReg(); if (TargetRegisterInfo::isVirtualRegister(Reg)) { if (!Uses.count(Reg)) - LiveOutRegs.push_back(RegisterMaskPair(Reg, 0)); + LiveOutRegs.push_back(RegisterMaskPair(Reg, + LaneBitmask::getNone())); } else if (MRI.isAllocatable(Reg)) { for (MCRegUnitIterator Units(Reg, TRI); Units.isValid(); ++Units) if (!Uses.count(*Units)) - LiveOutRegs.push_back(RegisterMaskPair(*Units, 0)); + LiveOutRegs.push_back(RegisterMaskPair(*Units, + LaneBitmask::getNone())); } } RPTracker.addLiveRegs(LiveOutRegs); |