diff options
| author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-03-09 21:43:39 +0000 | 
|---|---|---|
| committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-03-09 21:43:39 +0000 | 
| commit | f25745298635eb0f30967fc87e3597e3e9f9a129 (patch) | |
| tree | 8c42ec07e68c013db2c4ae6a37088c04769ce984 /llvm/lib | |
| parent | ad11d4c1961cc55c96f735659edaa96a55938678 (diff) | |
| download | bcm5719-llvm-f25745298635eb0f30967fc87e3597e3e9f9a129.tar.gz bcm5719-llvm-f25745298635eb0f30967fc87e3597e3e9f9a129.zip  | |
[SCEV] Add a `scalar-evolution-print-constant-ranges' option
Summary:
Unused in this commit, but will be used in a subsequent change (D8142)
by a FileCheck test.
Reviewers: atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8143
llvm-svn: 231708
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 49adbc37676..ce92e8c3469 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -8150,6 +8150,12 @@ void ScalarEvolution::print(raw_ostream &OS, const Module *) const {        OS << "  -->  ";        const SCEV *SV = SE.getSCEV(&*I);        SV->print(OS); +      if (!isa<SCEVCouldNotCompute>(SV)) { +        OS << " U: "; +        SE.getUnsignedRange(SV).print(OS); +        OS << " S: "; +        SE.getSignedRange(SV).print(OS); +      }        const Loop *L = LI->getLoopFor((*I).getParent()); @@ -8157,6 +8163,12 @@ void ScalarEvolution::print(raw_ostream &OS, const Module *) const {        if (AtUse != SV) {          OS << "  -->  ";          AtUse->print(OS); +        if (!isa<SCEVCouldNotCompute>(AtUse)) { +          OS << " U: "; +          SE.getUnsignedRange(AtUse).print(OS); +          OS << " S: "; +          SE.getSignedRange(AtUse).print(OS); +        }        }        if (L) {  | 

