forked from OSchip/llvm-project
[LVI] Add Datalayout to the class LazyValueInfo since all its Impls require it. NFC
llvm-svn: 297583
This commit is contained in:
parent
473b75c3d5
commit
a10e3e4c34
|
@ -32,6 +32,7 @@ namespace llvm {
|
|||
class LazyValueInfo {
|
||||
friend class LazyValueInfoWrapperPass;
|
||||
AssumptionCache *AC = nullptr;
|
||||
const DataLayout *DL = nullptr;
|
||||
class TargetLibraryInfo *TLI = nullptr;
|
||||
DominatorTree *DT = nullptr;
|
||||
void *PImpl = nullptr;
|
||||
|
@ -40,16 +41,17 @@ class LazyValueInfo {
|
|||
public:
|
||||
~LazyValueInfo();
|
||||
LazyValueInfo() {}
|
||||
LazyValueInfo(AssumptionCache *AC_, TargetLibraryInfo *TLI_,
|
||||
LazyValueInfo(AssumptionCache *AC_, const DataLayout *DL_, TargetLibraryInfo *TLI_,
|
||||
DominatorTree *DT_)
|
||||
: AC(AC_), TLI(TLI_), DT(DT_) {}
|
||||
: AC(AC_), DL(DL_), TLI(TLI_), DT(DT_) {}
|
||||
LazyValueInfo(LazyValueInfo &&Arg)
|
||||
: AC(Arg.AC), TLI(Arg.TLI), DT(Arg.DT), PImpl(Arg.PImpl) {
|
||||
: AC(Arg.AC), DL(Arg.DL), TLI(Arg.TLI), DT(Arg.DT), PImpl(Arg.PImpl) {
|
||||
Arg.PImpl = nullptr;
|
||||
}
|
||||
LazyValueInfo &operator=(LazyValueInfo &&Arg) {
|
||||
releaseMemory();
|
||||
AC = Arg.AC;
|
||||
DL = Arg.DL;
|
||||
TLI = Arg.TLI;
|
||||
DT = Arg.DT;
|
||||
PImpl = Arg.PImpl;
|
||||
|
|
|
@ -1554,7 +1554,7 @@ LazyValueInfo LazyValueAnalysis::run(Function &F, FunctionAnalysisManager &FAM)
|
|||
auto &TLI = FAM.getResult<TargetLibraryAnalysis>(F);
|
||||
auto *DT = FAM.getCachedResult<DominatorTreeAnalysis>(F);
|
||||
|
||||
return LazyValueInfo(&AC, &TLI, DT);
|
||||
return LazyValueInfo(&AC, &F.getParent()->getDataLayout(), &TLI, DT);
|
||||
}
|
||||
|
||||
/// Returns true if we can statically tell that this value will never be a
|
||||
|
|
Loading…
Reference in New Issue