tianshilei1992 marked an inline comment as done.
tianshilei1992 added inline comments.

================
Comment at: 
openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp:184
+
+  auto AddStream =
+      [&](size_t Task,
----------------
jdoerfert wrote:
> jhuber6 wrote:
> > tianshilei1992 wrote:
> > > jhuber6 wrote:
> > > > tianshilei1992 wrote:
> > > > > jhuber6 wrote:
> > > > > > tianshilei1992 wrote:
> > > > > > > Is there any way that we don't write it to a file here?
> > > > > > Why do we need to invoke LTO here? I figured that we could call the 
> > > > > > backend directly since we have no need to actually link any filies, 
> > > > > > and we may not have a need to run more expensive optimizations when 
> > > > > > the bitcode is already optimized. If you do that then you should be 
> > > > > > able to just use a `raw_svector_ostream` as your output stream and 
> > > > > > get the compiled output written to that buffer.
> > > > > For the purpose of this basic JIT support, we indeed just need 
> > > > > backend. However, since we have the plan for super optimization, 
> > > > > etc., having an optimization pipeline here is also useful.
> > > > We should be able to configure our own optimization pipeline in that 
> > > > case, we might want the extra control as well.
> > > which means we basically rewrite the function `opt` and `backend` in 
> > > `LTO.cpp`. I thought about just invoking backend before, especially using 
> > > LTO requires us to build the resolution table. However, after a second 
> > > thought, I think it would be better to just use LTO.
> > Building the passes isn't too complicated, it would take up the same amount 
> > of space as the symbol resolutions and has the advantage that we don't need 
> > to write the output to a file. I could write an implementation for this to 
> > see how well it works.
> Agreed. We can test it in a follow up and decide then.
I already switched to build the pipeline ourselves and drop LTO.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139287/new/

https://reviews.llvm.org/D139287

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to