Searched refs:VirtReg (Results 1 - 25 of 25) sorted by relevance

/external/llvm/lib/CodeGen/
H A DLiveRegMatrix.cpp72 void LiveRegMatrix::assign(LiveInterval &VirtReg, unsigned PhysReg) { argument
73 DEBUG(dbgs() << "assigning " << PrintReg(VirtReg.reg, TRI)
75 assert(!VRM->hasPhys(VirtReg.reg) && "Duplicate VirtReg assignment");
76 VRM->assignVirt2Phys(VirtReg.reg, PhysReg);
80 Matrix[*Units].unify(VirtReg);
86 void LiveRegMatrix::unassign(LiveInterval &VirtReg) { argument
87 unsigned PhysReg = VRM->getPhys(VirtReg.reg);
88 DEBUG(dbgs() << "unassigning " << PrintReg(VirtReg.reg, TRI)
90 VRM->clearVirt(VirtReg
99 checkRegMaskInterference(LiveInterval &VirtReg, unsigned PhysReg) argument
117 checkRegUnitInterference(LiveInterval &VirtReg, unsigned PhysReg) argument
128 query(LiveInterval &VirtReg, unsigned RegUnit) argument
136 checkInterference(LiveInterval &VirtReg, unsigned PhysReg) argument
[all...]
H A DLiveIntervalUnion.cpp28 void LiveIntervalUnion::unify(LiveInterval &VirtReg) { argument
29 if (VirtReg.empty())
34 LiveInterval::iterator RegPos = VirtReg.begin();
35 LiveInterval::iterator RegEnd = VirtReg.end();
39 SegPos.insert(RegPos->start, RegPos->end, &VirtReg);
49 SegPos.insert(RegEnd->start, RegEnd->end, &VirtReg);
51 SegPos.insert(RegPos->start, RegPos->end, &VirtReg);
55 void LiveIntervalUnion::extract(LiveInterval &VirtReg) { argument
56 if (VirtReg.empty())
61 LiveInterval::iterator RegPos = VirtReg
[all...]
H A DRegAllocBase.cpp84 while (LiveInterval *VirtReg = dequeue()) {
85 assert(!VRM->hasPhys(VirtReg->reg) && "Register already assigned");
88 if (MRI->reg_nodbg_empty(VirtReg->reg)) {
89 DEBUG(dbgs() << "Dropping unused " << *VirtReg << '\n');
90 LIS->removeInterval(VirtReg->reg);
101 << MRI->getRegClass(VirtReg->reg)->getName()
102 << ':' << PrintReg(VirtReg->reg) << ' ' << *VirtReg << '\n');
105 unsigned AvailablePhysReg = selectOrSplit(*VirtReg, SplitVRegs);
112 for (MachineRegisterInfo::reg_iterator I = MRI->reg_begin(VirtReg
[all...]
H A DAllocationOrder.cpp29 AllocationOrder::AllocationOrder(unsigned VirtReg, argument
35 Order = RegClassInfo.getOrder(MF.getRegInfo().getRegClass(VirtReg));
36 TRI->getRegAllocationHints(VirtReg, Order, Hints, MF, &VRM);
H A DRegAllocFast.cpp72 unsigned VirtReg; // Virtual register number. member in struct:__anon21193::RAFast::LiveReg
78 : LastUse(0), VirtReg(v), PhysReg(0), LastOpNum(0), Dirty(false) {}
81 return TargetRegisterInfo::virtReg2Index(VirtReg);
167 int getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC);
172 void killVirtReg(unsigned VirtReg);
174 void spillVirtReg(MachineBasicBlock::iterator MI, unsigned VirtReg);
180 LiveRegMap::iterator findLiveVirtReg(unsigned VirtReg) { argument
181 return LiveVirtRegs.find(TargetRegisterInfo::virtReg2Index(VirtReg));
183 LiveRegMap::const_iterator findLiveVirtReg(unsigned VirtReg) const {
184 return LiveVirtRegs.find(TargetRegisterInfo::virtReg2Index(VirtReg));
201 getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) argument
256 killVirtReg(unsigned VirtReg) argument
266 spillVirtReg(MachineBasicBlock::iterator MI, unsigned VirtReg) argument
499 assignVirtToPhysReg(unsigned VirtReg, unsigned PhysReg) argument
510 const unsigned VirtReg = LRI->VirtReg; local
579 defineVirtReg(MachineInstr *MI, unsigned OpNum, unsigned VirtReg, unsigned Hint) argument
612 reloadVirtReg(MachineInstr *MI, unsigned OpNum, unsigned VirtReg, unsigned Hint) argument
[all...]
H A DRegAllocBasic.cpp104 virtual unsigned selectOrSplit(LiveInterval &VirtReg,
113 bool spillInterferences(LiveInterval &VirtReg, unsigned PhysReg,
168 // that interfere with VirtReg. The newly spilled or split live intervals are
170 bool RABasic::spillInterferences(LiveInterval &VirtReg, unsigned PhysReg, argument
178 LiveIntervalUnion::Query &Q = Matrix->query(VirtReg, *Units);
184 if (!Intf->isSpillable() || Intf->weight > VirtReg.weight)
190 " interferences with " << VirtReg << "\n");
224 unsigned RABasic::selectOrSplit(LiveInterval &VirtReg, argument
230 AllocationOrder Order(VirtReg.reg, *VRM, RegClassInfo);
233 switch (Matrix->checkInterference(VirtReg, PhysRe
[all...]
H A DRegisterCoalescer.h68 CoalescerPair(unsigned VirtReg, unsigned PhysReg, argument
70 : TRI(tri), DstReg(PhysReg), SrcReg(VirtReg), DstIdx(0), SrcIdx(0),
H A DRegAllocGreedy.cpp137 LiveRangeStage getStage(const LiveInterval &VirtReg) const {
138 return ExtraRegInfo[VirtReg.reg].Stage;
141 void setStage(const LiveInterval &VirtReg, LiveRangeStage Stage) { argument
143 ExtraRegInfo[VirtReg.reg].Stage = Stage;
264 unsigned canReassign(LiveInterval &VirtReg, unsigned PhysReg);
359 bool RAGreedy::LRE_CanEraseVirtReg(unsigned VirtReg) { argument
360 if (VRM->hasPhys(VirtReg)) {
361 Matrix->unassign(LIS->getInterval(VirtReg));
369 void RAGreedy::LRE_WillShrinkVirtReg(unsigned VirtReg) { argument
370 if (!VRM->hasPhys(VirtReg))
456 tryAssign(LiveInterval &VirtReg, AllocationOrder &Order, SmallVectorImpl<LiveInterval*> &NewVRegs) argument
499 canReassign(LiveInterval &VirtReg, unsigned PrevReg) argument
558 canEvictInterference(LiveInterval &VirtReg, unsigned PhysReg, bool IsHint, EvictionCost &MaxCost) argument
640 evictInterference(LiveInterval &VirtReg, unsigned PhysReg, SmallVectorImpl<LiveInterval*> &NewVRegs) argument
681 tryEvict(LiveInterval &VirtReg, AllocationOrder &Order, SmallVectorImpl<LiveInterval*> &NewVRegs, unsigned CostPerUseLimit) argument
[all...]
H A DVirtRegMap.cpp80 bool VirtRegMap::hasPreferredPhys(unsigned VirtReg) { argument
81 unsigned Hint = MRI->getSimpleHint(VirtReg);
86 return getPhys(VirtReg) == Hint;
89 bool VirtRegMap::hasKnownPreference(unsigned VirtReg) { argument
90 std::pair<unsigned, unsigned> Hint = MRI->getRegAllocationHint(VirtReg);
239 unsigned VirtReg = TargetRegisterInfo::index2VirtReg(Idx); local
240 if (MRI->reg_nodbg_empty(VirtReg))
242 LiveInterval &LI = LIS->getInterval(VirtReg);
247 unsigned PhysReg = VRM->getPhys(VirtReg);
286 unsigned VirtReg local
[all...]
H A DAllocationOrder.h34 /// Create a new AllocationOrder for VirtReg.
35 /// @param VirtReg Virtual register to allocate for.
38 AllocationOrder(unsigned VirtReg,
H A DRegAllocBase.h82 /// enqueue - Add VirtReg to the priority queue of unassigned registers.
92 virtual unsigned selectOrSplit(LiveInterval &VirtReg,
H A DLiveDebugVariables.cpp307 /// lookupVirtReg - Find the EC leader for VirtReg or null.
308 UserValue *lookupVirtReg(unsigned VirtReg);
345 void mapVirtReg(unsigned VirtReg, UserValue *EC);
436 void LDVImpl::mapVirtReg(unsigned VirtReg, UserValue *EC) { argument
437 assert(TargetRegisterInfo::isVirtualRegister(VirtReg) && "Only map VirtRegs");
438 UserValue *&Leader = virtRegToEqClass[VirtReg];
442 UserValue *LDVImpl::lookupVirtReg(unsigned VirtReg) { argument
443 if (UserValue *UV = virtRegToEqClass.lookup(VirtReg))
874 unsigned VirtReg = Loc.getReg(); local
875 if (VRM.isAssignedReg(VirtReg)
[all...]
H A DTargetRegisterInfo.cpp256 TargetRegisterInfo::getRegAllocationHints(unsigned VirtReg, argument
262 std::pair<unsigned, unsigned> Hint = MRI.getRegAllocationHint(VirtReg);
274 // Check that Phys is a valid hint in VirtReg's register class.
280 // from VirtReg's register class if they aren't in the allocation order. The
H A DInlineSpiller.cpp837 bool InlineSpiller::reMaterializeFor(LiveInterval &VirtReg, argument
840 VNInfo *ParentVNI = VirtReg.getVNInfoAt(UseIdx.getBaseIndex());
846 if (MO.isReg() && MO.isUse() && MO.getReg() == VirtReg.reg)
862 markValueUsed(&VirtReg, ParentVNI);
867 // If the instruction also writes VirtReg.reg, it had better not require the
871 MIBundleOperands(MI).analyzeVirtReg(VirtReg.reg, &Ops);
873 markValueUsed(&VirtReg, ParentVNI);
900 if (MO.isReg() && MO.isUse() && MO.getReg() == VirtReg.reg) {
H A DMachineBasicBlock.cpp362 unsigned VirtReg = I->getOperand(0).getReg(); local
363 if (!MRI.constrainRegClass(VirtReg, RC))
365 return VirtReg;
369 unsigned VirtReg = MRI.createVirtualRegister(RC); local
370 BuildMI(*this, I, DebugLoc(), TII.get(TargetOpcode::COPY), VirtReg)
374 return VirtReg;
H A DPHIElimination.cpp197 /// isImplicitlyDefined - Return true if all defs of VirtReg are implicit-defs.
199 static bool isImplicitlyDefined(unsigned VirtReg, argument
201 for (MachineRegisterInfo::def_iterator DI = MRI->def_begin(VirtReg),
H A DMachineTraceMetrics.cpp625 DataDep(const MachineRegisterInfo *MRI, unsigned VirtReg, unsigned UseOp)
627 assert(TargetRegisterInfo::isVirtualRegister(VirtReg));
628 MachineRegisterInfo::def_iterator DefI = MRI->def_begin(VirtReg);
/external/llvm/include/llvm/CodeGen/
H A DLiveRegMatrix.h98 /// VirtReg is live across a call, and PhysReg isn't call-preserved.
102 /// Check for interference before assigning VirtReg to PhysReg.
103 /// If this function returns IK_Free, it is legal to assign(VirtReg, PhysReg).
106 InterferenceKind checkInterference(LiveInterval &VirtReg, unsigned PhysReg);
108 /// Assign VirtReg to PhysReg.
109 /// This will mark VirtReg's live range as occupied in the LiveRegMatrix and
111 void assign(LiveInterval &VirtReg, unsigned PhysReg);
113 /// Unassign VirtReg from its PhysReg.
114 /// Assuming that VirtReg was previously assigned to a PhysReg, this undoes
116 void unassign(LiveInterval &VirtReg);
[all...]
H A DLiveIntervalUnion.h87 void unify(LiveInterval &VirtReg);
90 void extract(LiveInterval &VirtReg);
107 LiveInterval *VirtReg; member in class:llvm::LiveIntervalUnion::Query
108 LiveInterval::iterator VirtRegI; // current position in VirtReg
117 Query(): LiveUnion(), VirtReg(), Tag(0), UserTag(0) {}
120 LiveUnion(LIU), VirtReg(VReg), CheckedFirstInterference(false),
126 VirtReg = NULL;
137 if (UserTag == UTag && VirtReg == VReg &&
144 VirtReg = VReg;
150 assert(VirtReg
[all...]
H A DVirtRegMap.h129 /// @brief returns true if VirtReg is assigned to its preferred physreg.
130 bool hasPreferredPhys(unsigned VirtReg);
132 /// @brief returns true if VirtReg has a known preferred register.
133 /// This returns false if VirtReg has a preference that is a virtual
135 bool hasKnownPreference(unsigned VirtReg);
147 /// getOriginal - Return the original virtual register that VirtReg descends
151 unsigned getOriginal(unsigned VirtReg) const {
152 unsigned Orig = getPreSplitReg(VirtReg);
153 return Orig ? Orig : VirtReg;
H A DScheduleDAGInstrs.h34 unsigned VirtReg; member in struct:llvm::VReg2SUnit
37 VReg2SUnit(unsigned reg, SUnit *su): VirtReg(reg), SU(su) {}
40 return TargetRegisterInfo::virtReg2Index(VirtReg);
H A DRegisterPressure.h333 bool hasUntiedDef(unsigned VirtReg) const {
334 return UntiedDefs.count(VirtReg);
/external/llvm/lib/Target/ARM/
H A DARMBaseRegisterInfo.h122 void getRegAllocationHints(unsigned VirtReg,
H A DARMBaseRegisterInfo.cpp196 ARMBaseRegisterInfo::getRegAllocationHints(unsigned VirtReg, argument
202 std::pair<unsigned, unsigned> Hint = MRI.getRegAllocationHint(VirtReg);
213 TargetRegisterInfo::getRegAllocationHints(VirtReg, Order, Hints, MF, VRM);
/external/llvm/include/llvm/Target/
H A DTargetRegisterInfo.h638 /// VirtReg. These registers are effectively moved to the front of the
641 /// The Order argument is the allocation order for VirtReg's register class
649 /// order for VirtReg. There may be target-independent hints.
650 virtual void getRegAllocationHints(unsigned VirtReg,

Completed in 845 milliseconds