Lines Matching refs:Def
113 static bool isNopCopy(MachineInstr *CopyMI, unsigned Def, unsigned Src,
116 if (Def == SrcSrc)
118 if (TRI->isSubRegister(SrcSrc, Def)) {
120 unsigned SubIdx = TRI->getSubRegIndex(SrcSrc, Def);
141 DenseMap<unsigned, MachineInstr*> AvailCopyMap; // Def -> available copies map
142 DenseMap<unsigned, MachineInstr*> CopyMap; // Def -> copies map
143 SourceMap SrcMap; // Src -> Def map
151 unsigned Def = MI->getOperand(0).getReg();
154 if (TargetRegisterInfo::isVirtualRegister(Def) ||
162 if (!MRI->isReserved(Def) &&
164 isNopCopy(CopyMI, Def, Src, TRI)) {
167 // %ECX<def> = COPY %EAX<kill>
169 // %EAX<def> = COPY %ECX
171 // %ECX<def> = COPY %EAX
175 // %RSP<def> = COPY %RAX
177 // %RAX<def> = COPY %RSP
179 // Clear any kills of Def between CopyMI and MI. This extends the
182 I->clearRegisterKills(Def, TRI);
203 // %xmm9<def> = copy %xmm2
205 // %xmm2<def> = copy %xmm0
207 // %xmm2<def> = copy %xmm9
208 SourceNoLongerAvailable(Def, SrcMap, AvailCopyMap);
210 // Remember Def is defined by the copy.
211 // ... Make sure to clear the def maps of aliases first.
212 for (MCRegAliasIterator AI(Def, TRI, false); AI.isValid(); ++AI) {
216 CopyMap[Def] = MI;
217 AvailCopyMap[Def] = MI;
218 for (MCSubRegIterator SR(Def, TRI); SR.isValid(); ++SR) {
223 // Remember source that's copied to Def. Once it's clobbered, then
225 if (std::find(SrcMap[Src].begin(), SrcMap[Src].end(), Def) ==
227 SrcMap[Src].push_back(Def);