Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/CodeGen/LiveRegUnits.h
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 47 | static void accumulateUsedDefed(const MachineInstr &MI, | |||
---|---|---|---|---|---|
48 | LiveRegUnits &ModifiedRegUnits, | 48 | LiveRegUnits &ModifiedRegUnits, | ||
49 | LiveRegUnits &UsedRegUnits, | 49 | LiveRegUnits &UsedRegUnits, | ||
50 | const TargetRegisterInfo *TRI) { | 50 | const TargetRegisterInfo *TRI) { | ||
51 | for (ConstMIBundleOperands O(MI); O.isValid(); ++O) { | 51 | for (ConstMIBundleOperands O(MI); O.isValid(); ++O) { | ||
52 | if (O->isRegMask()) | 52 | if (O->isRegMask()) | ||
53 | ModifiedRegUnits.addRegsInMask(O->getRegMask()); | 53 | ModifiedRegUnits.addRegsInMask(O->getRegMask()); | ||
54 | if (!O->isReg()) | 54 | if (!O->isReg()) | ||
55 | continue; | 55 | continue; | ||
56 | unsigned Reg = O->getReg(); | 56 | Register Reg = O->getReg(); | ||
57 | if (!Register::isPhysicalRegister(Reg)) | 57 | if (!Reg.isPhysical()) | ||
58 | continue; | 58 | continue; | ||
59 | if (O->isDef()) { | 59 | if (O->isDef()) { | ||
60 | // Some architectures (e.g. AArch64 XZR/WZR) have registers that are | 60 | // Some architectures (e.g. AArch64 XZR/WZR) have registers that are | ||
61 | // constant and may be used as destinations to indicate the generated | 61 | // constant and may be used as destinations to indicate the generated | ||
62 | // value is discarded. No need to track such case as a def. | 62 | // value is discarded. No need to track such case as a def. | ||
63 | if (!TRI->isConstantPhysReg(Reg)) | 63 | if (!TRI->isConstantPhysReg(Reg)) | ||
64 | ModifiedRegUnits.addReg(Reg); | 64 | ModifiedRegUnits.addReg(Reg); | ||
65 | } else { | 65 | } else { | ||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |