@@ -762,37 +762,31 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
762762 PGOOpt = PGOOptions (
763763 CodeGenOpts.InstrProfileOutput .empty () ? getDefaultProfileGenName ()
764764 : CodeGenOpts.InstrProfileOutput ,
765- " " , " " , CodeGenOpts. MemoryProfileUsePath , nullptr , PGOOptions::IRInstr,
766- PGOOptions::NoCSAction, CodeGenOpts.DebugInfoForProfiling );
765+ " " , " " , nullptr , PGOOptions::IRInstr, PGOOptions::NoCSAction ,
766+ CodeGenOpts.DebugInfoForProfiling );
767767 else if (CodeGenOpts.hasProfileIRUse ()) {
768768 // -fprofile-use.
769769 auto CSAction = CodeGenOpts.hasProfileCSIRUse () ? PGOOptions::CSIRUse
770770 : PGOOptions::NoCSAction;
771- PGOOpt = PGOOptions (
772- CodeGenOpts.ProfileInstrumentUsePath , " " ,
773- CodeGenOpts.ProfileRemappingFile , CodeGenOpts. MemoryProfileUsePath , VFS ,
774- PGOOptions::IRUse, CSAction, CodeGenOpts.DebugInfoForProfiling );
771+ PGOOpt =
772+ PGOOptions ( CodeGenOpts.ProfileInstrumentUsePath , " " ,
773+ CodeGenOpts.ProfileRemappingFile , VFS, PGOOptions::IRUse ,
774+ CSAction, CodeGenOpts.DebugInfoForProfiling );
775775 } else if (!CodeGenOpts.SampleProfileFile .empty ())
776776 // -fprofile-sample-use
777777 PGOOpt = PGOOptions (
778778 CodeGenOpts.SampleProfileFile , " " , CodeGenOpts.ProfileRemappingFile ,
779- CodeGenOpts.MemoryProfileUsePath , VFS, PGOOptions::SampleUse,
780- PGOOptions::NoCSAction, CodeGenOpts.DebugInfoForProfiling ,
781- CodeGenOpts.PseudoProbeForProfiling );
782- else if (!CodeGenOpts.MemoryProfileUsePath .empty ())
783- // -fmemory-profile-use (without any of the above options)
784- PGOOpt = PGOOptions (" " , " " , " " , CodeGenOpts.MemoryProfileUsePath , VFS,
785- PGOOptions::NoAction, PGOOptions::NoCSAction,
786- CodeGenOpts.DebugInfoForProfiling );
779+ VFS, PGOOptions::SampleUse, PGOOptions::NoCSAction,
780+ CodeGenOpts.DebugInfoForProfiling , CodeGenOpts.PseudoProbeForProfiling );
787781 else if (CodeGenOpts.PseudoProbeForProfiling )
788782 // -fpseudo-probe-for-profiling
789- PGOOpt = PGOOptions (" " , " " , " " , /* MemoryProfile= */ " " , nullptr ,
790- PGOOptions::NoAction, PGOOptions:: NoCSAction,
783+ PGOOpt = PGOOptions (" " , " " , " " , nullptr , PGOOptions::NoAction ,
784+ PGOOptions::NoCSAction,
791785 CodeGenOpts.DebugInfoForProfiling , true );
792786 else if (CodeGenOpts.DebugInfoForProfiling )
793787 // -fdebug-info-for-profiling
794- PGOOpt = PGOOptions (" " , " " , " " , /* MemoryProfile= */ " " , nullptr ,
795- PGOOptions::NoAction, PGOOptions:: NoCSAction, true );
788+ PGOOpt = PGOOptions (" " , " " , " " , nullptr , PGOOptions::NoAction ,
789+ PGOOptions::NoCSAction, true );
796790
797791 // Check to see if we want to generate a CS profile.
798792 if (CodeGenOpts.hasProfileCSIRInstr ()) {
@@ -814,8 +808,8 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
814808 CodeGenOpts.InstrProfileOutput .empty ()
815809 ? getDefaultProfileGenName ()
816810 : CodeGenOpts.InstrProfileOutput ,
817- " " , /* MemoryProfile= */ " " , nullptr , PGOOptions::NoAction,
818- PGOOptions::CSIRInstr, CodeGenOpts.DebugInfoForProfiling );
811+ " " , nullptr , PGOOptions::NoAction, PGOOptions::CSIRInstr ,
812+ CodeGenOpts.DebugInfoForProfiling );
819813 }
820814 if (TM)
821815 TM->setPGOOption (PGOOpt);
0 commit comments