diff options
author | Philip Reames <listmail@philipreames.com> | 2016-04-25 18:48:43 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2016-04-25 18:48:43 +0000 |
commit | 3bb28329000cd646ae24bbf44878b070c6d43bec (patch) | |
tree | 213098d8910dc3cb484a3b6a9636b3c02627f688 /llvm/lib/Analysis/LazyValueInfo.cpp | |
parent | 6671577eb309fd61822bd0c437ebb7e1534acf96 (diff) | |
download | llvm-3bb28329000cd646ae24bbf44878b070c6d43bec.zip llvm-3bb28329000cd646ae24bbf44878b070c6d43bec.tar.gz llvm-3bb28329000cd646ae24bbf44878b070c6d43bec.tar.bz2 |
[LVI] Clarify comments describing the lattice values
There has been much recent confusion about the partition in the lattice between constant and non-constant values. Hopefully, documenting this will prevent confusion going forward.
llvm-svn: 267440
Diffstat (limited to 'llvm/lib/Analysis/LazyValueInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/LazyValueInfo.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index 8a3e4fc..98136b8 100644 --- a/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/llvm/lib/Analysis/LazyValueInfo.cpp @@ -63,19 +63,24 @@ namespace llvm { namespace { class LVILatticeVal { enum LatticeValueTy { - /// This Value has no known value yet. + /// This Value has no known value yet. As a result, this implies the + /// producing instruction is dead. Caution: We use this as the starting + /// state in our local meet rules. In this usage, it's taken to mean + /// "nothing known yet". undefined, - /// This Value has a specific constant value. + /// This Value has a specific constant value. (For integers, constantrange + /// is used instead.) constant, - /// This Value is known to not have the specified value. + /// This Value is known to not have the specified value. (For integers, + /// constantrange is used instead.) notconstant, - /// The Value falls within this range. + /// The Value falls within this range. (Used only for integer typed values.) constantrange, - /// This value is not known to be constant, and we know that it has a value. + /// We can not precisely model the dynamic values this value might take. overdefined }; |