diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:51:11 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-20 21:51:11 +0000 |
commit | 4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 (patch) | |
tree | 9a48fa9f7f51fd635f6807ed7444fcdcad0e9bda /lib/Target/MBlaze | |
parent | 0041d4d447c26825e566ba38a4fe301471fda1eb (diff) | |
download | external_llvm-4d6ccb5f68cd7c6418a209f1fa4dbade569e4493.zip external_llvm-4d6ccb5f68cd7c6418a209f1fa4dbade569e4493.tar.gz external_llvm-4d6ccb5f68cd7c6418a209f1fa4dbade569e4493.tar.bz2 |
More dead code removal (using -Wunreachable-code)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MBlaze')
-rw-r--r-- | lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp | 1 | ||||
-rw-r--r-- | lib/Target/MBlaze/MBlazeELFWriterInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Target/MBlaze/MBlazeISelLowering.cpp | 2 | ||||
-rw-r--r-- | lib/Target/MBlaze/MBlazeRegisterInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h | 4 | ||||
-rw-r--r-- | lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp | 13 |
6 files changed, 5 insertions, 19 deletions
diff --git a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp index 97d311c..c1b003b 100644 --- a/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp +++ b/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp @@ -347,7 +347,6 @@ MatchAndEmitInstruction(SMLoc IDLoc, } llvm_unreachable("Implement any new match types added!"); - return true; } MBlazeOperand *MBlazeAsmParser:: diff --git a/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp b/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp index ad9247d..2928da4 100644 --- a/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp +++ b/lib/Target/MBlaze/MBlazeELFWriterInfo.cpp @@ -41,7 +41,6 @@ unsigned MBlazeELFWriterInfo::getRelocationType(unsigned MachineRelTy) const { default: llvm_unreachable("unknown mblaze machine relocation type"); } - return 0; } long int MBlazeELFWriterInfo::getDefaultAddendForRelTy(unsigned RelTy, @@ -54,7 +53,6 @@ long int MBlazeELFWriterInfo::getDefaultAddendForRelTy(unsigned RelTy, default: llvm_unreachable("unknown mblaze relocation type"); } - return 0; } unsigned MBlazeELFWriterInfo::getRelocationTySize(unsigned RelTy) const { diff --git a/lib/Target/MBlaze/MBlazeISelLowering.cpp b/lib/Target/MBlaze/MBlazeISelLowering.cpp index 0002174..9b09da0 100644 --- a/lib/Target/MBlaze/MBlazeISelLowering.cpp +++ b/lib/Target/MBlaze/MBlazeISelLowering.cpp @@ -602,7 +602,6 @@ LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { SDValue MBlazeTargetLowering:: LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const { llvm_unreachable("TLS not implemented for MicroBlaze."); - return SDValue(); // Not reached } SDValue MBlazeTargetLowering:: @@ -1081,7 +1080,6 @@ getConstraintType(const std::string &Constraint) const case 'y': case 'f': return C_RegisterClass; - break; } } return TargetLowering::getConstraintType(Constraint); diff --git a/lib/Target/MBlaze/MBlazeRegisterInfo.cpp b/lib/Target/MBlaze/MBlazeRegisterInfo.cpp index 9788ba9..0b1b107 100644 --- a/lib/Target/MBlaze/MBlazeRegisterInfo.cpp +++ b/lib/Target/MBlaze/MBlazeRegisterInfo.cpp @@ -184,10 +184,8 @@ unsigned MBlazeRegisterInfo::getFrameRegister(const MachineFunction &MF) const { unsigned MBlazeRegisterInfo::getEHExceptionRegister() const { llvm_unreachable("What is the exception register"); - return 0; } unsigned MBlazeRegisterInfo::getEHHandlerRegister() const { llvm_unreachable("What is the exception handler register"); - return 0; } diff --git a/lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h b/lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h index c8bdd6f..437026e 100644 --- a/lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h +++ b/lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h @@ -96,7 +96,6 @@ static inline bool isSpecialMBlazeRegister(unsigned Reg) { default: return false; } - return false; // Not reached } /// getMBlazeRegisterNumbering - Given the enum value for some register, e.g. @@ -161,7 +160,6 @@ static inline unsigned getMBlazeRegisterNumbering(unsigned RegEnum) { case MBlaze::RPVR11 : return 0x200B; default: llvm_unreachable("Unknown register number!"); } - return 0; // Not reached } /// getRegisterFromNumbering - Given the enum value for some register, e.g. @@ -202,7 +200,6 @@ static inline unsigned getMBlazeRegisterFromNumbering(unsigned Reg) { case 31 : return MBlaze::R31; default: llvm_unreachable("Unknown register number!"); } - return 0; // Not reached } static inline unsigned getSpecialMBlazeRegisterFromNumbering(unsigned Reg) { @@ -233,7 +230,6 @@ static inline unsigned getSpecialMBlazeRegisterFromNumbering(unsigned Reg) { case 0x200B : return MBlaze::RPVR11; default: llvm_unreachable("Unknown register number!"); } - return 0; // Not reached } } // end namespace llvm; diff --git a/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp b/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp index 1514557..e22ad0a 100644 --- a/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp +++ b/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp @@ -109,17 +109,14 @@ unsigned MBlazeMCCodeEmitter::getMachineOpValue(const MCInst &MI, const MCOperand &MO) const { if (MO.isReg()) return getMBlazeRegisterNumbering(MO.getReg()); - else if (MO.isImm()) + if (MO.isImm()) return static_cast<unsigned>(MO.getImm()); - else if (MO.isExpr()) - return 0; // The relocation has already been recorded at this point. - else { + if (MO.isExpr()) + return 0; // The relocation has already been recorded at this point. #ifndef NDEBUG - errs() << MO; + errs() << MO; #endif - llvm_unreachable(0); - } - return 0; + llvm_unreachable(0); } void MBlazeMCCodeEmitter:: |