@@ -176,10 +176,6 @@ static cl::opt<std::string> WorkloadDefinitions(
176
176
177
177
extern cl::opt<std::string> UseCtxProfile;
178
178
179
- static cl::opt<std::string>
180
- ContextualProfile (" thinlto-pgo-ctx-prof" ,
181
- cl::desc (" Path to a contextual profile." ), cl::Hidden);
182
-
183
179
namespace llvm {
184
180
extern cl::opt<bool > EnableMemProfContextDisambiguation;
185
181
}
@@ -713,7 +709,7 @@ class WorkloadImportsManager : public ModuleImportsManager {
713
709
714
710
void loadFromCtxProf () {
715
711
std::error_code EC;
716
- auto BufferOrErr = MemoryBuffer::getFileOrSTDIN (ContextualProfile );
712
+ auto BufferOrErr = MemoryBuffer::getFileOrSTDIN (UseCtxProfile );
717
713
if (std::error_code EC = BufferOrErr.getError ()) {
718
714
report_fatal_error (" Failed to open contextual profile file" );
719
715
return ;
@@ -764,12 +760,12 @@ class WorkloadImportsManager : public ModuleImportsManager {
764
760
const ModuleSummaryIndex &Index,
765
761
DenseMap<StringRef, FunctionImporter::ExportSetTy> *ExportLists)
766
762
: ModuleImportsManager(IsPrevailing, Index, ExportLists) {
767
- if (ContextualProfile .empty () == WorkloadDefinitions.empty ()) {
763
+ if (UseCtxProfile .empty () == WorkloadDefinitions.empty ()) {
768
764
report_fatal_error (
769
765
" Pass only one of: -thinlto-pgo-ctx-prof or -thinlto-workload-def" );
770
766
return ;
771
767
}
772
- if (!ContextualProfile .empty ())
768
+ if (!UseCtxProfile .empty ())
773
769
loadFromCtxProf ();
774
770
else
775
771
loadFromJson ();
@@ -791,7 +787,7 @@ std::unique_ptr<ModuleImportsManager> ModuleImportsManager::create(
791
787
IsPrevailing,
792
788
const ModuleSummaryIndex &Index,
793
789
DenseMap<StringRef, FunctionImporter::ExportSetTy> *ExportLists) {
794
- if (WorkloadDefinitions.empty () && ContextualProfile .empty ()) {
790
+ if (WorkloadDefinitions.empty () && UseCtxProfile .empty ()) {
795
791
LLVM_DEBUG (dbgs () << " [Workload] Using the regular imports manager.\n " );
796
792
return std::unique_ptr<ModuleImportsManager>(
797
793
new ModuleImportsManager (IsPrevailing, Index, ExportLists));
0 commit comments