mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
reduce indentation. Print <nuw> and <nsw> when dumping SCEV AddRec's
that have the bit set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123104 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
75fbd3793f
commit
f1859891b7
@ -157,6 +157,10 @@ void SCEV::print(raw_ostream &OS) const {
|
||||
for (unsigned i = 1, e = AR->getNumOperands(); i != e; ++i)
|
||||
OS << ",+," << *AR->getOperand(i);
|
||||
OS << "}<";
|
||||
if (AR->hasNoUnsignedWrap())
|
||||
OS << "nuw><";
|
||||
if (AR->hasNoSignedWrap())
|
||||
OS << "nsw><";
|
||||
WriteAsOperand(OS, AR->getLoop()->getHeader(), /*PrintType=*/false);
|
||||
OS << ">";
|
||||
return;
|
||||
@ -3608,7 +3612,9 @@ ScalarEvolution::getBackedgeTakenInfo(const Loop *L) {
|
||||
// backedge-taken count, which could result in infinite recursion.
|
||||
std::pair<std::map<const Loop *, BackedgeTakenInfo>::iterator, bool> Pair =
|
||||
BackedgeTakenCounts.insert(std::make_pair(L, getCouldNotCompute()));
|
||||
if (Pair.second) {
|
||||
if (!Pair.second)
|
||||
return Pair.first->second;
|
||||
|
||||
BackedgeTakenInfo BECount = ComputeBackedgeTakenCount(L);
|
||||
if (BECount.Exact != getCouldNotCompute()) {
|
||||
assert(isLoopInvariant(BECount.Exact, L) &&
|
||||
@ -3663,7 +3669,6 @@ ScalarEvolution::getBackedgeTakenInfo(const Loop *L) {
|
||||
PushDefUseChildren(I, Worklist);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Pair.first->second;
|
||||
}
|
||||
|
||||
|
@ -243,8 +243,7 @@ ICmpInst *IndVarSimplify::LinearFunctionTestReplace(Loop *L,
|
||||
/// happen later, except that it's more powerful in some cases, because it's
|
||||
/// able to brute-force evaluate arbitrary instructions as long as they have
|
||||
/// constant operands at the beginning of the loop.
|
||||
void IndVarSimplify::RewriteLoopExitValues(Loop *L,
|
||||
SCEVExpander &Rewriter) {
|
||||
void IndVarSimplify::RewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter) {
|
||||
// Verify the input to the pass in already in LCSSA form.
|
||||
assert(L->isLCSSAForm(*DT));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -analyze -scalar-evolution | grep { --> {.*,+,.*}<%bb>} | count 8
|
||||
; RUN: opt < %s -analyze -scalar-evolution | grep { --> {.*,+,.*}.*<%bb>} | count 8
|
||||
|
||||
; The addrecs in this loop are analyzable only by using nsw information.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user