Skip to content

Commit 709d03f

Browse files
committed
[LVI] Clarify getValueAt/getValueInBlock doc comments (NFC)
The lattice value returned by getValueInBlock() holds at the start of the block, not at the end. Also make it clearer what the difference between getValueInBlock() and getValueAt() is.
1 parent 9b959b5 commit 709d03f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

llvm/lib/Analysis/LazyValueInfo.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,14 +434,16 @@ class LazyValueInfoImpl {
434434
void solve();
435435

436436
public:
437-
/// This is the query interface to determine the lattice
438-
/// value for the specified Value* at the end of the specified block.
437+
/// This is the query interface to determine the lattice value for the
438+
/// specified Value* at the context instruction (if specified) or at the
439+
/// start of the block.
439440
ValueLatticeElement getValueInBlock(Value *V, BasicBlock *BB,
440441
Instruction *CxtI = nullptr);
441442

442-
/// This is the query interface to determine the lattice
443-
/// value for the specified Value* at the specified instruction (generally
444-
/// from an assume intrinsic).
443+
/// This is the query interface to determine the lattice value for the
444+
/// specified Value* at the specified instruction using only information
445+
/// from assumes/guards and range metadata. Unlike getValueInBlock(), no
446+
/// recursive query is performed.
445447
ValueLatticeElement getValueAt(Value *V, Instruction *CxtI);
446448

447449
/// This is the query interface to determine the lattice

0 commit comments

Comments
 (0)