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 {
810
810
void setRegAllocationHint (Register VReg, unsigned Type, Register PrefReg) {
811
811
assert (VReg.isVirtual ());
812
812
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);
816
817
}
817
818
818
819
// / addRegAllocationHint - Add a register allocation hint to the hints
@@ -843,9 +844,9 @@ class MachineRegisterInfo {
843
844
assert (VReg.isVirtual ());
844
845
if (!RegAllocHints.inBounds (VReg))
845
846
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};
849
850
}
850
851
851
852
// / getSimpleHint - same as getRegAllocationHint except it will only return
You can’t perform that action at this time.
0 commit comments