As a fix for https://bugs.llvm.org/show_bug.cgi?id=40986 ("excessive compile time building opencollada"), this patch makes sure that no phys reg is hinted more than once from getRegAllocationHints().
This handles the case were many virtual registers are assigned to the same physreg. The previous compile time fix (r343686) in weightCalcHelper() only made sure that physical / virtual registers are passed no more than once to addRegAllocationHint().
I am not sure if perhaps this check (with a HintedRegs set) is actually only needed in TargetRegisterInfo::getRegAllocationHints(), so that the one in weightCalcHelper() should be removed?
Do we need the IR part?
(I.e., does anything in the MIR reference back the IR?)