================
@@ -1558,6 +1562,60 @@ class InProcessThinBackend : public ThinBackendProc {
     return BackendThreadPool.getMaxConcurrency();
   }
 };
+
+/// This Backend will run ThinBackend process but throw away all the output 
from
+/// the codegen. This class facilitates the first codegen round.
+class NoOutputThinBackend : public InProcessThinBackend {
----------------
NuriAmari wrote:

If I'm following correctly, it's not as if this backend really throws results 
away, but it writes the produced object files into the scratch buffer rather 
than to files. It also writes the optimized bitcode files to disk right?

I don't have a strong opinion, but maybe we could name the backend / adjust the 
comment to reflect this. I wouldn't even be opposed to naming the backends 
something specific to two-codegen rounds, as I don't see anyone using them for 
other purposes.

Lastly just an idea:  We could just hold the optimized bitcode in a similar 
buffer in memory, rather than writing them to disk and reading them again 
between rounds. Might run a bit faster.

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

Reply via email to