Fix for machine licm assert: RCCost <= RegPressure[RCId]

in MultiSource/Benchmarks/VersaBench/beamformer/beamformer.
SmallSet.insert returns true if the element is inserted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116790 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick 2010-10-19 02:50:50 +00:00
parent 19785995f6
commit dc986d2462

View File

@ -604,7 +604,7 @@ void MachineLICM::InitRegPressure(MachineBasicBlock *BB) {
if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg))
continue;
bool isNew = !RegSeen.insert(Reg);
bool isNew = RegSeen.insert(Reg);
const TargetRegisterClass *RC = MRI->getRegClass(Reg);
EVT VT = *RC->vt_begin();
unsigned RCId = TLI->getRepRegClassFor(VT)->getID();
@ -634,7 +634,7 @@ void MachineLICM::UpdateRegPressureBefore(const MachineInstr *MI) {
if (!Reg || TargetRegisterInfo::isPhysicalRegister(Reg))
continue;
bool isNew = !RegSeen.insert(Reg);
bool isNew = RegSeen.insert(Reg);
if (NoImpact)
continue;