summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-06-22 12:44:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-06-22 12:44:16 +0000
commit2b7fef681fb65798e756c463dd3198e5af87f300 (patch)
treecc566e6794e45712f4bc3efbc35c71c93472b218 /llvm/lib/Target
parent716859aa644f0df05a84b77f8bd11a057083efe1 (diff)
downloadbcm5719-llvm-2b7fef681fb65798e756c463dd3198e5af87f300.tar.gz
bcm5719-llvm-2b7fef681fb65798e756c463dd3198e5af87f300.zip
Delete more dead code.
Found by gcc 6. llvm-svn: 273402
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp14
-rw-r--r--llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp20
-rw-r--r--llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp53
-rw-r--r--llvm/lib/Target/BPF/BPFAsmPrinter.cpp28
4 files changed, 0 insertions, 115 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
index dc69d9e4671..be3efea2255 100644
--- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
@@ -87,7 +87,6 @@ public:
}
private:
- MachineLocation getDebugValueLocation(const MachineInstr *MI) const;
void printOperand(const MachineInstr *MI, unsigned OpNum, raw_ostream &O);
bool printAsmMRegister(const MachineOperand &MO, char Mode, raw_ostream &O);
bool printAsmRegInClass(const MachineOperand &MO,
@@ -133,19 +132,6 @@ void AArch64AsmPrinter::EmitEndOfAsmFile(Module &M) {
}
}
-MachineLocation
-AArch64AsmPrinter::getDebugValueLocation(const MachineInstr *MI) const {
- MachineLocation Location;
- assert(MI->getNumOperands() == 4 && "Invalid no. of machine operands!");
- // Frame address. Currently handles register +- offset only.
- if (MI->getOperand(0).isReg() && MI->getOperand(1).isImm())
- Location.set(MI->getOperand(0).getReg(), MI->getOperand(1).getImm());
- else {
- DEBUG(dbgs() << "DBG_VALUE instruction ignored! " << *MI << "\n");
- }
- return Location;
-}
-
void AArch64AsmPrinter::EmitLOHs() {
SmallVector<MCSymbol *, 3> MCArgs;
diff --git a/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp b/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp
index e8e9947b078..b1e40510b2a 100644
--- a/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp
+++ b/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp
@@ -186,9 +186,6 @@ private:
void insertDefinitions(Function &F, GlobalVariable &GV,
InsertionPoints &InsertPts);
- /// Sort the updates in a deterministic way.
- void sortUpdates(SmallVectorImpl<UpdateRecord> &Updates);
-
/// Do the constant promotion indicated by the Updates records, keeping track
/// of globals in PromotionCache.
void promoteConstants(Function &F, SmallVectorImpl<UpdateRecord> &Updates,
@@ -514,23 +511,6 @@ void AArch64PromoteConstant::insertDefinitions(Function &F,
}
}
-void AArch64PromoteConstant::sortUpdates(
- SmallVectorImpl<UpdateRecord> &Updates) {
- // The order the constants were inserted is deterministic (unlike their
- // address).
- SmallDenseMap<const Constant *, unsigned, 128> InsertionOrder;
- for (const auto &Record : Updates)
- InsertionOrder.insert(std::make_pair(Record.C, InsertionOrder.size()));
-
- // This is already sorted by Instruction ordering in the function and operand
- // number, which is a good first step. Now reorder by constant.
- std::stable_sort(
- Updates.begin(), Updates.end(),
- [&InsertionOrder](const UpdateRecord &L, const UpdateRecord &R) {
- return InsertionOrder.lookup(L.C) < InsertionOrder.lookup(R.C);
- });
-}
-
void AArch64PromoteConstant::promoteConstants(
Function &F, SmallVectorImpl<UpdateRecord> &Updates,
PromotionCacheTy &PromotionCache) {
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
index 7d8e79bc63c..7b9ff8fa050 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
@@ -154,24 +154,6 @@ public:
SmallVectorImpl<MCFixup> &Fixups,
const MCSubtargetInfo &STI) const;
- /// getSIMDShift64OpValue - Return the encoded value for the
- // shift-by-immediate AdvSIMD instructions.
- uint32_t getSIMDShift64OpValue(const MCInst &MI, unsigned OpIdx,
- SmallVectorImpl<MCFixup> &Fixups,
- const MCSubtargetInfo &STI) const;
-
- uint32_t getSIMDShift64_32OpValue(const MCInst &MI, unsigned OpIdx,
- SmallVectorImpl<MCFixup> &Fixups,
- const MCSubtargetInfo &STI) const;
-
- uint32_t getSIMDShift32OpValue(const MCInst &MI, unsigned OpIdx,
- SmallVectorImpl<MCFixup> &Fixups,
- const MCSubtargetInfo &STI) const;
-
- uint32_t getSIMDShift16OpValue(const MCInst &MI, unsigned OpIdx,
- SmallVectorImpl<MCFixup> &Fixups,
- const MCSubtargetInfo &STI) const;
-
unsigned fixMOVZ(const MCInst &MI, unsigned EncodedValue,
const MCSubtargetInfo &STI) const;
@@ -428,41 +410,6 @@ AArch64MCCodeEmitter::getVecShifterOpValue(const MCInst &MI, unsigned OpIdx,
llvm_unreachable("Invalid value for vector shift amount!");
}
-uint32_t
-AArch64MCCodeEmitter::getSIMDShift64OpValue(const MCInst &MI, unsigned OpIdx,
- SmallVectorImpl<MCFixup> &Fixups,
- const MCSubtargetInfo &STI) const {
- const MCOperand &MO = MI.getOperand(OpIdx);
- assert(MO.isImm() && "Expected an immediate value for the shift amount!");
- return 64 - (MO.getImm());
-}
-
-uint32_t AArch64MCCodeEmitter::getSIMDShift64_32OpValue(
- const MCInst &MI, unsigned OpIdx, SmallVectorImpl<MCFixup> &Fixups,
- const MCSubtargetInfo &STI) const {
- const MCOperand &MO = MI.getOperand(OpIdx);
- assert(MO.isImm() && "Expected an immediate value for the shift amount!");
- return 64 - (MO.getImm() | 32);
-}
-
-uint32_t
-AArch64MCCodeEmitter::getSIMDShift32OpValue(const MCInst &MI, unsigned OpIdx,
- SmallVectorImpl<MCFixup> &Fixups,
- const MCSubtargetInfo &STI) const {
- const MCOperand &MO = MI.getOperand(OpIdx);
- assert(MO.isImm() && "Expected an immediate value for the shift amount!");
- return 32 - (MO.getImm() | 16);
-}
-
-uint32_t
-AArch64MCCodeEmitter::getSIMDShift16OpValue(const MCInst &MI, unsigned OpIdx,
- SmallVectorImpl<MCFixup> &Fixups,
- const MCSubtargetInfo &STI) const {
- const MCOperand &MO = MI.getOperand(OpIdx);
- assert(MO.isImm() && "Expected an immediate value for the shift amount!");
- return 16 - (MO.getImm() | 8);
-}
-
/// getFixedPointScaleOpValue - Return the encoded value for the
// FP-to-fixed-point scale factor.
uint32_t AArch64MCCodeEmitter::getFixedPointScaleOpValue(
diff --git a/llvm/lib/Target/BPF/BPFAsmPrinter.cpp b/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
index 10ec6587550..1078b065218 100644
--- a/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
+++ b/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
@@ -40,38 +40,10 @@ public:
const char *getPassName() const override { return "BPF Assembly Printer"; }
- void printOperand(const MachineInstr *MI, int OpNum, raw_ostream &O,
- const char *Modifier = nullptr);
void EmitInstruction(const MachineInstr *MI) override;
};
}
-void BPFAsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
- raw_ostream &O, const char *Modifier) {
- const MachineOperand &MO = MI->getOperand(OpNum);
-
- switch (MO.getType()) {
- case MachineOperand::MO_Register:
- O << BPFInstPrinter::getRegisterName(MO.getReg());
- break;
-
- case MachineOperand::MO_Immediate:
- O << MO.getImm();
- break;
-
- case MachineOperand::MO_MachineBasicBlock:
- O << *MO.getMBB()->getSymbol();
- break;
-
- case MachineOperand::MO_GlobalAddress:
- O << *getSymbol(MO.getGlobal());
- break;
-
- default:
- llvm_unreachable("<unknown operand type>");
- }
-}
-
void BPFAsmPrinter::EmitInstruction(const MachineInstr *MI) {
BPFMCInstLower MCInstLowering(OutContext, *this);
OpenPOWER on IntegriCloud