comparison llvm/lib/Analysis/ValueLattice.cpp @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents 1d019706d866
children 1f2b6ac9f198
comparison
equal deleted inserted replaced
172:9fbae9c8bf63 173:0572611fdcc8
8 8
9 #include "llvm/Analysis/ValueLattice.h" 9 #include "llvm/Analysis/ValueLattice.h"
10 10
11 namespace llvm { 11 namespace llvm {
12 raw_ostream &operator<<(raw_ostream &OS, const ValueLatticeElement &Val) { 12 raw_ostream &operator<<(raw_ostream &OS, const ValueLatticeElement &Val) {
13 if (Val.isUndefined()) 13 if (Val.isUnknown())
14 return OS << "undefined"; 14 return OS << "unknown";
15 if (Val.isUndef())
16 return OS << "undef";
15 if (Val.isOverdefined()) 17 if (Val.isOverdefined())
16 return OS << "overdefined"; 18 return OS << "overdefined";
17 19
18 if (Val.isNotConstant()) 20 if (Val.isNotConstant())
19 return OS << "notconstant<" << *Val.getNotConstant() << ">"; 21 return OS << "notconstant<" << *Val.getNotConstant() << ">";
22
23 if (Val.isConstantRangeIncludingUndef())
24 return OS << "constantrange incl. undef <"
25 << Val.getConstantRange(true).getLower() << ", "
26 << Val.getConstantRange(true).getUpper() << ">";
27
20 if (Val.isConstantRange()) 28 if (Val.isConstantRange())
21 return OS << "constantrange<" << Val.getConstantRange().getLower() << ", " 29 return OS << "constantrange<" << Val.getConstantRange().getLower() << ", "
22 << Val.getConstantRange().getUpper() << ">"; 30 << Val.getConstantRange().getUpper() << ">";
23 return OS << "constant<" << *Val.getConstant() << ">"; 31 return OS << "constant<" << *Val.getConstant() << ">";
24 } 32 }