mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
Cast away "comparison between signed and unsigned integer" warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122598 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -71,8 +71,9 @@ static bool ValueDominatesPHI(Value *V, PHINode *P, const DominatorTree *DT) {
|
|||||||
/// Also performs the transform "(A op' B) op C" -> "(A op C) op' (B op C)".
|
/// Also performs the transform "(A op' B) op C" -> "(A op C) op' (B op C)".
|
||||||
/// Returns the simplified value, or null if no simplification was performed.
|
/// Returns the simplified value, or null if no simplification was performed.
|
||||||
static Value *ExpandBinOp(unsigned Opcode, Value *LHS, Value *RHS,
|
static Value *ExpandBinOp(unsigned Opcode, Value *LHS, Value *RHS,
|
||||||
unsigned OpcodeToExpand, const TargetData *TD,
|
unsigned OpcToExpand, const TargetData *TD,
|
||||||
const DominatorTree *DT, unsigned MaxRecurse) {
|
const DominatorTree *DT, unsigned MaxRecurse) {
|
||||||
|
Instruction::BinaryOps OpcodeToExpand = (Instruction::BinaryOps)OpcToExpand;
|
||||||
// Recursion is always used, so bail out at once if we already hit the limit.
|
// Recursion is always used, so bail out at once if we already hit the limit.
|
||||||
if (!MaxRecurse--)
|
if (!MaxRecurse--)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -133,8 +134,9 @@ static Value *ExpandBinOp(unsigned Opcode, Value *LHS, Value *RHS,
|
|||||||
/// OpCodeToExtract is Mul then this tries to turn "(A*B)+(A*C)" into "A*(B+C)".
|
/// OpCodeToExtract is Mul then this tries to turn "(A*B)+(A*C)" into "A*(B+C)".
|
||||||
/// Returns the simplified value, or null if no simplification was performed.
|
/// Returns the simplified value, or null if no simplification was performed.
|
||||||
static Value *FactorizeBinOp(unsigned Opcode, Value *LHS, Value *RHS,
|
static Value *FactorizeBinOp(unsigned Opcode, Value *LHS, Value *RHS,
|
||||||
unsigned OpcodeToExtract, const TargetData *TD,
|
unsigned OpcToExtract, const TargetData *TD,
|
||||||
const DominatorTree *DT, unsigned MaxRecurse) {
|
const DominatorTree *DT, unsigned MaxRecurse) {
|
||||||
|
Instruction::BinaryOps OpcodeToExtract = (Instruction::BinaryOps)OpcToExtract;
|
||||||
// Recursion is always used, so bail out at once if we already hit the limit.
|
// Recursion is always used, so bail out at once if we already hit the limit.
|
||||||
if (!MaxRecurse--)
|
if (!MaxRecurse--)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -201,10 +203,11 @@ static Value *FactorizeBinOp(unsigned Opcode, Value *LHS, Value *RHS,
|
|||||||
|
|
||||||
/// SimplifyAssociativeBinOp - Generic simplifications for associative binary
|
/// SimplifyAssociativeBinOp - Generic simplifications for associative binary
|
||||||
/// operations. Returns the simpler value, or null if none was found.
|
/// operations. Returns the simpler value, or null if none was found.
|
||||||
static Value *SimplifyAssociativeBinOp(unsigned Opcode, Value *LHS, Value *RHS,
|
static Value *SimplifyAssociativeBinOp(unsigned Opc, Value *LHS, Value *RHS,
|
||||||
const TargetData *TD,
|
const TargetData *TD,
|
||||||
const DominatorTree *DT,
|
const DominatorTree *DT,
|
||||||
unsigned MaxRecurse) {
|
unsigned MaxRecurse) {
|
||||||
|
Instruction::BinaryOps Opcode = (Instruction::BinaryOps)Opc;
|
||||||
assert(Instruction::isAssociative(Opcode) && "Not an associative operation!");
|
assert(Instruction::isAssociative(Opcode) && "Not an associative operation!");
|
||||||
|
|
||||||
// Recursion is always used, so bail out at once if we already hit the limit.
|
// Recursion is always used, so bail out at once if we already hit the limit.
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ TargetAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
|
|||||||
{ "FK_PCRel_8", 0, 64, MCFixupKindInfo::FKF_IsPCRel }
|
{ "FK_PCRel_8", 0, 64, MCFixupKindInfo::FKF_IsPCRel }
|
||||||
};
|
};
|
||||||
|
|
||||||
assert(Kind <= sizeof(Builtins) / sizeof(Builtins[0]) &&
|
assert((size_t)Kind <= sizeof(Builtins) / sizeof(Builtins[0]) &&
|
||||||
"Unknown fixup kind");
|
"Unknown fixup kind");
|
||||||
return Builtins[Kind];
|
return Builtins[Kind];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user