mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-06 14:57:41 +00:00
Remove now dead methods and ivar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140940 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fe31e67350
commit
9aca75c4f8
@ -31,7 +31,7 @@ ARMConstantPoolValue::ARMConstantPoolValue(Type *Ty, unsigned id,
|
|||||||
unsigned char PCAdj,
|
unsigned char PCAdj,
|
||||||
ARMCP::ARMCPModifier modifier,
|
ARMCP::ARMCPModifier modifier,
|
||||||
bool addCurrentAddress)
|
bool addCurrentAddress)
|
||||||
: MachineConstantPoolValue(Ty), MBB(NULL), S(NULL), LabelId(id), Kind(kind),
|
: MachineConstantPoolValue(Ty), MBB(NULL), LabelId(id), Kind(kind),
|
||||||
PCAdjust(PCAdj), Modifier(modifier),
|
PCAdjust(PCAdj), Modifier(modifier),
|
||||||
AddCurrentAddress(addCurrentAddress) {}
|
AddCurrentAddress(addCurrentAddress) {}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C, unsigned id,
|
|||||||
ARMCP::ARMCPModifier modifier,
|
ARMCP::ARMCPModifier modifier,
|
||||||
bool addCurrentAddress)
|
bool addCurrentAddress)
|
||||||
: MachineConstantPoolValue((Type*)Type::getInt32Ty(C)),
|
: 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) {}
|
AddCurrentAddress(addCurrentAddress) {}
|
||||||
|
|
||||||
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
||||||
@ -52,21 +52,10 @@ ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
|||||||
ARMCP::ARMCPModifier Modif,
|
ARMCP::ARMCPModifier Modif,
|
||||||
bool AddCA)
|
bool AddCA)
|
||||||
: MachineConstantPoolValue((Type*)Type::getInt8PtrTy(C)),
|
: 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) {}
|
Modifier(Modif), AddCurrentAddress(AddCA) {}
|
||||||
|
|
||||||
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
ARMConstantPoolValue::~ARMConstantPoolValue() {}
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
const MachineBasicBlock *ARMConstantPoolValue::getMBB() const {
|
const MachineBasicBlock *ARMConstantPoolValue::getMBB() const {
|
||||||
return MBB;
|
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,
|
int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
|
||||||
unsigned Alignment) {
|
unsigned Alignment) {
|
||||||
unsigned AlignMask = Alignment - 1;
|
unsigned AlignMask = Alignment - 1;
|
||||||
@ -105,7 +86,6 @@ int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
|
|||||||
(ARMConstantPoolValue *)Constants[i].Val.MachineCPVal;
|
(ARMConstantPoolValue *)Constants[i].Val.MachineCPVal;
|
||||||
if (CPV->LabelId == LabelId &&
|
if (CPV->LabelId == LabelId &&
|
||||||
CPV->PCAdjust == PCAdjust &&
|
CPV->PCAdjust == PCAdjust &&
|
||||||
CPV_streq(CPV->S, S) &&
|
|
||||||
CPV->Modifier == Modifier)
|
CPV->Modifier == Modifier)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@ -116,7 +96,6 @@ int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
|
|||||||
|
|
||||||
void
|
void
|
||||||
ARMConstantPoolValue::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
|
ARMConstantPoolValue::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
|
||||||
ID.AddPointer(S);
|
|
||||||
ID.AddInteger(LabelId);
|
ID.AddInteger(LabelId);
|
||||||
ID.AddInteger(PCAdjust);
|
ID.AddInteger(PCAdjust);
|
||||||
}
|
}
|
||||||
@ -125,7 +104,6 @@ bool
|
|||||||
ARMConstantPoolValue::hasSameValue(ARMConstantPoolValue *ACPV) {
|
ARMConstantPoolValue::hasSameValue(ARMConstantPoolValue *ACPV) {
|
||||||
if (ACPV->Kind == Kind &&
|
if (ACPV->Kind == Kind &&
|
||||||
ACPV->PCAdjust == PCAdjust &&
|
ACPV->PCAdjust == PCAdjust &&
|
||||||
CPV_streq(ACPV->S, S) &&
|
|
||||||
ACPV->Modifier == Modifier) {
|
ACPV->Modifier == Modifier) {
|
||||||
if (ACPV->LabelId == LabelId)
|
if (ACPV->LabelId == LabelId)
|
||||||
return true;
|
return true;
|
||||||
@ -144,8 +122,6 @@ void ARMConstantPoolValue::dump() const {
|
|||||||
void ARMConstantPoolValue::print(raw_ostream &O) const {
|
void ARMConstantPoolValue::print(raw_ostream &O) const {
|
||||||
if (MBB)
|
if (MBB)
|
||||||
O << "";
|
O << "";
|
||||||
else
|
|
||||||
O << S;
|
|
||||||
if (Modifier) O << "(" << getModifierText() << ")";
|
if (Modifier) O << "(" << getModifierText() << ")";
|
||||||
if (PCAdjust != 0) {
|
if (PCAdjust != 0) {
|
||||||
O << "-(LPC" << LabelId << "+" << (unsigned)PCAdjust;
|
O << "-(LPC" << LabelId << "+" << (unsigned)PCAdjust;
|
||||||
@ -286,6 +262,14 @@ ARMConstantPoolSymbol::Create(LLVMContext &C, const char *s,
|
|||||||
AddCurrentAddress);
|
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,
|
int ARMConstantPoolSymbol::getExistingMachineCPValue(MachineConstantPool *CP,
|
||||||
unsigned Alignment) {
|
unsigned Alignment) {
|
||||||
unsigned AlignMask = Alignment - 1;
|
unsigned AlignMask = Alignment - 1;
|
||||||
|
@ -50,7 +50,6 @@ namespace ARMCP {
|
|||||||
/// instruction and the constant being loaded, i.e. (&GV-(LPIC+8)).
|
/// instruction and the constant being loaded, i.e. (&GV-(LPIC+8)).
|
||||||
class ARMConstantPoolValue : public MachineConstantPoolValue {
|
class ARMConstantPoolValue : public MachineConstantPoolValue {
|
||||||
const MachineBasicBlock *MBB; // MachineBasicBlock being loaded.
|
const MachineBasicBlock *MBB; // MachineBasicBlock being loaded.
|
||||||
const char *S; // ExtSymbol being loaded.
|
|
||||||
unsigned LabelId; // Label id of the load.
|
unsigned LabelId; // Label id of the load.
|
||||||
ARMCP::ARMCPKind Kind; // Kind of constant.
|
ARMCP::ARMCPKind Kind; // Kind of constant.
|
||||||
unsigned char PCAdjust; // Extra adjustment if constantpool is pc-relative.
|
unsigned char PCAdjust; // Extra adjustment if constantpool is pc-relative.
|
||||||
@ -72,13 +71,8 @@ public:
|
|||||||
unsigned char PCAdj = 0,
|
unsigned char PCAdj = 0,
|
||||||
ARMCP::ARMCPModifier Modifier = ARMCP::no_modifier,
|
ARMCP::ARMCPModifier Modifier = ARMCP::no_modifier,
|
||||||
bool AddCurrentAddress = false);
|
bool AddCurrentAddress = false);
|
||||||
ARMConstantPoolValue(LLVMContext &C, const char *s, unsigned id,
|
|
||||||
unsigned char PCAdj = 0,
|
|
||||||
ARMCP::ARMCPModifier Modifier = ARMCP::no_modifier,
|
|
||||||
bool AddCurrentAddress = false);
|
|
||||||
virtual ~ARMConstantPoolValue();
|
virtual ~ARMConstantPoolValue();
|
||||||
|
|
||||||
const char *getSymbol() const { return S; }
|
|
||||||
const MachineBasicBlock *getMBB() const;
|
const MachineBasicBlock *getMBB() const;
|
||||||
|
|
||||||
ARMCP::ARMCPModifier getModifier() const { return Modifier; }
|
ARMCP::ARMCPModifier getModifier() const { return Modifier; }
|
||||||
|
Loading…
Reference in New Issue
Block a user