X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FTransforms%2FUtils%2FSimplifyInstructions.cpp;h=56bc9dd30f0688e3f072c93d3100feb6f3c63c05;hp=c62e89ddbe7e03754bc4eef7ee900f754579c085;hb=7f2eff792a2e18758a25956abdac2440ee18dd7f;hpb=bb4954ddbfc9c1c3b2aa45b551bc02927ab65629 diff --git a/lib/Transforms/Utils/SimplifyInstructions.cpp b/lib/Transforms/Utils/SimplifyInstructions.cpp index c62e89ddbe7..56bc9dd30f0 100644 --- a/lib/Transforms/Utils/SimplifyInstructions.cpp +++ b/lib/Transforms/Utils/SimplifyInstructions.cpp @@ -45,7 +45,9 @@ namespace { /// runOnFunction - Remove instructions that simplify. bool runOnFunction(Function &F) { - const DominatorTree *DT = getAnalysisIfAvailable(); + const DominatorTreeWrapperPass *DTWP = + getAnalysisIfAvailable(); + const DominatorTree *DT = DTWP ? &DTWP->getDomTree() : 0; const DataLayout *TD = getAnalysisIfAvailable(); const TargetLibraryInfo *TLI = &getAnalysis(); SmallPtrSet S1, S2, *ToSimplify = &S1, *Next = &S2;