mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-30 04:35:00 +00:00
Whitespace cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156034 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f2c696f016
commit
e8cd3f2491
@ -173,7 +173,6 @@ void Reassociate::RemoveDeadBinaryOp(Value *V) {
|
|||||||
RemoveDeadBinaryOp(RHS);
|
RemoveDeadBinaryOp(RHS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool isUnmovableInstruction(Instruction *I) {
|
static bool isUnmovableInstruction(Instruction *I) {
|
||||||
if (I->getOpcode() == Instruction::PHI ||
|
if (I->getOpcode() == Instruction::PHI ||
|
||||||
I->getOpcode() == Instruction::Alloca ||
|
I->getOpcode() == Instruction::Alloca ||
|
||||||
@ -305,7 +304,6 @@ void Reassociate::LinearizeExpr(BinaryOperator *I) {
|
|||||||
LinearizeExpr(I);
|
LinearizeExpr(I);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// LinearizeExprTree - Given an associative binary expression tree, traverse
|
/// LinearizeExprTree - Given an associative binary expression tree, traverse
|
||||||
/// all of the uses putting it into canonical form. This forces a left-linear
|
/// all of the uses putting it into canonical form. This forces a left-linear
|
||||||
/// form of the expression (((a+b)+c)+d), and collects information about the
|
/// form of the expression (((a+b)+c)+d), and collects information about the
|
||||||
@ -438,13 +436,10 @@ void Reassociate::RewriteExprTree(BinaryOperator *I,
|
|||||||
RewriteExprTree(LHS, Ops, i+1);
|
RewriteExprTree(LHS, Ops, i+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// NegateValue - Insert instructions before the instruction pointed to by BI,
|
||||||
|
/// that computes the negative version of the value specified. The negative
|
||||||
// NegateValue - Insert instructions before the instruction pointed to by BI,
|
/// version of the value is returned, and BI is left pointing at the instruction
|
||||||
// that computes the negative version of the value specified. The negative
|
/// that should be processed next by the reassociation pass.
|
||||||
// version of the value is returned, and BI is left pointing at the instruction
|
|
||||||
// that should be processed next by the reassociation pass.
|
|
||||||
//
|
|
||||||
static Value *NegateValue(Value *V, Instruction *BI) {
|
static Value *NegateValue(Value *V, Instruction *BI) {
|
||||||
if (Constant *C = dyn_cast<Constant>(V))
|
if (Constant *C = dyn_cast<Constant>(V))
|
||||||
return ConstantExpr::getNeg(C);
|
return ConstantExpr::getNeg(C);
|
||||||
@ -586,9 +581,10 @@ static Instruction *ConvertShiftToMul(Instruction *Shl,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scan backwards and forwards among values with the same rank as element i to
|
/// FindInOperandList - Scan backwards and forwards among values with the same
|
||||||
// see if X exists. If X does not exist, return i. This is useful when
|
/// rank as element i to see if X exists. If X does not exist, return i. This
|
||||||
// scanning for 'x' when we see '-x' because they both get the same rank.
|
/// is useful when scanning for 'x' when we see '-x' because they both get the
|
||||||
|
/// same rank.
|
||||||
static unsigned FindInOperandList(SmallVectorImpl<ValueEntry> &Ops, unsigned i,
|
static unsigned FindInOperandList(SmallVectorImpl<ValueEntry> &Ops, unsigned i,
|
||||||
Value *X) {
|
Value *X) {
|
||||||
unsigned XRank = Ops[i].Rank;
|
unsigned XRank = Ops[i].Rank;
|
||||||
@ -1203,7 +1199,6 @@ Value *Reassociate::OptimizeExpression(BinaryOperator *I,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// ReassociateInst - Inspect and reassociate the instruction at the
|
/// ReassociateInst - Inspect and reassociate the instruction at the
|
||||||
/// given position, post-incrementing the position.
|
/// given position, post-incrementing the position.
|
||||||
void Reassociate::ReassociateInst(BasicBlock::iterator &BBI) {
|
void Reassociate::ReassociateInst(BasicBlock::iterator &BBI) {
|
||||||
@ -1330,7 +1325,6 @@ Value *Reassociate::ReassociateExpression(BinaryOperator *I) {
|
|||||||
return I;
|
return I;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Reassociate::runOnFunction(Function &F) {
|
bool Reassociate::runOnFunction(Function &F) {
|
||||||
// Recalculate the rank map for F
|
// Recalculate the rank map for F
|
||||||
BuildRankMap(F);
|
BuildRankMap(F);
|
||||||
@ -1358,4 +1352,3 @@ bool Reassociate::runOnFunction(Function &F) {
|
|||||||
ValueRankMap.clear();
|
ValueRankMap.clear();
|
||||||
return MadeChange;
|
return MadeChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user