summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-10-01 09:04:18 +0000
committerBill Wendling <isanbard@gmail.com>2011-10-01 09:04:18 +0000
commit9ff05f740f1ce64e6da0bad03c3eed81ead78b61 (patch)
treeef77e462dc1c0410d97bbce4b0c259788b151a07 /llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
parentc214cb055d8697ea2e11b48076ef069148f065aa (diff)
downloadbcm5719-llvm-9ff05f740f1ce64e6da0bad03c3eed81ead78b61.tar.gz
bcm5719-llvm-9ff05f740f1ce64e6da0bad03c3eed81ead78b61.zip
Remove now dead methods and ivar.
llvm-svn: 140940
Diffstat (limited to 'llvm/lib/Target/ARM/ARMConstantPoolValue.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMConstantPoolValue.cpp40
1 files changed, 12 insertions, 28 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp b/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
index 63af7382673..4d90e7e8f20 100644
--- a/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
+++ b/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
@@ -31,7 +31,7 @@ ARMConstantPoolValue::ARMConstantPoolValue(Type *Ty, unsigned id,
unsigned char PCAdj,
ARMCP::ARMCPModifier modifier,
bool addCurrentAddress)
- : MachineConstantPoolValue(Ty), MBB(NULL), S(NULL), LabelId(id), Kind(kind),
+ : MachineConstantPoolValue(Ty), MBB(NULL), LabelId(id), Kind(kind),
PCAdjust(PCAdj), Modifier(modifier),
AddCurrentAddress(addCurrentAddress) {}
@@ -41,7 +41,7 @@ ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C, unsigned id,
ARMCP::ARMCPModifier modifier,
bool addCurrentAddress)
: MachineConstantPoolValue((Type*)Type::getInt32Ty(C)),
- S(NULL), LabelId(id), Kind(kind), PCAdjust(PCAdj), Modifier(modifier),
+ LabelId(id), Kind(kind), PCAdjust(PCAdj), Modifier(modifier),
AddCurrentAddress(addCurrentAddress) {}
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
@@ -52,21 +52,10 @@ ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
ARMCP::ARMCPModifier Modif,
bool AddCA)
: MachineConstantPoolValue((Type*)Type::getInt8PtrTy(C)),
- MBB(mbb), S(NULL), LabelId(id), Kind(K), PCAdjust(PCAdj),
+ MBB(mbb), LabelId(id), Kind(K), PCAdjust(PCAdj),
Modifier(Modif), AddCurrentAddress(AddCA) {}
-ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
- const char *s, unsigned id,
- unsigned char PCAdj,
- ARMCP::ARMCPModifier Modif,
- bool AddCA)
- : MachineConstantPoolValue((Type*)Type::getInt32Ty(C)),
- S(strdup(s)), LabelId(id), Kind(ARMCP::CPExtSymbol),
- PCAdjust(PCAdj), Modifier(Modif), AddCurrentAddress(AddCA) {}
-
-ARMConstantPoolValue::~ARMConstantPoolValue() {
- free((void*)S);
-}
+ARMConstantPoolValue::~ARMConstantPoolValue() {}
const MachineBasicBlock *ARMConstantPoolValue::getMBB() const {
return MBB;
@@ -86,14 +75,6 @@ const char *ARMConstantPoolValue::getModifierText() const {
}
}
-static bool CPV_streq(const char *S1, const char *S2) {
- if (S1 == S2)
- return true;
- if (S1 && S2 && strcmp(S1, S2) == 0)
- return true;
- return false;
-}
-
int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
unsigned Alignment) {
unsigned AlignMask = Alignment - 1;
@@ -105,7 +86,6 @@ int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
(ARMConstantPoolValue *)Constants[i].Val.MachineCPVal;
if (CPV->LabelId == LabelId &&
CPV->PCAdjust == PCAdjust &&
- CPV_streq(CPV->S, S) &&
CPV->Modifier == Modifier)
return i;
}
@@ -116,7 +96,6 @@ int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
void
ARMConstantPoolValue::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
- ID.AddPointer(S);
ID.AddInteger(LabelId);
ID.AddInteger(PCAdjust);
}
@@ -125,7 +104,6 @@ bool
ARMConstantPoolValue::hasSameValue(ARMConstantPoolValue *ACPV) {
if (ACPV->Kind == Kind &&
ACPV->PCAdjust == PCAdjust &&
- CPV_streq(ACPV->S, S) &&
ACPV->Modifier == Modifier) {
if (ACPV->LabelId == LabelId)
return true;
@@ -144,8 +122,6 @@ void ARMConstantPoolValue::dump() const {
void ARMConstantPoolValue::print(raw_ostream &O) const {
if (MBB)
O << "";
- else
- O << S;
if (Modifier) O << "(" << getModifierText() << ")";
if (PCAdjust != 0) {
O << "-(LPC" << LabelId << "+" << (unsigned)PCAdjust;
@@ -286,6 +262,14 @@ ARMConstantPoolSymbol::Create(LLVMContext &C, const char *s,
AddCurrentAddress);
}
+static bool CPV_streq(const char *S1, const char *S2) {
+ if (S1 == S2)
+ return true;
+ if (S1 && S2 && strcmp(S1, S2) == 0)
+ return true;
+ return false;
+}
+
int ARMConstantPoolSymbol::getExistingMachineCPValue(MachineConstantPool *CP,
unsigned Alignment) {
unsigned AlignMask = Alignment - 1;
OpenPOWER on IntegriCloud