[clang] [llvm] [HIP] add --offload-compression-level= option (PR #83605)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 8 13:13:51 PST 2024


================
@@ -2863,3 +2863,18 @@ void tools::addOutlineAtomicsArgs(const Driver &D, const ToolChain &TC,
     CmdArgs.push_back("+outline-atomics");
   }
 }
+
+void tools::addOffloadCompressArgs(const llvm::opt::ArgList &TCArgs,
+                                   llvm::opt::ArgStringList &CmdArgs) {
+  if (TCArgs.hasFlag(options::OPT_offload_compress,
+                     options::OPT_no_offload_compress, false))
+    CmdArgs.push_back("-compress");
+  if (TCArgs.hasArg(options::OPT_v))
+    CmdArgs.push_back("-verbose");
+  if (auto *Arg =
+          TCArgs.getLastArg(options::OPT_offload_compression_level_EQ)) {
+    std::string CompressionLevelArg =
+        std::string("-compression-level=") + Arg->getValue();
+    CmdArgs.push_back(TCArgs.MakeArgString(CompressionLevelArg));
----------------
yxsamliu wrote:

will do

https://github.com/llvm/llvm-project/pull/83605


More information about the cfe-commits mailing list