Lines Matching +full:auto +full:- +full:mode

1 //===--- InfoByHwMode.cpp -------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
25 std::string llvm::getModeName(unsigned Mode) { in getModeName() argument
26 if (Mode == DefaultMode) in getModeName()
28 return (Twine('m') + Twine(Mode)).str(); in getModeName()
34 auto I = Map.insert({P.first, MVT(llvm::getValueType(P.second))}); in ValueTypeByHwMode()
38 if (R->isSubClassOf("PtrValueType")) in ValueTypeByHwMode()
39 PtrAddrSpace = R->getValueAsInt("AddrSpace"); in ValueTypeByHwMode()
43 if (R->isSubClassOf("PtrValueType")) in ValueTypeByHwMode()
44 PtrAddrSpace = R->getValueAsInt("AddrSpace"); in ValueTypeByHwMode()
64 MVT &ValueTypeByHwMode::getOrCreateTypeForMode(unsigned Mode, MVT Type) { in getOrCreateTypeForMode() argument
65 auto F = Map.find(Mode); in getOrCreateTypeForMode()
67 return F->second; in getOrCreateTypeForMode()
68 // If Mode is not in the map, look up the default mode. If it exists, in getOrCreateTypeForMode()
69 // make a copy of it for Mode and return it. in getOrCreateTypeForMode()
70 auto D = Map.begin(); in getOrCreateTypeForMode()
71 if (D != Map.end() && D->first == DefaultMode) in getOrCreateTypeForMode()
72 return Map.insert(std::pair(Mode, D->second)).first->second; in getOrCreateTypeForMode()
73 // If default mode is not present either, use provided Type. in getOrCreateTypeForMode()
74 return Map.insert(std::pair(Mode, Type)).first->second; in getOrCreateTypeForMode()
90 for (const auto &P : Map) in writeToStream()
97 OS << LS << '(' << getModeName(P->first) << ':' in writeToStream()
98 << getMVTName(P->second).str() << ')'; in writeToStream()
108 if (!Rec->isSubClassOf("ValueType")) in getValueTypeByHwMode()
109 Rec->dump(); in getValueTypeByHwMode()
111 assert(Rec->isSubClassOf("ValueType") && in getValueTypeByHwMode()
113 if (Rec->isSubClassOf("HwModeSelect")) in getValueTypeByHwMode()
119 RegSize = R->getValueAsInt("RegSize"); in RegSizeInfo()
120 SpillSize = R->getValueAsInt("SpillSize"); in RegSizeInfo()
121 SpillAlignment = R->getValueAsInt("SpillAlignment"); in RegSizeInfo()
142 auto I = Map.insert({P.first, RegSizeInfo(P.second)}); in RegSizeInfoByHwMode()
149 unsigned M0 = Map.begin()->first; in operator <()
154 unsigned M0 = Map.begin()->first; in operator ==()
159 unsigned M0 = Map.begin()->first; in isSubClassOf()
165 unsigned M0 = Map.begin()->first; in hasStricterSpillThan()
175 for (const auto &P : Map) in writeToStream()
182 OS << LS << '(' << getModeName(P->first) << ':' << P->second << ')'; in writeToStream()
187 Size = R->getValueAsInt("Size"); in SubRegRange()
188 Offset = R->getValueAsInt("Offset"); in SubRegRange()
194 auto I = Map.insert({P.first, SubRegRange(P.second)}); in SubRegRangeByHwMode()
204 assert(P.second && P.second->isSubClassOf("InstructionEncoding") && in EncodingInfoByHwMode()
206 auto I = Map.insert({P.first, P.second}); in EncodingInfoByHwMode()