Lines Matching refs:Summary
194 void HexagonShuffler::restrictSlot1AOK(HexagonPacketSummary const &Summary) { in restrictSlot1AOK() argument
195 if (Summary.Slot1AOKLoc) in restrictSlot1AOK()
209 *Summary.Slot1AOKLoc, "Instruction can only be combined " in restrictSlot1AOK()
218 HexagonPacketSummary const &Summary) { in restrictNoSlot1Store() argument
223 if (!Summary.NoSlot1StoreLoc) in restrictNoSlot1Store()
243 std::make_pair(*Summary.NoSlot1StoreLoc, in restrictNoSlot1Store()
248 HexagonPacketSummary const &Summary) { in applySlotRestrictions() argument
252 restrictSlot1AOK(Summary); in applySlotRestrictions()
253 restrictNoSlot1Store(Summary); in applySlotRestrictions()
261 restrictStoreLoadOrder(Summary); in applySlotRestrictions()
263 restrictBranchOrder(Summary); in applySlotRestrictions()
265 restrictPreferSlot3(Summary); in applySlotRestrictions()
269 void HexagonShuffler::restrictBranchOrder(HexagonPacketSummary const &Summary) { in restrictBranchOrder() argument
271 const bool HasMultipleBranches = Summary.branchInsts.size() > 1; in restrictBranchOrder()
275 if (Summary.branchInsts.size() > 2) { in restrictBranchOrder()
285 if (!(jumpSlot.first & Summary.branchInsts[0]->Core.getUnits())) in restrictBranchOrder()
289 if (!(jumpSlot.second & Summary.branchInsts[1]->Core.getUnits())) in restrictBranchOrder()
294 Summary.branchInsts[0]->Core.setUnits(jumpSlot.first); in restrictBranchOrder()
295 Summary.branchInsts[1]->Core.setUnits(jumpSlot.second); in restrictBranchOrder()
297 const bool HasShuffledPacket = tryAuction(Summary).hasValue(); in restrictBranchOrder()
318 bool HexagonShuffler::ValidResourceUsage(HexagonPacketSummary const &Summary) { in ValidResourceUsage() argument
319 Optional<HexagonPacket> ShuffledPacket = tryAuction(Summary); in ValidResourceUsage()
356 HexagonPacketSummary const &Summary) { in restrictStoreLoadOrder() argument
372 if (Summary.loads == 1 && Summary.loads == Summary.memory && in restrictStoreLoadOrder()
373 Summary.memops == 0) in restrictStoreLoadOrder()
388 else if (Summary.loads >= 1 && isMemReorderDisabled()) { // }:mem_noshuf in restrictStoreLoadOrder()
405 if (!Summary.store0) { in restrictStoreLoadOrder()
412 (Summary.loads == 0) || in restrictStoreLoadOrder()
415 if (Summary.stores == 1 && SafeToMoveToSlot0) in restrictStoreLoadOrder()
418 else if (Summary.stores >= 1) { in restrictStoreLoadOrder()
430 if (Summary.store1 && Summary.stores > 1) { in restrictStoreLoadOrder()
442 HexagonPacketSummary Summary = HexagonPacketSummary(); in GetPacketSummary() local
449 Summary.Slot1AOKLoc = ID.getLoc(); in GetPacketSummary()
451 Summary.NoSlot1StoreLoc = ID.getLoc(); in GetPacketSummary()
454 ++Summary.pSlot3Cnt; in GetPacketSummary()
455 Summary.PrefSlot3Inst = ISJ; in GetPacketSummary()
457 Summary.ReservedSlotMask |= in GetPacketSummary()
466 Summary.branchInsts.push_back(ISJ); in GetPacketSummary()
474 ++Summary.NonZCVIloads; in GetPacketSummary()
477 ++Summary.AllCVIloads; in GetPacketSummary()
480 ++Summary.loads; in GetPacketSummary()
481 ++Summary.memory; in GetPacketSummary()
484 ++Summary.load0; in GetPacketSummary()
486 Summary.branchInsts.push_back(ISJ); in GetPacketSummary()
496 ++Summary.CVIstores; in GetPacketSummary()
499 ++Summary.stores; in GetPacketSummary()
500 ++Summary.memory; in GetPacketSummary()
503 ++Summary.store0; in GetPacketSummary()
506 ++Summary.loads; in GetPacketSummary()
507 ++Summary.stores; in GetPacketSummary()
508 ++Summary.store1; in GetPacketSummary()
509 ++Summary.memops; in GetPacketSummary()
510 ++Summary.memory; in GetPacketSummary()
513 ++Summary.memory; // NV insns are memory-like. in GetPacketSummary()
514 Summary.branchInsts.push_back(ISJ); in GetPacketSummary()
518 ++Summary.loads; in GetPacketSummary()
519 ++Summary.memory; in GetPacketSummary()
523 ++Summary.load0; in GetPacketSummary()
526 ++Summary.memory; in GetPacketSummary()
527 ++Summary.stores; in GetPacketSummary()
534 Summary.branchInsts.push_back(ISJ); in GetPacketSummary()
537 ++Summary.duplex; in GetPacketSummary()
541 Summary.branchInsts.push_back(ISJ); in GetPacketSummary()
543 Summary.branchInsts.push_back(ISJ); in GetPacketSummary()
545 Summary.branchInsts.push_back(ISJ); in GetPacketSummary()
547 Summary.branchInsts.push_back(ISJ); in GetPacketSummary()
552 return Summary; in GetPacketSummary()
556 HexagonPacketSummary const &Summary) const { in ValidPacketMemoryOps()
558 const unsigned ZCVIloads = Summary.AllCVIloads - Summary.NonZCVIloads; in ValidPacketMemoryOps()
560 Summary.NonZCVIloads <= 1 && ZCVIloads <= 1 && Summary.CVIstores <= 1; in ValidPacketMemoryOps()
562 ((Summary.load0 > 1 || Summary.store0 > 1 || !ValidHVXMem) || in ValidPacketMemoryOps()
563 (Summary.duplex > 1 || (Summary.duplex && Summary.memory))); in ValidPacketMemoryOps()
568 void HexagonShuffler::restrictPreferSlot3(HexagonPacketSummary const &Summary) { in restrictPreferSlot3() argument
574 (Summary.branchInsts.size() <= 1 && !HasOnlySlot3 && in restrictPreferSlot3()
575 Summary.pSlot3Cnt == 1 && Summary.PrefSlot3Inst); in restrictPreferSlot3()
580 HexagonInstr *PrefSlot3Inst = *Summary.PrefSlot3Inst; in restrictPreferSlot3()
585 const bool HasShuffledPacket = tryAuction(Summary).hasValue(); in restrictPreferSlot3()
594 const HexagonPacketSummary Summary = GetPacketSummary(); in check() local
595 if (!applySlotRestrictions(Summary)) in check()
598 if (!ValidPacketMemoryOps(Summary)) { in check()
603 ValidResourceUsage(Summary); in check()
609 HexagonShuffler::tryAuction(HexagonPacketSummary const &Summary) const { in tryAuction()
611 HexagonUnitAuction AuctionCore(Summary.ReservedSlotMask); in tryAuction()