LLVM  6.0.0svn
ValueLattice.cpp
Go to the documentation of this file.
1 //===- ValueLattice.cpp - Value constraint analysis -------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
11 
12 namespace llvm {
14  if (Val.isUndefined())
15  return OS << "undefined";
16  if (Val.isOverdefined())
17  return OS << "overdefined";
18 
19  if (Val.isNotConstant())
20  return OS << "notconstant<" << *Val.getNotConstant() << ">";
21  if (Val.isConstantRange())
22  return OS << "constantrange<" << Val.getConstantRange().getLower() << ", "
23  << Val.getConstantRange().getUpper() << ">";
24  return OS << "constant<" << *Val.getConstant() << ">";
25 }
26 } // end namespace llvm
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
const APInt & getUpper() const
Return the upper value for this range.
const ConstantRange & getConstantRange() const
Definition: ValueLattice.h:100
bool isOverdefined() const
Definition: ValueLattice.h:88
bool isNotConstant() const
Definition: ValueLattice.h:86
bool isConstantRange() const
Definition: ValueLattice.h:87
Constant * getConstant() const
Definition: ValueLattice.h:90
Constant * getNotConstant() const
Definition: ValueLattice.h:95
const APInt & getLower() const
Return the lower value for this range.
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
Definition: APInt.h:2018
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44