File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
llvm/include/llvm/CodeGen Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -810,9 +810,10 @@ class MachineRegisterInfo {
810810 void setRegAllocationHint (Register VReg, unsigned Type, Register PrefReg) {
811811 assert (VReg.isVirtual ());
812812 RegAllocHints.grow (Register::index2VirtReg (getNumVirtRegs ()));
813- RegAllocHints[VReg].first = Type;
814- RegAllocHints[VReg].second .clear ();
815- RegAllocHints[VReg].second .push_back (PrefReg);
813+ auto &Hint = RegAllocHints[VReg];
814+ Hint.first = Type;
815+ Hint.second .clear ();
816+ Hint.second .push_back (PrefReg);
816817 }
817818
818819 // / addRegAllocationHint - Add a register allocation hint to the hints
@@ -843,9 +844,9 @@ class MachineRegisterInfo {
843844 assert (VReg.isVirtual ());
844845 if (!RegAllocHints.inBounds (VReg))
845846 return {0 , Register ()};
846- Register BestHint = ( RegAllocHints[VReg.id ()]. second . size () ?
847- RegAllocHints[VReg. id ()] .second [0 ] : Register ());
848- return {RegAllocHints[VReg. id ()] .first , BestHint};
847+ auto &Hint = RegAllocHints[VReg.id ()];
848+ Register BestHint = (Hint. second . size () ? Hint .second [0 ] : Register ());
849+ return {Hint .first , BestHint};
849850 }
850851
851852 // / getSimpleHint - same as getRegAllocationHint except it will only return
You can’t perform that action at this time.
0 commit comments