Lines Matching +full:cycle +full:-
1 //===- MachineCycleAnalysis.cpp - Compute CycleInfo for Machine IR --------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
29 INITIALIZE_PASS_BEGIN(MachineCycleInfoWrapperPass, "machine-cycles",
30 "Machine Cycle Info Analysis", true, true)
31 INITIALIZE_PASS_END(MachineCycleInfoWrapperPass, "machine-cycles",
32 "Machine Cycle Info Analysis", true, true)
48 OS << "MachineCycleInfo for function: " << F->getName() << "\n"; in print()
76 INITIALIZE_PASS_BEGIN(MachineCycleInfoPrinterPass, "print-machine-cycles",
77 "Print Machine Cycle Info Analysis", true, true)
79 INITIALIZE_PASS_END(MachineCycleInfoPrinterPass, "print-machine-cycles", in INITIALIZE_PASS_DEPENDENCY()
80 "Print Machine Cycle Info Analysis", true, true) in INITIALIZE_PASS_DEPENDENCY()
94 bool llvm::isCycleInvariant(const MachineCycle *Cycle, MachineInstr &I) { in isCycleInvariant() argument
95 MachineFunction *MF = I.getParent()->getParent(); in isCycleInvariant()
96 MachineRegisterInfo *MRI = &MF->getRegInfo(); in isCycleInvariant()
97 const TargetSubtargetInfo &ST = MF->getSubtarget(); in isCycleInvariant()
101 // The instruction is cycle invariant if all of its operands are. in isCycleInvariant()
119 if (!MRI->isConstantPhysReg(Reg) && in isCycleInvariant()
120 !(TRI->isCallerPreservedPhysReg(Reg.asMCReg(), *I.getMF())) && in isCycleInvariant()
121 !TII->isIgnorableUse(MO)) in isCycleInvariant()
128 } else if (any_of(Cycle->getEntries(), in isCycleInvariant()
130 return Block->isLiveIn(Reg); in isCycleInvariant()
132 // If the reg is live into any header of the cycle we can't hoist an in isCycleInvariant()
141 assert(MRI->getVRegDef(Reg) && "Machine instr not mapped for this vreg?!"); in isCycleInvariant()
143 // If the cycle contains the definition of an operand, then the instruction in isCycleInvariant()
144 // isn't cycle invariant. in isCycleInvariant()
145 if (Cycle->contains(MRI->getVRegDef(Reg)->getParent())) in isCycleInvariant()
149 // If we got this far, the instruction is cycle invariant! in isCycleInvariant()