mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Fix newly-introduced 4.3 warnings
llvm-svn: 47375
This commit is contained in:
parent
891328ca3d
commit
c41f5b6af4
@ -80,7 +80,7 @@ public:
|
|||||||
// ParserOptions in effect. If positional information is not applicable,
|
// ParserOptions in effect. If positional information is not applicable,
|
||||||
// these will return a value of -1.
|
// these will return a value of -1.
|
||||||
//
|
//
|
||||||
inline const void getErrorLocation(int &Line, int &Column) const {
|
inline void getErrorLocation(int &Line, int &Column) const {
|
||||||
Line = LineNo; Column = ColumnNo;
|
Line = LineNo; Column = ColumnNo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -578,12 +578,13 @@ static BasicBlock *getBBVal(const ValID &ID) {
|
|||||||
} if (ID.Type == ValID::LocalName) {
|
} if (ID.Type == ValID::LocalName) {
|
||||||
std::string Name = ID.getName();
|
std::string Name = ID.getName();
|
||||||
Value *N = CurFun.CurrentFunction->getValueSymbolTable().lookup(Name);
|
Value *N = CurFun.CurrentFunction->getValueSymbolTable().lookup(Name);
|
||||||
if (N)
|
if (N) {
|
||||||
if (N->getType()->getTypeID() == Type::LabelTyID)
|
if (N->getType()->getTypeID() == Type::LabelTyID)
|
||||||
BB = cast<BasicBlock>(N);
|
BB = cast<BasicBlock>(N);
|
||||||
else
|
else
|
||||||
GenerateError("Reference to label '" + Name + "' is actually of type '"+
|
GenerateError("Reference to label '" + Name + "' is actually of type '"+
|
||||||
N->getType()->getDescription() + "'");
|
N->getType()->getDescription() + "'");
|
||||||
|
}
|
||||||
} else if (ID.Type == ValID::LocalID) {
|
} else if (ID.Type == ValID::LocalID) {
|
||||||
if (ID.Num < CurFun.NextValNum && ID.Num < CurFun.Values.size()) {
|
if (ID.Num < CurFun.NextValNum && ID.Num < CurFun.Values.size()) {
|
||||||
if (CurFun.Values[ID.Num]->getType()->getTypeID() == Type::LabelTyID)
|
if (CurFun.Values[ID.Num]->getType()->getTypeID() == Type::LabelTyID)
|
||||||
|
@ -578,12 +578,13 @@ static BasicBlock *getBBVal(const ValID &ID) {
|
|||||||
} if (ID.Type == ValID::LocalName) {
|
} if (ID.Type == ValID::LocalName) {
|
||||||
std::string Name = ID.getName();
|
std::string Name = ID.getName();
|
||||||
Value *N = CurFun.CurrentFunction->getValueSymbolTable().lookup(Name);
|
Value *N = CurFun.CurrentFunction->getValueSymbolTable().lookup(Name);
|
||||||
if (N)
|
if (N) {
|
||||||
if (N->getType()->getTypeID() == Type::LabelTyID)
|
if (N->getType()->getTypeID() == Type::LabelTyID)
|
||||||
BB = cast<BasicBlock>(N);
|
BB = cast<BasicBlock>(N);
|
||||||
else
|
else
|
||||||
GenerateError("Reference to label '" + Name + "' is actually of type '"+
|
GenerateError("Reference to label '" + Name + "' is actually of type '"+
|
||||||
N->getType()->getDescription() + "'");
|
N->getType()->getDescription() + "'");
|
||||||
|
}
|
||||||
} else if (ID.Type == ValID::LocalID) {
|
} else if (ID.Type == ValID::LocalID) {
|
||||||
if (ID.Num < CurFun.NextValNum && ID.Num < CurFun.Values.size()) {
|
if (ID.Num < CurFun.NextValNum && ID.Num < CurFun.Values.size()) {
|
||||||
if (CurFun.Values[ID.Num]->getType()->getTypeID() == Type::LabelTyID)
|
if (CurFun.Values[ID.Num]->getType()->getTypeID() == Type::LabelTyID)
|
||||||
|
@ -224,11 +224,12 @@ unsigned RALinScan::attemptTrivialCoalescing(LiveInterval &cur, unsigned Reg) {
|
|||||||
unsigned SrcReg, DstReg;
|
unsigned SrcReg, DstReg;
|
||||||
if (!CopyMI || !tii_->isMoveInstr(*CopyMI, SrcReg, DstReg))
|
if (!CopyMI || !tii_->isMoveInstr(*CopyMI, SrcReg, DstReg))
|
||||||
return Reg;
|
return Reg;
|
||||||
if (TargetRegisterInfo::isVirtualRegister(SrcReg))
|
if (TargetRegisterInfo::isVirtualRegister(SrcReg)) {
|
||||||
if (!vrm_->isAssignedReg(SrcReg))
|
if (!vrm_->isAssignedReg(SrcReg))
|
||||||
return Reg;
|
return Reg;
|
||||||
else
|
else
|
||||||
SrcReg = vrm_->getPhys(SrcReg);
|
SrcReg = vrm_->getPhys(SrcReg);
|
||||||
|
}
|
||||||
if (Reg == SrcReg)
|
if (Reg == SrcReg)
|
||||||
return Reg;
|
return Reg;
|
||||||
|
|
||||||
@ -864,7 +865,7 @@ unsigned RALinScan::getFreePhysReg(LiveInterval *cur) {
|
|||||||
|
|
||||||
// If copy coalescer has assigned a "preferred" register, check if it's
|
// If copy coalescer has assigned a "preferred" register, check if it's
|
||||||
// available first.
|
// available first.
|
||||||
if (cur->preference)
|
if (cur->preference) {
|
||||||
if (prt_->isRegAvail(cur->preference)) {
|
if (prt_->isRegAvail(cur->preference)) {
|
||||||
DOUT << "\t\tassigned the preferred register: "
|
DOUT << "\t\tassigned the preferred register: "
|
||||||
<< tri_->getName(cur->preference) << "\n";
|
<< tri_->getName(cur->preference) << "\n";
|
||||||
@ -872,6 +873,7 @@ unsigned RALinScan::getFreePhysReg(LiveInterval *cur) {
|
|||||||
} else
|
} else
|
||||||
DOUT << "\t\tunable to assign the preferred register: "
|
DOUT << "\t\tunable to assign the preferred register: "
|
||||||
<< tri_->getName(cur->preference) << "\n";
|
<< tri_->getName(cur->preference) << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
// Scan for the first available register.
|
// Scan for the first available register.
|
||||||
TargetRegisterClass::iterator I = RC->allocation_order_begin(*mf_);
|
TargetRegisterClass::iterator I = RC->allocation_order_begin(*mf_);
|
||||||
|
@ -775,11 +775,12 @@ void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
|||||||
|
|
||||||
// Spill all physical registers holding virtual registers now.
|
// Spill all physical registers holding virtual registers now.
|
||||||
for (unsigned i = 0, e = TRI->getNumRegs(); i != e; ++i)
|
for (unsigned i = 0, e = TRI->getNumRegs(); i != e; ++i)
|
||||||
if (PhysRegsUsed[i] != -1 && PhysRegsUsed[i] != -2)
|
if (PhysRegsUsed[i] != -1 && PhysRegsUsed[i] != -2) {
|
||||||
if (unsigned VirtReg = PhysRegsUsed[i])
|
if (unsigned VirtReg = PhysRegsUsed[i])
|
||||||
spillVirtReg(MBB, MI, VirtReg, i);
|
spillVirtReg(MBB, MI, VirtReg, i);
|
||||||
else
|
else
|
||||||
removePhysReg(i);
|
removePhysReg(i);
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// This checking code is very expensive.
|
// This checking code is very expensive.
|
||||||
|
@ -34,7 +34,7 @@ namespace llvm {
|
|||||||
getCalleeSaveSpillSlots(unsigned &NumEntries) const;
|
getCalleeSaveSpillSlots(unsigned &NumEntries) const;
|
||||||
|
|
||||||
//! Stack slot size (16 bytes)
|
//! Stack slot size (16 bytes)
|
||||||
static const int stackSlotSize() {
|
static int stackSlotSize() {
|
||||||
return 16;
|
return 16;
|
||||||
}
|
}
|
||||||
//! Maximum frame offset representable by a signed 10-bit integer
|
//! Maximum frame offset representable by a signed 10-bit integer
|
||||||
@ -42,19 +42,19 @@ namespace llvm {
|
|||||||
This is the maximum frame offset that can be expressed as a 10-bit
|
This is the maximum frame offset that can be expressed as a 10-bit
|
||||||
integer, used in D-form addresses.
|
integer, used in D-form addresses.
|
||||||
*/
|
*/
|
||||||
static const int maxFrameOffset() {
|
static int maxFrameOffset() {
|
||||||
return ((1 << 9) - 1) * stackSlotSize();
|
return ((1 << 9) - 1) * stackSlotSize();
|
||||||
}
|
}
|
||||||
//! Minimum frame offset representable by a signed 10-bit integer
|
//! Minimum frame offset representable by a signed 10-bit integer
|
||||||
static const int minFrameOffset() {
|
static int minFrameOffset() {
|
||||||
return -(1 << 9) * stackSlotSize();
|
return -(1 << 9) * stackSlotSize();
|
||||||
}
|
}
|
||||||
//! Minimum frame size (enough to spill LR + SP)
|
//! Minimum frame size (enough to spill LR + SP)
|
||||||
static const int minStackSize() {
|
static int minStackSize() {
|
||||||
return (2 * stackSlotSize());
|
return (2 * stackSlotSize());
|
||||||
}
|
}
|
||||||
//! Frame size required to spill all registers plus frame info
|
//! Frame size required to spill all registers plus frame info
|
||||||
static const int fullSpillSize() {
|
static int fullSpillSize() {
|
||||||
return (SPURegisterInfo::getNumArgRegs() * stackSlotSize());
|
return (SPURegisterInfo::getNumArgRegs() * stackSlotSize());
|
||||||
}
|
}
|
||||||
//! Number of instructions required to overcome hint-for-branch latency
|
//! Number of instructions required to overcome hint-for-branch latency
|
||||||
@ -65,7 +65,7 @@ namespace llvm {
|
|||||||
of instructions occurs between the HBR and the target. Currently, HBRs
|
of instructions occurs between the HBR and the target. Currently, HBRs
|
||||||
take 6 cycles, ergo, the magic number 6.
|
take 6 cycles, ergo, the magic number 6.
|
||||||
*/
|
*/
|
||||||
static const int branchHintPenalty() {
|
static int branchHintPenalty() {
|
||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -221,7 +221,7 @@ SPURegisterInfo::getArgRegs()
|
|||||||
return SPU_ArgRegs;
|
return SPU_ArgRegs;
|
||||||
}
|
}
|
||||||
|
|
||||||
const unsigned
|
unsigned
|
||||||
SPURegisterInfo::getNumArgRegs()
|
SPURegisterInfo::getNumArgRegs()
|
||||||
{
|
{
|
||||||
return sizeof(SPU_ArgRegs) / sizeof(SPU_ArgRegs[0]);
|
return sizeof(SPU_ArgRegs) / sizeof(SPU_ArgRegs[0]);
|
||||||
|
@ -90,7 +90,7 @@ namespace llvm {
|
|||||||
static const unsigned *getArgRegs();
|
static const unsigned *getArgRegs();
|
||||||
|
|
||||||
//! Return the size of the argument passing register array
|
//! Return the size of the argument passing register array
|
||||||
static const unsigned getNumArgRegs();
|
static unsigned getNumArgRegs();
|
||||||
|
|
||||||
//! Get DWARF debugging register number
|
//! Get DWARF debugging register number
|
||||||
int getDwarfRegNum(unsigned RegNum, bool isEH) const;
|
int getDwarfRegNum(unsigned RegNum, bool isEH) const;
|
||||||
|
@ -145,11 +145,12 @@ unsigned X86RegisterInfo::getX86RegNum(unsigned RegNo) const {
|
|||||||
|
|
||||||
const TargetRegisterClass *
|
const TargetRegisterClass *
|
||||||
X86RegisterInfo::getCrossCopyRegClass(const TargetRegisterClass *RC) const {
|
X86RegisterInfo::getCrossCopyRegClass(const TargetRegisterClass *RC) const {
|
||||||
if (RC == &X86::CCRRegClass)
|
if (RC == &X86::CCRRegClass) {
|
||||||
if (Is64Bit)
|
if (Is64Bit)
|
||||||
return &X86::GR64RegClass;
|
return &X86::GR64RegClass;
|
||||||
else
|
else
|
||||||
return &X86::GR32RegClass;
|
return &X86::GR32RegClass;
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5481,8 +5481,8 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
|||||||
// Extending a relational comparison when we're checking the sign
|
// Extending a relational comparison when we're checking the sign
|
||||||
// bit would not work.
|
// bit would not work.
|
||||||
if (Cast->hasOneUse() &&
|
if (Cast->hasOneUse() &&
|
||||||
(ICI.isEquality() || AndCST->getValue().isNonNegative() &&
|
(ICI.isEquality() ||
|
||||||
RHSV.isNonNegative())) {
|
(AndCST->getValue().isNonNegative() && RHSV.isNonNegative()))) {
|
||||||
uint32_t BitWidth =
|
uint32_t BitWidth =
|
||||||
cast<IntegerType>(Cast->getOperand(0)->getType())->getBitWidth();
|
cast<IntegerType>(Cast->getOperand(0)->getType())->getBitWidth();
|
||||||
APInt NewCST = AndCST->getValue();
|
APInt NewCST = AndCST->getValue();
|
||||||
|
@ -90,7 +90,7 @@ namespace {
|
|||||||
std::map<DomTreeNode*, Value*> &Phis);
|
std::map<DomTreeNode*, Value*> &Phis);
|
||||||
|
|
||||||
/// inLoop - returns true if the given block is within the current loop
|
/// inLoop - returns true if the given block is within the current loop
|
||||||
const bool inLoop(BasicBlock* B) {
|
bool inLoop(BasicBlock* B) {
|
||||||
return std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), B);
|
return std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), B);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -186,7 +186,7 @@ ParamAttrsList::includeAttrs(const ParamAttrsList *PAL,
|
|||||||
// For now, say we can't change a known alignment.
|
// For now, say we can't change a known alignment.
|
||||||
ParameterAttributes OldAlign = OldAttrs & ParamAttr::Alignment;
|
ParameterAttributes OldAlign = OldAttrs & ParamAttr::Alignment;
|
||||||
ParameterAttributes NewAlign = attrs & ParamAttr::Alignment;
|
ParameterAttributes NewAlign = attrs & ParamAttr::Alignment;
|
||||||
assert(!OldAlign || !NewAlign || OldAlign == NewAlign &&
|
assert((!OldAlign || !NewAlign || OldAlign == NewAlign) &&
|
||||||
"Attempt to change alignment!");
|
"Attempt to change alignment!");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user