@@ -1566,7 +1566,6 @@ void LazyValueInfoImpl::threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc,
1566
1566
1567
1567
bool LazyValueInfoWrapperPass::runOnFunction (Function &F) {
1568
1568
Info.AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache (F);
1569
- Info.TLI = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI (F);
1570
1569
1571
1570
if (auto *Impl = Info.getImpl ())
1572
1571
Impl->clear ();
@@ -1627,9 +1626,8 @@ void LazyValueInfoWrapperPass::releaseMemory() { Info.releaseMemory(); }
1627
1626
LazyValueInfo LazyValueAnalysis::run (Function &F,
1628
1627
FunctionAnalysisManager &FAM) {
1629
1628
auto &AC = FAM.getResult <AssumptionAnalysis>(F);
1630
- auto &TLI = FAM.getResult <TargetLibraryAnalysis>(F);
1631
1629
1632
- return LazyValueInfo (&AC, &F.getParent ()->getDataLayout (), &TLI );
1630
+ return LazyValueInfo (&AC, &F.getParent ()->getDataLayout ());
1633
1631
}
1634
1632
1635
1633
// / Returns true if we can statically tell that this value will never be a
@@ -1714,11 +1712,11 @@ ConstantRange LazyValueInfo::getConstantRangeOnEdge(Value *V,
1714
1712
1715
1713
static LazyValueInfo::Tristate
1716
1714
getPredicateResult (unsigned Pred, Constant *C, const ValueLatticeElement &Val,
1717
- const DataLayout &DL, TargetLibraryInfo *TLI ) {
1715
+ const DataLayout &DL) {
1718
1716
// If we know the value is a constant, evaluate the conditional.
1719
1717
Constant *Res = nullptr ;
1720
1718
if (Val.isConstant ()) {
1721
- Res = ConstantFoldCompareInstOperands (Pred, Val.getConstant (), C, DL, TLI );
1719
+ Res = ConstantFoldCompareInstOperands (Pred, Val.getConstant (), C, DL);
1722
1720
if (ConstantInt *ResCI = dyn_cast_or_null<ConstantInt>(Res))
1723
1721
return ResCI->isZero () ? LazyValueInfo::False : LazyValueInfo::True;
1724
1722
return LazyValueInfo::Unknown;
@@ -1759,15 +1757,13 @@ getPredicateResult(unsigned Pred, Constant *C, const ValueLatticeElement &Val,
1759
1757
if (Pred == ICmpInst::ICMP_EQ) {
1760
1758
// !C1 == C -> false iff C1 == C.
1761
1759
Res = ConstantFoldCompareInstOperands (ICmpInst::ICMP_NE,
1762
- Val.getNotConstant (), C, DL,
1763
- TLI);
1760
+ Val.getNotConstant (), C, DL);
1764
1761
if (Res && Res->isNullValue ())
1765
1762
return LazyValueInfo::False;
1766
1763
} else if (Pred == ICmpInst::ICMP_NE) {
1767
1764
// !C1 != C -> true iff C1 == C.
1768
1765
Res = ConstantFoldCompareInstOperands (ICmpInst::ICMP_NE,
1769
- Val.getNotConstant (), C, DL,
1770
- TLI);
1766
+ Val.getNotConstant (), C, DL);
1771
1767
if (Res && Res->isNullValue ())
1772
1768
return LazyValueInfo::True;
1773
1769
}
@@ -1787,7 +1783,7 @@ LazyValueInfo::getPredicateOnEdge(unsigned Pred, Value *V, Constant *C,
1787
1783
ValueLatticeElement Result =
1788
1784
getOrCreateImpl (M).getValueOnEdge (V, FromBB, ToBB, CxtI);
1789
1785
1790
- return getPredicateResult (Pred, C, Result, M->getDataLayout (), TLI );
1786
+ return getPredicateResult (Pred, C, Result, M->getDataLayout ());
1791
1787
}
1792
1788
1793
1789
LazyValueInfo::Tristate
@@ -1811,7 +1807,7 @@ LazyValueInfo::getPredicateAt(unsigned Pred, Value *V, Constant *C,
1811
1807
ValueLatticeElement Result =
1812
1808
UseBlockValue ? Impl.getValueInBlock (V, CxtI->getParent (), CxtI)
1813
1809
: Impl.getValueAt (V, CxtI);
1814
- Tristate Ret = getPredicateResult (Pred, C, Result, DL, TLI );
1810
+ Tristate Ret = getPredicateResult (Pred, C, Result, DL);
1815
1811
if (Ret != Unknown)
1816
1812
return Ret;
1817
1813
0 commit comments