mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +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);
|
||||
}
|
||||
|
||||
|
||||
static bool isUnmovableInstruction(Instruction *I) {
|
||||
if (I->getOpcode() == Instruction::PHI ||
|
||||
I->getOpcode() == Instruction::Alloca ||
|
||||
@ -305,7 +304,6 @@ void Reassociate::LinearizeExpr(BinaryOperator *I) {
|
||||
LinearizeExpr(I);
|
||||
}
|
||||
|
||||
|
||||
/// LinearizeExprTree - Given an associative binary expression tree, traverse
|
||||
/// 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
|
||||
@ -438,13 +436,10 @@ void Reassociate::RewriteExprTree(BinaryOperator *I,
|
||||
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
|
||||
// version of the value is returned, and BI is left pointing at the instruction
|
||||
// that should be processed next by the reassociation pass.
|
||||
//
|
||||
/// NegateValue - Insert instructions before the instruction pointed to by BI,
|
||||
/// that computes the negative version of the value specified. The negative
|
||||
/// 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) {
|
||||
if (Constant *C = dyn_cast<Constant>(V))
|
||||
return ConstantExpr::getNeg(C);
|
||||
@ -586,9 +581,10 @@ static Instruction *ConvertShiftToMul(Instruction *Shl,
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Scan backwards and forwards among values with the same rank as element i to
|
||||
// see if X exists. If X does not exist, return i. This is useful when
|
||||
// scanning for 'x' when we see '-x' because they both get the same rank.
|
||||
/// FindInOperandList - Scan backwards and forwards among values with the same
|
||||
/// rank as element i to see if X exists. If X does not exist, return i. This
|
||||
/// 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,
|
||||
Value *X) {
|
||||
unsigned XRank = Ops[i].Rank;
|
||||
@ -1203,7 +1199,6 @@ Value *Reassociate::OptimizeExpression(BinaryOperator *I,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/// ReassociateInst - Inspect and reassociate the instruction at the
|
||||
/// given position, post-incrementing the position.
|
||||
void Reassociate::ReassociateInst(BasicBlock::iterator &BBI) {
|
||||
@ -1330,7 +1325,6 @@ Value *Reassociate::ReassociateExpression(BinaryOperator *I) {
|
||||
return I;
|
||||
}
|
||||
|
||||
|
||||
bool Reassociate::runOnFunction(Function &F) {
|
||||
// Recalculate the rank map for F
|
||||
BuildRankMap(F);
|
||||
@ -1358,4 +1352,3 @@ bool Reassociate::runOnFunction(Function &F) {
|
||||
ValueRankMap.clear();
|
||||
return MadeChange;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user