[LLVMdev] LazyValueInfo.getPredicateAt

Artur Pilipenko apilipenko at azulsystems.com
Thu Apr 16 05:22:03 PDT 2015


Hi,

Is it intentional that LazyValueInfo.getPredicateAt doesn't solve for 
the value and only takes assumptions into account?

getPredicateAt gets lattice value from cache using getValueAt call:
LVILatticeVal LazyValueInfoCache::getValueAt(Value *V, Instruction *CxtI) {
   ...
   LVILatticeVal Result;
   mergeAssumeBlockValueConstantRange(V, Result, CxtI);
   ...
   return Result;
}

Other get functions in LazyValueInfoCache solve to obtain the result:
LVILatticeVal LazyValueInfoCache::getValueInBlock(Value *V, BasicBlock *BB,
                                                   Instruction *CxtI) {

   ...
   pushBlockValue(std::make_pair(BB, V));
   solve();
   LVILatticeVal Result = getBlockValue(V, BB);
   mergeAssumeBlockValueConstantRange(V, Result, CxtI);
   ...
   return Result;
}

Thanks,
Artur



More information about the llvm-dev mailing list