summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetRegisterInfo.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/TargetRegisterInfo.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/TargetRegisterInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetRegisterInfo.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/TargetRegisterInfo.cpp b/llvm/lib/CodeGen/TargetRegisterInfo.cpp
index 89c407de472..cd50c5b6571 100644
--- a/llvm/lib/CodeGen/TargetRegisterInfo.cpp
+++ b/llvm/lib/CodeGen/TargetRegisterInfo.cpp
@@ -30,8 +30,8 @@ using namespace llvm;
TargetRegisterInfo::TargetRegisterInfo(const TargetRegisterInfoDesc *ID,
regclass_iterator RCB, regclass_iterator RCE,
const char *const *SRINames,
- const unsigned *SRILaneMasks,
- unsigned SRICoveringLanes)
+ const LaneBitmask *SRILaneMasks,
+ LaneBitmask SRICoveringLanes)
: InfoDesc(ID), SubRegIndexNames(SRINames),
SubRegIndexLaneMasks(SRILaneMasks),
RegClassBegin(RCB), RegClassEnd(RCE),
@@ -127,12 +127,6 @@ Printable PrintVRegOrUnit(unsigned Unit, const TargetRegisterInfo *TRI) {
});
}
-Printable PrintLaneMask(LaneBitmask LaneMask) {
- return Printable([LaneMask](raw_ostream &OS) {
- OS << format("%08X", LaneMask);
- });
-}
-
} // End of llvm namespace
/// getAllocatableClass - Return the maximal subclass of the given register
OpenPOWER on IntegriCloud