mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
[RegisterBankInfo] Constify the member of the XXXMapping maps.
This makes it obvious that items in those maps behave like statically created objects. llvm-svn: 282327
This commit is contained in:
parent
c04a3667f5
commit
3d5fa3f4d2
@ -361,11 +361,11 @@ protected:
|
||||
|
||||
/// Keep dynamically allocated PartialMapping in a separate map.
|
||||
/// This shouldn't be needed when everything gets TableGen'ed.
|
||||
mutable DenseMap<unsigned, PartialMapping *> MapOfPartialMappings;
|
||||
mutable DenseMap<unsigned, const PartialMapping *> MapOfPartialMappings;
|
||||
|
||||
/// Keep dynamically allocated ValueMapping in a separate map.
|
||||
/// This shouldn't be needed when everything gets TableGen'ed.
|
||||
mutable DenseMap<unsigned, ValueMapping *> MapOfValueMappings;
|
||||
mutable DenseMap<unsigned, const ValueMapping *> MapOfValueMappings;
|
||||
|
||||
/// Create a RegisterBankInfo that can accomodate up to \p NumRegBanks
|
||||
/// RegisterBank instances.
|
||||
|
@ -344,7 +344,7 @@ RegisterBankInfo::getPartialMapping(unsigned StartIdx, unsigned Length,
|
||||
|
||||
++NumPartialMappingsCreated;
|
||||
|
||||
PartialMapping *&PartMapping = MapOfPartialMappings[Hash];
|
||||
const PartialMapping *&PartMapping = MapOfPartialMappings[Hash];
|
||||
PartMapping = new PartialMapping{StartIdx, Length, RegBank};
|
||||
return *PartMapping;
|
||||
}
|
||||
@ -376,7 +376,7 @@ RegisterBankInfo::getValueMapping(const PartialMapping *BreakDown,
|
||||
|
||||
++NumValueMappingsCreated;
|
||||
|
||||
ValueMapping *&ValMapping = MapOfValueMappings[Hash];
|
||||
const ValueMapping *&ValMapping = MapOfValueMappings[Hash];
|
||||
ValMapping = new ValueMapping{BreakDown, NumBreakDowns};
|
||||
return *ValMapping;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user