(Constants[i].getAlignment() & AlignMask) == 0) {
ARMConstantPoolValue *CPV =
(ARMConstantPoolValue *)Constants[i].Val.MachineCPVal;
- if (CPV->LabelId == LabelId &&
- CPV->PCAdjust == PCAdjust &&
- CPV->Modifier == Modifier)
+ if (this->equals(CPV))
return i;
}
}
(ARMConstantPoolValue *)Constants[i].Val.MachineCPVal;
ARMConstantPoolConstant *APC = dyn_cast<ARMConstantPoolConstant>(CPV);
if (!APC) continue;
-
- if (APC->getGV() == this->CVal &&
- APC->getLabelId() == this->getLabelId() &&
- APC->getPCAdjustment() == this->getPCAdjustment() &&
- APC->getModifier() == this->getModifier())
+ if (APC->CVal == CVal && equals(APC))
return i;
}
}
ARMConstantPoolSymbol *APS = dyn_cast<ARMConstantPoolSymbol>(CPV);
if (!APS) continue;
- if (APS->getLabelId() == this->getLabelId() &&
- APS->getPCAdjustment() == this->getPCAdjustment() &&
- CPV_streq(APS->getSymbol(), this->getSymbol()) &&
- APS->getModifier() == this->getModifier())
+ if (CPV_streq(APS->S, S) && equals(APS))
return i;
}
}
ARMConstantPoolMBB *APMBB = dyn_cast<ARMConstantPoolMBB>(CPV);
if (!APMBB) continue;
- if (APMBB->getLabelId() == this->getLabelId() &&
- APMBB->getPCAdjustment() == this->getPCAdjustment() &&
- APMBB->getMBB() == this->getMBB() &&
- APMBB->getModifier() == this->getModifier())
+ if (APMBB->MBB == MBB && equals(APMBB))
return i;
}
}
/// constantpool entry as another ARM constpool value.
virtual bool hasSameValue(ARMConstantPoolValue *ACPV);
+ bool equals(const ARMConstantPoolValue *A) const {
+ return this->LabelId == A->LabelId &&
+ this->PCAdjust == A->PCAdjust &&
+ this->Modifier == A->Modifier;
+ }
+
virtual void print(raw_ostream &O) const;
void print(raw_ostream *O) const { if (O) print(*O); }
void dump() const;