|
@@ -212,18 +212,23 @@ aot_apply_llvm_new_pass_manager(AOTCompContext *comp_ctx, LLVMModuleRef module)
|
|
|
cl::ParseCommandLineOptions(2, argv);
|
|
cl::ParseCommandLineOptions(2, argv);
|
|
|
#if LLVM_VERSION_MAJOR < 17
|
|
#if LLVM_VERSION_MAJOR < 17
|
|
|
PGO = PGOOptions("", "", "", PGOOptions::IRInstr);
|
|
PGO = PGOOptions("", "", "", PGOOptions::IRInstr);
|
|
|
-#else
|
|
|
|
|
|
|
+#elif LLVM_VERSION_MAJOR < 22
|
|
|
auto FS = vfs::getRealFileSystem();
|
|
auto FS = vfs::getRealFileSystem();
|
|
|
PGO = PGOOptions("", "", "", "", FS, PGOOptions::IRInstr);
|
|
PGO = PGOOptions("", "", "", "", FS, PGOOptions::IRInstr);
|
|
|
|
|
+#else
|
|
|
|
|
+ PGO = PGOOptions("", "", "", "", PGOOptions::IRInstr);
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
else if (comp_ctx->use_prof_file) {
|
|
else if (comp_ctx->use_prof_file) {
|
|
|
#if LLVM_VERSION_MAJOR < 17
|
|
#if LLVM_VERSION_MAJOR < 17
|
|
|
PGO = PGOOptions(comp_ctx->use_prof_file, "", "", PGOOptions::IRUse);
|
|
PGO = PGOOptions(comp_ctx->use_prof_file, "", "", PGOOptions::IRUse);
|
|
|
-#else
|
|
|
|
|
|
|
+#elif LLVM_VERSION_MAJOR < 22
|
|
|
auto FS = vfs::getRealFileSystem();
|
|
auto FS = vfs::getRealFileSystem();
|
|
|
PGO = PGOOptions(comp_ctx->use_prof_file, "", "", "", FS,
|
|
PGO = PGOOptions(comp_ctx->use_prof_file, "", "", "", FS,
|
|
|
PGOOptions::IRUse);
|
|
PGOOptions::IRUse);
|
|
|
|
|
+#else
|
|
|
|
|
+ PGO =
|
|
|
|
|
+ PGOOptions(comp_ctx->use_prof_file, "", "", "", PGOOptions::IRUse);
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
|
|
|