mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
Clean up some uninitialized variables and missing return statements that
GCC 4.0.0 compiler (sometimes incorrectly) warns about under release build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22249 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a207c16d2
commit
4b828e6384
@ -43,8 +43,9 @@ namespace {
|
|||||||
case PPC::IMPLICIT_DEF: // no asm emitted
|
case PPC::IMPLICIT_DEF: // no asm emitted
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
return 4; // PowerPC instructions are all 4 bytes
|
break;
|
||||||
}
|
}
|
||||||
|
return 4; // PowerPC instructions are all 4 bytes
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool runOnMachineFunction(MachineFunction &Fn) {
|
virtual bool runOnMachineFunction(MachineFunction &Fn) {
|
||||||
|
@ -2915,8 +2915,9 @@ extern bool ThisIsAChainRule(int eruleno) {
|
|||||||
return true; break;
|
return true; break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false; break;
|
break;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// GetInstructionsByRule - Choose machine instructions for the
|
/// GetInstructionsByRule - Choose machine instructions for the
|
||||||
|
@ -56,7 +56,7 @@ unsigned
|
|||||||
SparcV9CodeEmitter::getRealRegNum(unsigned fakeReg,
|
SparcV9CodeEmitter::getRealRegNum(unsigned fakeReg,
|
||||||
MachineInstr &MI) {
|
MachineInstr &MI) {
|
||||||
const SparcV9RegInfo &RI = *TM.getRegInfo();
|
const SparcV9RegInfo &RI = *TM.getRegInfo();
|
||||||
unsigned regClass, regType = RI.getRegType(fakeReg);
|
unsigned regClass = 0, regType = RI.getRegType(fakeReg);
|
||||||
// At least map fakeReg into its class
|
// At least map fakeReg into its class
|
||||||
fakeReg = RI.getClassRegNum(fakeReg, regClass);
|
fakeReg = RI.getClassRegNum(fakeReg, regClass);
|
||||||
|
|
||||||
|
@ -757,7 +757,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) {
|
|||||||
return BinaryOperator::createNot(Op1);
|
return BinaryOperator::createNot(Op1);
|
||||||
|
|
||||||
// C - ~X == X + (1+C)
|
// C - ~X == X + (1+C)
|
||||||
Value *X;
|
Value *X = 0;
|
||||||
if (match(Op1, m_Not(m_Value(X))))
|
if (match(Op1, m_Not(m_Value(X))))
|
||||||
return BinaryOperator::createAdd(X,
|
return BinaryOperator::createAdd(X,
|
||||||
ConstantExpr::getAdd(C, ConstantInt::get(I.getType(), 1)));
|
ConstantExpr::getAdd(C, ConstantInt::get(I.getType(), 1)));
|
||||||
@ -852,7 +852,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator &I) {
|
|||||||
ConstantExpr::getNeg(DivRHS));
|
ConstantExpr::getNeg(DivRHS));
|
||||||
|
|
||||||
// X - X*C --> X * (1-C)
|
// X - X*C --> X * (1-C)
|
||||||
ConstantInt *C2;
|
ConstantInt *C2 = 0;
|
||||||
if (dyn_castFoldableMul(Op1I, C2) == Op0) {
|
if (dyn_castFoldableMul(Op1I, C2) == Op0) {
|
||||||
Constant *CP1 =
|
Constant *CP1 =
|
||||||
ConstantExpr::getSub(ConstantInt::get(I.getType(), 1), C2);
|
ConstantExpr::getSub(ConstantInt::get(I.getType(), 1), C2);
|
||||||
@ -5129,7 +5129,7 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) {
|
|||||||
|
|
||||||
Instruction *InstCombiner::visitBranchInst(BranchInst &BI) {
|
Instruction *InstCombiner::visitBranchInst(BranchInst &BI) {
|
||||||
// Change br (not X), label True, label False to: br X, label False, True
|
// Change br (not X), label True, label False to: br X, label False, True
|
||||||
Value *X;
|
Value *X = 0;
|
||||||
BasicBlock *TrueDest;
|
BasicBlock *TrueDest;
|
||||||
BasicBlock *FalseDest;
|
BasicBlock *FalseDest;
|
||||||
if (match(&BI, m_Br(m_Not(m_Value(X)), TrueDest, FalseDest)) &&
|
if (match(&BI, m_Br(m_Not(m_Value(X)), TrueDest, FalseDest)) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user