1 //===- CodeGenTarget.cpp - CodeGen Target Class Wrapper -------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This class wraps target description classes used by the various code 11 // generation TableGen backends. This makes it easier to access the data and 12 // provides a single place that needs to check it for validity. All of these 13 // classes abort on error conditions. 14 // 15 //===----------------------------------------------------------------------===// 16 17 #include "CodeGenTarget.h" 18 #include "CodeGenIntrinsics.h" 19 #include "CodeGenSchedule.h" 20 #include "llvm/TableGen/Error.h" 21 #include "llvm/TableGen/Record.h" 22 #include "llvm/ADT/StringExtras.h" 23 #include "llvm/ADT/STLExtras.h" 24 #include "llvm/Support/CommandLine.h" 25 #include <algorithm> 26 using namespace llvm; 27 28 static cl::opt<unsigned> 29 AsmParserNum("asmparsernum", cl::init(0), 30 cl::desc("Make -gen-asm-parser emit assembly parser #N")); 31 32 static cl::opt<unsigned> 33 AsmWriterNum("asmwriternum", cl::init(0), 34 cl::desc("Make -gen-asm-writer emit assembly writer #N")); 35 36 /// getValueType - Return the MVT::SimpleValueType that the specified TableGen 37 /// record corresponds to. 38 MVT::SimpleValueType llvm::getValueType(Record *Rec) { 39 return (MVT::SimpleValueType)Rec->getValueAsInt("Value"); 40 } 41 42 std::string llvm::getName(MVT::SimpleValueType T) { 43 switch (T) { 44 case MVT::Other: return "UNKNOWN"; 45 case MVT::iPTR: return "TLI.getPointerTy()"; 46 case MVT::iPTRAny: return "TLI.getPointerTy()"; 47 default: return getEnumName(T); 48 } 49 } 50 51 std::string llvm::getEnumName(MVT::SimpleValueType T) { 52 switch (T) { 53 case MVT::Other: return "MVT::Other"; 54 case MVT::i1: return "MVT::i1"; 55 case MVT::i8: return "MVT::i8"; 56 case MVT::i16: return "MVT::i16"; 57 case MVT::i32: return "MVT::i32"; 58 case MVT::i64: return "MVT::i64"; 59 case MVT::i128: return "MVT::i128"; 60 case MVT::iAny: return "MVT::iAny"; 61 case MVT::fAny: return "MVT::fAny"; 62 case MVT::vAny: return "MVT::vAny"; 63 case MVT::f16: return "MVT::f16"; 64 case MVT::f32: return "MVT::f32"; 65 case MVT::f64: return "MVT::f64"; 66 case MVT::f80: return "MVT::f80"; 67 case MVT::f128: return "MVT::f128"; 68 case MVT::ppcf128: return "MVT::ppcf128"; 69 case MVT::x86mmx: return "MVT::x86mmx"; 70 case MVT::Glue: return "MVT::Glue"; 71 case MVT::isVoid: return "MVT::isVoid"; 72 case MVT::v2i1: return "MVT::v2i1"; 73 case MVT::v4i1: return "MVT::v4i1"; 74 case MVT::v8i1: return "MVT::v8i1"; 75 case MVT::v16i1: return "MVT::v16i1"; 76 case MVT::v2i8: return "MVT::v2i8"; 77 case MVT::v4i8: return "MVT::v4i8"; 78 case MVT::v8i8: return "MVT::v8i8"; 79 case MVT::v16i8: return "MVT::v16i8"; 80 case MVT::v32i8: return "MVT::v32i8"; 81 case MVT::v1i16: return "MVT::v1i16"; 82 case MVT::v2i16: return "MVT::v2i16"; 83 case MVT::v4i16: return "MVT::v4i16"; 84 case MVT::v8i16: return "MVT::v8i16"; 85 case MVT::v16i16: return "MVT::v16i16"; 86 case MVT::v1i32: return "MVT::v1i32"; 87 case MVT::v2i32: return "MVT::v2i32"; 88 case MVT::v4i32: return "MVT::v4i32"; 89 case MVT::v8i32: return "MVT::v8i32"; 90 case MVT::v16i32: return "MVT::v16i32"; 91 case MVT::v1i64: return "MVT::v1i64"; 92 case MVT::v2i64: return "MVT::v2i64"; 93 case MVT::v4i64: return "MVT::v4i64"; 94 case MVT::v8i64: return "MVT::v8i64"; 95 case MVT::v16i64: return "MVT::v16i64"; 96 case MVT::v2f16: return "MVT::v2f16"; 97 case MVT::v2f32: return "MVT::v2f32"; 98 case MVT::v4f32: return "MVT::v4f32"; 99 case MVT::v8f32: return "MVT::v8f32"; 100 case MVT::v2f64: return "MVT::v2f64"; 101 case MVT::v4f64: return "MVT::v4f64"; 102 case MVT::Metadata: return "MVT::Metadata"; 103 case MVT::iPTR: return "MVT::iPTR"; 104 case MVT::iPTRAny: return "MVT::iPTRAny"; 105 case MVT::Untyped: return "MVT::Untyped"; 106 default: llvm_unreachable("ILLEGAL VALUE TYPE!"); 107 } 108 } 109 110 /// getQualifiedName - Return the name of the specified record, with a 111 /// namespace qualifier if the record contains one. 112 /// 113 std::string llvm::getQualifiedName(const Record *R) { 114 std::string Namespace; 115 if (R->getValue("Namespace")) 116 Namespace = R->getValueAsString("Namespace"); 117 if (Namespace.empty()) return R->getName(); 118 return Namespace + "::" + R->getName(); 119 } 120 121 122 /// getTarget - Return the current instance of the Target class. 123 /// 124 CodeGenTarget::CodeGenTarget(RecordKeeper &records) 125 : Records(records), RegBank(0), SchedModels(0) { 126 std::vector<Record*> Targets = Records.getAllDerivedDefinitions("Target"); 127 if (Targets.size() == 0) 128 PrintFatalError("ERROR: No 'Target' subclasses defined!"); 129 if (Targets.size() != 1) 130 PrintFatalError("ERROR: Multiple subclasses of Target defined!"); 131 TargetRec = Targets[0]; 132 } 133 134 CodeGenTarget::~CodeGenTarget() { 135 delete RegBank; 136 delete SchedModels; 137 } 138 139 const std::string &CodeGenTarget::getName() const { 140 return TargetRec->getName(); 141 } 142 143 std::string CodeGenTarget::getInstNamespace() const { 144 for (inst_iterator i = inst_begin(), e = inst_end(); i != e; ++i) { 145 // Make sure not to pick up "TargetOpcode" by accidentally getting 146 // the namespace off the PHI instruction or something. 147 if ((*i)->Namespace != "TargetOpcode") 148 return (*i)->Namespace; 149 } 150 151 return ""; 152 } 153 154 Record *CodeGenTarget::getInstructionSet() const { 155 return TargetRec->getValueAsDef("InstructionSet"); 156 } 157 158 159 /// getAsmParser - Return the AssemblyParser definition for this target. 160 /// 161 Record *CodeGenTarget::getAsmParser() const { 162 std::vector<Record*> LI = TargetRec->getValueAsListOfDefs("AssemblyParsers"); 163 if (AsmParserNum >= LI.size()) 164 PrintFatalError("Target does not have an AsmParser #" + utostr(AsmParserNum) + "!"); 165 return LI[AsmParserNum]; 166 } 167 168 /// getAsmParserVariant - Return the AssmblyParserVariant definition for 169 /// this target. 170 /// 171 Record *CodeGenTarget::getAsmParserVariant(unsigned i) const { 172 std::vector<Record*> LI = 173 TargetRec->getValueAsListOfDefs("AssemblyParserVariants"); 174 if (i >= LI.size()) 175 PrintFatalError("Target does not have an AsmParserVariant #" + utostr(i) + "!"); 176 return LI[i]; 177 } 178 179 /// getAsmParserVariantCount - Return the AssmblyParserVariant definition 180 /// available for this target. 181 /// 182 unsigned CodeGenTarget::getAsmParserVariantCount() const { 183 std::vector<Record*> LI = 184 TargetRec->getValueAsListOfDefs("AssemblyParserVariants"); 185 return LI.size(); 186 } 187 188 /// getAsmWriter - Return the AssemblyWriter definition for this target. 189 /// 190 Record *CodeGenTarget::getAsmWriter() const { 191 std::vector<Record*> LI = TargetRec->getValueAsListOfDefs("AssemblyWriters"); 192 if (AsmWriterNum >= LI.size()) 193 PrintFatalError("Target does not have an AsmWriter #" + utostr(AsmWriterNum) + "!"); 194 return LI[AsmWriterNum]; 195 } 196 197 CodeGenRegBank &CodeGenTarget::getRegBank() const { 198 if (!RegBank) 199 RegBank = new CodeGenRegBank(Records); 200 return *RegBank; 201 } 202 203 void CodeGenTarget::ReadRegAltNameIndices() const { 204 RegAltNameIndices = Records.getAllDerivedDefinitions("RegAltNameIndex"); 205 std::sort(RegAltNameIndices.begin(), RegAltNameIndices.end(), LessRecord()); 206 } 207 208 /// getRegisterByName - If there is a register with the specific AsmName, 209 /// return it. 210 const CodeGenRegister *CodeGenTarget::getRegisterByName(StringRef Name) const { 211 const StringMap<CodeGenRegister*> &Regs = getRegBank().getRegistersByName(); 212 StringMap<CodeGenRegister*>::const_iterator I = Regs.find(Name); 213 if (I == Regs.end()) 214 return 0; 215 return I->second; 216 } 217 218 std::vector<MVT::SimpleValueType> CodeGenTarget:: 219 getRegisterVTs(Record *R) const { 220 const CodeGenRegister *Reg = getRegBank().getReg(R); 221 std::vector<MVT::SimpleValueType> Result; 222 ArrayRef<CodeGenRegisterClass*> RCs = getRegBank().getRegClasses(); 223 for (unsigned i = 0, e = RCs.size(); i != e; ++i) { 224 const CodeGenRegisterClass &RC = *RCs[i]; 225 if (RC.contains(Reg)) { 226 const std::vector<MVT::SimpleValueType> &InVTs = RC.getValueTypes(); 227 Result.insert(Result.end(), InVTs.begin(), InVTs.end()); 228 } 229 } 230 231 // Remove duplicates. 232 array_pod_sort(Result.begin(), Result.end()); 233 Result.erase(std::unique(Result.begin(), Result.end()), Result.end()); 234 return Result; 235 } 236 237 238 void CodeGenTarget::ReadLegalValueTypes() const { 239 ArrayRef<CodeGenRegisterClass*> RCs = getRegBank().getRegClasses(); 240 for (unsigned i = 0, e = RCs.size(); i != e; ++i) 241 for (unsigned ri = 0, re = RCs[i]->VTs.size(); ri != re; ++ri) 242 LegalValueTypes.push_back(RCs[i]->VTs[ri]); 243 244 // Remove duplicates. 245 std::sort(LegalValueTypes.begin(), LegalValueTypes.end()); 246 LegalValueTypes.erase(std::unique(LegalValueTypes.begin(), 247 LegalValueTypes.end()), 248 LegalValueTypes.end()); 249 } 250 251 CodeGenSchedModels &CodeGenTarget::getSchedModels() const { 252 if (!SchedModels) 253 SchedModels = new CodeGenSchedModels(Records, *this); 254 return *SchedModels; 255 } 256 257 void CodeGenTarget::ReadInstructions() const { 258 std::vector<Record*> Insts = Records.getAllDerivedDefinitions("Instruction"); 259 if (Insts.size() <= 2) 260 PrintFatalError("No 'Instruction' subclasses defined!"); 261 262 // Parse the instructions defined in the .td file. 263 for (unsigned i = 0, e = Insts.size(); i != e; ++i) 264 Instructions[Insts[i]] = new CodeGenInstruction(Insts[i]); 265 } 266 267 static const CodeGenInstruction * 268 GetInstByName(const char *Name, 269 const DenseMap<const Record*, CodeGenInstruction*> &Insts, 270 RecordKeeper &Records) { 271 const Record *Rec = Records.getDef(Name); 272 273 DenseMap<const Record*, CodeGenInstruction*>::const_iterator 274 I = Insts.find(Rec); 275 if (Rec == 0 || I == Insts.end()) 276 PrintFatalError(std::string("Could not find '") + Name + "' instruction!"); 277 return I->second; 278 } 279 280 namespace { 281 /// SortInstByName - Sorting predicate to sort instructions by name. 282 /// 283 struct SortInstByName { 284 bool operator()(const CodeGenInstruction *Rec1, 285 const CodeGenInstruction *Rec2) const { 286 return Rec1->TheDef->getName() < Rec2->TheDef->getName(); 287 } 288 }; 289 } 290 291 /// getInstructionsByEnumValue - Return all of the instructions defined by the 292 /// target, ordered by their enum value. 293 void CodeGenTarget::ComputeInstrsByEnum() const { 294 // The ordering here must match the ordering in TargetOpcodes.h. 295 const char *const FixedInstrs[] = { 296 "PHI", 297 "INLINEASM", 298 "PROLOG_LABEL", 299 "EH_LABEL", 300 "GC_LABEL", 301 "KILL", 302 "EXTRACT_SUBREG", 303 "INSERT_SUBREG", 304 "IMPLICIT_DEF", 305 "SUBREG_TO_REG", 306 "COPY_TO_REGCLASS", 307 "DBG_VALUE", 308 "REG_SEQUENCE", 309 "COPY", 310 "BUNDLE", 311 "LIFETIME_START", 312 "LIFETIME_END", 313 0 314 }; 315 const DenseMap<const Record*, CodeGenInstruction*> &Insts = getInstructions(); 316 for (const char *const *p = FixedInstrs; *p; ++p) { 317 const CodeGenInstruction *Instr = GetInstByName(*p, Insts, Records); 318 assert(Instr && "Missing target independent instruction"); 319 assert(Instr->Namespace == "TargetOpcode" && "Bad namespace"); 320 InstrsByEnum.push_back(Instr); 321 } 322 unsigned EndOfPredefines = InstrsByEnum.size(); 323 324 for (DenseMap<const Record*, CodeGenInstruction*>::const_iterator 325 I = Insts.begin(), E = Insts.end(); I != E; ++I) { 326 const CodeGenInstruction *CGI = I->second; 327 if (CGI->Namespace != "TargetOpcode") 328 InstrsByEnum.push_back(CGI); 329 } 330 331 assert(InstrsByEnum.size() == Insts.size() && "Missing predefined instr"); 332 333 // All of the instructions are now in random order based on the map iteration. 334 // Sort them by name. 335 std::sort(InstrsByEnum.begin()+EndOfPredefines, InstrsByEnum.end(), 336 SortInstByName()); 337 } 338 339 340 /// isLittleEndianEncoding - Return whether this target encodes its instruction 341 /// in little-endian format, i.e. bits laid out in the order [0..n] 342 /// 343 bool CodeGenTarget::isLittleEndianEncoding() const { 344 return getInstructionSet()->getValueAsBit("isLittleEndianEncoding"); 345 } 346 347 /// guessInstructionProperties - Return true if it's OK to guess instruction 348 /// properties instead of raising an error. 349 /// 350 /// This is configurable as a temporary migration aid. It will eventually be 351 /// permanently false. 352 bool CodeGenTarget::guessInstructionProperties() const { 353 return getInstructionSet()->getValueAsBit("guessInstructionProperties"); 354 } 355 356 //===----------------------------------------------------------------------===// 357 // ComplexPattern implementation 358 // 359 ComplexPattern::ComplexPattern(Record *R) { 360 Ty = ::getValueType(R->getValueAsDef("Ty")); 361 NumOperands = R->getValueAsInt("NumOperands"); 362 SelectFunc = R->getValueAsString("SelectFunc"); 363 RootNodes = R->getValueAsListOfDefs("RootNodes"); 364 365 // Parse the properties. 366 Properties = 0; 367 std::vector<Record*> PropList = R->getValueAsListOfDefs("Properties"); 368 for (unsigned i = 0, e = PropList.size(); i != e; ++i) 369 if (PropList[i]->getName() == "SDNPHasChain") { 370 Properties |= 1 << SDNPHasChain; 371 } else if (PropList[i]->getName() == "SDNPOptInGlue") { 372 Properties |= 1 << SDNPOptInGlue; 373 } else if (PropList[i]->getName() == "SDNPMayStore") { 374 Properties |= 1 << SDNPMayStore; 375 } else if (PropList[i]->getName() == "SDNPMayLoad") { 376 Properties |= 1 << SDNPMayLoad; 377 } else if (PropList[i]->getName() == "SDNPSideEffect") { 378 Properties |= 1 << SDNPSideEffect; 379 } else if (PropList[i]->getName() == "SDNPMemOperand") { 380 Properties |= 1 << SDNPMemOperand; 381 } else if (PropList[i]->getName() == "SDNPVariadic") { 382 Properties |= 1 << SDNPVariadic; 383 } else if (PropList[i]->getName() == "SDNPWantRoot") { 384 Properties |= 1 << SDNPWantRoot; 385 } else if (PropList[i]->getName() == "SDNPWantParent") { 386 Properties |= 1 << SDNPWantParent; 387 } else { 388 errs() << "Unsupported SD Node property '" << PropList[i]->getName() 389 << "' on ComplexPattern '" << R->getName() << "'!\n"; 390 exit(1); 391 } 392 } 393 394 //===----------------------------------------------------------------------===// 395 // CodeGenIntrinsic Implementation 396 //===----------------------------------------------------------------------===// 397 398 std::vector<CodeGenIntrinsic> llvm::LoadIntrinsics(const RecordKeeper &RC, 399 bool TargetOnly) { 400 std::vector<Record*> I = RC.getAllDerivedDefinitions("Intrinsic"); 401 402 std::vector<CodeGenIntrinsic> Result; 403 404 for (unsigned i = 0, e = I.size(); i != e; ++i) { 405 bool isTarget = I[i]->getValueAsBit("isTarget"); 406 if (isTarget == TargetOnly) 407 Result.push_back(CodeGenIntrinsic(I[i])); 408 } 409 return Result; 410 } 411 412 CodeGenIntrinsic::CodeGenIntrinsic(Record *R) { 413 TheDef = R; 414 std::string DefName = R->getName(); 415 ModRef = ReadWriteMem; 416 isOverloaded = false; 417 isCommutative = false; 418 canThrow = false; 419 isNoReturn = false; 420 421 if (DefName.size() <= 4 || 422 std::string(DefName.begin(), DefName.begin() + 4) != "int_") 423 PrintFatalError("Intrinsic '" + DefName + "' does not start with 'int_'!"); 424 425 EnumName = std::string(DefName.begin()+4, DefName.end()); 426 427 if (R->getValue("GCCBuiltinName")) // Ignore a missing GCCBuiltinName field. 428 GCCBuiltinName = R->getValueAsString("GCCBuiltinName"); 429 430 TargetPrefix = R->getValueAsString("TargetPrefix"); 431 Name = R->getValueAsString("LLVMName"); 432 433 if (Name == "") { 434 // If an explicit name isn't specified, derive one from the DefName. 435 Name = "llvm."; 436 437 for (unsigned i = 0, e = EnumName.size(); i != e; ++i) 438 Name += (EnumName[i] == '_') ? '.' : EnumName[i]; 439 } else { 440 // Verify it starts with "llvm.". 441 if (Name.size() <= 5 || 442 std::string(Name.begin(), Name.begin() + 5) != "llvm.") 443 PrintFatalError("Intrinsic '" + DefName + "'s name does not start with 'llvm.'!"); 444 } 445 446 // If TargetPrefix is specified, make sure that Name starts with 447 // "llvm.<targetprefix>.". 448 if (!TargetPrefix.empty()) { 449 if (Name.size() < 6+TargetPrefix.size() || 450 std::string(Name.begin() + 5, Name.begin() + 6 + TargetPrefix.size()) 451 != (TargetPrefix + ".")) 452 PrintFatalError("Intrinsic '" + DefName + "' does not start with 'llvm." + 453 TargetPrefix + ".'!"); 454 } 455 456 // Parse the list of return types. 457 std::vector<MVT::SimpleValueType> OverloadedVTs; 458 ListInit *TypeList = R->getValueAsListInit("RetTypes"); 459 for (unsigned i = 0, e = TypeList->getSize(); i != e; ++i) { 460 Record *TyEl = TypeList->getElementAsRecord(i); 461 assert(TyEl->isSubClassOf("LLVMType") && "Expected a type!"); 462 MVT::SimpleValueType VT; 463 if (TyEl->isSubClassOf("LLVMMatchType")) { 464 unsigned MatchTy = TyEl->getValueAsInt("Number"); 465 assert(MatchTy < OverloadedVTs.size() && 466 "Invalid matching number!"); 467 VT = OverloadedVTs[MatchTy]; 468 // It only makes sense to use the extended and truncated vector element 469 // variants with iAny types; otherwise, if the intrinsic is not 470 // overloaded, all the types can be specified directly. 471 assert(((!TyEl->isSubClassOf("LLVMExtendedElementVectorType") && 472 !TyEl->isSubClassOf("LLVMTruncatedElementVectorType")) || 473 VT == MVT::iAny || VT == MVT::vAny) && 474 "Expected iAny or vAny type"); 475 } else { 476 VT = getValueType(TyEl->getValueAsDef("VT")); 477 } 478 if (EVT(VT).isOverloaded()) { 479 OverloadedVTs.push_back(VT); 480 isOverloaded = true; 481 } 482 483 // Reject invalid types. 484 if (VT == MVT::isVoid) 485 PrintFatalError("Intrinsic '" + DefName + " has void in result type list!"); 486 487 IS.RetVTs.push_back(VT); 488 IS.RetTypeDefs.push_back(TyEl); 489 } 490 491 // Parse the list of parameter types. 492 TypeList = R->getValueAsListInit("ParamTypes"); 493 for (unsigned i = 0, e = TypeList->getSize(); i != e; ++i) { 494 Record *TyEl = TypeList->getElementAsRecord(i); 495 assert(TyEl->isSubClassOf("LLVMType") && "Expected a type!"); 496 MVT::SimpleValueType VT; 497 if (TyEl->isSubClassOf("LLVMMatchType")) { 498 unsigned MatchTy = TyEl->getValueAsInt("Number"); 499 assert(MatchTy < OverloadedVTs.size() && 500 "Invalid matching number!"); 501 VT = OverloadedVTs[MatchTy]; 502 // It only makes sense to use the extended and truncated vector element 503 // variants with iAny types; otherwise, if the intrinsic is not 504 // overloaded, all the types can be specified directly. 505 assert(((!TyEl->isSubClassOf("LLVMExtendedElementVectorType") && 506 !TyEl->isSubClassOf("LLVMTruncatedElementVectorType")) || 507 VT == MVT::iAny || VT == MVT::vAny) && 508 "Expected iAny or vAny type"); 509 } else 510 VT = getValueType(TyEl->getValueAsDef("VT")); 511 512 if (EVT(VT).isOverloaded()) { 513 OverloadedVTs.push_back(VT); 514 isOverloaded = true; 515 } 516 517 // Reject invalid types. 518 if (VT == MVT::isVoid && i != e-1 /*void at end means varargs*/) 519 PrintFatalError("Intrinsic '" + DefName + " has void in result type list!"); 520 521 IS.ParamVTs.push_back(VT); 522 IS.ParamTypeDefs.push_back(TyEl); 523 } 524 525 // Parse the intrinsic properties. 526 ListInit *PropList = R->getValueAsListInit("Properties"); 527 for (unsigned i = 0, e = PropList->getSize(); i != e; ++i) { 528 Record *Property = PropList->getElementAsRecord(i); 529 assert(Property->isSubClassOf("IntrinsicProperty") && 530 "Expected a property!"); 531 532 if (Property->getName() == "IntrNoMem") 533 ModRef = NoMem; 534 else if (Property->getName() == "IntrReadArgMem") 535 ModRef = ReadArgMem; 536 else if (Property->getName() == "IntrReadMem") 537 ModRef = ReadMem; 538 else if (Property->getName() == "IntrReadWriteArgMem") 539 ModRef = ReadWriteArgMem; 540 else if (Property->getName() == "Commutative") 541 isCommutative = true; 542 else if (Property->getName() == "Throws") 543 canThrow = true; 544 else if (Property->getName() == "IntrNoReturn") 545 isNoReturn = true; 546 else if (Property->isSubClassOf("NoCapture")) { 547 unsigned ArgNo = Property->getValueAsInt("ArgNo"); 548 ArgumentAttributes.push_back(std::make_pair(ArgNo, NoCapture)); 549 } else 550 llvm_unreachable("Unknown property!"); 551 } 552 553 // Sort the argument attributes for later benefit. 554 std::sort(ArgumentAttributes.begin(), ArgumentAttributes.end()); 555 } 556