@@ -598,9 +598,9 @@ Expected<StringRef> linkDeviceInputFiles(SmallVectorImpl<StringRef> &InputFiles,
598598static Error getSYCLDeviceLibs (SmallVector<std::string, 16 > &DeviceLibFiles,
599599 const ArgList &Args) {
600600 StringRef SYCLDeviceLibLoc (" " );
601- if (Arg *A = Args.getLastArg (OPT_sycl_device_library_location_EQ ))
601+ if (Arg *A = Args.getLastArg (OPT_device_library_location_EQ ))
602602 SYCLDeviceLibLoc = A->getValue ();
603- if (Arg *A = Args.getLastArg (OPT_sycl_device_lib_EQ )) {
603+ if (Arg *A = Args.getLastArg (OPT_device_lib_EQ )) {
604604 if (A->getValues ().size () == 0 )
605605 return createStringError (
606606 inconvertibleErrorCode (),
@@ -706,7 +706,7 @@ static Expected<StringRef> linkDeviceBitcode(ArrayRef<StringRef> InputFiles,
706706
707707 // For NVPTX backend we need to also link libclc and CUDA libdevice.
708708 if (Triple.isNVPTX ()) {
709- if (Arg *A = Args.getLastArg (OPT_sycl_nvptx_device_lib_EQ )) {
709+ if (Arg *A = Args.getLastArg (OPT_nvptx_device_lib_EQ )) {
710710 if (A->getValues ().size () == 0 )
711711 return createStringError (
712712 inconvertibleErrorCode (),
@@ -773,11 +773,11 @@ getTripleBasedSYCLPostLinkOpts(const ArgList &Args,
773773 // because it only increases amount of code for device compiler to handle,
774774 // without any actual benefits.
775775 // TODO: Try to extend this feature for non-Intel GPUs.
776- if ((!Args.hasFlag (OPT_no_sycl_remove_unused_external_funcs ,
777- OPT_sycl_remove_unused_external_funcs , false ) &&
776+ if ((!Args.hasFlag (OPT_no_remove_unused_external_funcs ,
777+ OPT_remove_unused_external_funcs , false ) &&
778778 !SYCLNativeCPU) &&
779- !Args.hasArg (OPT_sycl_allow_device_image_dependencies ) &&
780- !Triple.isNVPTX () && !Triple. isAMDGPU ())
779+ !Args.hasArg (OPT_allow_device_image_dependencies) && !Triple. isNVPTX ( ) &&
780+ !Triple.isAMDGPU ())
781781 PostLinkArgs.push_back (" -emit-only-kernels-as-entry-points" );
782782
783783 if (!Triple.isAMDGCN ())
@@ -788,9 +788,9 @@ getTripleBasedSYCLPostLinkOpts(const ArgList &Args,
788788
789789 bool SplitEsimdByDefault = Triple.isSPIROrSPIRV ();
790790 bool SplitEsimd =
791- Args.hasFlag (OPT_sycl_device_code_split_esimd ,
792- OPT_no_sycl_device_code_split_esimd, SplitEsimdByDefault);
793- if (!Args.hasArg (OPT_sycl_thin_lto ))
791+ Args.hasFlag (OPT_device_code_split_esimd, OPT_no_device_code_split_esimd ,
792+ SplitEsimdByDefault);
793+ if (!Args.hasArg (OPT_thin_lto ))
794794 PostLinkArgs.push_back (" -symbols" );
795795 // Specialization constant info generation is mandatory -
796796 // add options unconditionally
@@ -801,8 +801,8 @@ getTripleBasedSYCLPostLinkOpts(const ArgList &Args,
801801 PostLinkArgs.push_back (" -lower-esimd" );
802802
803803 bool IsAOT = Triple.isNVPTX () || Triple.isAMDGCN () || Triple.isSPIRAOT ();
804- if (Args.hasFlag (OPT_sycl_add_default_spec_consts_image ,
805- OPT_no_sycl_add_default_spec_consts_image , false ) &&
804+ if (Args.hasFlag (OPT_add_default_spec_consts_image ,
805+ OPT_no_add_default_spec_consts_image , false ) &&
806806 IsAOT)
807807 PostLinkArgs.push_back (" -generate-device-image-default-spec-consts" );
808808}
@@ -828,7 +828,7 @@ runSYCLPostLinkTool(ArrayRef<StringRef> InputFiles, const ArgList &Args) {
828828 SmallVector<StringRef, 8 > CmdArgs;
829829 CmdArgs.push_back (*SYCLPostLinkPath);
830830 const llvm::Triple Triple (Args.getLastArgValue (OPT_triple_EQ));
831- Arg *SYCLDeviceLibLoc = Args.getLastArg (OPT_sycl_device_library_location_EQ );
831+ Arg *SYCLDeviceLibLoc = Args.getLastArg (OPT_device_library_location_EQ );
832832 if (SYCLDeviceLibLoc && !Triple.isSPIRAOT ()) {
833833 std::string SYCLDeviceLibLocParam = SYCLDeviceLibLoc->getValue ();
834834 std::string BF16DeviceLibLoc =
@@ -840,7 +840,7 @@ runSYCLPostLinkTool(ArrayRef<StringRef> InputFiles, const ArgList &Args) {
840840 }
841841 getTripleBasedSYCLPostLinkOpts (Args, CmdArgs, Triple);
842842 StringRef SYCLPostLinkOptions;
843- if (Arg *A = Args.getLastArg (OPT_sycl_post_link_options_EQ ))
843+ if (Arg *A = Args.getLastArg (OPT_post_link_options_EQ ))
844844 SYCLPostLinkOptions = A->getValue ();
845845 SYCLPostLinkOptions.split (CmdArgs, " " , /* MaxSplit = */ -1 ,
846846 /* KeepEmpty = */ false );
@@ -1037,10 +1037,9 @@ static Expected<StringRef> runLLVMToSPIRVTranslation(StringRef File,
10371037static void addBackendOptions (const ArgList &Args,
10381038 SmallVector<StringRef, 8 > &CmdArgs, bool IsCPU) {
10391039 StringRef OptC =
1040- Args.getLastArgValue (OPT_sycl_backend_compile_options_from_image_EQ );
1040+ Args.getLastArgValue (OPT_backend_compile_options_from_image_EQ );
10411041 OptC.split (CmdArgs, " " , /* MaxSplit=*/ -1 , /* KeepEmpty=*/ false );
1042- StringRef OptL =
1043- Args.getLastArgValue (OPT_sycl_backend_link_options_from_image_EQ);
1042+ StringRef OptL = Args.getLastArgValue (OPT_backend_link_options_from_image_EQ);
10441043 OptL.split (CmdArgs, " " , /* MaxSplit=*/ -1 , /* KeepEmpty=*/ false );
10451044 StringRef OptTool = (IsCPU) ? Args.getLastArgValue (OPT_cpu_tool_arg_EQ)
10461045 : Args.getLastArgValue (OPT_gpu_tool_arg_EQ);
@@ -1236,8 +1235,7 @@ Error runSYCLLink(ArrayRef<StringRef> Files, const ArgList &Args) {
12361235
12371236 auto &SplitModules = *SplitModulesOrErr;
12381237 const llvm::Triple Triple (Args.getLastArgValue (OPT_triple_EQ));
1239- if ((Triple.isNVPTX () || Triple.isAMDGCN ()) &&
1240- Args.hasArg (OPT_sycl_embed_ir)) {
1238+ if ((Triple.isNVPTX () || Triple.isAMDGCN ()) && Args.hasArg (OPT_embed_ir)) {
12411239 // When compiling for Nvidia/AMD devices and the user requested the
12421240 // IR to be embedded in the application (via option), run the output
12431241 // of sycl-post-link (filetable referencing LLVM Bitcode + symbols)
@@ -1341,20 +1339,20 @@ int main(int argc, char **argv) {
13411339 if (Args.hasArg (OPT_o))
13421340 OutputFile = Args.getLastArgValue (OPT_o);
13431341
1344- UseSYCLPostLinkTool = Args. hasFlag (OPT_use_sycl_post_link_tool,
1345- OPT_no_use_sycl_post_link_tool , true );
1346- if (!UseSYCLPostLinkTool && Args.hasArg (OPT_use_sycl_post_link_tool ))
1342+ UseSYCLPostLinkTool =
1343+ Args. hasFlag (OPT_use_post_link_tool, OPT_no_use_post_link_tool , true );
1344+ if (!UseSYCLPostLinkTool && Args.hasArg (OPT_use_post_link_tool ))
13471345 reportError (createStringError (" -use-sycl-post-link-tool and "
13481346 " -no-use-sycl-post-link-tool options can't "
13491347 " be used together." ));
13501348
1351- if (Args.hasArg (OPT_sycl_module_split_mode_EQ )) {
1349+ if (Args.hasArg (OPT_module_split_mode_EQ )) {
13521350 if (UseSYCLPostLinkTool)
13531351 reportError (createStringError (
13541352 " -sycl-module-split-mode should be used with "
13551353 " the -no-use-sycl-post-link-tool command line option." ));
13561354
1357- StringRef StrMode = Args.getLastArgValue (OPT_sycl_module_split_mode_EQ );
1355+ StringRef StrMode = Args.getLastArgValue (OPT_module_split_mode_EQ );
13581356 SYCLModuleSplitMode = module_split::convertStringToSplitMode (StrMode);
13591357 if (!SYCLModuleSplitMode)
13601358 reportError (createStringError (
@@ -1363,8 +1361,8 @@ int main(int argc, char **argv) {
13631361 StrMode)));
13641362 }
13651363
1366- if (Args.hasArg (OPT_sycl_dump_device_code_EQ )) {
1367- Arg *A = Args.getLastArg (OPT_sycl_dump_device_code_EQ );
1364+ if (Args.hasArg (OPT_dump_device_code_EQ )) {
1365+ Arg *A = Args.getLastArg (OPT_dump_device_code_EQ );
13681366 OffloadImageDumpDir = A->getValue ();
13691367 if (OffloadImageDumpDir.empty ())
13701368 sys::path::native (OffloadImageDumpDir = " ./" );
0 commit comments