================
@@ -942,20 +942,28 @@ CompressedOffloadBundle::compress(const 
llvm::MemoryBuffer &Input,
       Input.getBuffer().size());
 
   llvm::compression::Format CompressionFormat;
+  int Level;
 
-  if (llvm::compression::zstd::isAvailable())
+  if (llvm::compression::zstd::isAvailable()) {
     CompressionFormat = llvm::compression::Format::Zstd;
-  else if (llvm::compression::zlib::isAvailable())
+    // Use a high zstd compress level by default for better size reduction.
+    const int DefaultZstdLevel = 20;
----------------
Artem-B wrote:

What's the default compression level for zstd? 

It would be great if we could override the compression level. I'm somewhat 
reluctant to impose max compression level on everyone by default, without any 
way out, if it turns out to be a problem.

@MaskRay WDYT? 

Max compression level may be fine. If we produce enough stuff for compression 
to take long, compilation time itself will likely dwarf the compression time. 
For the small TUs, even slow compression may be fine.

@yxsamliu how long the compilation w/o compression takes in your benchmarks?

https://github.com/llvm/llvm-project/pull/83605
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to