diff options
| author | Dan Gohman <gohman@apple.com> | 2009-06-19 17:49:54 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-06-19 17:49:54 +0000 |
| commit | b9063a84ce76849cd074097a45dde9391aa57e38 (patch) | |
| tree | c41e6b8c64b13c26dec529f7ae694b12d4ef8002 | |
| parent | 81241a37fae3e3faf4dc9bd7bb0735c0757de304 (diff) | |
| download | bcm5719-llvm-b9063a84ce76849cd074097a45dde9391aa57e38.tar.gz bcm5719-llvm-b9063a84ce76849cd074097a45dde9391aa57e38.zip | |
Make ScalarEvolution::print print getSCEVAtScope values for
expressions, when interesting.
llvm-svn: 73776
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 94b75baeee0..049f886c5ab 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -4048,9 +4048,17 @@ void ScalarEvolution::print(raw_ostream &OS, const Module* ) const { SCEVHandle SV = SE.getSCEV(&*I); SV->print(OS); - if (const Loop *L = LI->getLoopFor((*I).getParent())) { + const Loop *L = LI->getLoopFor((*I).getParent()); + + SCEVHandle AtUse = SE.getSCEVAtScope(SV, L); + if (AtUse != SV) { + OS << " --> "; + AtUse->print(OS); + } + + if (L) { OS << "\t\t" "Exits: "; - SCEVHandle ExitValue = SE.getSCEVAtScope(&*I, L->getParentLoop()); + SCEVHandle ExitValue = SE.getSCEVAtScope(SV, L->getParentLoop()); if (!ExitValue->isLoopInvariant(L)) { OS << "<<Unknown>>"; } else { |

