@@ -63,14 +63,14 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
6363 public InstVisitor<InstCombinerImpl, Instruction *> {
6464public:
6565 InstCombinerImpl (InstructionWorklist &Worklist, BuilderTy &Builder,
66- bool MinimizeSize , AAResults *AA, AssumptionCache &AC,
66+ Function &F , AAResults *AA, AssumptionCache &AC,
6767 TargetLibraryInfo &TLI, TargetTransformInfo &TTI,
6868 DominatorTree &DT, OptimizationRemarkEmitter &ORE,
6969 BlockFrequencyInfo *BFI, BranchProbabilityInfo *BPI,
7070 ProfileSummaryInfo *PSI, const DataLayout &DL,
7171 ReversePostOrderTraversal<BasicBlock *> &RPOT)
72- : InstCombiner(Worklist, Builder, MinimizeSize , AA, AC, TLI, TTI, DT, ORE,
73- BFI, BPI, PSI, DL, RPOT) {}
72+ : InstCombiner(Worklist, Builder, F , AA, AC, TLI, TTI, DT, ORE, BFI, BPI ,
73+ PSI, DL, RPOT) {}
7474
7575 virtual ~InstCombinerImpl () = default ;
7676
@@ -470,14 +470,14 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
470470 Value *simplifyNonNullOperand (Value *V, bool HasDereferenceable,
471471 unsigned Depth = 0 );
472472
473- static SelectInst *createSelectInstMaybeWithUnknownBranchWeights (
474- Value *C, Value *S1, Value *S2, Function *F, const Twine &NameStr = " " ,
475- InsertPosition InsertBefore = nullptr , Instruction *MDFrom = nullptr ) {
473+ SelectInst *createSelectInst (Value *C, Value *S1, Value *S2,
474+ const Twine &NameStr = " " ,
475+ InsertPosition InsertBefore = nullptr ,
476+ Instruction *MDFrom = nullptr ) {
476477 SelectInst *SI =
477478 SelectInst::Create (C, S1, S2, NameStr, InsertBefore, MDFrom);
478479 if (SI && !MDFrom) {
479- assert (F && " provided parent function is nullptr!" );
480- setExplicitlyUnknownBranchWeightsIfProfiled (*SI, *F, DEBUG_TYPE);
480+ setExplicitlyUnknownBranchWeightsIfProfiled (*SI, F, DEBUG_TYPE);
481481 }
482482 return SI;
483483 }
0 commit comments