mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-10 02:25:47 +00:00
Remove now dead methods and ivar from ARMConstantPoolValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -35,15 +35,6 @@ ARMConstantPoolValue::ARMConstantPoolValue(Type *Ty, unsigned id,
|
|||||||
PCAdjust(PCAdj), Modifier(modifier),
|
PCAdjust(PCAdj), Modifier(modifier),
|
||||||
AddCurrentAddress(addCurrentAddress) {}
|
AddCurrentAddress(addCurrentAddress) {}
|
||||||
|
|
||||||
ARMConstantPoolValue::ARMConstantPoolValue(const Constant *cval, unsigned id,
|
|
||||||
ARMCP::ARMCPKind K,
|
|
||||||
unsigned char PCAdj,
|
|
||||||
ARMCP::ARMCPModifier Modif,
|
|
||||||
bool AddCA)
|
|
||||||
: MachineConstantPoolValue((Type*)cval->getType()),
|
|
||||||
CVal(cval), S(NULL), LabelId(id), Kind(K), PCAdjust(PCAdj),
|
|
||||||
Modifier(Modif), AddCurrentAddress(AddCA) {}
|
|
||||||
|
|
||||||
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
||||||
const MachineBasicBlock *mbb,
|
const MachineBasicBlock *mbb,
|
||||||
unsigned id,
|
unsigned id,
|
||||||
@@ -52,7 +43,7 @@ ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
|||||||
ARMCP::ARMCPModifier Modif,
|
ARMCP::ARMCPModifier Modif,
|
||||||
bool AddCA)
|
bool AddCA)
|
||||||
: MachineConstantPoolValue((Type*)Type::getInt8PtrTy(C)),
|
: MachineConstantPoolValue((Type*)Type::getInt8PtrTy(C)),
|
||||||
CVal(NULL), MBB(mbb), S(NULL), LabelId(id), Kind(K), PCAdjust(PCAdj),
|
MBB(mbb), S(NULL), LabelId(id), Kind(K), PCAdjust(PCAdj),
|
||||||
Modifier(Modif), AddCurrentAddress(AddCA) {}
|
Modifier(Modif), AddCurrentAddress(AddCA) {}
|
||||||
|
|
||||||
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
||||||
@@ -61,23 +52,9 @@ ARMConstantPoolValue::ARMConstantPoolValue(LLVMContext &C,
|
|||||||
ARMCP::ARMCPModifier Modif,
|
ARMCP::ARMCPModifier Modif,
|
||||||
bool AddCA)
|
bool AddCA)
|
||||||
: MachineConstantPoolValue((Type*)Type::getInt32Ty(C)),
|
: MachineConstantPoolValue((Type*)Type::getInt32Ty(C)),
|
||||||
CVal(NULL), S(strdup(s)), LabelId(id), Kind(ARMCP::CPExtSymbol),
|
S(strdup(s)), LabelId(id), Kind(ARMCP::CPExtSymbol),
|
||||||
PCAdjust(PCAdj), Modifier(Modif), AddCurrentAddress(AddCA) {}
|
PCAdjust(PCAdj), Modifier(Modif), AddCurrentAddress(AddCA) {}
|
||||||
|
|
||||||
ARMConstantPoolValue::ARMConstantPoolValue(const GlobalValue *gv,
|
|
||||||
ARMCP::ARMCPModifier Modif)
|
|
||||||
: MachineConstantPoolValue((Type*)Type::getInt32Ty(gv->getContext())),
|
|
||||||
CVal(gv), S(NULL), LabelId(0), Kind(ARMCP::CPValue), PCAdjust(0),
|
|
||||||
Modifier(Modif), AddCurrentAddress(false) {}
|
|
||||||
|
|
||||||
const GlobalValue *ARMConstantPoolValue::getGV() const {
|
|
||||||
return dyn_cast_or_null<GlobalValue>(CVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
const BlockAddress *ARMConstantPoolValue::getBlockAddress() const {
|
|
||||||
return dyn_cast_or_null<BlockAddress>(CVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
const MachineBasicBlock *ARMConstantPoolValue::getMBB() const {
|
const MachineBasicBlock *ARMConstantPoolValue::getMBB() const {
|
||||||
return MBB;
|
return MBB;
|
||||||
}
|
}
|
||||||
@@ -156,9 +133,7 @@ void ARMConstantPoolValue::dump() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ARMConstantPoolValue::print(raw_ostream &O) const {
|
void ARMConstantPoolValue::print(raw_ostream &O) const {
|
||||||
if (CVal)
|
if (MBB)
|
||||||
O << CVal->getName();
|
|
||||||
else if (MBB)
|
|
||||||
O << "";
|
O << "";
|
||||||
else
|
else
|
||||||
O << S;
|
O << S;
|
||||||
|
@@ -49,7 +49,6 @@ namespace ARMCP {
|
|||||||
/// represent PC-relative displacement between the address of the load
|
/// represent PC-relative displacement between the address of the load
|
||||||
/// 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 Constant *CVal; // Constant being loaded.
|
|
||||||
const MachineBasicBlock *MBB; // MachineBasicBlock being loaded.
|
const MachineBasicBlock *MBB; // MachineBasicBlock being loaded.
|
||||||
const char *S; // ExtSymbol being loaded.
|
const char *S; // ExtSymbol being loaded.
|
||||||
unsigned LabelId; // Label id of the load.
|
unsigned LabelId; // Label id of the load.
|
||||||
@@ -65,11 +64,6 @@ protected:
|
|||||||
bool AddCurrentAddress);
|
bool AddCurrentAddress);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ARMConstantPoolValue(const Constant *cval, unsigned id,
|
|
||||||
ARMCP::ARMCPKind Kind = ARMCP::CPValue,
|
|
||||||
unsigned char PCAdj = 0,
|
|
||||||
ARMCP::ARMCPModifier Modifier = ARMCP::no_modifier,
|
|
||||||
bool AddCurrentAddress = false);
|
|
||||||
ARMConstantPoolValue(LLVMContext &C, const MachineBasicBlock *mbb,unsigned id,
|
ARMConstantPoolValue(LLVMContext &C, const MachineBasicBlock *mbb,unsigned id,
|
||||||
ARMCP::ARMCPKind Kind = ARMCP::CPValue,
|
ARMCP::ARMCPKind Kind = ARMCP::CPValue,
|
||||||
unsigned char PCAdj = 0,
|
unsigned char PCAdj = 0,
|
||||||
@@ -79,13 +73,9 @@ 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(const GlobalValue *GV, ARMCP::ARMCPModifier Modifier);
|
|
||||||
ARMConstantPoolValue();
|
|
||||||
~ARMConstantPoolValue();
|
~ARMConstantPoolValue();
|
||||||
|
|
||||||
const GlobalValue *getGV() const;
|
|
||||||
const char *getSymbol() const { return S; }
|
const char *getSymbol() const { return S; }
|
||||||
const BlockAddress *getBlockAddress() const;
|
|
||||||
const MachineBasicBlock *getMBB() const;
|
const MachineBasicBlock *getMBB() const;
|
||||||
|
|
||||||
ARMCP::ARMCPModifier getModifier() const { return Modifier; }
|
ARMCP::ARMCPModifier getModifier() const { return Modifier; }
|
||||||
|
Reference in New Issue
Block a user