Use std::fill instead of memset to initialize an array to avoid hardcoded count and a multiply. The outputed code is identical.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2015-12-05 07:13:25 +00:00
parent fbbab8b959
commit 83f50fab53

View File

@ -1293,7 +1293,7 @@ protected:
/// Remove all register classes.
void clearRegisterClasses() {
memset(RegClassForVT, 0,MVT::LAST_VALUETYPE * sizeof(TargetRegisterClass*));
std::fill(std::begin(RegClassForVT), std::end(RegClassForVT), nullptr);
AvailableRegClasses.clear();
}