mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-01 08:28:19 +00:00
Comment formatting.
llvm-svn: 139375
This commit is contained in:
parent
8a2e622f38
commit
77fa88a786
@ -621,12 +621,12 @@ void IndVarSimplify::RewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter) {
|
|||||||
// To be replaced by -disable-iv-rewrite.
|
// To be replaced by -disable-iv-rewrite.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// FIXME: It is an extremely bad idea to indvar substitute anything more
|
/// FIXME: It is an extremely bad idea to indvar substitute anything more
|
||||||
// complex than affine induction variables. Doing so will put expensive
|
/// complex than affine induction variables. Doing so will put expensive
|
||||||
// polynomial evaluations inside of the loop, and the str reduction pass
|
/// polynomial evaluations inside of the loop, and the str reduction pass
|
||||||
// currently can only reduce affine polynomials. For now just disable
|
/// currently can only reduce affine polynomials. For now just disable
|
||||||
// indvar subst on anything more complex than an affine addrec, unless
|
/// indvar subst on anything more complex than an affine addrec, unless
|
||||||
// it can be expanded to a trivial value.
|
/// it can be expanded to a trivial value.
|
||||||
static bool isSafe(const SCEV *S, const Loop *L, ScalarEvolution *SE) {
|
static bool isSafe(const SCEV *S, const Loop *L, ScalarEvolution *SE) {
|
||||||
// Loop-invariant values are safe.
|
// Loop-invariant values are safe.
|
||||||
if (SE->isLoopInvariant(S, L)) return true;
|
if (SE->isLoopInvariant(S, L)) return true;
|
||||||
@ -637,7 +637,8 @@ static bool isSafe(const SCEV *S, const Loop *L, ScalarEvolution *SE) {
|
|||||||
return AR->isAffine();
|
return AR->isAffine();
|
||||||
|
|
||||||
// An add is safe it all its operands are safe.
|
// An add is safe it all its operands are safe.
|
||||||
if (const SCEVCommutativeExpr *Commutative = dyn_cast<SCEVCommutativeExpr>(S)) {
|
if (const SCEVCommutativeExpr *Commutative
|
||||||
|
= dyn_cast<SCEVCommutativeExpr>(S)) {
|
||||||
for (SCEVCommutativeExpr::op_iterator I = Commutative->op_begin(),
|
for (SCEVCommutativeExpr::op_iterator I = Commutative->op_begin(),
|
||||||
E = Commutative->op_end(); I != E; ++I)
|
E = Commutative->op_end(); I != E; ++I)
|
||||||
if (!isSafe(*I, L, SE)) return false;
|
if (!isSafe(*I, L, SE)) return false;
|
||||||
@ -950,11 +951,11 @@ static bool HoistStep(Instruction *IncV, Instruction *InsertPos,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetWideRecurrence - Is this instruction potentially interesting from IVUsers'
|
/// GetWideRecurrence - Is this instruction potentially interesting from
|
||||||
// perspective after widening it's type? In other words, can the extend be
|
/// IVUsers' perspective after widening it's type? In other words, can the
|
||||||
// safely hoisted out of the loop with SCEV reducing the value to a recurrence
|
/// extend be safely hoisted out of the loop with SCEV reducing the value to a
|
||||||
// on the same loop. If so, return the sign or zero extended
|
/// recurrence on the same loop. If so, return the sign or zero extended
|
||||||
// recurrence. Otherwise return NULL.
|
/// recurrence. Otherwise return NULL.
|
||||||
const SCEVAddRecExpr *WidenIV::GetWideRecurrence(Instruction *NarrowUse) {
|
const SCEVAddRecExpr *WidenIV::GetWideRecurrence(Instruction *NarrowUse) {
|
||||||
if (!SE->isSCEVable(NarrowUse->getType()))
|
if (!SE->isSCEVable(NarrowUse->getType()))
|
||||||
return 0;
|
return 0;
|
||||||
@ -1270,9 +1271,9 @@ void IndVarSimplify::SimplifyCongruentIVs(Loop *L) {
|
|||||||
// LinearFunctionTestReplace and its kin. Rewrite the loop exit condition.
|
// LinearFunctionTestReplace and its kin. Rewrite the loop exit condition.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// Check for expressions that ScalarEvolution generates to compute
|
/// Check for expressions that ScalarEvolution generates to compute
|
||||||
// BackedgeTakenInfo. If these expressions have not been reduced, then expanding
|
/// BackedgeTakenInfo. If these expressions have not been reduced, then
|
||||||
// them may incur additional cost (albeit in the loop preheader).
|
/// expanding them may incur additional cost (albeit in the loop preheader).
|
||||||
static bool isHighCostExpansion(const SCEV *S, BranchInst *BI,
|
static bool isHighCostExpansion(const SCEV *S, BranchInst *BI,
|
||||||
ScalarEvolution *SE) {
|
ScalarEvolution *SE) {
|
||||||
// If the backedge-taken count is a UDiv, it's very likely a UDiv that
|
// If the backedge-taken count is a UDiv, it's very likely a UDiv that
|
||||||
|
Loading…
Reference in New Issue
Block a user